Re: [PATCH v3 2/2] x86/monitor: Add new monitor event to catch all vmexits

2022-04-07 Thread Tamas K Lengyel
On Thu, Apr 7, 2022 at 2:01 AM Jan Beulich wrote: > > On 06.04.2022 20:02, Tamas K Lengyel wrote: > > On Wed, Apr 6, 2022 at 11:14 AM Jan Beulich wrote: > >> On 06.04.2022 16:58, Tamas K Lengyel wrote: > >>> --- a/xen/arch/x86/hvm/vmx/vmx.c > >>> +++ b/xen/arch/x86/hvm/vmx/vmx.c > >>> @@ -4008,6

Re: [PATCH v3 2/2] x86/monitor: Add new monitor event to catch all vmexits

2022-04-06 Thread Jan Beulich
On 06.04.2022 20:02, Tamas K Lengyel wrote: > On Wed, Apr 6, 2022 at 11:14 AM Jan Beulich wrote: >> On 06.04.2022 16:58, Tamas K Lengyel wrote: >>> --- a/xen/arch/x86/hvm/vmx/vmx.c >>> +++ b/xen/arch/x86/hvm/vmx/vmx.c >>> @@ -4008,6 +4008,18 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs) >

Re: [PATCH v3 2/2] x86/monitor: Add new monitor event to catch all vmexits

2022-04-06 Thread Tamas K Lengyel
On Wed, Apr 6, 2022 at 11:14 AM Jan Beulich wrote: > > On 06.04.2022 16:58, Tamas K Lengyel wrote: > > --- a/xen/arch/x86/hvm/monitor.c > > +++ b/xen/arch/x86/hvm/monitor.c > > @@ -328,6 +328,24 @@ bool hvm_monitor_check_p2m(unsigned long gla, gfn_t > > gfn, uint32_t pfec, > > return monitor

Re: [PATCH v3 2/2] x86/monitor: Add new monitor event to catch all vmexits

2022-04-06 Thread Jan Beulich
On 06.04.2022 16:58, Tamas K Lengyel wrote: > --- a/xen/arch/x86/hvm/monitor.c > +++ b/xen/arch/x86/hvm/monitor.c > @@ -328,6 +328,24 @@ bool hvm_monitor_check_p2m(unsigned long gla, gfn_t gfn, > uint32_t pfec, > return monitor_traps(curr, true, &req) >= 0; > } > > +int hvm_monitor_vmexit(

[PATCH v3 2/2] x86/monitor: Add new monitor event to catch all vmexits

2022-04-06 Thread Tamas K Lengyel
Add monitor event that hooks the vmexit handler allowing for both sync and async monitoring of events. With async monitoring an event is placed on the monitor ring for each exit and the rest of the vmexit handler resumes normally. If there are additional monitor events configured those will also pl