Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-20 Thread Roger Pau Monné
On Thu, May 19, 2022 at 04:45:20PM +0200, Roger Pau Monné wrote: > On Thu, May 19, 2022 at 12:10:24AM +, Andrew Cooper wrote: > > On 17/05/2022 14:21, Roger Pau Monne wrote: > > > @@ -1333,6 +1338,19 @@ static int construct_vmcs(struct vcpu *v) > > > rc = vmx_add_msr(v, MSR_FLUSH_CMD,

Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-19 Thread Roger Pau Monné
On Thu, May 19, 2022 at 12:10:24AM +, Andrew Cooper wrote: > On 17/05/2022 14:21, Roger Pau Monne wrote: > > Under certain conditions guests can get the CPU stuck in an infinite > > loop without the possibility of an interrupt window to occur. > > instruction boundary. > > It's trivial to cre

Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-19 Thread Jan Beulich
On 19.05.2022 14:44, Roger Pau Monné wrote: > On Thu, May 19, 2022 at 08:50:55AM +0200, Jan Beulich wrote: >> On 17.05.2022 15:21, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/hvm/vmx/vmx.c >>> +++ b/xen/arch/x86/hvm/vmx/vmx.c >>> @@ -4567,6 +4567,30 @@ void vmx_vmexit_handler(struct cpu_user_regs

Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-19 Thread Roger Pau Monné
On Thu, May 19, 2022 at 08:50:55AM +0200, Jan Beulich wrote: > On 17.05.2022 15:21, Roger Pau Monne wrote: > > --- a/xen/arch/x86/hvm/vmx/vmcs.c > > +++ b/xen/arch/x86/hvm/vmx/vmcs.c > > @@ -67,6 +67,9 @@ integer_param("ple_gap", ple_gap); > > static unsigned int __read_mostly ple_window = 4096; >

Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-19 Thread Andrew Cooper
On 19/05/2022 07:59, Jan Beulich wrote: > On 19.05.2022 02:10, Andrew Cooper wrote: >> On 17/05/2022 14:21, Roger Pau Monne wrote: >>> Under certain conditions guests can get the CPU stuck in an infinite >>> loop without the possibility of an interrupt window to occur. >> instruction boundary. >> >

Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-18 Thread Jan Beulich
On 19.05.2022 02:10, Andrew Cooper wrote: > On 17/05/2022 14:21, Roger Pau Monne wrote: >> Under certain conditions guests can get the CPU stuck in an infinite >> loop without the possibility of an interrupt window to occur. > > instruction boundary. > > It's trivial to create an infinite loop wi

Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-18 Thread Jan Beulich
On 17.05.2022 15:21, Roger Pau Monne wrote: > --- a/xen/arch/x86/hvm/vmx/vmcs.c > +++ b/xen/arch/x86/hvm/vmx/vmcs.c > @@ -67,6 +67,9 @@ integer_param("ple_gap", ple_gap); > static unsigned int __read_mostly ple_window = 4096; > integer_param("ple_window", ple_window); > > +static int __read_mos

Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-18 Thread Andrew Cooper
On 17/05/2022 14:21, Roger Pau Monne wrote: > Under certain conditions guests can get the CPU stuck in an infinite > loop without the possibility of an interrupt window to occur. instruction boundary. It's trivial to create an infinite loop without an interrupt window :) Also, I'd probably phras

Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-17 Thread Roger Pau Monné
On Tue, May 17, 2022 at 03:21:30PM +0200, Roger Pau Monne wrote: > Under certain conditions guests can get the CPU stuck in an infinite > loop without the possibility of an interrupt window to occur. This > was the case with the scenarios described in XSA-156. > > Make use of the Notify VM Exit m

[PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-17 Thread Roger Pau Monne
Under certain conditions guests can get the CPU stuck in an infinite loop without the possibility of an interrupt window to occur. This was the case with the scenarios described in XSA-156. Make use of the Notify VM Exit mechanism, that will trigger a VM Exit if no interrupt window occurs for a s