From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] pci-assign: Fix transition MSI->INTx
Date: Thu, 6 Jan 2011 16:23:42 +0200 [thread overview]
Message-ID: <20110106142342.GJ12142@redhat.com> (raw)
In-Reply-To: <4D238B5E.9010102@web.de>
On Tue, Jan 04, 2011 at 10:04:30PM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> 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 <jan.kiszka@siemens.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> 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
next prev parent reply other threads:[~2011-01-06 14:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 21:04 [PATCH] pci-assign: Fix transition MSI->INTx Jan Kiszka
2011-01-06 13:40 ` Avi Kivity
2011-01-06 13:51 ` Alex Williamson
2011-01-06 14:23 ` Michael S. Tsirkin [this message]
2011-01-07 9:59 ` Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110106142342.GJ12142@redhat.com \
--to=mst@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox