diff options
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
| -rw-r--r-- | arch/x86/include/asm/kvm_host.h | 30 | 
1 files changed, 19 insertions, 11 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index dc87b65e9c3..4979778cc7f 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -33,10 +33,10 @@  #define KVM_MAX_VCPUS 254  #define KVM_SOFT_MAX_VCPUS 160 -#define KVM_MEMORY_SLOTS 32 -/* memory slots that does not exposed to userspace */ -#define KVM_PRIVATE_MEM_SLOTS 4 -#define KVM_MEM_SLOTS_NUM (KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS) +#define KVM_USER_MEM_SLOTS 125 +/* memory slots that are not exposed to userspace */ +#define KVM_PRIVATE_MEM_SLOTS 3 +#define KVM_MEM_SLOTS_NUM (KVM_USER_MEM_SLOTS + KVM_PRIVATE_MEM_SLOTS)  #define KVM_MMIO_SIZE 16 @@ -219,11 +219,6 @@ struct kvm_mmu_page {  	u64 *spt;  	/* hold the gfn of each spte inside spt */  	gfn_t *gfns; -	/* -	 * One bit set per slot which has memory -	 * in this shadow page. -	 */ -	DECLARE_BITMAP(slot_bitmap, KVM_MEM_SLOTS_NUM);  	bool unsync;  	int root_count;          /* Currently serving as active root */  	unsigned int unsync_children; @@ -419,8 +414,8 @@ struct kvm_vcpu_arch {  	gpa_t time;  	struct pvclock_vcpu_time_info hv_clock;  	unsigned int hw_tsc_khz; -	unsigned int time_offset; -	struct page *time_page; +	struct gfn_to_hva_cache pv_time; +	bool pv_time_enabled;  	/* set guest stopped flag in pvclock flags field */  	bool pvclock_set_guest_stopped_request; @@ -502,6 +497,13 @@ struct kvm_vcpu_arch {  		u64 msr_val;  		struct gfn_to_hva_cache data;  	} pv_eoi; + +	/* +	 * Indicate whether the access faults on its page table in guest +	 * which is set when fix page fault and used to detect unhandeable +	 * instruction. +	 */ +	bool write_fault_to_shadow_pgtable;  };  struct kvm_lpage_info { @@ -697,6 +699,11 @@ struct kvm_x86_ops {  	void (*enable_nmi_window)(struct kvm_vcpu *vcpu);  	void (*enable_irq_window)(struct kvm_vcpu *vcpu);  	void (*update_cr8_intercept)(struct kvm_vcpu *vcpu, int tpr, int irr); +	int (*vm_has_apicv)(struct kvm *kvm); +	void (*hwapic_irr_update)(struct kvm_vcpu *vcpu, int max_irr); +	void (*hwapic_isr_update)(struct kvm *kvm, int isr); +	void (*load_eoi_exitmap)(struct kvm_vcpu *vcpu, u64 *eoi_exit_bitmap); +	void (*set_virtual_x2apic_mode)(struct kvm_vcpu *vcpu, bool set);  	int (*set_tss_addr)(struct kvm *kvm, unsigned int addr);  	int (*get_tdp_level)(void);  	u64 (*get_mt_mask)(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio); @@ -991,6 +998,7 @@ int kvm_age_hva(struct kvm *kvm, unsigned long hva);  int kvm_test_age_hva(struct kvm *kvm, unsigned long hva);  void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);  int cpuid_maxphyaddr(struct kvm_vcpu *vcpu); +int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v);  int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu);  int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu);  int kvm_cpu_get_interrupt(struct kvm_vcpu *v);  |