From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFikS-0003zG-OG for qemu-devel@nongnu.org; Thu, 05 Apr 2012 05:13:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFikM-00059U-Gl for qemu-devel@nongnu.org; Thu, 05 Apr 2012 05:12:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFikM-00059I-94 for qemu-devel@nongnu.org; Thu, 05 Apr 2012 05:12:50 -0400 Date: Thu, 5 Apr 2012 12:12:37 +0300 From: Gleb Natapov Message-ID: <20120405091237.GC11204@redhat.com> References: <20120405050848.31461.10826.stgit@bling.home> <20120405055113.31461.45258.stgit@bling.home> <4F7D55FE.1070407@redhat.com> <20120405090444.GB28229@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120405090444.GB28229@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/5] acpi_piix4: Only allow writes to PCI hotplug eject register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: aliguori@us.ibm.com, jbaron@redhat.com, qemu-devel@nongnu.org, yamahata@valinux.co.jp, Alex Williamson , kraxel@redhat.com, pbonzini@redhat.com, Igor Mammedov , aurelien@aurel32.net On Thu, Apr 05, 2012 at 12:04:44PM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 05, 2012 at 10:21:18AM +0200, Igor Mammedov wrote: > > On 04/05/2012 07:51 AM, Alex Williamson wrote: > > >This is never read. We can also derive bus from the write handler, > > >making this more inline with the other callbacks. Note that > > >pciej_write was actually called with (PCIBus *)dev->bus, which is > > >cast as a void* allowing us to pretend it's a BusState*. Fix this > > >so we don't depend on the BusState location within PCIBus. > > > > > >Signed-off-by: Alex Williamson > > >--- > > > > > > docs/specs/acpi_pci_hotplug.txt | 2 +- > > > hw/acpi_piix4.c | 14 ++++---------- > > > 2 files changed, 5 insertions(+), 11 deletions(-) > > > > > >diff --git a/docs/specs/acpi_pci_hotplug.txt b/docs/specs/acpi_pci_hotplug.txt > > >index 1e2c8a2..1e61d19 100644 > > >--- a/docs/specs/acpi_pci_hotplug.txt > > >+++ b/docs/specs/acpi_pci_hotplug.txt > > >@@ -28,7 +28,7 @@ PCI device eject (IO port 0xae08-0xae0b, 4-byte access): > > > ---------------------------------------- > > > > > > Used by ACPI BIOS _EJ0 method to request device removal. One bit per slot. > > >-Reads return 0. > > >+Read-only. > > Write-only perhaps? > > Yes, let's also specify what happens in practice. No we shouldn't. > I think it is 'Guest should never read this register, in practice > 0 is returned'. > In practice kitten die for each read. Unspecified behaviour is unspecified. -- Gleb.