mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-03 02:11:29 +00:00
KVM: MMU: Merge set_pte() and set_pte_common()
Since set_pte() is now the only caller of set_pte_common(), merge the two functions. Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
parent
050e64992f
commit
230c9a8f23
1 changed files with 6 additions and 20 deletions
|
@ -186,15 +186,11 @@ err:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu,
|
static void FNAME(set_pte)(struct kvm_vcpu *vcpu, pt_element_t gpte,
|
||||||
u64 *shadow_pte,
|
u64 *shadow_pte, u64 access_bits,
|
||||||
pt_element_t gpte,
|
int user_fault, int write_fault,
|
||||||
u64 access_bits,
|
int *ptwrite, struct guest_walker *walker,
|
||||||
int user_fault,
|
gfn_t gfn)
|
||||||
int write_fault,
|
|
||||||
int *ptwrite,
|
|
||||||
struct guest_walker *walker,
|
|
||||||
gfn_t gfn)
|
|
||||||
{
|
{
|
||||||
int dirty = gpte & PT_DIRTY_MASK;
|
int dirty = gpte & PT_DIRTY_MASK;
|
||||||
u64 spte;
|
u64 spte;
|
||||||
|
@ -206,6 +202,7 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu,
|
||||||
__FUNCTION__, *shadow_pte, (u64)gpte, access_bits,
|
__FUNCTION__, *shadow_pte, (u64)gpte, access_bits,
|
||||||
write_fault, user_fault, gfn);
|
write_fault, user_fault, gfn);
|
||||||
|
|
||||||
|
access_bits &= gpte;
|
||||||
/*
|
/*
|
||||||
* We don't set the accessed bit, since we sometimes want to see
|
* We don't set the accessed bit, since we sometimes want to see
|
||||||
* whether the guest actually used the pte (in order to detect
|
* whether the guest actually used the pte (in order to detect
|
||||||
|
@ -275,17 +272,6 @@ unshadowed:
|
||||||
vcpu->last_pte_updated = shadow_pte;
|
vcpu->last_pte_updated = shadow_pte;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FNAME(set_pte)(struct kvm_vcpu *vcpu, pt_element_t gpte,
|
|
||||||
u64 *shadow_pte, u64 access_bits,
|
|
||||||
int user_fault, int write_fault, int *ptwrite,
|
|
||||||
struct guest_walker *walker, gfn_t gfn)
|
|
||||||
{
|
|
||||||
access_bits &= gpte;
|
|
||||||
FNAME(set_pte_common)(vcpu, shadow_pte,
|
|
||||||
gpte, access_bits, user_fault, write_fault,
|
|
||||||
ptwrite, walker, gfn);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *page,
|
static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *page,
|
||||||
u64 *spte, const void *pte, int bytes,
|
u64 *spte, const void *pte, int bytes,
|
||||||
int offset_in_pte)
|
int offset_in_pte)
|
||||||
|
|
Loading…
Reference in a new issue