From: Yu Zhao <yuzhao@google.com>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: pbonzini@redhat.com, chenhuacai@loongson.cn,
jiaxun.yang@flygoat.com, kvm@vger.kernel.org,
linux-mips@vger.kernel.org, stable@vger.kernel.org,
tsbogend@alpha.franken.de
Subject: Re: [PATCH] MIPS: KVM: Fix NULL pointer dereference
Date: Thu, 29 Jun 2023 02:54:49 -0600 [thread overview]
Message-ID: <CAOUHufYHANwC-YZ0W5D89spuA693-PKnZ+9JwkNEN05AagUETw@mail.gmail.com> (raw)
In-Reply-To: <CAAhV-H73BgeU=Vw+X+R+1pTrbZb_y9WLy66iu9=d3SXXeD0SBw@mail.gmail.com>
On Thu, Jun 29, 2023 at 12:24 AM Huacai Chen <chenhuacai@kernel.org> wrote:
>
> Hi, Zhao,
>
> On Thu, Jun 29, 2023 at 8:07 AM Yu Zhao <yuzhao@google.com> wrote:
> >
> > On Mon, Jun 26, 2023 at 6:33 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
> > >
> > > On Mon, Jun 26, 2023 at 9:59 AM Huacai Chen <chenhuacai@loongson.cn> 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@redhat.com>
> > 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@google.com/
> My testbed is Loongson-3A4000 host + Loongson-3A4000 guest + Qemu8.0,
> both TCG and KVM works.
I tried TCG too, as reported in the link above, and had no luck.
> 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.
Good to know. Thanks.
> 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.
I fully understand :) I was trying to point out that QEMU/KVM had been
broken for over 2 years -- neither TE (removed from KVM) nor VZ works
with 7.2, which is probably why you used 8.0 too -- until that commit
*accidentally* fixed VZ (it was supposed to be a cleanup, not a fix).
next prev parent reply other threads:[~2023-06-29 8:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 7:49 [PATCH] MIPS: KVM: Fix NULL pointer dereference Huacai Chen
2023-06-26 10:28 ` Philippe Mathieu-Daudé
2023-06-28 7:34 ` Huacai Chen
2023-06-26 10:33 ` Paolo Bonzini
2023-06-26 12:44 ` Huacai Chen
2023-06-29 0:07 ` Yu Zhao
2023-06-29 6:24 ` Huacai Chen
2023-06-29 8:54 ` Yu Zhao [this message]
2023-06-29 14:58 ` Jiaxun Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOUHufYHANwC-YZ0W5D89spuA693-PKnZ+9JwkNEN05AagUETw@mail.gmail.com \
--to=yuzhao@google.com \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=stable@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).