aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-09-10 11:30:57 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:52:41 -0400
commitff03a073e715d49b5cfeeec862649b1df2481ae0 (patch)
treefa0642550d0d1af65a4a02def7f1862410a36edc /arch/x86/include
parentd47f00a62b2e14b4a811b87bdb9ea1809693a377 (diff)
KVM: MMU: Add kvm_mmu parameter to load_pdptrs function
This function need to be able to load the pdptrs from any mmu context currently in use. So change this function to take an kvm_mmu parameter to fit these needs. As a side effect this patch also moves the cached pdptrs from vcpu_arch into the kvm_mmu struct. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/kvm_host.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 574db6d1532..9e70de37654 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -257,6 +257,8 @@ struct kvm_mmu {
257 257
258 u64 *pae_root; 258 u64 *pae_root;
259 u64 rsvd_bits_mask[2][4]; 259 u64 rsvd_bits_mask[2][4];
260
261 u64 pdptrs[4]; /* pae */
260}; 262};
261 263
262struct kvm_vcpu_arch { 264struct kvm_vcpu_arch {
@@ -276,7 +278,6 @@ struct kvm_vcpu_arch {
276 unsigned long cr4_guest_owned_bits; 278 unsigned long cr4_guest_owned_bits;
277 unsigned long cr8; 279 unsigned long cr8;
278 u32 hflags; 280 u32 hflags;
279 u64 pdptrs[4]; /* pae */
280 u64 efer; 281 u64 efer;
281 u64 apic_base; 282 u64 apic_base;
282 struct kvm_lapic *apic; /* kernel irqchip context */ 283 struct kvm_lapic *apic; /* kernel irqchip context */
@@ -592,7 +593,7 @@ void kvm_mmu_zap_all(struct kvm *kvm);
592unsigned int kvm_mmu_calculate_mmu_pages(struct kvm *kvm); 593unsigned int kvm_mmu_calculate_mmu_pages(struct kvm *kvm);
593void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages); 594void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages);
594 595
595int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3); 596int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3);
596 597
597int emulator_write_phys(struct kvm_vcpu *vcpu, gpa_t gpa, 598int emulator_write_phys(struct kvm_vcpu *vcpu, gpa_t gpa,
598 const void *val, int bytes); 599 const void *val, int bytes);