From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NInZa-00006s-R6 for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:17:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NInZV-0008Rj-V8 for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:17:06 -0500 Received: from [199.232.76.173] (port=41934 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInZV-0008RE-Fz for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:17:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42272) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NInZV-0003zE-TF for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:17:02 -0500 Date: Thu, 10 Dec 2009 20:14:15 +0200 From: "Michael S. Tsirkin" Message-ID: <20091210181415.GA25733@redhat.com> References: <20091209203537.GA7836@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091209203537.GA7836@redhat.com> Subject: [Qemu-devel] Re: [PATCH] e1000: fix init values for command register List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Luiz Capitulino , qemu-devel@nongnu.org On Wed, Dec 09, 2009 at 10:35:37PM +0200, Michael S. Tsirkin wrote: > Command register for e1000 was initialized to > values out of spec: all of bus master, > io, memory and interrupt disable bits were set. > > This breaks the device now that we actually respect > the interrupt disable bit, unless the guest > happens to clear it. Fix, and make the device > more spec compliant, by not touching > the default. > > There are implications for migration > from old qemu as well, will be addressed > separately. > > Reported-by: Luiz Capitulino > Tested-by: Luiz Capitulino > Signed-off-by: Michael S. Tsirkin This patch is also appropriate for 0.12, it will make migration 0.12 to master less painful. What's the process to get it there? Should I create pci-for-0.12 branch on my tree? > --- > hw/e1000.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/hw/e1000.c b/hw/e1000.c > index 8566fe3..ad7a267 100644 > --- a/hw/e1000.c > +++ b/hw/e1000.c > @@ -1089,7 +1089,6 @@ static int pci_e1000_init(PCIDevice *pci_dev) > > pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); > pci_config_set_device_id(pci_conf, E1000_DEVID); > - *(uint16_t *)(pci_conf+0x04) = cpu_to_le16(0x0407); > *(uint16_t *)(pci_conf+0x06) = cpu_to_le16(0x0010); > pci_conf[0x08] = 0x03; > pci_config_set_class(pci_conf, PCI_CLASS_NETWORK_ETHERNET); > -- > 1.6.6.rc1.43.gf55cc