Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-29 Thread Stecklina, Julian
On Fri, 2018-10-26 at 09:30 -0700, Jim Mattson wrote: > On Fri, Oct 26, 2018 at 8:46 AM, Sean Christopherson > wrote: > > > And FWIW, I find the original code to be more readable since all > > GRPs > > are zeroed with the same method. > I concur. I really do prefer the explicit xors to the input

Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-29 Thread Stecklina, Julian
On Fri, 2018-10-26 at 09:30 -0700, Jim Mattson wrote: > On Fri, Oct 26, 2018 at 8:46 AM, Sean Christopherson > wrote: > > > And FWIW, I find the original code to be more readable since all > > GRPs > > are zeroed with the same method. > I concur. I really do prefer the explicit xors to the input

Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-26 Thread Jim Mattson
On Fri, Oct 26, 2018 at 8:46 AM, Sean Christopherson wrote: > Since clearing the GPRs exists to mitigate speculation junk, I think > we should keep the explicit XOR zeroing instead of deferring to the > compiler. Explicit XORs will ensure the resulting assembly is the > same regardless of

Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-26 Thread Jim Mattson
On Fri, Oct 26, 2018 at 8:46 AM, Sean Christopherson wrote: > Since clearing the GPRs exists to mitigate speculation junk, I think > we should keep the explicit XOR zeroing instead of deferring to the > compiler. Explicit XORs will ensure the resulting assembly is the > same regardless of

Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-26 Thread Sean Christopherson
On Wed, Oct 24, 2018 at 10:28:57AM +0200, Julian Stecklina wrote: > Split the security related register clearing out of the large inline > assembly VM entry path. This results in two slightly less complicated > inline assembly statements, where it is clearer what each one does. > > Signed-off-by:

Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-26 Thread Sean Christopherson
On Wed, Oct 24, 2018 at 10:28:57AM +0200, Julian Stecklina wrote: > Split the security related register clearing out of the large inline > assembly VM entry path. This results in two slightly less complicated > inline assembly statements, where it is clearer what each one does. > > Signed-off-by:

Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-26 Thread Stecklina, Julian
On Thu, 2018-10-25 at 09:55 -0700, Jim Mattson wrote: > Looking at the second asm statement and the comment that precedes it, > my first question would be, "What about the registers not covered > here?" Good point. I'll make the comment a bit clearer. > I'm also not convinced that the

Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-26 Thread Stecklina, Julian
On Thu, 2018-10-25 at 09:55 -0700, Jim Mattson wrote: > Looking at the second asm statement and the comment that precedes it, > my first question would be, "What about the registers not covered > here?" Good point. I'll make the comment a bit clearer. > I'm also not convinced that the

Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-25 Thread Jim Mattson
On Wed, Oct 24, 2018 at 1:28 AM, Julian Stecklina wrote: > Split the security related register clearing out of the large inline > assembly VM entry path. This results in two slightly less complicated > inline assembly statements, where it is clearer what each one does. > > Signed-off-by: Julian

Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-25 Thread Jim Mattson
On Wed, Oct 24, 2018 at 1:28 AM, Julian Stecklina wrote: > Split the security related register clearing out of the large inline > assembly VM entry path. This results in two slightly less complicated > inline assembly statements, where it is clearer what each one does. > > Signed-off-by: Julian

[PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-24 Thread Julian Stecklina
Split the security related register clearing out of the large inline assembly VM entry path. This results in two slightly less complicated inline assembly statements, where it is clearer what each one does. Signed-off-by: Julian Stecklina Reviewed-by: Jan H. Schönherr Reviewed-by: Konrad Jan

[PATCH 2/4] kvm, vmx: move register clearing out of assembly path

2018-10-24 Thread Julian Stecklina
Split the security related register clearing out of the large inline assembly VM entry path. This results in two slightly less complicated inline assembly statements, where it is clearer what each one does. Signed-off-by: Julian Stecklina Reviewed-by: Jan H. Schönherr Reviewed-by: Konrad Jan