|
120 | 120 | #define KVM_REQ_TLB_FLUSH_GUEST \ |
121 | 121 | KVM_ARCH_REQ_FLAGS(27, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP) |
122 | 122 | #define KVM_REQ_APF_READY KVM_ARCH_REQ(28) |
123 | | -#define KVM_REQ_MSR_FILTER_CHANGED KVM_ARCH_REQ(29) |
| 123 | +#define KVM_REQ_RECALC_INTERCEPTS KVM_ARCH_REQ(29) |
124 | 124 | #define KVM_REQ_UPDATE_CPU_DIRTY_LOGGING \ |
125 | 125 | KVM_ARCH_REQ_FLAGS(30, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP) |
126 | 126 | #define KVM_REQ_MMU_FREE_OBSOLETE_ROOTS \ |
@@ -545,10 +545,10 @@ struct kvm_pmc { |
545 | 545 | #define KVM_MAX_NR_GP_COUNTERS KVM_MAX(KVM_MAX_NR_INTEL_GP_COUNTERS, \ |
546 | 546 | KVM_MAX_NR_AMD_GP_COUNTERS) |
547 | 547 |
|
548 | | -#define KVM_MAX_NR_INTEL_FIXED_COUTNERS 3 |
549 | | -#define KVM_MAX_NR_AMD_FIXED_COUTNERS 0 |
550 | | -#define KVM_MAX_NR_FIXED_COUNTERS KVM_MAX(KVM_MAX_NR_INTEL_FIXED_COUTNERS, \ |
551 | | - KVM_MAX_NR_AMD_FIXED_COUTNERS) |
| 548 | +#define KVM_MAX_NR_INTEL_FIXED_COUNTERS 3 |
| 549 | +#define KVM_MAX_NR_AMD_FIXED_COUNTERS 0 |
| 550 | +#define KVM_MAX_NR_FIXED_COUNTERS KVM_MAX(KVM_MAX_NR_INTEL_FIXED_COUNTERS, \ |
| 551 | + KVM_MAX_NR_AMD_FIXED_COUNTERS) |
552 | 552 |
|
553 | 553 | struct kvm_pmu { |
554 | 554 | u8 version; |
@@ -579,6 +579,9 @@ struct kvm_pmu { |
579 | 579 | DECLARE_BITMAP(all_valid_pmc_idx, X86_PMC_IDX_MAX); |
580 | 580 | DECLARE_BITMAP(pmc_in_use, X86_PMC_IDX_MAX); |
581 | 581 |
|
| 582 | + DECLARE_BITMAP(pmc_counting_instructions, X86_PMC_IDX_MAX); |
| 583 | + DECLARE_BITMAP(pmc_counting_branches, X86_PMC_IDX_MAX); |
| 584 | + |
582 | 585 | u64 ds_area; |
583 | 586 | u64 pebs_enable; |
584 | 587 | u64 pebs_enable_rsvd; |
@@ -771,6 +774,7 @@ enum kvm_only_cpuid_leafs { |
771 | 774 | CPUID_7_2_EDX, |
772 | 775 | CPUID_24_0_EBX, |
773 | 776 | CPUID_8000_0021_ECX, |
| 777 | + CPUID_7_1_ECX, |
774 | 778 | NR_KVM_CPU_CAPS, |
775 | 779 |
|
776 | 780 | NKVMCAPINTS = NR_KVM_CPU_CAPS - NCAPINTS, |
@@ -926,6 +930,7 @@ struct kvm_vcpu_arch { |
926 | 930 | bool emulate_regs_need_sync_from_vcpu; |
927 | 931 | int (*complete_userspace_io)(struct kvm_vcpu *vcpu); |
928 | 932 | unsigned long cui_linear_rip; |
| 933 | + int cui_rdmsr_imm_reg; |
929 | 934 |
|
930 | 935 | gpa_t time; |
931 | 936 | s8 pvclock_tsc_shift; |
@@ -1381,6 +1386,7 @@ struct kvm_arch { |
1381 | 1386 | u8 vm_type; |
1382 | 1387 | bool has_private_mem; |
1383 | 1388 | bool has_protected_state; |
| 1389 | + bool has_protected_eoi; |
1384 | 1390 | bool pre_fault_allowed; |
1385 | 1391 | struct hlist_head *mmu_page_hash; |
1386 | 1392 | struct list_head active_mmu_pages; |
@@ -1921,7 +1927,7 @@ struct kvm_x86_ops { |
1921 | 1927 | int (*enable_l2_tlb_flush)(struct kvm_vcpu *vcpu); |
1922 | 1928 |
|
1923 | 1929 | void (*migrate_timers)(struct kvm_vcpu *vcpu); |
1924 | | - void (*recalc_msr_intercepts)(struct kvm_vcpu *vcpu); |
| 1930 | + void (*recalc_intercepts)(struct kvm_vcpu *vcpu); |
1925 | 1931 | int (*complete_emulated_msr)(struct kvm_vcpu *vcpu, int err); |
1926 | 1932 |
|
1927 | 1933 | void (*vcpu_deliver_sipi_vector)(struct kvm_vcpu *vcpu, u8 vector); |
@@ -2162,13 +2168,16 @@ void kvm_prepare_event_vectoring_exit(struct kvm_vcpu *vcpu, gpa_t gpa); |
2162 | 2168 |
|
2163 | 2169 | void kvm_enable_efer_bits(u64); |
2164 | 2170 | bool kvm_valid_efer(struct kvm_vcpu *vcpu, u64 efer); |
2165 | | -int kvm_get_msr_with_filter(struct kvm_vcpu *vcpu, u32 index, u64 *data); |
2166 | | -int kvm_set_msr_with_filter(struct kvm_vcpu *vcpu, u32 index, u64 data); |
2167 | | -int __kvm_get_msr(struct kvm_vcpu *vcpu, u32 index, u64 *data, bool host_initiated); |
2168 | | -int kvm_get_msr(struct kvm_vcpu *vcpu, u32 index, u64 *data); |
2169 | | -int kvm_set_msr(struct kvm_vcpu *vcpu, u32 index, u64 data); |
| 2171 | +int kvm_emulate_msr_read(struct kvm_vcpu *vcpu, u32 index, u64 *data); |
| 2172 | +int kvm_emulate_msr_write(struct kvm_vcpu *vcpu, u32 index, u64 data); |
| 2173 | +int __kvm_emulate_msr_read(struct kvm_vcpu *vcpu, u32 index, u64 *data); |
| 2174 | +int __kvm_emulate_msr_write(struct kvm_vcpu *vcpu, u32 index, u64 data); |
| 2175 | +int kvm_msr_read(struct kvm_vcpu *vcpu, u32 index, u64 *data); |
| 2176 | +int kvm_msr_write(struct kvm_vcpu *vcpu, u32 index, u64 data); |
2170 | 2177 | int kvm_emulate_rdmsr(struct kvm_vcpu *vcpu); |
| 2178 | +int kvm_emulate_rdmsr_imm(struct kvm_vcpu *vcpu, u32 msr, int reg); |
2171 | 2179 | int kvm_emulate_wrmsr(struct kvm_vcpu *vcpu); |
| 2180 | +int kvm_emulate_wrmsr_imm(struct kvm_vcpu *vcpu, u32 msr, int reg); |
2172 | 2181 | int kvm_emulate_as_nop(struct kvm_vcpu *vcpu); |
2173 | 2182 | int kvm_emulate_invd(struct kvm_vcpu *vcpu); |
2174 | 2183 | int kvm_emulate_mwait(struct kvm_vcpu *vcpu); |
|
0 commit comments