]> xenbits.xen.org Git - xen.git/commit
x86/svm: Fix a livelock when trying to run shadowed unpaged guests
authorAndrew Cooper <[email protected]>
Tue, 24 Oct 2017 14:09:11 +0000 (16:09 +0200)
committerJan Beulich <[email protected]>
Tue, 24 Oct 2017 14:09:11 +0000 (16:09 +0200)
commit53d01aaa640822e9d8014f5c5151eb15812a9462
tree986229111fcfd1972a6cdea06ad199abcc715c2b
parent5237ff8995ac3be0bec89f71948d5f3c81bd8b89
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 <[email protected]>
Reviewed-by: Boris Ostrovsky <[email protected]>
master commit: 3164f2f9db1e63ea64c3f9520d40cb09920d2b35
master date: 2017-10-02 13:57:34 +0100
xen/arch/x86/hvm/svm/svm.c