Re: [PATCH 6/6] KVM: x86: check DR6/7 high-bits are clear only on long-mode

2014-06-16 Thread Paolo Bonzini
Il 15/06/2014 15:13, Nadav Amit ha scritto: From: Nadav Amit nadav.a...@gmail.com When the guest sets DR6 and DR7, KVM asserts the high 32-bits are clear, and otherwise injects a #GP exception. This exception should only be injected only if running in long-mode. Signed-off-by: Nadav Amit

Re: [PATCH 6/6] KVM: x86: check DR6/7 high-bits are clear only on long-mode

2014-06-16 Thread Nadav Amit
On 6/16/14, 1:17 PM, Paolo Bonzini wrote: Il 15/06/2014 15:13, Nadav Amit ha scritto: From: Nadav Amit nadav.a...@gmail.com When the guest sets DR6 and DR7, KVM asserts the high 32-bits are clear, and otherwise injects a #GP exception. This exception should only be injected only if running in

Re: [PATCH 6/6] KVM: x86: check DR6/7 high-bits are clear only on long-mode

2014-06-16 Thread Paolo Bonzini
Il 16/06/2014 12:33, Nadav Amit ha scritto: Do you get this if the input register has bit 31 set? No. To be frank, the scenario may be considered a bit synthetic: the guest assigns a value to a general-purpose register in 64-bit mode, setting the high 32-bits to some non-zero value. Then,

Re: [PATCH 6/6] KVM: x86: check DR6/7 high-bits are clear only on long-mode

2014-06-16 Thread Nadav Amit
On 6/16/14, 2:09 PM, Paolo Bonzini wrote: Il 16/06/2014 12:33, Nadav Amit ha scritto: Do you get this if the input register has bit 31 set? No. To be frank, the scenario may be considered a bit synthetic: the guest assigns a value to a general-purpose register in 64-bit mode, setting the high

Re: [PATCH 6/6] KVM: x86: check DR6/7 high-bits are clear only on long-mode

2014-06-16 Thread Paolo Bonzini
Il 16/06/2014 13:53, Nadav Amit ha scritto: On 6/16/14, 2:09 PM, Paolo Bonzini wrote: Il 16/06/2014 12:33, Nadav Amit ha scritto: Do you get this if the input register has bit 31 set? No. To be frank, the scenario may be considered a bit synthetic: the guest assigns a value to a

Re: [PATCH 6/6] KVM: x86: check DR6/7 high-bits are clear only on long-mode

2014-06-16 Thread Nadav Amit
On 6/16/14, 5:56 PM, Paolo Bonzini wrote: Il 16/06/2014 13:53, Nadav Amit ha scritto: On 6/16/14, 2:09 PM, Paolo Bonzini wrote: Il 16/06/2014 12:33, Nadav Amit ha scritto: Do you get this if the input register has bit 31 set? No. To be frank, the scenario may be considered a bit synthetic:

[PATCH 6/6] KVM: x86: check DR6/7 high-bits are clear only on long-mode

2014-06-15 Thread Nadav Amit
From: Nadav Amit nadav.a...@gmail.com When the guest sets DR6 and DR7, KVM asserts the high 32-bits are clear, and otherwise injects a #GP exception. This exception should only be injected only if running in long-mode. Signed-off-by: Nadav Amit na...@cs.technion.ac.il --- arch/x86/kvm/x86.c |