From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
"Nadav Har'El" <nyh@math.technion.ac.il>,
"Nakajima, Jun" <jun.nakajima@intel.com>
Subject: Re: [PATCH v2] KVM: nVMX: Reset RFLAGS on VM-exit
Date: Mon, 4 Mar 2013 11:00:38 +0200 [thread overview]
Message-ID: <20130304090038.GH23616@redhat.com> (raw)
In-Reply-To: <5133A8BF.1010607@web.de>
On Sun, Mar 03, 2013 at 08:47:11PM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Ouch, how could this work so well that far? We need to clear RFLAGS to
> the reset value as specified by the SDM. Particularly, IF must be off
> after VM-exit!
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Gleb Natapov <gleb@redhat.com>
> ---
>
> Changes in v2:
> - use symbolic constant for rflags reset value
>
> arch/x86/kvm/vmx.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 486078d..eece4c8 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -7454,6 +7454,7 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,
>
> kvm_register_write(vcpu, VCPU_REGS_RSP, vmcs12->host_rsp);
> kvm_register_write(vcpu, VCPU_REGS_RIP, vmcs12->host_rip);
> + vmx_set_rflags(vcpu, X86_EFLAGS_BIT1);
> /*
> * Note that calling vmx_set_cr0 is important, even if cr0 hasn't
> * actually changed, because it depends on the current state of
> --
> 1.7.3.4
--
Gleb.
next prev parent reply other threads:[~2013-03-04 9:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-03 19:47 [PATCH v2] KVM: nVMX: Reset RFLAGS on VM-exit Jan Kiszka
2013-03-04 9:00 ` Gleb Natapov [this message]
2013-03-05 23:49 ` Marcelo Tosatti
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=20130304090038.GH23616@redhat.com \
--to=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=jun.nakajima@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=nyh@math.technion.ac.il \
/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