diff options
author | Avi Kivity <avi@qumranet.com> | 2007-05-31 04:56:54 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-16 05:05:43 -0400 |
commit | 63b1ad24d2695db3ec1cc8b10760e130e1a1f04b (patch) | |
tree | b1a74434132f0c3398a21d00337bdbef9661eaa8 /drivers/kvm/mmu.c | |
parent | 6598c8b2420c30b48fc0d1d40d9ef6a1f7312107 (diff) |
KVM: MMU: Fold fix_read_pf() into set_pte_common()
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/mmu.c')
-rw-r--r-- | drivers/kvm/mmu.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index a7631502f22b..2079d69f186a 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c | |||
@@ -972,23 +972,6 @@ static void inject_page_fault(struct kvm_vcpu *vcpu, | |||
972 | kvm_arch_ops->inject_page_fault(vcpu, addr, err_code); | 972 | kvm_arch_ops->inject_page_fault(vcpu, addr, err_code); |
973 | } | 973 | } |
974 | 974 | ||
975 | static inline int fix_read_pf(u64 *shadow_ent) | ||
976 | { | ||
977 | if ((*shadow_ent & PT_SHADOW_USER_MASK) && | ||
978 | !(*shadow_ent & PT_USER_MASK)) { | ||
979 | /* | ||
980 | * If supervisor write protect is disabled, we shadow kernel | ||
981 | * pages as user pages so we can trap the write access. | ||
982 | */ | ||
983 | *shadow_ent |= PT_USER_MASK; | ||
984 | *shadow_ent &= ~PT_WRITABLE_MASK; | ||
985 | |||
986 | return 1; | ||
987 | |||
988 | } | ||
989 | return 0; | ||
990 | } | ||
991 | |||
992 | static void paging_free(struct kvm_vcpu *vcpu) | 975 | static void paging_free(struct kvm_vcpu *vcpu) |
993 | { | 976 | { |
994 | nonpaging_free(vcpu); | 977 | nonpaging_free(vcpu); |