From patchwork Thu May 28 14:42:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 478183 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Yxz0v-0007kg-Ls for mharc-qemu-devel@gnu.org; Thu, 28 May 2015 10:42:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxz0t-0007kY-6Q for qemu-devel@nongnu.org; Thu, 28 May 2015 10:42:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxz0p-0000hT-Tt for qemu-devel@nongnu.org; Thu, 28 May 2015 10:42:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxz0p-0000hF-Nl for qemu-devel@nongnu.org; Thu, 28 May 2015 10:42:23 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 947D7B6F28; Thu, 28 May 2015 14:42:22 +0000 (UTC) Received: from [10.36.112.72] (ovpn-112-72.ams2.redhat.com [10.36.112.72]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4SEgHew010662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 28 May 2015 10:42:19 -0400 Message-ID: <55672949.5000502@redhat.com> Date: Thu, 28 May 2015 16:42:17 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Gerd Hoffmann , "Gabriel L. Somlo" References: <20150528125925.GG6488@HEDWIG.INI.CMU.EDU> <1432821161.6250.11.camel@nilsson.home.kraxel.org> In-Reply-To: <1432821161.6250.11.camel@nilsson.home.kraxel.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: John Snow , mst@redhat.com, lersek@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com Subject: Re: [Qemu-devel] [PATCH] i386: drop FDC in pc-q35-2.4+ if neither X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2015 14:42:28 -0000 On 28/05/2015 15:52, Gerd Hoffmann wrote: > @@ -494,7 +494,7 @@ static void ich9_lpc_machine_ready(Notifier *n, void *opaque) > /* lpt */ > pci_conf[0x82] |= 0x04; > } > - if (memory_region_present(io_as, 0x3f0)) { > + if (memory_region_present(io_as, 0x3f2)) { > /* floppy */ > pci_conf[0x82] |= 0x08; > } > > Oh, and this ... > > $ virsh qemu-monitor-command fedora-org-q35.base --hmp "info mtree" | grep fdc > 00000000000003f1-00000000000003f5 (prio 0, RW): fdc > 00000000000003f7-00000000000003f7 (prio 0, RW): fdc > > ... looks fishy too. Shouldn't that be 0x3f2-0x3f6 for the first range? I think 0x3f0-0x3f5 based on this: hw/block/fdc.c: FD_REG_SRA = 0x00, hw/block/fdc.c: FD_REG_SRB = 0x01, hw/block/fdc.c: FD_REG_DOR = 0x02, hw/block/fdc.c: FD_REG_TDR = 0x03, hw/block/fdc.c: FD_REG_MSR = 0x04, hw/block/fdc.c: FD_REG_DSR = 0x04, hw/block/fdc.c: FD_REG_FIFO = 0x05, hw/block/fdc.c: FD_REG_DIR = 0x07, hw/block/fdc.c: FD_REG_CCR = 0x07, So: Paolo diff --git a/hw/block/fdc.c b/hw/block/fdc.c index d8a8edd..c761291 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -2186,7 +2186,7 @@ static void fdctrl_realize_common(FDCtrl *fdctrl, Error **errp) } static const MemoryRegionPortio fdc_portio_list[] = { - { 1, 5, 1, .read = fdctrl_read, .write = fdctrl_write }, + { 0, 6, 1, .read = fdctrl_read, .write = fdctrl_write }, { 7, 1, 1, .read = fdctrl_read, .write = fdctrl_write }, PORTIO_END_OF_LIST(), };