From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "Zhang, Yang Z" <yang.z.zhang@intel.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"keir.xen@gmail.com" <keir.xen@gmail.com>,
"JBeulich@suse.com" <JBeulich@suse.com>,
"White, Edmund H" <edmund.h.white@intel.com>
Subject: Re: [PATCH] Nested VMX: load current_vmcs only when it exists
Date: Fri, 9 May 2014 10:40:00 +0100 [thread overview]
Message-ID: <536CA270.5090105@citrix.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D125E6B2DF@SHSMSX101.ccr.corp.intel.com>
On 09/05/14 06:53, Tian, Kevin wrote:
>> From: Zhang, Yang Z
>> Sent: Friday, May 09, 2014 12:56 PM
>>
>> From: Yang Zhang <yang.z.zhang@Intel.com>
>>
>> There may not have valid vmcs on current CPU. So only load it when it exists.
>>
>> This original fixing is from Edmud <edmund.h.white@intel.com>.
>>
>> Signed-off-by: Edmund H White <edmund.h.white@intel.com>
>> Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
> Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
>> ---
>> xen/arch/x86/hvm/vmx/vmcs.c | 6 +++++-
>> 1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
>> index cc84ca2..7564895 100644
>> --- a/xen/arch/x86/hvm/vmx/vmcs.c
>> +++ b/xen/arch/x86/hvm/vmx/vmcs.c
>> @@ -824,8 +824,12 @@ void virtual_vmcs_enter(void *vvmcs)
>>
>> void virtual_vmcs_exit(void *vvmcs)
>> {
>> + struct vmcs_struct *cur = this_cpu(current_vmcs);
>> +
>> __vmpclear(pfn_to_paddr(domain_page_map_to_mfn(vvmcs)));
>> - __vmptrld(virt_to_maddr(this_cpu(current_vmcs)));
>> + if ( cur )
>> + __vmptrld(virt_to_maddr(cur));
>> +
>> }
>>
>> u64 virtual_vmcs_vmread(void *vvmcs, u32 vmcs_encoding)
>> --
>> 1.7.1
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-05-09 9:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 4:56 [PATCH] Nested VMX: load current_vmcs only when it exists Yang Zhang
2014-05-09 5:53 ` Tian, Kevin
2014-05-09 9:40 ` Andrew Cooper [this message]
2014-05-09 9:46 ` Jan Beulich
2014-05-09 16:30 ` White, Edmund H
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=536CA270.5090105@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=edmund.h.white@intel.com \
--cc=keir.xen@gmail.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xensource.com \
--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.