From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: [PATCH 05/10] KVM: Add fields for MSI device assignment Date: Thu, 30 Oct 2008 16:20:13 +0800 Message-ID: <1225354818-16963-6-git-send-email-sheng@linux.intel.com> References: <1225354818-16963-1-git-send-email-sheng@linux.intel.com> Cc: kvm@vger.kernel.org, Sheng Yang To: Avi Kivity Return-path: Received: from mga01.intel.com ([192.55.52.88]:6241 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753307AbYJ3IWc (ORCPT ); Thu, 30 Oct 2008 04:22:32 -0400 In-Reply-To: <1225354818-16963-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Prepared for kvm_arch_assigned_device_msi_dispatch(). Signed-off-by: Sheng Yang --- include/linux/kvm.h | 6 +++++- include/linux/kvm_host.h | 4 ++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 44fd7fa..8ec74b8 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -506,11 +506,15 @@ struct kvm_assigned_irq { __u32 host_irq; __u32 guest_irq; __u32 flags; + __u32 guest_msi_data; + __u32 guest_msi_addr; union { - __u32 reserved[12]; + __u32 reserved[10]; }; }; #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) +#define KVM_DEV_IRQ_ASSIGN_ENABLE_MSI (1 << 0) + #endif diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index f002f9b..1cae239 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -307,8 +307,12 @@ struct kvm_assigned_dev_kernel { int host_devfn; int host_irq; int guest_irq; + u32 guest_msi_addr; + u32 guest_msi_data; #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) +#define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) #define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) +#define KVM_ASSIGNED_DEV_HOST_MSI (1 << 9) unsigned long irq_requested_type; int irq_source_id; struct pci_dev *dev; -- 1.5.4.5