Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Razvan Cojocaru
On 12/13/18 4:58 PM, Jan Beulich wrote: On 13.12.18 at 14:18, wrote: >> So, long story short, on VMX we first send out the vm_event, while >> processing it an interrupt / exception may become pending, before >> resuming the VCPU that has sent out the vm_event there's a Xen function >> that pi

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Jan Beulich
>>> On 13.12.18 at 14:18, wrote: > So, long story short, on VMX we first send out the vm_event, while > processing it an interrupt / exception may become pending, before > resuming the VCPU that has sent out the vm_event there's a Xen function > that picks up the pending interrupt and schedules it

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Razvan Cojocaru
On 12/13/18 2:39 PM, Julien Grall wrote: > Hi, > > On 12/13/18 12:15 PM, Razvan Cojocaru wrote: >> On 12/13/18 2:04 PM, Julien Grall wrote: >>> Hi, >>> >>> On 12/13/18 8:03 AM, Razvan Cojocaru wrote: On 12/13/18 8:54 AM, Tian, Kevin wrote: >> From: Razvan Cojocaru [mailto:rcojoc...@bitdef

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Julien Grall
Hi, On 12/13/18 12:15 PM, Razvan Cojocaru wrote: On 12/13/18 2:04 PM, Julien Grall wrote: Hi, On 12/13/18 8:03 AM, Razvan Cojocaru wrote: On 12/13/18 8:54 AM, Tian, Kevin wrote: From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] Sent: Tuesday, December 11, 2018 8:33 PM In any case, I

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Razvan Cojocaru
On 12/13/18 2:04 PM, Julien Grall wrote: > Hi, > > On 12/13/18 8:03 AM, Razvan Cojocaru wrote: >> On 12/13/18 8:54 AM, Tian, Kevin wrote: From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] Sent: Tuesday, December 11, 2018 8:33 PM > In any case, I think you want to rename t

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Julien Grall
Hi, On 12/13/18 8:03 AM, Razvan Cojocaru wrote: On 12/13/18 8:54 AM, Tian, Kevin wrote: From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] Sent: Tuesday, December 11, 2018 8:33 PM In any case, I think you want to rename the function and/or document more that expected behavior. You're

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Razvan Cojocaru
On 12/13/18 8:54 AM, Tian, Kevin wrote: >> From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] >> Sent: Tuesday, December 11, 2018 8:33 PM >> >>> In any case, I think you want to rename the function and/or document >>> more that expected behavior. >> >> You're right, I should probably rename t

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-12 Thread Tian, Kevin
> From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] > Sent: Tuesday, December 11, 2018 8:33 PM > > > In any case, I think you want to rename the function and/or document > > more that expected behavior. > > You're right, I should probably rename that function / variable to > better reflect

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-11 Thread Razvan Cojocaru
On 12/11/18 1:59 PM, Julien Grall wrote: > Hi, > > On 11/12/2018 10:21, Razvan Cojocaru wrote: >> On 12/11/18 12:14 PM, Roger Pau Monné wrote: >>> On Tue, Dec 11, 2018 at 12:01:53PM +0200, Razvan Cojocaru wrote: On 12/10/18 6:59 PM, Razvan Cojocaru wrote: > On 12/10/18 6:49 PM, Roger Pau

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-11 Thread Julien Grall
Hi, On 11/12/2018 10:21, Razvan Cojocaru wrote: On 12/11/18 12:14 PM, Roger Pau Monné wrote: On Tue, Dec 11, 2018 at 12:01:53PM +0200, Razvan Cojocaru wrote: On 12/10/18 6:59 PM, Razvan Cojocaru wrote: On 12/10/18 6:49 PM, Roger Pau Monné wrote: On Mon, Dec 10, 2018 at 06:01:49PM +0200, Razv

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-11 Thread Razvan Cojocaru
On 12/11/18 12:14 PM, Roger Pau Monné wrote: > On Tue, Dec 11, 2018 at 12:01:53PM +0200, Razvan Cojocaru wrote: >> On 12/10/18 6:59 PM, Razvan Cojocaru wrote: >>> On 12/10/18 6:49 PM, Roger Pau Monné wrote: On Mon, Dec 10, 2018 at 06:01:49PM +0200, Razvan Cojocaru wrote: > diff --git a/xen

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-11 Thread Roger Pau Monné
On Tue, Dec 11, 2018 at 12:01:53PM +0200, Razvan Cojocaru wrote: > On 12/10/18 6:59 PM, Razvan Cojocaru wrote: > > On 12/10/18 6:49 PM, Roger Pau Monné wrote: > >> On Mon, Dec 10, 2018 at 06:01:49PM +0200, Razvan Cojocaru wrote: > >>> diff --git a/xen/include/asm-arm/vm_event.h > >>> b/xen/include

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-11 Thread Razvan Cojocaru
On 12/10/18 6:59 PM, Razvan Cojocaru wrote: > On 12/10/18 6:49 PM, Roger Pau Monné wrote: >> On Mon, Dec 10, 2018 at 06:01:49PM +0200, Razvan Cojocaru wrote: >>> diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h >>> index 66f2474..b63249e 100644 >>> --- a/xen/include/asm-

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-10 Thread Razvan Cojocaru
On 12/10/18 6:49 PM, Roger Pau Monné wrote: > On Mon, Dec 10, 2018 at 06:01:49PM +0200, Razvan Cojocaru wrote: >> diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h >> index 66f2474..b63249e 100644 >> --- a/xen/include/asm-arm/vm_event.h >> +++ b/xen/include/asm-arm/vm_eve

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-10 Thread Roger Pau Monné
On Mon, Dec 10, 2018 at 06:01:49PM +0200, Razvan Cojocaru wrote: > diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h > index 66f2474..b63249e 100644 > --- a/xen/include/asm-arm/vm_event.h > +++ b/xen/include/asm-arm/vm_event.h > @@ -52,4 +52,10 @@ void vm_event_emulate_ch

[Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-10 Thread Razvan Cojocaru
Block interrupts (in vmx_intr_assist()) for the duration of processing a sync vm_event (similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by a vm_event reply may legitimately need to call e.g. hvm_inject_page_fault(), which