[PATCH v5 0/6] accel/kvm: Specify default IPA size for arm64

Akihiko Odaki posted 6 patches 9 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230727073134.134102-1-akihiko.odaki@daynix.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Huacai Chen <chenhuacai@kernel.org>, Jiaxun Yang <jiaxun.yang@flygoat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Marcelo Tosatti <mtosatti@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Nicholas Piggin <npiggin@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Weiwei Li <liweiwei@iscas.ac.cn>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>
include/sysemu/kvm.h     |  2 ++
target/mips/kvm_mips.h   |  9 ---------
accel/kvm/kvm-all.c      | 19 +++++++++++--------
hw/arm/virt.c            |  2 +-
hw/mips/loongson3_virt.c |  2 --
hw/ppc/spapr.c           |  2 +-
target/arm/kvm.c         |  7 +++++++
target/i386/kvm/kvm.c    |  5 +++++
target/mips/kvm.c        |  3 ++-
target/ppc/kvm.c         |  5 +++++
target/riscv/kvm.c       |  5 +++++
target/s390x/kvm/kvm.c   |  5 +++++
12 files changed, 44 insertions(+), 22 deletions(-)
[PATCH v5 0/6] accel/kvm: Specify default IPA size for arm64
Posted by Akihiko Odaki 9 months, 1 week ago
Some Arm systems such as Apple Silicon Macs have IPA size smaller than the
default used by KVM. Introduce our own default IPA size that fits on such a
system.

When reviewing this series, Philippe Mathieu-Daudé found the error handling
around KVM type decision logic is flawed so I added a few patches for fixing
the error handling path.

V4 -> V5: Fixed KVM type error handling
V3 -> V4: Removed an inclusion of kvm_mips.h that is no longer needed.
V2 -> V3: Changed to use the maximum IPA size as the default.
V1 -> V2: Introduced an arch hook

Akihiko Odaki (6):
  kvm: Introduce kvm_arch_get_default_type hook
  accel/kvm: Specify default IPA size for arm64
  mips: Report an error when KVM_VM_MIPS_VZ is unavailable
  accel/kvm: Use negative KVM type for error propagation
  accel/kvm: Free as when an error occurred
  accel/kvm: Make kvm_dirty_ring_reaper_init() void

 include/sysemu/kvm.h     |  2 ++
 target/mips/kvm_mips.h   |  9 ---------
 accel/kvm/kvm-all.c      | 19 +++++++++++--------
 hw/arm/virt.c            |  2 +-
 hw/mips/loongson3_virt.c |  2 --
 hw/ppc/spapr.c           |  2 +-
 target/arm/kvm.c         |  7 +++++++
 target/i386/kvm/kvm.c    |  5 +++++
 target/mips/kvm.c        |  3 ++-
 target/ppc/kvm.c         |  5 +++++
 target/riscv/kvm.c       |  5 +++++
 target/s390x/kvm/kvm.c   |  5 +++++
 12 files changed, 44 insertions(+), 22 deletions(-)

-- 
2.41.0


Re: [PATCH v5 0/6] accel/kvm: Specify default IPA size for arm64
Posted by Peter Maydell 9 months ago
On Thu, 27 Jul 2023 at 08:31, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>
> Some Arm systems such as Apple Silicon Macs have IPA size smaller than the
> default used by KVM. Introduce our own default IPA size that fits on such a
> system.
>
> When reviewing this series, Philippe Mathieu-Daudé found the error handling
> around KVM type decision logic is flawed so I added a few patches for fixing
> the error handling path.
>
> V4 -> V5: Fixed KVM type error handling
> V3 -> V4: Removed an inclusion of kvm_mips.h that is no longer needed.
> V2 -> V3: Changed to use the maximum IPA size as the default.
> V1 -> V2: Introduced an arch hook

Applied to target-arm-for-8.2 with an extra doc comment in patch 1;
thanks.

-- PMM
Re: [PATCH v5 0/6] accel/kvm: Specify default IPA size for arm64
Posted by Peter Maydell 8 months, 3 weeks ago
On Fri, 4 Aug 2023 at 18:41, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Thu, 27 Jul 2023 at 08:31, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
> >
> > Some Arm systems such as Apple Silicon Macs have IPA size smaller than the
> > default used by KVM. Introduce our own default IPA size that fits on such a
> > system.
> >
> > When reviewing this series, Philippe Mathieu-Daudé found the error handling
> > around KVM type decision logic is flawed so I added a few patches for fixing
> > the error handling path.
> >
> > V4 -> V5: Fixed KVM type error handling
> > V3 -> V4: Removed an inclusion of kvm_mips.h that is no longer needed.
> > V2 -> V3: Changed to use the maximum IPA size as the default.
> > V1 -> V2: Introduced an arch hook
>
> Applied to target-arm-for-8.2 with an extra doc comment in patch 1;
> thanks.

I also figured it would be good to tag the first 2 patches
for qemu-stable, so I'll do that as well.

thanks
-- PMM