xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/3] x86/HVM: support (emulate) UMIP
Date: Wed, 7 Dec 2016 10:10:18 -0500	[thread overview]
Message-ID: <ac5572a3-a4ba-039c-7dd6-a0eb686194ed@oracle.com> (raw)
In-Reply-To: <584800A302000078001262BA@prv-mh.provo.novell.com>

On 12/07/2016 06:29 AM, Jan Beulich wrote:
>>>> On 06.12.16 at 17:23, <boris.ostrovsky@oracle.com> wrote:
>> On 12/06/2016 06:44 AM, Jan Beulich wrote:
>>> --- a/xen/arch/x86/cpuid.c
>>> +++ b/xen/arch/x86/cpuid.c
>>> @@ -154,6 +154,13 @@ static void __init calculate_hvm_feature
>>>      __set_bit(X86_FEATURE_APIC, hvm_featureset);
>>>  
>>>      /*
>>> +     * Xen can often provide UMIP emulation to HVM guests even if the host
>>> +     * doesn't have such functionality.
>>> +     */
>>> +    if ( cpu_has_vmx_dt_exiting || cpu_has_svm )
>>> +        __set_bit(X86_FEATURE_UMIP, hvm_featureset);
>> I don't think I understand how this is going to work for processors that
>> don't support UMIP.
>>
>> How, for example, can guest_cr[4] have X86_CR4_UMIP set on these
>> processors when CPUID will not show the feature being there?
> What we allow the guest to see and what we store into hardware
> registers are two different things: Note how svm_update_guest_cr()
> masks off X86_CR4_UMIP from the vale to be put into the VMCB.

So that was kind of my question --- why would a guest ever try to set
this bit? As far as it is concerned, UMIP is not available and the guest
is then trying to set an unsupported bit in cr4. And that should result
in a #GP.

-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-12-07 15:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 11:35 [PATCH 0/3] x86/HVM: misc improvements Jan Beulich
2016-12-06 11:43 ` [PATCH 1/3] x86/HVM: introduce hvm_get_cpl() and respective hook Jan Beulich
2016-12-06 12:16   ` Razvan Cojocaru
2016-12-06 13:49   ` Andrew Cooper
2016-12-06 14:07     ` Jan Beulich
2016-12-06 14:10       ` Andrew Cooper
2016-12-06 15:49   ` Boris Ostrovsky
2016-12-07  6:21   ` Tian, Kevin
2016-12-13  8:45   ` Ping: " Jan Beulich
2016-12-13  9:33     ` Tim Deegan
2016-12-06 11:44 ` [PATCH 2/3] x86/HVM: support (emulate) UMIP Jan Beulich
2016-12-06 14:47   ` Andrew Cooper
2016-12-06 14:55     ` Jan Beulich
2016-12-06 14:57       ` Andrew Cooper
2016-12-08 12:20     ` Jan Beulich
2016-12-09 18:42       ` Andrew Cooper
2016-12-06 16:23   ` Boris Ostrovsky
2016-12-07 11:29     ` Jan Beulich
2016-12-07 15:10       ` Boris Ostrovsky [this message]
2016-12-07 15:14         ` Jan Beulich
2016-12-07 15:31           ` Boris Ostrovsky
2016-12-07 15:39             ` Jan Beulich
2016-12-07 16:06               ` Andrew Cooper
2016-12-08  8:20                 ` Tian, Kevin
2016-12-26  3:56                 ` Suravee Suthikulpanit
2016-12-06 11:45 ` [PATCH 3/3] x86/HVM: prefer structure assignment for seg reg copying Jan Beulich
2016-12-06 11:47   ` Paul Durrant
2016-12-06 13:55   ` Andrew Cooper
2016-12-06 16:25   ` 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=ac5572a3-a4ba-039c-7dd6-a0eb686194ed@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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).