diff options
author | Sheng Yang <sheng@linux.intel.com> | 2009-03-12 09:45:39 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 04:48:29 -0400 |
commit | e56d532f20c890a06bbe7cd479f4201e3a03cd73 (patch) | |
tree | 6c8b1a019a77bf2081ac7482eea322f5b0a636e8 /include/linux/kvm_host.h | |
parent | 386eb6e8b3caface8a0514da70a47c05cabb5b96 (diff) |
KVM: Device assignment framework rework
After discussion with Marcelo, we decided to rework device assignment framework
together. The old problems are kernel logic is unnecessary complex. So Marcelo
suggest to split it into a more elegant way:
1. Split host IRQ assign and guest IRQ assign. And userspace determine the
combination. Also discard msi2intx parameter, userspace can specific
KVM_DEV_IRQ_HOST_MSI | KVM_DEV_IRQ_GUEST_INTX in assigned_irq->flags to
enable MSI to INTx convertion.
2. Split assign IRQ and deassign IRQ. Import two new ioctls:
KVM_ASSIGN_DEV_IRQ and KVM_DEASSIGN_DEV_IRQ.
This patch also fixed the reversed _IOR vs _IOW in definition(by deprecated the
old interface).
[avi: replace homemade bitcount() by hweight_long()]
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
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.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index fb60f31c4fb3..40e49ede8f91 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -339,11 +339,6 @@ struct kvm_assigned_dev_kernel { | |||
339 | struct msix_entry *host_msix_entries; | 339 | struct msix_entry *host_msix_entries; |
340 | int guest_irq; | 340 | int guest_irq; |
341 | struct kvm_guest_msix_entry *guest_msix_entries; | 341 | struct kvm_guest_msix_entry *guest_msix_entries; |
342 | #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) | ||
343 | #define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) | ||
344 | #define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) | ||
345 | #define KVM_ASSIGNED_DEV_HOST_MSI (1 << 9) | ||
346 | #define KVM_ASSIGNED_DEV_MSIX ((1 << 2) | (1 << 10)) | ||
347 | unsigned long irq_requested_type; | 342 | unsigned long irq_requested_type; |
348 | int irq_source_id; | 343 | int irq_source_id; |
349 | int flags; | 344 | int flags; |