]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/mitigations: Fix the test for Xen PV guest
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Mon, 13 May 2019 22:29:42 +0000 (18:29 -0400)
committerBrian Maly <brian.maly@oracle.com>
Tue, 21 May 2019 19:54:31 +0000 (15:54 -0400)
commit7d55ae471cce5e31889ef6f6a2ef929f3a2d52ea
treebaa463e13c1f682becd2891ec5e09c13e17274ca
parent5eb925dab2cabc73f291520d8f391115f38b08b4
x86/mitigations: Fix the test for Xen PV guest

Commit 6af1c37c19ea ("x86/pti: Don't report XenPV as vulnerable")
looks at current hypervisor to determine whether we are running as a Xen
PV guest. This is incorrect since the test will be true for HVM guests
as well.

Instead we should see if we are xen_pv_domain().

(Using Xen-specific primitives in this file is not ideal. This is not
for upstream though so we are going to have to live with this)

Orabug: 29774291

Fixes: 6af1c37c19ea ("x86/pti: Don't report XenPV as vulnerable")
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Patrick Colp <patrick.colp@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/kernel/cpu/bugs_64.c