diff options
Diffstat (limited to 'include/linux/kvm_host.h')
| -rw-r--r-- | include/linux/kvm_host.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 7d21cf9f4380..ec4e3bd83d47 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -134,6 +134,8 @@ static inline bool is_error_page(struct page *page) | |||
| 134 | #define KVM_REQ_EPR_EXIT 20 | 134 | #define KVM_REQ_EPR_EXIT 20 |
| 135 | #define KVM_REQ_SCAN_IOAPIC 21 | 135 | #define KVM_REQ_SCAN_IOAPIC 21 |
| 136 | #define KVM_REQ_GLOBAL_CLOCK_UPDATE 22 | 136 | #define KVM_REQ_GLOBAL_CLOCK_UPDATE 22 |
| 137 | #define KVM_REQ_ENABLE_IBS 23 | ||
| 138 | #define KVM_REQ_DISABLE_IBS 24 | ||
| 137 | 139 | ||
| 138 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 140 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
| 139 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 | 141 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 |
| @@ -163,6 +165,7 @@ enum kvm_bus { | |||
| 163 | KVM_MMIO_BUS, | 165 | KVM_MMIO_BUS, |
| 164 | KVM_PIO_BUS, | 166 | KVM_PIO_BUS, |
| 165 | KVM_VIRTIO_CCW_NOTIFY_BUS, | 167 | KVM_VIRTIO_CCW_NOTIFY_BUS, |
| 168 | KVM_FAST_MMIO_BUS, | ||
| 166 | KVM_NR_BUSES | 169 | KVM_NR_BUSES |
| 167 | }; | 170 | }; |
| 168 | 171 | ||
| @@ -367,6 +370,7 @@ struct kvm { | |||
| 367 | struct mm_struct *mm; /* userspace tied to this vm */ | 370 | struct mm_struct *mm; /* userspace tied to this vm */ |
| 368 | struct kvm_memslots *memslots; | 371 | struct kvm_memslots *memslots; |
| 369 | struct srcu_struct srcu; | 372 | struct srcu_struct srcu; |
| 373 | struct srcu_struct irq_srcu; | ||
| 370 | #ifdef CONFIG_KVM_APIC_ARCHITECTURE | 374 | #ifdef CONFIG_KVM_APIC_ARCHITECTURE |
| 371 | u32 bsp_vcpu_id; | 375 | u32 bsp_vcpu_id; |
| 372 | #endif | 376 | #endif |
| @@ -410,9 +414,7 @@ struct kvm { | |||
| 410 | unsigned long mmu_notifier_seq; | 414 | unsigned long mmu_notifier_seq; |
| 411 | long mmu_notifier_count; | 415 | long mmu_notifier_count; |
| 412 | #endif | 416 | #endif |
| 413 | /* Protected by mmu_lock */ | 417 | long tlbs_dirty; |
| 414 | bool tlbs_dirty; | ||
| 415 | |||
| 416 | struct list_head devices; | 418 | struct list_head devices; |
| 417 | }; | 419 | }; |
| 418 | 420 | ||
| @@ -584,7 +586,7 @@ void mark_page_dirty(struct kvm *kvm, gfn_t gfn); | |||
| 584 | 586 | ||
| 585 | void kvm_vcpu_block(struct kvm_vcpu *vcpu); | 587 | void kvm_vcpu_block(struct kvm_vcpu *vcpu); |
| 586 | void kvm_vcpu_kick(struct kvm_vcpu *vcpu); | 588 | void kvm_vcpu_kick(struct kvm_vcpu *vcpu); |
| 587 | bool kvm_vcpu_yield_to(struct kvm_vcpu *target); | 589 | int kvm_vcpu_yield_to(struct kvm_vcpu *target); |
| 588 | void kvm_vcpu_on_spin(struct kvm_vcpu *vcpu); | 590 | void kvm_vcpu_on_spin(struct kvm_vcpu *vcpu); |
| 589 | void kvm_load_guest_fpu(struct kvm_vcpu *vcpu); | 591 | void kvm_load_guest_fpu(struct kvm_vcpu *vcpu); |
| 590 | void kvm_put_guest_fpu(struct kvm_vcpu *vcpu); | 592 | void kvm_put_guest_fpu(struct kvm_vcpu *vcpu); |
| @@ -879,6 +881,13 @@ static inline hpa_t pfn_to_hpa(pfn_t pfn) | |||
| 879 | return (hpa_t)pfn << PAGE_SHIFT; | 881 | return (hpa_t)pfn << PAGE_SHIFT; |
| 880 | } | 882 | } |
| 881 | 883 | ||
| 884 | static inline bool kvm_is_error_gpa(struct kvm *kvm, gpa_t gpa) | ||
| 885 | { | ||
| 886 | unsigned long hva = gfn_to_hva(kvm, gpa_to_gfn(gpa)); | ||
| 887 | |||
| 888 | return kvm_is_error_hva(hva); | ||
| 889 | } | ||
| 890 | |||
| 882 | static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu) | 891 | static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu) |
| 883 | { | 892 | { |
| 884 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); | 893 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); |
