All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Ian Campbell <Ian.Campbell@citrix.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:32:38 +0000	[thread overview]
Message-ID: <532972460200007800125962@nat28.tlf.novell.com> (raw)
In-Reply-To: <1395221220.10203.8.camel@kazak.uk.xensource.com>

>>> On 19.03.14 at 10:27, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Tue, 2014-03-18 at 20:58 -0400, Boris Ostrovsky 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).
>> 
>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> ---
>>  tools/libxc/xc_cpuid_x86.c   |   71 
> ++++++++++++++++++++++++++++++++++++++++--
>>  xen/arch/x86/domain.c        |   19 +++++++++--
>>  xen/arch/x86/traps.c         |    3 ++
>>  xen/include/asm-x86/domain.h |    7 +++++
>>  4 files changed, 95 insertions(+), 5 deletions(-)
>> 
>> diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
>> index bbbf9b8..5501d5b 100644
>> --- a/tools/libxc/xc_cpuid_x86.c
>> +++ b/tools/libxc/xc_cpuid_x86.c
>> @@ -33,6 +33,8 @@
>>  #define DEF_MAX_INTELEXT  0x80000008u
>>  #define DEF_MAX_AMDEXT    0x8000001cu
>>  
>> +#define IS_HYPERVISOR_LEAF(idx) (((idx) & 0xffff0000) == 0x40000000)
> 
> Not idx == 0x40000000?
> 
> Also as I think Jan said before if viridian support is enabled then the
> Xen leaves may be elsewhere (at 0x100 increments above that address
> IIRC).

But that's exactly why the low 16 bits should be masked off in
above comparison.

Jan

  reply	other threads:[~2014-03-19  9:32 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
2014-03-19 14:26       ` Boris Ostrovsky
2014-03-19  9:27   ` Ian Campbell
2014-03-19  9:32     ` Jan Beulich [this message]
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=532972460200007800125962@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Campbell@citrix.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.