Re: [PATCH v2] KVM: X86: Fix load RFLAGS w/o the fixed bit

2017-12-07 Thread Wanpeng Li
2017-12-07 1:28 GMT+08:00 David Hildenbrand : > On 06.12.2017 15:40, David Hildenbrand wrote: >> On 06.12.2017 12:59, Wanpeng Li wrote: >>> From: Wanpeng Li >>> >>> *** Guest State *** >>> CR0: actual=0x0030, shadow=0x6010, >>> gh_mask=fff7 >>> CR4: actual=0

Re: [PATCH v2] KVM: X86: Fix load RFLAGS w/o the fixed bit

2017-12-06 Thread Wanpeng Li
2017-12-07 1:14 GMT+08:00 Jim Mattson : > What if I change the testcase so that regs.rflags is initialized to (1 << 3)? >From Paolo's pointing: > I suspect somebody might be passing an all-zero regs struct to > KVM_SET_REGS, so ORing X86_EFLAGS_FIXED is better. I think the patch tries to fix a c

Re: [PATCH v2] KVM: X86: Fix load RFLAGS w/o the fixed bit

2017-12-06 Thread David Hildenbrand
On 06.12.2017 15:40, David Hildenbrand wrote: > On 06.12.2017 12:59, Wanpeng Li wrote: >> From: Wanpeng Li >> >> *** Guest State *** >> CR0: actual=0x0030, shadow=0x6010, >> gh_mask=fff7 >> CR4: actual=0x2050, shadow=0x, >> gh_ma

Re: [PATCH v2] KVM: X86: Fix load RFLAGS w/o the fixed bit

2017-12-06 Thread Jim Mattson
What if I change the testcase so that regs.rflags is initialized to (1 << 3)? On Wed, Dec 6, 2017 at 6:40 AM, David Hildenbrand wrote: > On 06.12.2017 12:59, Wanpeng Li wrote: >> From: Wanpeng Li >> >> *** Guest State *** >> CR0: actual=0x0030, shadow=0x6010, >> gh_mas

Re: [PATCH v2] KVM: X86: Fix load RFLAGS w/o the fixed bit

2017-12-06 Thread David Hildenbrand
On 06.12.2017 12:59, Wanpeng Li wrote: > From: Wanpeng Li > > *** Guest State *** > CR0: actual=0x0030, shadow=0x6010, > gh_mask=fff7 > CR4: actual=0x2050, shadow=0x, > gh_mask=e871 > CR3 = 0xfffbc000 > RSP