Skip to content
Commit f09465ac authored by Nadav Amit's avatar Nadav Amit Committed by Paolo Bonzini
Browse files

x86: Flush the TLB after setting user-bit



According to Intel SDM 4.10.4.3 "Optional Invalidation": "If CR4.SMEP =
0 and a paging-structure entry is modified to change the U/S flag from 0
to 1, failure to perform an invalidation may result in a "spurious"
page-fault exception (e.g., in response to an attempted user-mode
access) but no other adverse behavior."

The access test actually causes in certain environments a spurious
page-fault. So invalidate the relevant PTE after setting the user bit.

Signed-off-by: default avatarNadav Amit <nadav.amit@gmail.com>
Message-Id: <20210617101543.180792-1-namit@vmware.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 1d4fa329
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment