Re: [PATCH] MIPS: KVM: Fix NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Zhao,

On Thu, Jun 29, 2023 at 8:07 AM Yu Zhao <yuzhao@xxxxxxxxxx> wrote:
>
> On Mon, Jun 26, 2023 at 6:33 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> >
> > On Mon, Jun 26, 2023 at 9:59 AM Huacai Chen <chenhuacai@xxxxxxxxxxx> wrote:
> > >
> > > After commit 45c7e8af4a5e3f0bea4ac209 ("MIPS: Remove KVM_TE support") we
> > > get a NULL pointer dereference when creating a KVM guest:
> >
> > To be honest, a bug that needed 2 years to be reproduced is probably a
> > sign that KVM/MIPS has no users. Any objections to removing it
> > altogether?
>
> ACK:
> 1. It's still broken after this patch [1]. The most well-tested MIPS
>    distros, i.e., Debian/OpenWrt, have CONFIG_KVM=n. (The latter doesn't
>    even provide the QEMU package on MIPS.)
> 2. Burden on QEMU dev. There is no guarantee that QEMU would work with
>    KVM even if we could fix the kernel -- it actually does not until
>    v8.0 [1], which is by luck:
>
>    commit a844873512400fae6bed9e87694dc96ff2f15f39
>    Author: Paolo Bonzini <pbonzini@xxxxxxxxxx>
>    Date:   Sun Dec 18 01:06:45 2022 +0100
>
>        mips: Remove support for trap and emulate KVM
>
>        This support was limited to the Malta board, drop it.
>        I do not have a machine that can run VZ KVM, so I am assuming
>        that it works for -M malta as well.
>
>    (The latest Debian stable only ships v7.2.)
>
> [1] https://lore.kernel.org/r/ZI0R76Fx25Q2EThZ@xxxxxxxxxx/
My testbed is Loongson-3A4000 host + Loongson-3A4000 guest + Qemu8.0,
both TCG and KVM works.

Some thoughts:
1, I think your host is malta, but you cannot use a malta host to boot
a Loongson guest, at least their kernels use different page sizes.
2, commit a844873512400fae6bed9e87694dc96f remove the TE KVM, so if
you are trying VZ KVM (but it seems you are using TE KVM), it can
break nothing.

Huacai




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux