From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
To: Greg Kurz <groug@kaod.org>, Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-pci: warn when both legacy and modern modes are disabled
Date: Thu, 21 Jul 2016 18:32:40 +0300 [thread overview]
Message-ID: <5790EB18.9020104@gmail.com> (raw)
In-Reply-To: <20160721164330.03c6f52a@bahia.lan>
On 07/21/2016 05:43 PM, Greg Kurz wrote:
> On Thu, 21 Jul 2016 13:07:46 +0200
> Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
>
>> On Thu, 21 Jul 2016 11:24:45 +0200
>> Greg Kurz <groug@kaod.org> wrote:
>>
>>> On Thu, 12 May 2016 11:45:58 +0200
>>> Greg Kurz <gkurz@linux.vnet.ibm.com> wrote:
>>>> Without presuming if we got there because of a user mistake or some
>>>> more subtile bug in the tooling, it doesn't hurt to log somewhere that
>>
>> s/subtile/subtle/
>>
>
> Frenglish stroke again :)
>
>>>> the device won't be functional.
>>>>
>>>> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
>>>> ---
>>>
>>> Michael,
>>>
>>> This patch still applies to your tree. Please nack if this is not worth
>>> being upstreamed.
>>>
>>> Cc'ing Connie for broader audience :)
>>>
>>> Cheers.
>>>
>>> --
>>> Greg
>>>
>>>> hw/virtio/virtio-pci.c | 4 ++++
>>>> 1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
>>>> index 0f634d2d776e..a74978cb5e83 100644
>>>> --- a/hw/virtio/virtio-pci.c
>>>> +++ b/hw/virtio/virtio-pci.c
>>>> @@ -1639,6 +1639,10 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp)
>>>> uint32_t size;
>>>> VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
>>>>
>>>> + if (!legacy && !modern) {
>>>> + error_report("Warning: device is unserviceable when both legacy and modern modes are disabled. At least one of the disable-modern or disable-legacy properties should be set to false.");
>>>> + }
>>
>> Do you maybe want to fail this at the realize stage already? A device
>> that is neither legacy nor modern should not exist at all.
>>
>
> Makes sense. I'll send a v2. Thanks !
>
I suggest to rebase it on top of:
https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg04744.html
which touches the same area... or the maintainer will deal with it :)
Thanks,
Marcel
>>>> +
>>>> config = proxy->pci_dev.config;
>>>> if (proxy->class_code) {
>>>> pci_config_set_class(config, proxy->class_code);
>>>>
>>>>
>>>
>>
>
>
next prev parent reply other threads:[~2016-07-21 15:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 9:45 [Qemu-devel] [PATCH] virtio-pci: warn when both legacy and modern modes are disabled Greg Kurz
2016-07-21 9:24 ` Greg Kurz
2016-07-21 11:07 ` Cornelia Huck
2016-07-21 14:43 ` Greg Kurz
2016-07-21 15:32 ` Marcel Apfelbaum [this message]
2016-07-21 16:20 ` Greg Kurz
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=5790EB18.9020104@gmail.com \
--to=marcel.apfelbaum@gmail.com \
--cc=cornelia.huck@de.ibm.com \
--cc=groug@kaod.org \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).