Skip to content

target/arm: Add nested virtualization support

Haibo Xu qemu-arm qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/26 patches 18 repliesIn review
  2. v2 posting 1/26 patches 0 repliesSuperseded
  3. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Move the NV to a CPU feature flag(Andrea&Andrew)
- Add CPU feature 'el2' test(Andrew)

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Update linux header with new arm64 NV macrolinux-headers/asm-arm64/kvm.h linux-headers/linux/kvm.h+3 -00 replies
2/6target/arm/kvm: Add helper to detect el2 when using KVMtarget/arm/kvm64.c target/arm/kvm_arm.h+18 -01 reply
3/6target/arm/kvm: Add an option to turn on/off el2 supporttarget/arm/cpu.c target/arm/cpu.h target/arm/cpu64.c+67 -02 replies
4/6hw/intc/arm_gicv3: Enable support for setting vGIC maintenance IRQhw/arm/virt.c hw/intc/arm_gicv3_common.c hw/intc/arm_gicv3_kvm.c +1 more+23 -01 reply
5/6target/arm/cpu: Enable 'el2' to work with host/max cpuhw/arm/virt.c target/arm/cpu.c target/arm/cpu64.c +1 more+23 -54 replies
6/6target/arm: Add vCPU feature 'el2' test.target/arm/monitor.c tests/qtest/arm-cpu-features.c+10 -11 reply

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchAndrew Jones
1/6
2/6R-b
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH RESEND v2 0/6] target/arm: Add nested virtualization support

v2:
- Move the NV to a CPU feature flag(Andrea&Andrew)
- Add CPU feature 'el2' test(Andrew)

Many thanks to Andrea and Andrew for their comments!

This series add support for ARMv8.3/8.4 nested virtualization support in KVM mode. It's based on Marc Zyngier's kernel KVM patches[1], and has been tested on a FVP model to run a L2 guest with Qemu. Now the feature can be enabled by "-M virt,accel=kvm -cpu host,el2=on" when starting a VM.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/nv-5.12-WIP

Haibo Xu (6):
Update linux header with new arm64 NV macro target/arm/kvm: Add helper to detect el2 when using KVM target/arm/kvm: Add an option to turn on/off el2 support hw/intc/arm_gicv3: Enable support for setting vGIC maintenance IRQ target/arm/cpu: Enable 'el2' to work with host/max cpu target/arm: Add vCPU feature 'el2' test.

 hw/arm/virt.c                      | 19 ++++++++---
 hw/intc/arm_gicv3_common.c         |  1 +
 hw/intc/arm_gicv3_kvm.c            | 16 +++++++++
 include/hw/intc/arm_gicv3_common.h |  1 +
 linux-headers/asm-arm64/kvm.h      |  2 ++
 linux-headers/linux/kvm.h          |  1 +
 target/arm/cpu.c                   | 14 +++++++-
 target/arm/cpu.h                   |  4 +++
 target/arm/cpu64.c                 | 53 ++++++++++++++++++++++++++++++
 target/arm/kvm64.c                 | 15 +++++++++
 target/arm/kvm_arm.h               | 13 ++++++++
 target/arm/monitor.c               |  2 +-
 tests/qtest/arm-cpu-features.c     |  9 +++++
 13 files changed, 144 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.1