All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: Only set PCR in kvm if actually in a compat mode
Date: Tue, 8 Aug 2017 11:21:24 +0200	[thread overview]
Message-ID: <20170808112124.78b86b01@bahia.lan> (raw)
In-Reply-To: <20170808062106.GC25081@umbus.fritz.box>

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

On Tue, 8 Aug 2017 16:21:06 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:
[...]
> > > > 
> > > > Does it make sense at all to use compat mode with KVM_PR since it
> > > > requires hypervisor privilege, that we're supposed not to have ?    
> > > 
> > > Uh.. what?  Availability of the PCR is a question of the guest
> > > environment, and PR (at least potentially) supports various different
> > > guest environments, both with and without (apparent) hypervisor
> > > capability.
> > >   
> > 
> > I mean mtpcr/mfpcr only work when the CPU is in hypervisor state, and PR
> > is supposed to be *mostly* used nested, ie, without hypervisor
> > privilege.  
> 
> It tends to be used that way, but it doesn't have to be.
> 
> > Thus, I don't see the point in implementing PPC_ARCH_COMPAT in PR... but
> > I'm probably missing something :)  
> 
> Well, qemu expects to be able to set ARCH_COMPAT for a pseries guest,
> if that guest is going into a compatibility mode (which it usually
> does these days).  We don't want userspace to have to be constantly
> checking which KVM implementation its working against, so it makes
> sense for PR to implement the call, even if it's a no-op because it
> can't really implement the PCR fully.
> 

Thanks for the explanation!

> >   
> > > > Shouldn't we check for kvm_get_one_reg(KVM_REG_PPC_ARCH_COMPAT) and
> > > > don't try to do any compat stuff if it isn't supported ? This would
> > > > include exiting QEMU if max-cpu-compat was passed on the cmdline.    
> > > 
> > > Oh.. right.. that's actually what I meant by setting the PCR.  PCR
> > > setting from the userspace side via PPC_ARCH_COMPAT, rather than PCR
> > > setting from the guest side.
> > >   
> 
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2017-08-08  9:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29  4:59 [Qemu-devel] [PATCH] target/ppc: Only set PCR in kvm if actually in a compat mode Suraj Jitindar Singh
2017-06-30  4:03 ` David Gibson
2017-07-03  3:18   ` Suraj Jitindar Singh
2017-07-03  9:20     ` David Gibson
2017-07-12  6:45       ` Suraj Jitindar Singh
2017-07-13  1:21         ` David Gibson
2017-08-03 17:28           ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-08-04  2:35             ` David Gibson
2017-08-07  9:00               ` Greg Kurz
2017-08-08  6:21                 ` David Gibson
2017-08-08  9:21                   ` Greg Kurz [this message]
2017-07-06 23:49 ` [Qemu-devel] " no-reply
2017-07-07  0:03   ` Fam Zheng

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=20170808112124.78b86b01@bahia.lan \
    --to=groug@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sjitindarsingh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.