diff options
Diffstat (limited to 'drivers/kvm/x86.h')
-rw-r--r-- | drivers/kvm/x86.h | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h index 0e01ac75268c..0da4be9b0bad 100644 --- a/drivers/kvm/x86.h +++ b/drivers/kvm/x86.h | |||
@@ -334,44 +334,6 @@ int kvm_fix_hypercall(struct kvm_vcpu *vcpu); | |||
334 | 334 | ||
335 | int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code); | 335 | int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code); |
336 | 336 | ||
337 | static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) | ||
338 | { | ||
339 | if (unlikely(vcpu->kvm->n_free_mmu_pages < KVM_MIN_FREE_MMU_PAGES)) | ||
340 | __kvm_mmu_free_some_pages(vcpu); | ||
341 | } | ||
342 | |||
343 | static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu) | ||
344 | { | ||
345 | if (likely(vcpu->arch.mmu.root_hpa != INVALID_PAGE)) | ||
346 | return 0; | ||
347 | |||
348 | return kvm_mmu_load(vcpu); | ||
349 | } | ||
350 | |||
351 | static inline int is_long_mode(struct kvm_vcpu *vcpu) | ||
352 | { | ||
353 | #ifdef CONFIG_X86_64 | ||
354 | return vcpu->arch.shadow_efer & EFER_LME; | ||
355 | #else | ||
356 | return 0; | ||
357 | #endif | ||
358 | } | ||
359 | |||
360 | static inline int is_pae(struct kvm_vcpu *vcpu) | ||
361 | { | ||
362 | return vcpu->arch.cr4 & X86_CR4_PAE; | ||
363 | } | ||
364 | |||
365 | static inline int is_pse(struct kvm_vcpu *vcpu) | ||
366 | { | ||
367 | return vcpu->arch.cr4 & X86_CR4_PSE; | ||
368 | } | ||
369 | |||
370 | static inline int is_paging(struct kvm_vcpu *vcpu) | ||
371 | { | ||
372 | return vcpu->arch.cr0 & X86_CR0_PG; | ||
373 | } | ||
374 | |||
375 | int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3); | 337 | int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3); |
376 | int complete_pio(struct kvm_vcpu *vcpu); | 338 | int complete_pio(struct kvm_vcpu *vcpu); |
377 | 339 | ||
@@ -490,10 +452,4 @@ static inline void kvm_inject_gp(struct kvm_vcpu *vcpu, u32 error_code) | |||
490 | #define TSS_REDIRECTION_SIZE (256 / 8) | 452 | #define TSS_REDIRECTION_SIZE (256 / 8) |
491 | #define RMODE_TSS_SIZE (TSS_BASE_SIZE + TSS_REDIRECTION_SIZE + TSS_IOPB_SIZE + 1) | 453 | #define RMODE_TSS_SIZE (TSS_BASE_SIZE + TSS_REDIRECTION_SIZE + TSS_IOPB_SIZE + 1) |
492 | 454 | ||
493 | static inline int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) | ||
494 | { | ||
495 | return vcpu->arch.mp_state == VCPU_MP_STATE_RUNNABLE | ||
496 | || vcpu->arch.mp_state == VCPU_MP_STATE_SIPI_RECEIVED; | ||
497 | } | ||
498 | |||
499 | #endif | 455 | #endif |