From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XR1rR-0008J4-Ei for qemu-devel@nongnu.org; Mon, 08 Sep 2014 12:32:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XR1rM-0004Ca-52 for qemu-devel@nongnu.org; Mon, 08 Sep 2014 12:32:13 -0400 Date: Mon, 8 Sep 2014 19:35:14 +0300 From: "Michael S. Tsirkin" Message-ID: <20140908163514.GB4905@redhat.com> References: <1410192283-4026-1-git-send-email-mst@redhat.com> <540DD8CB.2000705@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <540DD8CB.2000705@siemens.com> Subject: Re: [Qemu-devel] [PATCH] virtio-pci: enable bus master for old guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel@nongnu.org, Anthony Liguori , qemu-stable@nongnu.org On Mon, Sep 08, 2014 at 06:26:51PM +0200, Jan Kiszka wrote: > On 2014-09-08 18:05, Michael S. Tsirkin wrote: > > commit cc943c36faa192cd4b32af8fe5edb31894017d35 > > pci: Use bus master address space for delivering MSI/MSI-X messages > > breaks virtio-net for rhel6.[56] x86 guests because they don't > > enable bus mastering for virtio PCI devices > > > > Old guests forgot to enable bus mastering, enable it > > automatically on DRIVER_OK. > > > > Note: we should either back out the original patch from > > stable or apply this one on top. > > > > Cc: qemu-stable@nongnu.org > > Reported-by: Greg Kurz > > Signed-off-by: Jan Kiszka > > I didn't signed off as I didn't write this patch ;). But you can add my > reviewed-by if you like. > > Jan Should have been Cc :) > > Signed-off-by: Michael S. Tsirkin > > --- > > hw/virtio/virtio-pci.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c > > index ddb5da1..af937d2 100644 > > --- a/hw/virtio/virtio-pci.c > > +++ b/hw/virtio/virtio-pci.c > > @@ -320,6 +320,8 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val) > > if ((val & VIRTIO_CONFIG_S_DRIVER_OK) && > > !(proxy->pci_dev.config[PCI_COMMAND] & PCI_COMMAND_MASTER)) { > > proxy->flags |= VIRTIO_PCI_FLAG_BUS_MASTER_BUG; > > + memory_region_set_enabled(&proxy->pci_dev.bus_master_enable_region, > > + true); > > } > > break; > > case VIRTIO_MSI_CONFIG_VECTOR: > > > > -- > Siemens AG, Corporate Technology, CT RTC ITP SES-DE > Corporate Competence Center Embedded Linux