LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Crystal Wood" <oss@buserror.net>, <linuxppc-dev@lists.ozlabs.org>
Cc: Bernhard Beschow <shentey@gmail.com>,
	qemu-ppc@nongnu.org, Laurentiu Tudor <laurentiu.tudor@nxp.com>
Subject: Re: [RFC PATCH] Disable Book-E KVM support?
Date: Thu, 01 Dec 2022 16:06:16 +1000	[thread overview]
Message-ID: <COQ97E42D81J.FQM2WRVT7HIY@bobo> (raw)
In-Reply-To: <3d1a6cde6c8e108be77fa4a47666e14d06a91d74.camel@buserror.net>

On Thu Dec 1, 2022 at 6:45 AM AEST, Crystal Wood wrote:
> On Mon, 2022-11-28 at 14:36 +1000, Nicholas Piggin wrote:
> > BookE KVM is in a deep maintenance state, I'm not sure how much testing
> > it gets. I don't have a test setup, and it does not look like QEMU has
> > any HV architecture enabled. It hasn't been too painful but there are
> > some cases where it causes a bit of problem not being able to test, e.g.,
> > 
> > https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-November/251452.html
> > 
> > Time to begin removal process, or are there still people using it? I'm
> > happy to to keep making occasional patches to try keep it going if
> > there are people testing upstream. Getting HV support into QEMU would
> > help with long term support, not sure how big of a job that would be.
>
> Not sure what you mean about QEMU not having e500 HV support?  I don't know if
> it's bitrotted, but it's there.
>
> I don't know whether anyone is still using this, but if they are, it's
> probably e500mc and not e500v2 (which involved a bunch of hacks to get almost-
> sorta-usable performance out of hardware not designed for virtualization).  I
> do see that there have been a few recent patches on QEMU e500 (beyond the
> treewide cleanup type stuff), though I don't know if they're using KVM.  CCing
> them and the QEMU list.

Well I could be wrong about it, but it doesn't look it implements LPIDR
or GSPRs. The only use of MSR_GS seems to be a couple of places
including an instruction that aborts because no HV implementation. It
does have an MMU index selector but before d764184ddb22 that apparently
didn't really work.

QEMU probably should be able to run BookE KVM in PR mode at least.

> I have an e6500 I could occasionally test on, if it turns out people do still
> care about this.  Don't count me as the use case, though. :-)

Do you have a KVM setup on it? And it works with recentish upstream?

> FWIW, as far as the RECONCILE_IRQ_STATE issue, that used to be done in
> kvmppc_handle_exit(), but was moved in commit 9bd880a2c882 to be "cleaner and
> faster". :-P

Yeah that was probably reasonable at the time, that was the common way
to do it and thie patch avoids an unnecessary expensive write to MSR
(which my patch retains).

I think it must have always clobbered r4 though. It's possible it wasn't
tested with the right build option, or the right tracer active, or maybe
the call was simple enough that it was lucky and the compiler didn't use
r4. Easy bug to miss when it's not obvious that macro can call into C.

Thanks,
Nick

  reply	other threads:[~2022-12-01  6:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28  4:36 [RFC PATCH] Disable Book-E KVM support? Nicholas Piggin
2022-11-30 20:45 ` Crystal Wood
2022-12-01  6:06   ` Nicholas Piggin [this message]
2022-12-01 11:23     ` Bernhard Beschow
2022-12-02 11:04   ` Daniel Henrique Barboza
2022-12-02 11:38     ` Cédric Le Goater
  -- strict thread matches above, loose matches on Subject: below --
2022-12-04 11:33 Christian Zigotzky
2022-12-04 12:23 ` Christian Zigotzky
2022-12-06  7:11 ` Nicholas Piggin

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=COQ97E42D81J.FQM2WRVT7HIY@bobo \
    --to=npiggin@gmail.com \
    --cc=laurentiu.tudor@nxp.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=oss@buserror.net \
    --cc=qemu-ppc@nongnu.org \
    --cc=shentey@gmail.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