All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: Yan Vugenfirer <yvugenfi@redhat.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Gleb Natapov <gleb@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] VirtIO: Fix QEMU crash during Windows PNP tests
Date: Tue, 2 Mar 2010 13:05:49 +0200	[thread overview]
Message-ID: <20100302110549.GA6064@redhat.com> (raw)
In-Reply-To: <ADC5D120-C3C2-4BCE-AB1F-E11EBBE02A96@suse.de>

On Tue, Mar 02, 2010 at 12:03:15PM +0100, Alexander Graf wrote:
> 
> On 02.03.2010, at 11:09, Michael S. Tsirkin wrote:
> 
> > On Mon, Mar 01, 2010 at 01:26:37PM +0200, Gleb Natapov wrote:
> >> On Mon, Mar 01, 2010 at 12:14:43PM +0100, Alexander Graf wrote:
> >>> 
> >>> On 14.09.2009, at 15:31, Yan Vugenfirer wrote:
> >>> 
> >>>> Signed-off-by: Yan Vugenfirer <yvugenfi@redhat.com>
> >>>> 
> >>>> ---
> >>>> hw/virtio-pci.c |   14 ++++++++++++--
> >>>> 1 files changed, 12 insertions(+), 2 deletions(-)
> >>>> 
> >>>> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> >>>> index f812ab7..a0a22c4 100644
> >>>> --- a/hw/virtio-pci.c
> >>>> +++ b/hw/virtio-pci.c
> >>>> @@ -364,8 +364,17 @@ static void virtio_map(PCIDevice *pci_dev, int region_num,
> >>>> static void virtio_write_config(PCIDevice *pci_dev, uint32_t address,
> >>>>                                uint32_t val, int len)
> >>>> {
> >>>> +    VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
> >>>> +
> >>>> +    if (PCI_COMMAND == address) {
> >>>> +        if (!(val & PCI_COMMAND_MASTER)) {
> >>>> +            proxy->vdev->status &= ~VIRTIO_CONFIG_S_DRIVER_OK;
> >>> 
> >>> This part breaks PCI hotplug with Linux guests.
> >>> 
> >>> What happens is the following:
> >> Looks like something is broken even without this patch.
> >> 
> >>> 
> >>> (qemu) pci_add auto nic model=virtio,vlan=0
> >>>  - Virtio dev 1 -> write config (0)
> >>>  - Virtio dev 1 -> write config (0x3)
> >>>  - Virtio dev 1 -> set status explicitly to OK
> >> Why Linux doesn't enable bus mastering on this device?
> > 
> > I fixed this, and Rusty said he has applied the patch,
> > but it seems the patch got lost later:
> > 
> > http://lkml.org/lkml/2009/11/29/73
> > 
> > Alexander, could you please check whether applying
> > this patch fixes hotplug for you?
> > If yes I will queue it up for 2.6.34.
> 
> So we're looking at a guest bug?

Donnu. Does it work with the patch applied?

> It's still a qemu regression then. This configuration used to work
> with 0.10. There should at least be a feature bit from the guest
> saying "I'm good with bus mastering", so we can enable the check only
> for those.
> Alex

  reply	other threads:[~2010-03-02 11:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14 13:31 [Qemu-devel] [PATCH] VirtIO: Fix QEMU crash during Windows PNP tests Yan Vugenfirer
2010-03-01 11:14 ` Alexander Graf
2010-03-01 11:26   ` Gleb Natapov
2010-03-02 10:09     ` Michael S. Tsirkin
2010-03-02 11:03       ` Alexander Graf
2010-03-02 11:05         ` Michael S. Tsirkin [this message]
2010-03-02 11:43           ` Alexander Graf
  -- strict thread matches above, loose matches on Subject: below --
2009-09-08 14:49 Yan Vugenfirer
2009-09-11 13:36 ` Anthony Liguori
2009-09-13 11:47   ` Yan Vugenfirer
2009-09-14 12:50     ` Anthony Liguori

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=20100302110549.GA6064@redhat.com \
    --to=mst@redhat.com \
    --cc=agraf@suse.de \
    --cc=gleb@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yvugenfi@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.