Re: [PATCH] KVM: x86: fix eflags state following processor init/reset

2015-11-10 Thread Wanpeng Li
2015-11-03 18:47 GMT+08:00 Paolo Bonzini : > > > On 28/10/2015 09:10, Nadav Amit wrote: >> Here are my 5 cents. Note that vmx_vcpu_reset calls: >> >> vmcs_writel(GUEST_RFLAGS, 0x02); >> >> (And the RFLAGS value is not cached by KVM, so no consistency problem should >> occur.) >> >> You may

Re: [PATCH] KVM: x86: fix eflags state following processor init/reset

2015-11-10 Thread Wanpeng Li
2015-11-03 18:47 GMT+08:00 Paolo Bonzini : > > > On 28/10/2015 09:10, Nadav Amit wrote: >> Here are my 5 cents. Note that vmx_vcpu_reset calls: >> >> vmcs_writel(GUEST_RFLAGS, 0x02); >> >> (And the RFLAGS value is not cached by KVM, so no consistency problem should >>

Re: [PATCH] KVM: x86: fix eflags state following processor init/reset

2015-11-03 Thread Paolo Bonzini
On 28/10/2015 09:10, Nadav Amit wrote: > Here are my 5 cents. Note that vmx_vcpu_reset calls: > > vmcs_writel(GUEST_RFLAGS, 0x02); > > (And the RFLAGS value is not cached by KVM, so no consistency problem should > occur.) > > You may want to change the value into constant or call a

Re: [PATCH] KVM: x86: fix eflags state following processor init/reset

2015-11-03 Thread Paolo Bonzini
On 28/10/2015 09:10, Nadav Amit wrote: > Here are my 5 cents. Note that vmx_vcpu_reset calls: > > vmcs_writel(GUEST_RFLAGS, 0x02); > > (And the RFLAGS value is not cached by KVM, so no consistency problem should > occur.) > > You may want to change the value into constant or call a

Re: [PATCH] KVM: x86: fix eflags state following processor init/reset

2015-10-28 Thread Nadav Amit
Here are my 5 cents. Note that vmx_vcpu_reset calls: vmcs_writel(GUEST_RFLAGS, 0x02); (And the RFLAGS value is not cached by KVM, so no consistency problem should occur.) You may want to change the value into constant or call a wrapper function for setting RFLAGS, but I don’t see

Re: [PATCH] KVM: x86: fix eflags state following processor init/reset

2015-10-28 Thread Nadav Amit
Here are my 5 cents. Note that vmx_vcpu_reset calls: vmcs_writel(GUEST_RFLAGS, 0x02); (And the RFLAGS value is not cached by KVM, so no consistency problem should occur.) You may want to change the value into constant or call a wrapper function for setting RFLAGS, but I don’t see

Re: [PATCH] KVM: x86: fix eflags state following processor init/reset

2015-10-27 Thread Wanpeng Li
Ping, :-) On 10/21/15 2:28 PM, Wanpeng Li wrote: Reference SDM 3.4.3: Following initialization of the processor (either by asserting the RESET pin or the INIT pin), the state of the EFLAGS register is 0002H. However, the eflags fixed bit is not set and other bits are also not cleared

Re: [PATCH] KVM: x86: fix eflags state following processor init/reset

2015-10-27 Thread Wanpeng Li
Ping, :-) On 10/21/15 2:28 PM, Wanpeng Li wrote: Reference SDM 3.4.3: Following initialization of the processor (either by asserting the RESET pin or the INIT pin), the state of the EFLAGS register is 0002H. However, the eflags fixed bit is not set and other bits are also not cleared

[PATCH] KVM: x86: fix eflags state following processor init/reset

2015-10-21 Thread Wanpeng Li
Reference SDM 3.4.3: Following initialization of the processor (either by asserting the RESET pin or the INIT pin), the state of the EFLAGS register is 0002H. However, the eflags fixed bit is not set and other bits are also not cleared during the init/reset in kvm. This patch fix it by

[PATCH] KVM: x86: fix eflags state following processor init/reset

2015-10-21 Thread Wanpeng Li
Reference SDM 3.4.3: Following initialization of the processor (either by asserting the RESET pin or the INIT pin), the state of the EFLAGS register is 0002H. However, the eflags fixed bit is not set and other bits are also not cleared during the init/reset in kvm. This patch fix it by