aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-05-31 10:17:06 -0400
committerAvi Kivity <avi@qumranet.com>2007-07-16 05:05:44 -0400
commit4436d466219a6a7874ebc19eb6523c3a9a280dcc (patch)
tree5e1fb884432621d73ac140816bb848db5903e650
parente663ee64aefc57f7eff7325142206c4ea0200be8 (diff)
KVM: MMU: Remove cr0.wp tricks
No longer needed as we do everything in one place. Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--drivers/kvm/paging_tmpl.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index fabc2c9093cd..59b4cb29e0f7 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -240,17 +240,6 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu,
240 240
241 spte |= paddr; 241 spte |= paddr;
242 242
243 if (!write_fault && (spte & PT_SHADOW_USER_MASK) &&
244 !(spte & PT_USER_MASK)) {
245 /*
246 * If supervisor write protect is disabled, we shadow kernel
247 * pages as user pages so we can trap the write access.
248 */
249 spte |= PT_USER_MASK;
250 spte &= ~PT_WRITABLE_MASK;
251 access_bits &= ~PT_WRITABLE_MASK;
252 }
253
254 if ((access_bits & PT_WRITABLE_MASK) 243 if ((access_bits & PT_WRITABLE_MASK)
255 || (write_fault && !is_write_protection(vcpu) && !user_fault)) { 244 || (write_fault && !is_write_protection(vcpu) && !user_fault)) {
256 struct kvm_mmu_page *shadow; 245 struct kvm_mmu_page *shadow;