From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH] pci-assign: Use PCI-2.3-based shared legacy interrupts
Date: Tue, 9 Nov 2010 16:42:56 +0200 [thread overview]
Message-ID: <20101109144256.GA24525@redhat.com> (raw)
In-Reply-To: <4CD7DE3B.3020602@siemens.com>
On Mon, Nov 08, 2010 at 12:25:47PM +0100, Jan Kiszka wrote:
> @@ -417,6 +423,17 @@ static void assigned_dev_pci_write_config(PCIDevice *d, uint32_t address,
>
> if (address == 0x4) {
> pci_default_write_config(d, address, val, len);
> + pci_dev->intx_masked = val & PCI_COMMAND_INTX_DISABLE;
> +#ifdef KVM_CAP_PCI_2_3
> + memset(&assigned_dev_data, 0, sizeof(assigned_dev_data));
> + assigned_dev_data.assigned_dev_id =
> + calc_assigned_dev_id(pci_dev->h_segnr, pci_dev->h_busnr,
> + pci_dev->h_devfn);
> + if (pci_dev->intx_masked) {
> + assigned_dev_data.flags = KVM_DEV_ASSIGN_MASK_INTX;
> + }
> + kvm_assign_set_intx_mask(kvm_context, &assigned_dev_data);
> +#endif
> /* Continue to program the card */
> }
>
> @@ -494,6 +511,10 @@ do_log:
> else if (address == 6)
> val &= ~0x10;
> }
> + if (address == PCI_COMMAND) {
Could also be a single-byte write into the high byte
of this word.
> + val &= ~PCI_COMMAND_INTX_DISABLE;
> + val |= pci_dev->intx_masked;
> + }
>
> return val;
> }
> @@ -824,11 +845,6 @@ static void free_assigned_device(AssignedDevice *dev)
next prev parent reply other threads:[~2010-11-09 14:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 11:25 [PATCH] pci-assign: Use PCI-2.3-based shared legacy interrupts Jan Kiszka
2010-11-09 14:42 ` Michael S. Tsirkin [this message]
2010-11-09 14:55 ` Jan Kiszka
2010-11-09 15:08 ` Michael S. Tsirkin
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=20101109144256.GA24525@redhat.com \
--to=mst@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.