diff options
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/bootparam.h | 8 | ||||
-rw-r--r-- | include/asm-x86/kvm_host.h | 10 | ||||
-rw-r--r-- | include/asm-x86/pgtable_32.h | 9 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 6 |
4 files changed, 16 insertions, 17 deletions
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h index e8659909e5f6..f62f4733606b 100644 --- a/include/asm-x86/bootparam.h +++ b/include/asm-x86/bootparam.h | |||
@@ -14,10 +14,10 @@ | |||
14 | 14 | ||
15 | /* extensible setup data list node */ | 15 | /* extensible setup data list node */ |
16 | struct setup_data { | 16 | struct setup_data { |
17 | u64 next; | 17 | __u64 next; |
18 | u32 type; | 18 | __u32 type; |
19 | u32 len; | 19 | __u32 len; |
20 | u8 data[0]; | 20 | __u8 data[0]; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | struct setup_header { | 23 | struct setup_header { |
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 9d963cd6533c..1d8cd01fa514 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -314,6 +314,9 @@ struct kvm_arch{ | |||
314 | struct page *apic_access_page; | 314 | struct page *apic_access_page; |
315 | 315 | ||
316 | gpa_t wall_clock; | 316 | gpa_t wall_clock; |
317 | |||
318 | struct page *ept_identity_pagetable; | ||
319 | bool ept_identity_pagetable_done; | ||
317 | }; | 320 | }; |
318 | 321 | ||
319 | struct kvm_vm_stat { | 322 | struct kvm_vm_stat { |
@@ -422,6 +425,7 @@ struct kvm_x86_ops { | |||
422 | struct kvm_run *run); | 425 | struct kvm_run *run); |
423 | 426 | ||
424 | int (*set_tss_addr)(struct kvm *kvm, unsigned int addr); | 427 | int (*set_tss_addr)(struct kvm *kvm, unsigned int addr); |
428 | int (*get_tdp_level)(void); | ||
425 | }; | 429 | }; |
426 | 430 | ||
427 | extern struct kvm_x86_ops *kvm_x86_ops; | 431 | extern struct kvm_x86_ops *kvm_x86_ops; |
@@ -433,6 +437,9 @@ void kvm_mmu_destroy(struct kvm_vcpu *vcpu); | |||
433 | int kvm_mmu_create(struct kvm_vcpu *vcpu); | 437 | int kvm_mmu_create(struct kvm_vcpu *vcpu); |
434 | int kvm_mmu_setup(struct kvm_vcpu *vcpu); | 438 | int kvm_mmu_setup(struct kvm_vcpu *vcpu); |
435 | void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); | 439 | void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); |
440 | void kvm_mmu_set_base_ptes(u64 base_pte); | ||
441 | void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask, | ||
442 | u64 dirty_mask, u64 nx_mask, u64 x_mask); | ||
436 | 443 | ||
437 | int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); | 444 | int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); |
438 | void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); | 445 | void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); |
@@ -620,7 +627,7 @@ static inline void fx_restore(struct i387_fxsave_struct *image) | |||
620 | asm("fxrstor (%0)":: "r" (image)); | 627 | asm("fxrstor (%0)":: "r" (image)); |
621 | } | 628 | } |
622 | 629 | ||
623 | static inline void fpu_init(void) | 630 | static inline void fx_finit(void) |
624 | { | 631 | { |
625 | asm("finit"); | 632 | asm("finit"); |
626 | } | 633 | } |
@@ -644,6 +651,7 @@ static inline void kvm_inject_gp(struct kvm_vcpu *vcpu, u32 error_code) | |||
644 | #define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4" | 651 | #define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4" |
645 | #define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4" | 652 | #define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4" |
646 | #define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30" | 653 | #define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30" |
654 | #define ASM_VMX_INVEPT ".byte 0x66, 0x0f, 0x38, 0x80, 0x08" | ||
647 | #define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08" | 655 | #define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08" |
648 | 656 | ||
649 | #define MSR_IA32_TIME_STAMP_COUNTER 0x010 | 657 | #define MSR_IA32_TIME_STAMP_COUNTER 0x010 |
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 577ab79c4c27..d7f0403bbecb 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -88,14 +88,7 @@ extern unsigned long pg0[]; | |||
88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ | 88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ |
89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) | 89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) |
90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) | 90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) |
91 | 91 | #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) | |
92 | extern int pmd_bad(pmd_t pmd); | ||
93 | |||
94 | #define pmd_bad_v1(x) \ | ||
95 | (_KERNPG_TABLE != (pmd_val((x)) & ~(PAGE_MASK | _PAGE_USER))) | ||
96 | #define pmd_bad_v2(x) \ | ||
97 | (_KERNPG_TABLE != (pmd_val((x)) & ~(PAGE_MASK | _PAGE_USER | \ | ||
98 | _PAGE_PSE | _PAGE_NX))) | ||
99 | 92 | ||
100 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
101 | 94 | ||
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index a3bbf8766c1d..efe83dcbd412 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -158,14 +158,12 @@ static inline unsigned long pgd_bad(pgd_t pgd) | |||
158 | 158 | ||
159 | static inline unsigned long pud_bad(pud_t pud) | 159 | static inline unsigned long pud_bad(pud_t pud) |
160 | { | 160 | { |
161 | return pud_val(pud) & | 161 | return pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); |
162 | ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX); | ||
163 | } | 162 | } |
164 | 163 | ||
165 | static inline unsigned long pmd_bad(pmd_t pmd) | 164 | static inline unsigned long pmd_bad(pmd_t pmd) |
166 | { | 165 | { |
167 | return pmd_val(pmd) & | 166 | return pmd_val(pmd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); |
168 | ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX); | ||
169 | } | 167 | } |
170 | 168 | ||
171 | #define pte_none(x) (!pte_val((x))) | 169 | #define pte_none(x) (!pte_val((x))) |