diff options
-rw-r--r-- | arch/x86/pci/xen.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 56ab74989cf1..94e76620460f 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c | |||
@@ -162,6 +162,9 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) | |||
162 | struct msi_desc *msidesc; | 162 | struct msi_desc *msidesc; |
163 | int *v; | 163 | int *v; |
164 | 164 | ||
165 | if (type == PCI_CAP_ID_MSI && nvec > 1) | ||
166 | return 1; | ||
167 | |||
165 | v = kzalloc(sizeof(int) * max(1, nvec), GFP_KERNEL); | 168 | v = kzalloc(sizeof(int) * max(1, nvec), GFP_KERNEL); |
166 | if (!v) | 169 | if (!v) |
167 | return -ENOMEM; | 170 | return -ENOMEM; |
@@ -220,6 +223,9 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) | |||
220 | struct msi_desc *msidesc; | 223 | struct msi_desc *msidesc; |
221 | struct msi_msg msg; | 224 | struct msi_msg msg; |
222 | 225 | ||
226 | if (type == PCI_CAP_ID_MSI && nvec > 1) | ||
227 | return 1; | ||
228 | |||
223 | list_for_each_entry(msidesc, &dev->msi_list, list) { | 229 | list_for_each_entry(msidesc, &dev->msi_list, list) { |
224 | __read_msi_msg(msidesc, &msg); | 230 | __read_msi_msg(msidesc, &msg); |
225 | pirq = MSI_ADDR_EXT_DEST_ID(msg.address_hi) | | 231 | pirq = MSI_ADDR_EXT_DEST_ID(msg.address_hi) | |
@@ -263,6 +269,9 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) | |||
263 | int ret = 0; | 269 | int ret = 0; |
264 | struct msi_desc *msidesc; | 270 | struct msi_desc *msidesc; |
265 | 271 | ||
272 | if (type == PCI_CAP_ID_MSI && nvec > 1) | ||
273 | return 1; | ||
274 | |||
266 | list_for_each_entry(msidesc, &dev->msi_list, list) { | 275 | list_for_each_entry(msidesc, &dev->msi_list, list) { |
267 | struct physdev_map_pirq map_irq; | 276 | struct physdev_map_pirq map_irq; |
268 | domid_t domid; | 277 | domid_t domid; |