Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-25 Thread Tim Deegan
At 00:25 -0700 on 25 Nov (1480033543), Jan Beulich wrote: > >>> On 24.11.16 at 18:37, wrote: > > As an interim between now and getting a proper audit hook, would a bool > > permit_traps in x86_emulate_ctxt suffice? > > That's one option; the other would be to do away

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-24 Thread Jan Beulich
>>> On 24.11.16 at 18:19, wrote: > On 24/11/16 17:08, Jan Beulich wrote: > On 24.11.16 at 18:00, wrote: But wouldn't you then need to add similar checks in OKAY paths elsewhere? >>> I don't see why I would. Does my explanation above

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-24 Thread Jan Beulich
>>> On 24.11.16 at 18:37, wrote: > As an interim between now and getting a proper audit hook, would a bool > permit_traps in x86_emulate_ctxt suffice? That's one option; the other would be to do away with only the exception injection hook for now, and keep the swint

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-24 Thread Andrew Cooper
On 24/11/16 17:30, Tim Deegan wrote: > At 17:19 + on 24 Nov (1480007992), Andrew Cooper wrote: >> On 24/11/16 17:08, Jan Beulich wrote: >> On 24.11.16 at 18:00, wrote: On 24/11/16 14:53, Jan Beulich wrote: On 23.11.16 at 16:38,

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-24 Thread Tim Deegan
At 17:19 + on 24 Nov (1480007992), Andrew Cooper wrote: > On 24/11/16 17:08, Jan Beulich wrote: > On 24.11.16 at 18:00, wrote: > >> On 24/11/16 14:53, Jan Beulich wrote: > >> On 23.11.16 at 16:38, wrote: > ---

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-24 Thread Andrew Cooper
On 24/11/16 17:08, Jan Beulich wrote: On 24.11.16 at 18:00, wrote: >> On 24/11/16 14:53, Jan Beulich wrote: >> On 23.11.16 at 16:38, wrote: --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5377,7 +5377,7 @@ int

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-24 Thread Jan Beulich
>>> On 24.11.16 at 18:00, wrote: > On 24/11/16 14:53, Jan Beulich wrote: > On 23.11.16 at 16:38, wrote: >>> --- a/xen/arch/x86/mm.c >>> +++ b/xen/arch/x86/mm.c >>> @@ -5377,7 +5377,7 @@ int ptwr_do_page_fault(struct vcpu *v, unsigned long

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-24 Thread Andrew Cooper
On 24/11/16 14:53, Jan Beulich wrote: On 23.11.16 at 16:38, wrote: >> --- a/xen/arch/x86/mm.c >> +++ b/xen/arch/x86/mm.c >> @@ -5377,7 +5377,7 @@ int ptwr_do_page_fault(struct vcpu *v, unsigned long >> addr, >> page_unlock(page); >> put_page(page); >>

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-24 Thread Jan Beulich
>>> On 23.11.16 at 16:38, wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -5377,7 +5377,7 @@ int ptwr_do_page_fault(struct vcpu *v, unsigned long > addr, > page_unlock(page); > put_page(page); > > -if ( rc == X86EMUL_UNHANDLEABLE ) > +

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-23 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Wednesday, November 23, 2016 11:39 PM > > The emulator needs to gain an understanding of interrupts and exceptions > generated by its actions. > > Move hvm_emulate_ctxt.{exn_pending,trap} into struct x86_emulate_ctxt so they > are

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-23 Thread Tim Deegan
At 09:33 -0700 on 23 Nov (1479893609), Jan Beulich wrote: > >>> On 23.11.16 at 17:19, wrote: > > Hi, > > > > At 15:38 + on 23 Nov (1479915529), Andrew Cooper wrote: > >> The emulator needs to gain an understanding of interrupts and exceptions > >> generated by its actions. > >>

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-23 Thread Andrew Cooper
On 23/11/16 16:19, Tim Deegan wrote: > Hi, > > At 15:38 + on 23 Nov (1479915529), Andrew Cooper wrote: >> The emulator needs to gain an understanding of interrupts and exceptions >> generated by its actions. >> >> Move hvm_emulate_ctxt.{exn_pending,trap} into struct x86_emulate_ctxt so they >>

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-23 Thread Jan Beulich
>>> On 23.11.16 at 17:19, wrote: > Hi, > > At 15:38 + on 23 Nov (1479915529), Andrew Cooper wrote: >> The emulator needs to gain an understanding of interrupts and exceptions >> generated by its actions. >> >> Move hvm_emulate_ctxt.{exn_pending,trap} into struct

Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-23 Thread Tim Deegan
Hi, At 15:38 + on 23 Nov (1479915529), Andrew Cooper wrote: > The emulator needs to gain an understanding of interrupts and exceptions > generated by its actions. > > Move hvm_emulate_ctxt.{exn_pending,trap} into struct x86_emulate_ctxt so they > are visible to the emulator. This removes

[Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection

2016-11-23 Thread Andrew Cooper
The emulator needs to gain an understanding of interrupts and exceptions generated by its actions. Move hvm_emulate_ctxt.{exn_pending,trap} into struct x86_emulate_ctxt so they are visible to the emulator. This removes the need for the inject_{hw,sw}_interrupt() hooks, which are dropped and