aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2009-02-25 04:22:26 -0500
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:23 -0400
commitc1e01514296e8a4a43ff0c88dcff635cb90feb5f (patch)
tree299a54da71c4900fc3b71840e2c6eec98b35f8b4 /include/linux/kvm_host.h
parentbfd349d073b2838a6a031f057d25e266619b7093 (diff)
KVM: Ioctls for init MSI-X entry
Introduce KVM_SET_MSIX_NR and KVM_SET_MSIX_ENTRY two ioctls. This two ioctls are used by userspace to specific guest device MSI-X entry number and correlate MSI-X entry with GSI during the initialization stage. MSI-X should be well initialzed before enabling. Don't support change MSI-X entry number for now. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 1a2f98fbecea..432edc27e82b 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -319,6 +319,12 @@ struct kvm_irq_ack_notifier {
319 void (*irq_acked)(struct kvm_irq_ack_notifier *kian); 319 void (*irq_acked)(struct kvm_irq_ack_notifier *kian);
320}; 320};
321 321
322struct kvm_guest_msix_entry {
323 u32 vector;
324 u16 entry;
325 u16 flags;
326};
327
322struct kvm_assigned_dev_kernel { 328struct kvm_assigned_dev_kernel {
323 struct kvm_irq_ack_notifier ack_notifier; 329 struct kvm_irq_ack_notifier ack_notifier;
324 struct work_struct interrupt_work; 330 struct work_struct interrupt_work;
@@ -326,13 +332,17 @@ struct kvm_assigned_dev_kernel {
326 int assigned_dev_id; 332 int assigned_dev_id;
327 int host_busnr; 333 int host_busnr;
328 int host_devfn; 334 int host_devfn;
335 unsigned int entries_nr;
329 int host_irq; 336 int host_irq;
330 bool host_irq_disabled; 337 bool host_irq_disabled;
338 struct msix_entry *host_msix_entries;
331 int guest_irq; 339 int guest_irq;
340 struct kvm_guest_msix_entry *guest_msix_entries;
332#define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) 341#define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0)
333#define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) 342#define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1)
334#define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) 343#define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8)
335#define KVM_ASSIGNED_DEV_HOST_MSI (1 << 9) 344#define KVM_ASSIGNED_DEV_HOST_MSI (1 << 9)
345#define KVM_ASSIGNED_DEV_MSIX ((1 << 2) | (1 << 10))
336 unsigned long irq_requested_type; 346 unsigned long irq_requested_type;
337 int irq_source_id; 347 int irq_source_id;
338 int flags; 348 int flags;