Re: [Xen-devel] [PATCH SpectreV1+L1TF v4 01/11] is_control_domain: block speculation

2019-01-25 Thread Jan Beulich
>>> On 24.01.19 at 21:33, wrote: > On 24/01/2019 12:07, Norbert Manthey wrote: >> On 1/23/19 14:20, Jan Beulich wrote: >> On 23.01.19 at 12:51, wrote: --- a/xen/include/xen/nospec.h +++ b/xen/include/xen/nospec.h @@ -58,6 +58,21 @@ static inline unsigned long > array_index_mas

Re: [Xen-devel] [PATCH SpectreV1+L1TF v4 01/11] is_control_domain: block speculation

2019-01-24 Thread Andrew Cooper
On 24/01/2019 12:07, Norbert Manthey wrote: > On 1/23/19 14:20, Jan Beulich wrote: > On 23.01.19 at 12:51, wrote: >>> --- a/xen/include/xen/nospec.h >>> +++ b/xen/include/xen/nospec.h >>> @@ -58,6 +58,21 @@ static inline unsigned long >>> array_index_mask_nospec(unsigned long index, >>>

Re: [Xen-devel] [PATCH SpectreV1+L1TF v4 01/11] is_control_domain: block speculation

2019-01-24 Thread Norbert Manthey
On 1/23/19 14:20, Jan Beulich wrote: On 23.01.19 at 12:51, wrote: >> --- a/xen/include/xen/nospec.h >> +++ b/xen/include/xen/nospec.h >> @@ -58,6 +58,21 @@ static inline unsigned long >> array_index_mask_nospec(unsigned long index, >> (typeof(_i)) (_i & _mask);

Re: [Xen-devel] [PATCH SpectreV1+L1TF v4 01/11] is_control_domain: block speculation

2019-01-23 Thread Jan Beulich
>>> On 23.01.19 at 14:20, wrote: > On 23/01/2019 13:07, Jan Beulich wrote: > On 23.01.19 at 12:51, wrote: >>> --- a/xen/include/xen/nospec.h >>> +++ b/xen/include/xen/nospec.h >>> @@ -58,6 +58,21 @@ static inline unsigned long >>> array_index_mask_nospec(unsigned long index, >>> (typeo

Re: [Xen-devel] [PATCH SpectreV1+L1TF v4 01/11] is_control_domain: block speculation

2019-01-23 Thread Jan Beulich
>>> On 23.01.19 at 12:51, wrote: > --- a/xen/include/xen/nospec.h > +++ b/xen/include/xen/nospec.h > @@ -58,6 +58,21 @@ static inline unsigned long > array_index_mask_nospec(unsigned long index, > (typeof(_i)) (_i & _mask); \ > }) > > +/* > + * all

Re: [Xen-devel] [PATCH SpectreV1+L1TF v4 01/11] is_control_domain: block speculation

2019-01-23 Thread Julien Grall
Hi, On 23/01/2019 13:07, Jan Beulich wrote: On 23.01.19 at 12:51, wrote: --- a/xen/include/xen/nospec.h +++ b/xen/include/xen/nospec.h @@ -58,6 +58,21 @@ static inline unsigned long array_index_mask_nospec(unsigned long index, (typeof(_i)) (_i & _mask);

Re: [Xen-devel] [PATCH SpectreV1+L1TF v4 01/11] is_control_domain: block speculation

2019-01-23 Thread Jan Beulich
>>> On 23.01.19 at 12:51, wrote: > --- a/xen/include/xen/nospec.h > +++ b/xen/include/xen/nospec.h > @@ -58,6 +58,21 @@ static inline unsigned long > array_index_mask_nospec(unsigned long index, > (typeof(_i)) (_i & _mask); \ > }) > > +/* > + * all

[Xen-devel] [PATCH SpectreV1+L1TF v4 01/11] is_control_domain: block speculation

2019-01-23 Thread Norbert Manthey
Checks of domain properties, such as is_hardware_domain or is_hvm_domain, might be bypassed by speculatively executing these instructions. A reason for bypassing these checks is that these macros access the domain structure via a pointer, and check a certain field. Since this memory access is slow,