Re: [Xen-devel] [PATCH 1/2] x86/hvm: Don't raise #GP behind the emulators back for CR accesses

2017-03-03 Thread Jan Beulich
>>> On 03.03.17 at 11:30, wrote: > On 03/03/17 10:16, Jan Beulich wrote: > On 02.03.17 at 15:59, wrote: >>> --- a/xen/arch/x86/hvm/vmx/vvmx.c >>> +++ b/xen/arch/x86/hvm/vmx/vvmx.c >>> @@ -1046,9 +1046,18 @@ static void load_shadow_guest_state(struct vcpu *v) >>> >>> nvcpu->guest_cr[0]

Re: [Xen-devel] [PATCH 1/2] x86/hvm: Don't raise #GP behind the emulators back for CR accesses

2017-03-03 Thread Andrew Cooper
On 03/03/17 10:16, Jan Beulich wrote: On 02.03.17 at 15:59, wrote: >> hvm_set_cr{0,4}() are reachable from the emulator, but use >> hvm_inject_hw_exception() directly. >> >> Alter the API to make the callers of hvm_set_cr{0,3,4}() responsible for >> raising #GP, and apply this change to all e

Re: [Xen-devel] [PATCH 1/2] x86/hvm: Don't raise #GP behind the emulators back for CR accesses

2017-03-03 Thread Jan Beulich
>>> On 02.03.17 at 15:59, wrote: > hvm_set_cr{0,4}() are reachable from the emulator, but use > hvm_inject_hw_exception() directly. > > Alter the API to make the callers of hvm_set_cr{0,3,4}() responsible for > raising #GP, and apply this change to all existing callers. As you're touching CR-wri

Re: [Xen-devel] [PATCH 1/2] x86/hvm: Don't raise #GP behind the emulators back for CR accesses

2017-03-03 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Thursday, March 02, 2017 11:00 PM > > hvm_set_cr{0,4}() are reachable from the emulator, but use > hvm_inject_hw_exception() directly. > > Alter the API to make the callers of hvm_set_cr{0,3,4}() responsible for > raising #GP, and a

Re: [Xen-devel] [PATCH 1/2] x86/hvm: Don't raise #GP behind the emulators back for CR accesses

2017-03-02 Thread Boris Ostrovsky
On 03/02/2017 09:59 AM, Andrew Cooper wrote: > hvm_set_cr{0,4}() are reachable from the emulator, but use > hvm_inject_hw_exception() directly. > > Alter the API to make the callers of hvm_set_cr{0,3,4}() responsible for > raising #GP, and apply this change to all existing callers. > > Signed-off-b

Re: [Xen-devel] [PATCH 1/2] x86/hvm: Don't raise #GP behind the emulators back for CR accesses

2017-03-02 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 02 March 2017 15:00 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Paul Durrant ; Jun > Nakajima ; Kevin Tian ; > Boris Ostrovsky ; Suravee Suthikulpanit > > Subject: [PATCH 1/2] x86/hvm: Don't ra

[Xen-devel] [PATCH 1/2] x86/hvm: Don't raise #GP behind the emulators back for CR accesses

2017-03-02 Thread Andrew Cooper
hvm_set_cr{0,4}() are reachable from the emulator, but use hvm_inject_hw_exception() directly. Alter the API to make the callers of hvm_set_cr{0,3,4}() responsible for raising #GP, and apply this change to all existing callers. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Paul Durrant