All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: keir@xen.org, eddie.dong@intel.com,
	stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, xen-devel@lists.xen.org,
	jun.nakajima@intel.com, yang.z.zhang@intel.com,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v5 1/4] xen/libxc: Allow changes to hypervisor CPUID leaf from config file
Date: Wed, 19 Mar 2014 09:29:27 +0000	[thread overview]
Message-ID: <1395221367.10203.10.camel@kazak.uk.xensource.com> (raw)
In-Reply-To: <532970D50200007800125943@nat28.tlf.novell.com>

On Wed, 2014-03-19 at 09:26 +0000, Jan Beulich wrote:
> >>> On 19.03.14 at 01:58, Boris Ostrovsky <boris.ostrovsky@oracle.com> wrote:
> > Currently only "real" cpuid leaves can be overwritten by users via
> > 'cpuid' option in the configuration file. This patch provides ability to
> > do the same for hypervisor leaves (but for now only 0x40000000 is allowed).
> 
> I'm still not really happy with the approach:
> 
> > --- a/xen/arch/x86/traps.c
> > +++ b/xen/arch/x86/traps.c
> > @@ -690,6 +690,9 @@ int cpuid_hypervisor_leaves( uint32_t idx, uint32_t sub_idx,
> >      if ( idx > limit ) 
> >          return 0;
> >  
> > +    if ( domain_cpuid_exists(d, base + idx, sub_idx, eax, ebx, ecx, edx) )
> > +        return 1;
> 
> You basically rely here on the tools having fed back the values the
> hypervisor returned to them. What if this gets tweaked at some
> point based on some other domain characteristics? I'd really like to
> see the hypervisor, and only the hypervisor, being in charge of
> returning the hypervisor leaf values. The sole restriction the tools
> may place ought to be on the maximum leaf.

That does sound like it would simplify things.

> Sadly I didn't see anyone else commenting on this model of yours,
> so I can't judge whether I'm the only one having reservations
> against the model you have been proposing so far.

Well, the libxc side is certainly very complicated if all which is
needed is the ability to limit the maximum hypervisor leaf which is
exposed. That ought to be a dozen lines max across tools and hypervisor
I would have said.

Ian.

  reply	other threads:[~2014-03-19  9:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19  0:58 [PATCH v5 0/4] Expose HW APIC virtualization support to HVM guests Boris Ostrovsky
2014-03-19  0:58 ` [PATCH v5 1/4] xen/libxc: Allow changes to hypervisor CPUID leaf from config file Boris Ostrovsky
2014-03-19  9:26   ` Jan Beulich
2014-03-19  9:29     ` Ian Campbell [this message]
2014-03-19 14:26       ` Boris Ostrovsky
2014-03-19  9:27   ` Ian Campbell
2014-03-19  9:32     ` Jan Beulich
2014-03-19  9:52       ` Ian Campbell
2014-03-19 10:06         ` Jan Beulich
2014-03-19 10:39           ` Ian Campbell
2014-03-19 11:44             ` Jan Beulich
2014-03-19 12:02               ` Ian Campbell
2014-03-19 14:41     ` Boris Ostrovsky
2014-03-20  9:25       ` Ian Campbell
2014-03-20 13:50         ` Boris Ostrovsky
2014-03-19  0:58 ` [PATCH v5 2/4] x86/hvm: Revert 80ecb40362365ba77e68fc609de8bd3b7208ae19 Boris Ostrovsky
2014-03-19  0:58 ` [PATCH v5 3/4] x86/hvm: Add HVM-specific hypervisor CPUID leaf Boris Ostrovsky
2014-03-19  0:58 ` [PATCH v5 4/4] x86/hvm: Indicate avaliability of HW support of APIC virtualization to HVM guests Boris Ostrovsky

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=1395221367.10203.10.camel@kazak.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=eddie.dong@intel.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yang.z.zhang@intel.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.