]> xenbits.xensource.com Git - xen.git/commit
x86/svm: Fix a livelock when trying to run shadowed unpaged guests
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 26 Sep 2017 16:08:33 +0000 (17:08 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 2 Oct 2017 12:57:34 +0000 (13:57 +0100)
commit3164f2f9db1e63ea64c3f9520d40cb09920d2b35
treea4c637becb711aa37c2ec66bf2cf1140616c3b6b
parentceb6ad8850ba6c3ae39fb540cd99f0d7f1311aae
x86/svm: Fix a livelock when trying to run shadowed unpaged guests

On AMD processors which support SMEP (Some Fam16h processors) and SMAP (Zen,
Fam17h), a guest which is running with shadow paging and clears CR0.PG while
keeping CR4.{SMEP,SMAP} set will livelock, as hardware raises #PF which the
shadow pagetable concludes shouldn't happen.

This occurs because hardware is running with host paging settings, which
causes the guests choice of SMEP/SMAP to actually take effect, even though
they shouldn't from the guests point of view.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/hvm/svm/svm.c