linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huacai Chen <chenhuacai@kernel.org>
To: Yu Zhao <yuzhao@google.com>
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 14:24:32 +0800	[thread overview]
Message-ID: <CAAhV-H73BgeU=Vw+X+R+1pTrbZb_y9WLy66iu9=d3SXXeD0SBw@mail.gmail.com> (raw)
In-Reply-To: <20230629000729.1223067-1-yuzhao@google.com>

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.

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

  reply	other threads:[~2023-06-29  6:24 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 [this message]
2023-06-29  8:54       ` Yu Zhao
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='CAAhV-H73BgeU=Vw+X+R+1pTrbZb_y9WLy66iu9=d3SXXeD0SBw@mail.gmail.com' \
    --to=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 \
    --cc=yuzhao@google.com \
    /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).