From: Jan Kiszka <jan.kiszka@siemens.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v4 3/4] pci-assign: Use PCI-2.3-based shared legacy interrupts
Date: Thu, 08 Mar 2012 18:08:49 +0100 [thread overview]
Message-ID: <4F58E7A1.5010708@siemens.com> (raw)
In-Reply-To: <1331226058.25831.19.camel@ul30vt>
On 2012-03-08 18:00, Alex Williamson wrote:
> On Thu, 2012-03-08 at 11:10 +0100, Jan Kiszka wrote:
>> Enable the new KVM feature that allows legacy interrupt sharing for
>> PCI-2.3-compliant devices. This requires to synchronize any guest
>> change of the INTx mask bit to the kernel.
>>
>> The feature is controlled by the property 'share_intx' and is off by
>> default for now.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> hw/device-assignment.c | 25 +++++++++++++++++++++++++
>> hw/device-assignment.h | 10 ++++++----
>> qemu-kvm.c | 9 +++++++++
>> qemu-kvm.h | 2 ++
>> 4 files changed, 42 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/device-assignment.c b/hw/device-assignment.c
>> index a5f1abb..b7cabd4 100644
>> --- a/hw/device-assignment.c
>> +++ b/hw/device-assignment.c
>> @@ -782,6 +782,13 @@ static int assign_device(AssignedDevice *dev)
>> "cause host memory corruption if the device issues DMA write "
>> "requests!\n");
>> }
>> + if (dev->features & ASSIGNED_DEVICE_SHARE_INTX_MASK) {
>> + assigned_dev_data.flags |= KVM_DEV_ASSIGN_PCI_2_3;
>> +
>> + /* hide host-side INTx masking from the guest */
>> + dev->emulate_config_read[PCI_COMMAND + 1] |=
>> + PCI_COMMAND_INTX_DISABLE >> 8;
>> + }
>
> I think this also needs a kvm_has_intx_set_mask() check or else we're
> emulating pci2.3 intx disable support without actually backing it.
Hmm... true.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2012-03-08 17:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-08 10:10 [PATCH v4 0/4] qemu-kvm: pci-assign: Host IRQ sharing suppport Jan Kiszka
2012-03-08 10:10 ` [PATCH v4 1/4] kvm: Update kernel headers against kvm.git Jan Kiszka
2012-04-05 9:44 ` Michael S. Tsirkin
2012-03-08 10:10 ` [PATCH v4 2/4] kvm: Introduce kvm_has_intx_set_mask Jan Kiszka
2012-04-05 9:44 ` Michael S. Tsirkin
2012-03-08 10:10 ` [PATCH v4 3/4] pci-assign: Use PCI-2.3-based shared legacy interrupts Jan Kiszka
2012-03-08 17:00 ` Alex Williamson
2012-03-08 17:08 ` Jan Kiszka [this message]
2012-03-08 18:04 ` [PATCH v5 " Jan Kiszka
2012-04-05 9:44 ` [PATCH v4 " Michael S. Tsirkin
2012-03-08 10:10 ` [PATCH v4 4/4] pci_assign: Flip defaults of prefer_msi and share_intx Jan Kiszka
2012-04-05 9:46 ` Michael S. Tsirkin
2012-03-09 22:38 ` [PATCH v4 0/4] qemu-kvm: pci-assign: Host IRQ sharing suppport Alex Williamson
2012-03-09 22:49 ` 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=4F58E7A1.5010708@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--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.