qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Dennis Clarke <dclarke@blastwave.org>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	qemu-ppc <qemu-ppc@nongnu.org>, "Cédric Le Goater" <clg@kaod.org>
Subject: Re: [PATCH-for-5.0?] target/ppc: Fix TCG temporary leaks in gen_slbia()
Date: Tue, 21 Apr 2020 10:49:46 +1000	[thread overview]
Message-ID: <20200421004946.GB52174@umbus.fritz.box> (raw)
In-Reply-To: <dcf67e87-da27-68ee-0dd8-5b94edb84291@blastwave.org>

[-- Attachment #1: Type: text/plain, Size: 2872 bytes --]

On Mon, Apr 20, 2020 at 10:53:48PM +0000, Dennis Clarke wrote:
> On 4/20/20 6:56 PM, Peter Maydell wrote:
> > On Fri, 17 Apr 2020 at 10:08, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> > > 
> > > This fixes:
> > > 
> > >    $ qemu-system-ppc64 \
> > >    -machine pseries-4.1 -cpu power9 \
> > >    -smp 4 -m 12G -accel tcg ...
> > >    ...
> > >    Quiescing Open Firmware ...
> > >    Booting Linux via __start() @ 0x0000000002000000 ...
> > >    Opcode 1f 12 0f 00 (7ce003e4) leaked temporaries
> > >    Opcode 1f 12 0f 00 (7ce003e4) leaked temporaries
> > >    Opcode 1f 12 0f 00 (7ce003e4) leaked temporaries
> > > 
> > > [*] https://www.mail-archive.com/qemu-discuss@nongnu.org/msg05400.html
> > > 
> > > Fixes: 0418bf78fe8 ("Fix ISA v3.0 (POWER9) slbia implementation")
> > > Reported-by: Dennis Clarke <dclarke@blastwave.org>
> > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > 
> > I propose to apply this patch for 5.0 rc4 (as well as the
> > ppc pullreq already sent), since the iscsi bugfix means
> > we need an rc4 anyway. Any objections?
> > 
> 
> I have been running rc3 with this patch fine for some days now.  Both with
> and without a debug enabled build wherein the performance difference between
> the two is obvious.
> 
> However, I do see warnings from 5.0.0-rc3 that worry me :
> 
> $ /usr/local/bin/qemu-system-ppc64 \
> > -machine pseries-4.1 -cpu power9 -smp 4 -m 12G -accel tcg \
> > -drive file=/home/ppc64/ppc64le.qcow2 \
> > -device virtio-net-pci,netdev=usernet \
> > -netdev user,id=usernet,hostfwd=tcp::10000-:22 \
> > -serial stdio -display none -vga none
> qemu-system-ppc64: warning: TCG doesn't support requested feature,
> cap-cfpc=workaround
> qemu-system-ppc64: warning: TCG doesn't support requested feature,
> cap-sbbc=workaround
> qemu-system-ppc64: warning: TCG doesn't support requested feature,
> cap-ibs=workaround

These are completely unrelated to the slbia patch.

[snip]
> etc etc etc
> 
> What shall I do with "TCG doesn't support requested feature,
> cap-cfpc=workaround" ??

Ignore them, probably.  It means your TCG guest is insecure against
Spectre attacks, but it was always going to be one way or another.

You can suppress them with:
    -machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken

That doesn't make anything more secure, it just lets qemu know that's
what you intended, and in turn it will tell the guest that these
mitigations are not available.

These are enabled by default, because they're very important for
production KVM guests.  However, doing equivalent Spectre mitigation
for TCG is essentially infeasible.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-04-21  0:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17  9:07 [PATCH-for-5.0?] target/ppc: Fix TCG temporary leaks in gen_slbia() Philippe Mathieu-Daudé
2020-04-17 10:51 ` Nicholas Piggin
2020-04-17 11:00   ` Philippe Mathieu-Daudé
2020-04-18 10:45     ` Nicholas Piggin
2020-04-17 12:46 ` Cédric Le Goater
2020-04-20 18:56 ` Peter Maydell
2020-04-20 22:53   ` Dennis Clarke
2020-04-21  0:49     ` David Gibson [this message]
2020-04-21  7:17     ` Philippe Mathieu-Daudé
2020-04-21 16:07       ` Dennis Clarke
2020-04-21  0:31   ` David Gibson
2020-04-21  9:29     ` Peter Maydell

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=20200421004946.GB52174@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@kaod.org \
    --cc=dclarke@blastwave.org \
    --cc=f4bug@amsat.org \
    --cc=npiggin@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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).