From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH] pci-assign: Fix transition MSI->INTx Date: Thu, 6 Jan 2011 16:23:42 +0200 Message-ID: <20110106142342.GJ12142@redhat.com> References: <4D238B5E.9010102@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46687 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752197Ab1AFOX7 (ORCPT ); Thu, 6 Jan 2011 09:23:59 -0500 Content-Disposition: inline In-Reply-To: <4D238B5E.9010102@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jan 04, 2011 at 10:04:30PM +0100, Jan Kiszka wrote: > From: Jan Kiszka > > Make sure to re-register the IRQ of an assigned device as INTx when the > guest disables MSI[X] mode again. > > Signed-off-by: Jan Kiszka Acked-by: Michael S. Tsirkin > --- > hw/device-assignment.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/hw/device-assignment.c b/hw/device-assignment.c > index f6410f8..fce7567 100644 > --- a/hw/device-assignment.c > +++ b/hw/device-assignment.c > @@ -1192,7 +1192,10 @@ static void assigned_dev_update_msi(PCIDevice *pci_dev, unsigned int ctrl_pos) > if (kvm_assign_irq(kvm_context, &assigned_irq_data) < 0) > perror("assigned_dev_enable_msi: assign irq"); > > + assigned_dev->girq = -1; > assigned_dev->irq_requested_type = assigned_irq_data.flags; > + } else { > + assign_irq(assigned_dev); > } > } > #endif > @@ -1332,7 +1335,10 @@ static void assigned_dev_update_msix(PCIDevice *pci_dev, unsigned int ctrl_pos) > perror("assigned_dev_enable_msix: assign irq"); > return; > } > + assigned_dev->girq = -1; > assigned_dev->irq_requested_type = assigned_irq_data.flags; > + } else { > + assign_irq(assigned_dev); > } > } > #endif > -- > 1.7.1 > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html