diff options
| -rw-r--r-- | drivers/kvm/paging_tmpl.h | 11 |
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; |
