[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 22/42] ivshmem: Leave INTx alone when using M
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v2 22/42] ivshmem: Leave INTx alone when using MSI-X |
Date: |
Wed, 09 Mar 2016 21:16:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Marc-André Lureau <address@hidden> writes:
> Hi
>
> On Mon, Mar 7, 2016 at 8:25 PM, Markus Armbruster <address@hidden> wrote:
>> The ivshmem device can either use MSI-X or legacy INTx for interrupts.
>>
>> With MSI-X enabled, peer interrupt events trigger an MSI as they
>> should. But software can still raise INTx via interrupt status and
>> mask register in BAR 0. This is explicitly prohibited by PCI Local
>> Bus Specification Revision 3.0, section 6.8.3.3:
>>
>> While enabled for MSI or MSI-X operation, a function is prohibited
>> from using its INTx# pin (if implemented) to request service (MSI,
>> MSI-X, and INTx# are mutually exclusive).
>>
>> Fix the device model to leave INTx alone when using MSI-X.
>>
>> Document that we claim to use INTx in config space even when we don't.
>> Unlike other devices, ivshmem does *not* use INTx when configured for
>> MSI-X and MSI-X isn't enabled by software.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> hw/misc/ivshmem.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
>> index cfea151..fc37feb 100644
>> --- a/hw/misc/ivshmem.c
>> +++ b/hw/misc/ivshmem.c
>> @@ -126,6 +126,11 @@ static void ivshmem_update_irq(IVShmemState *s)
>> PCIDevice *d = PCI_DEVICE(s);
>> uint32_t isr = s->intrstatus & s->intrmask;
>>
>> + /* No INTx with msi=off, whether the guest enabled MSI-X or not */
>> + if (ivshmem_has_feature(s, IVSHMEM_MSI)) {
>> + return;
>
> So you probably mean msi=on
You're right.
> with that
> Reviewed-by: Marc-André Lureau <address@hidden>
Thanks!
[...]
- Re: [Qemu-devel] [PATCH v2 33/42] ivshmem: Implement shm=... with a memory backend, (continued)
- [Qemu-devel] [PATCH v2 12/42] ivshmem: Rewrite specification document, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 28/42] ivshmem: Propagate errors through ivshmem_recv_setup(), Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 42/42] contrib/ivshmem-server: Print "not for production" warning, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 41/42] ivshmem: Require master to have ID zero, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 07/42] event_notifier: Make event_notifier_init_fd() #ifdef CONFIG_EVENTFD, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 22/42] ivshmem: Leave INTx alone when using MSI-X, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 15/42] ivshmem: Clean up after commit 9940c32, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 18/42] ivshmem: Fix harmless misuse of Error, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 27/42] ivshmem: Receive shared memory synchronously in realize(), Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 32/42] ivshmem: Tighten check of property "size", Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 26/42] ivshmem: Plug leaks on unplug, fix peer disconnect, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 37/42] ivshmem: Replace int role_val by OnOffAuto master, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 39/42] ivshmem: Clean up after the previous commit, Markus Armbruster, 2016/03/07