Skip to content

hw/arm/virt: Improve virt_kvm_type()

Gavin Shan qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4hw/arm/virt: hide virt_kvm_type() on !CONFIG_KVMhw/arm/virt.c+4 -02 replies
2/4hw/arm/virt: Avoid multiple lines of comments in virt_kvm_type()hw/arm/virt.c+1 -30 replies
3/4hw/arm/virt: Use kvm_arch_get_default_type()hw/arm/virt.c target/arm/kvm.c target/arm/kvm_arm.h+7 -243 replies
4/4target/arm/kvm: Remove kvm_arm_get_max_vm_ipa_size()target/arm/kvm.c+2 -110 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/4] hw/arm/virt: Improve virt_kvm_type()

hw/arm/virt.c::virt_kvm_type() can be improved due to the facts as below, when I inspect the code to review Salil's (RFCv3) vCPU hotplug series.

* virt_kvm_type() and MachineClass::kvm_type() are needed only when CONFIG_KVM is enabled.

* kvm_arm_get_max_vm_ipa_size() and kvm_arch_get_default_type() are generally interchangeable with the exception that type zero is corresponding to IPA size (bits) 40. So it's unecessary to keep both APIs.

Lets clean it up so that kvm_arm_get_max_vm_ipa_size() is eventually removed. kvm_arch_get_default_type() is used to get the KVM type and IPA size (bits).

Gavin Shan (4):
hw/arm/virt: hide virt_kvm_type() on !CONFIG_KVM hw/arm/virt: Avoid multiple lines of comments in virt_kvm_type() hw/arm/virt: Use kvm_arch_get_default_type() target/arm/kvm: Remove kvm_arm_get_max_vm_ipa_size()

 hw/arm/virt.c        | 22 +++++++++++-----------
 target/arm/kvm.c     | 13 ++-----------
 target/arm/kvm_arm.h | 15 ---------------
 3 files changed, 13 insertions(+), 37 deletions(-)
Signature · 1 line
2.45.2