* [PATCH for-4.7] x86/spec-ctrl: Fix backport of 1fdb25a614b
@ 2018-08-30 18:37 Andrew Cooper
2018-08-31 7:24 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2018-08-30 18:37 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Jan Beulich
Refreshing XenServer's patchqueue has shown that I missed this adjustment in
the upstream backports of the final version of the XSA-273 fixes.
The code does work in 4.7 and earlier, but only because the eventual value of
(opt_pv_l1tf & OPT_PV_L1TF_DOMx) is within range of a char.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
---
xen/include/asm-x86/shadow.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/include/asm-x86/shadow.h b/xen/include/asm-x86/shadow.h
index de09e81..c720008 100644
--- a/xen/include/asm-x86/shadow.h
+++ b/xen/include/asm-x86/shadow.h
@@ -215,8 +215,8 @@ void pv_l1tf_tasklet(unsigned long data);
static inline void pv_l1tf_domain_init(struct domain *d)
{
d->arch.pv_domain.check_l1tf =
- opt_pv_l1tf & (is_hardware_domain(d)
- ? OPT_PV_L1TF_DOM0 : OPT_PV_L1TF_DOMU);
+ !!(opt_pv_l1tf & (is_hardware_domain(d)
+ ? OPT_PV_L1TF_DOM0 : OPT_PV_L1TF_DOMU));
#ifdef CONFIG_SHADOW_PAGING
tasklet_init(&d->arch.paging.shadow.pv_l1tf_tasklet,
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-4.7] x86/spec-ctrl: Fix backport of 1fdb25a614b
2018-08-30 18:37 [PATCH for-4.7] x86/spec-ctrl: Fix backport of 1fdb25a614b Andrew Cooper
@ 2018-08-31 7:24 ` Jan Beulich
2018-08-31 14:10 ` Andrew Cooper
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2018-08-31 7:24 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Xen-devel
>>> On 30.08.18 at 20:37, <andrew.cooper3@citrix.com> wrote:
> Refreshing XenServer's patchqueue has shown that I missed this adjustment in
> the upstream backports of the final version of the XSA-273 fixes.
>
> The code does work in 4.7 and earlier, but only because the eventual value of
> (opt_pv_l1tf & OPT_PV_L1TF_DOMx) is within range of a char.
And I had noticed this while pulling things into our trees, but decided
to leave it since it's working.
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for-4.7] x86/spec-ctrl: Fix backport of 1fdb25a614b
2018-08-31 7:24 ` Jan Beulich
@ 2018-08-31 14:10 ` Andrew Cooper
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2018-08-31 14:10 UTC (permalink / raw)
To: Jan Beulich; +Cc: Xen-devel
On 31/08/18 08:24, Jan Beulich wrote:
>>>> On 30.08.18 at 20:37, <andrew.cooper3@citrix.com> wrote:
>> Refreshing XenServer's patchqueue has shown that I missed this adjustment in
>> the upstream backports of the final version of the XSA-273 fixes.
>>
>> The code does work in 4.7 and earlier, but only because the eventual value of
>> (opt_pv_l1tf & OPT_PV_L1TF_DOMx) is within range of a char.
> And I had noticed this while pulling things into our trees, but decided
> to leave it since it's working.
>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Acked-by: Jan Beulich <jbeulich@suse.com>
I figured that, especially as you've got a patch proposing to change
these constants, that it would be safer to make it work now.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-31 14:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-30 18:37 [PATCH for-4.7] x86/spec-ctrl: Fix backport of 1fdb25a614b Andrew Cooper
2018-08-31 7:24 ` Jan Beulich
2018-08-31 14:10 ` Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.