* [PATCH v2] KVM: nVMX: Reset RFLAGS on VM-exit
@ 2013-03-03 19:47 Jan Kiszka
2013-03-04 9:00 ` Gleb Natapov
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2013-03-03 19:47 UTC (permalink / raw)
To: Gleb Natapov, Marcelo Tosatti; +Cc: kvm, Nadav Har'El, Nakajima, Jun
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] KVM: nVMX: Reset RFLAGS on VM-exit
2013-03-03 19:47 [PATCH v2] KVM: nVMX: Reset RFLAGS on VM-exit Jan Kiszka
@ 2013-03-04 9:00 ` Gleb Natapov
2013-03-05 23:49 ` Marcelo Tosatti
0 siblings, 1 reply; 3+ messages in thread
From: Gleb Natapov @ 2013-03-04 9:00 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Marcelo Tosatti, kvm, Nadav Har'El, Nakajima, Jun
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] KVM: nVMX: Reset RFLAGS on VM-exit
2013-03-04 9:00 ` Gleb Natapov
@ 2013-03-05 23:49 ` Marcelo Tosatti
0 siblings, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2013-03-05 23:49 UTC (permalink / raw)
To: Gleb Natapov; +Cc: Jan Kiszka, kvm, Nadav Har'El, Nakajima, Jun
On Mon, Mar 04, 2013 at 11:00:38AM +0200, Gleb Natapov wrote:
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-06 0:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03 19:47 [PATCH v2] KVM: nVMX: Reset RFLAGS on VM-exit Jan Kiszka
2013-03-04 9:00 ` Gleb Natapov
2013-03-05 23:49 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox