From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Haozhong Zhang <haozhong.zhang@intel.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Kevin Tian <kevin.tian@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Jan Beulich <jbeulich@suse.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 2/3] vvmx: return VMfail to L1 if L1 vmxon is executed in VMX operation
Date: Tue, 13 Dec 2016 10:16:40 -0500 [thread overview]
Message-ID: <20161213151640.GJ10029@char.us.oracle.com> (raw)
In-Reply-To: <20161213121620.22745-3-haozhong.zhang@intel.com>
On Tue, Dec 13, 2016 at 08:16:19PM +0800, Haozhong Zhang wrote:
> According to Intel SDM, section "VMXON - Enter VMX Operation", a
> VMfail should be returned to L1 hypervisor if L1 vmxon is executed in
> VMX operation, rather than just print a warning message.
The spec also says to return value 15? But I suppose that means
the TOOD in vmreturn should be implemented?
>
> Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
> ---
> xen/arch/x86/hvm/vmx/vvmx.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
> index f5637eb..b60d7f0 100644
> --- a/xen/arch/x86/hvm/vmx/vvmx.c
> +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> @@ -1397,9 +1397,12 @@ int nvmx_handle_vmxon(struct cpu_user_regs *regs)
> return rc;
>
> if ( nvmx_vcpu_in_vmx(v) )
> - gdprintk(XENLOG_WARNING,
> - "vmxon again: orig %"PRIpaddr" new %lx\n",
> - nvmx->vmxon_region_pa, gpa);
> + {
> + vmreturn(regs,
> + nvcpu->nv_vvmcxaddr != VMCX_EADDR ?
> + VMFAIL_VALID : VMFAIL_INVALID);
> + return X86EMUL_OKAY;
> + }
>
> nvmx->vmxon_region_pa = gpa;
>
> --
> 2.10.1
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-12-13 15:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 12:16 [PATCH 0/3] vvmx: fix L1 vmxon Haozhong Zhang
2016-12-13 12:16 ` [PATCH 1/3] vvmx: set vmxon_region_pa of vcpu out of VMX operation to an invalid address Haozhong Zhang
2016-12-13 14:35 ` Andrew Cooper
2016-12-13 15:06 ` Konrad Rzeszutek Wilk
2016-12-13 15:19 ` Jan Beulich
2016-12-13 15:21 ` Jan Beulich
2016-12-14 1:37 ` Haozhong Zhang
2016-12-14 7:08 ` Jan Beulich
2016-12-14 5:18 ` Tian, Kevin
2016-12-13 12:16 ` [PATCH 2/3] vvmx: return VMfail to L1 if L1 vmxon is executed in VMX operation Haozhong Zhang
2016-12-13 14:46 ` Andrew Cooper
2016-12-13 15:16 ` Konrad Rzeszutek Wilk [this message]
2016-12-14 1:25 ` Haozhong Zhang
2016-12-14 5:22 ` Tian, Kevin
2016-12-13 12:16 ` [PATCH 3/3] vvmx: check the operand of L1 vmxon Haozhong Zhang
2016-12-13 14:48 ` Andrew Cooper
2016-12-13 15:18 ` Konrad Rzeszutek Wilk
2016-12-14 5:24 ` Tian, Kevin
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=20161213151640.GJ10029@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=haozhong.zhang@intel.com \
--cc=jbeulich@suse.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xen.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 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.