mbox series

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

Message ID 20230727073134.134102-1-akihiko.odaki@daynix.com (mailing list archive)
Headers show
Series accel/kvm: Specify default IPA size for arm64 | expand

Message

Akihiko Odaki July 27, 2023, 7:31 a.m. UTC
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(-)

Comments

Peter Maydell Aug. 4, 2023, 5:41 p.m. UTC | #1
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
Peter Maydell Aug. 7, 2023, 3:27 p.m. UTC | #2
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