qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] hw/arm/virt: Improve virt_kvm_type()
@ 2024-08-09  3:51 Gavin Shan
  2024-08-09  3:51 ` [PATCH 1/4] hw/arm/virt: hide virt_kvm_type() on !CONFIG_KVM Gavin Shan
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Gavin Shan @ 2024-08-09  3:51 UTC (permalink / raw)
  To: qemu-arm
  Cc: qemu-devel, peter.maydell, pbonzini, philmd, richard.henderson,
	shan.gavin

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(-)

-- 
2.45.2



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-08-09 10:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-09  3:51 [PATCH 0/4] hw/arm/virt: Improve virt_kvm_type() Gavin Shan
2024-08-09  3:51 ` [PATCH 1/4] hw/arm/virt: hide virt_kvm_type() on !CONFIG_KVM Gavin Shan
2024-08-09  9:00   ` Peter Maydell
2024-08-09  9:39     ` Gavin Shan
2024-08-09  3:51 ` [PATCH 2/4] hw/arm/virt: Avoid multiple lines of comments in virt_kvm_type() Gavin Shan
2024-08-09  3:51 ` [PATCH 3/4] hw/arm/virt: Use kvm_arch_get_default_type() Gavin Shan
2024-08-09  8:59   ` Peter Maydell
2024-08-09  9:58     ` Gavin Shan
2024-08-09 10:01   ` Gavin Shan
2024-08-09  3:51 ` [PATCH 4/4] target/arm/kvm: Remove kvm_arm_get_max_vm_ipa_size() Gavin Shan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).