qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] pseries: Correct vmx/dfp handling in both KVM and TCG cases
Date: Fri, 21 Oct 2011 16:06:14 +1100	[thread overview]
Message-ID: <20111021050614.GA24434@truffala.fritz.box> (raw)
In-Reply-To: <2B3B4C66-9DF4-4CB1-876D-AF917D716D42@suse.de>

On Thu, Oct 20, 2011 at 07:40:00PM -0700, Alexander Graf wrote:
> On 20.10.2011, at 17:41, David Gibson <david@gibson.dropbear.id.au> wrote:
> > On Thu, Oct 20, 2011 at 10:12:51AM -0700, Alexander Graf wrote:
> >> On 17.10.2011, at 21:15, David Gibson wrote:
[snip]
> > So, I really don't follow what the logic you want is.  It sounds more
> > like what I have already, so I'm not sure how -cpu host comes into
> > this.
> 
> Well, I want something very simple, layered:
> 
> -cpu host only searches for pvr matches and selects a different CPU
> -type based on this

Hrm, ok, well I can do this if you like, but note that this is quite
different from how -cpu host behaves on x86.  There it builds the CPU
spec from scratch based on querying the host cpuid, rather than
selecting from an existing list of cpus.  I selected from the existing
table based on host PVR because that was the easiest source for some
of the info in the cpu_spec, but my intention was that anything we
_can_ query directly from the host would override the table.

It seems to be your approach is giving up on the possibility of
allowing -cpu host to work (and give you full access to the host
features) when qemu doesn't recognize the precise PVR of the host cpu.

This gets further complicated in the case of the w-i-p patch I have to
properly advertise page sizes, where it's not just presence or absence
of a feature, but the specific SLB and HPTE encodings must be
advertised to the guest.

> We have 2 masks of available flags: TCG emulatable flags and KVM
> virtualizable flags. The KVM flags need to be generated dynamically,
> from the host dt for now. TCG flags are constant.
> 
> Then we always AND the inst feature bits with the mask. This tells
> every other layer what features are available. That way even running
> -cpu G5 on a p7 works properly by not exposing DFP for example.

That case was already fine.

Are you suggesting doing the AND in the per-machine code (so, as we
build the guest dt in the spapr case) or when we build the env->insn_flags
from the spec->insn_flags?

> 
> Based on the inst feature bits we now expose features in the guest dt.
> 
> 
> Simple, eh? :)
> 
> Alex
> 
> > 
> 

-- 
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

  reply	other threads:[~2011-10-21  5:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18  4:15 [Qemu-devel] [PATCH] pseries: Correct vmx/dfp handling in both KVM and TCG cases David Gibson
2011-10-20 17:12 ` Alexander Graf
2011-10-21  0:41   ` [Qemu-devel] [Qemu-ppc] " David Gibson
2011-10-21  2:40     ` Alexander Graf
2011-10-21  5:06       ` David Gibson [this message]
2011-10-21  6:49         ` Alexander Graf
2011-10-24  5:29           ` David Gibson
2011-10-24 17:25             ` Alexander Graf
2011-10-24 17:55               ` Alexander Graf
2011-10-24 17:59                 ` Alexander Graf
2011-10-24 23:08                   ` David Gibson
2011-10-24 23:43                     ` Alexander Graf
2011-10-25  0:09                       ` David Gibson
2011-10-25  1:20                         ` Alexander Graf
2011-10-24 23:11               ` David Gibson

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=20111021050614.GA24434@truffala.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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).