aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kvm.h2
-rw-r--r--include/linux/kvm_host.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index f1dada0519eb..5037e170a70d 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -430,6 +430,7 @@ struct kvm_trace_rec {
430#ifdef __KVM_HAVE_PIT 430#ifdef __KVM_HAVE_PIT
431#define KVM_CAP_PIT2 33 431#define KVM_CAP_PIT2 33
432#endif 432#endif
433#define KVM_CAP_SET_BOOT_CPU_ID 34
433 434
434#ifdef KVM_CAP_IRQ_ROUTING 435#ifdef KVM_CAP_IRQ_ROUTING
435 436
@@ -537,6 +538,7 @@ struct kvm_irqfd {
537#define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq) 538#define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq)
538#define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) 539#define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd)
539#define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config) 540#define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config)
541#define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78)
540 542
541/* 543/*
542 * ioctls for vcpu fds 544 * ioctls for vcpu fds
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index a5bd429e9bd3..d3fdf1a738c9 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -131,8 +131,12 @@ struct kvm {
131 int nmemslots; 131 int nmemslots;
132 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + 132 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS +
133 KVM_PRIVATE_MEM_SLOTS]; 133 KVM_PRIVATE_MEM_SLOTS];
134#ifdef CONFIG_KVM_APIC_ARCHITECTURE
135 u32 bsp_vcpu_id;
134 struct kvm_vcpu *bsp_vcpu; 136 struct kvm_vcpu *bsp_vcpu;
137#endif
135 struct kvm_vcpu *vcpus[KVM_MAX_VCPUS]; 138 struct kvm_vcpu *vcpus[KVM_MAX_VCPUS];
139 atomic_t online_vcpus;
136 struct list_head vm_list; 140 struct list_head vm_list;
137 struct mutex lock; 141 struct mutex lock;
138 struct kvm_io_bus mmio_bus; 142 struct kvm_io_bus mmio_bus;
@@ -550,8 +554,10 @@ static inline void kvm_irqfd_release(struct kvm *kvm) {}
550 554
551#endif /* CONFIG_HAVE_KVM_EVENTFD */ 555#endif /* CONFIG_HAVE_KVM_EVENTFD */
552 556
557#ifdef CONFIG_KVM_APIC_ARCHITECTURE
553static inline bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu) 558static inline bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu)
554{ 559{
555 return vcpu->kvm->bsp_vcpu == vcpu; 560 return vcpu->kvm->bsp_vcpu == vcpu;
556} 561}
557#endif 562#endif
563#endif