Skip to content

KVM: ARM: Get rid of hardcoded VGIC addresses

Christoffer Dall kvm 2 versions New

Get series with b4
b4 am 20121020141255.24046.20020.stgit@ubuntu

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v12 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3KVM: ARM: Check for overlaps of mapped io addressesarch/arm/kvm/mmu.c+7 -40 replies
2/3KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctlDocumentation/virtual/kvm/api.txt arch/arm/include/asm/kvm.h arch/arm/include/asm/kvm_mmu.h +4 more+124 -10 replies
3/3KVM: ARM: Defer parts of the vgic init until first KVM_RUNarch/arm/include/asm/kvm_vgic.h arch/arm/kvm/arm.c arch/arm/kvm/vgic.c+102 -270 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] KVM: ARM: Get rid of hardcoded VGIC addresses

We need a way to specify the address at which we expect VMs to access the interrupt controller (both the emulated distributor and the hardware interface supporting virtualization). User space should decide on this address as user space decides on an emulated board and loads a device tree describing these details directly to the guest.

We introduce a new ioctl, KVM_SET_DEVICE_ADDRESS, that lets user space provide a base address for a device based on exported device ids. For now, this is only supported for the ARM vgic. User space provides this address after creating the IRQ chip and KVM performs the required mappings for a VM on the first execution of a VCPU.

To avoid users mistakenly supplying overlapping io address ranges we check for existing mappings at io mappings for guests and explicitly raise an error if address space conflicts occur.

Changelog[2]:
- Check for page aligned addresses on vgic_set_devic_address
- Move vgic_cpu_base for host to vgic_hyp_init
- Fix irqchip_in_kernel to be VM-specific

---

Christoffer Dall (3):
KVM: ARM: Check for overlaps of mapped io addresses
KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl
KVM: ARM: Defer parts of the vgic init until first KVM_RUN

 Documentation/virtual/kvm/api.txt |   37 +++++++++++
 arch/arm/include/asm/kvm.h        |   13 ++++
 arch/arm/include/asm/kvm_mmu.h    |    2 +
 arch/arm/include/asm/kvm_vgic.h   |   28 +++++++--
 arch/arm/kvm/arm.c                |   41 ++++++++++++-
 arch/arm/kvm/mmu.c                |   11 ++-
 arch/arm/kvm/vgic.c               |  121 +++++++++++++++++++++++++++++++------
 include/linux/kvm.h               |    8 ++
 8 files changed, 231 insertions(+), 30 deletions(-)
Signature · 1 line
Signature