Received: from eggs.gnu.org ([208.118.235.92]:36444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYCC7-0007jn-28 for qemu-devel@nongnu.org; Tue, 13 Nov 2012 03:50:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYCC4-0003JW-0O for qemu-devel@nongnu.org; Tue, 13 Nov 2012 03:50:07 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:41571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYCC3-0003Hw-Nc for qemu-devel@nongnu.org; Tue, 13 Nov 2012 03:50:03 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Nov 2012 08:50:01 -0000 Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAD8nqNx45875250 for ; Tue, 13 Nov 2012 08:49:52 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAD8nvTY016690 for ; Tue, 13 Nov 2012 01:49:58 -0700 From: Christian Borntraeger Date: Tue, 13 Nov 2012 09:50:11 +0100 Message-Id: <1352796612-49081-3-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1352796612-49081-1-git-send-email-borntraeger@de.ibm.com> References: <1352796612-49081-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH 2/3] hd-geometry.c/s390: Disable geometry translation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kwolf@redhat.com, stefanha@gmail.com Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, Einar Lueck , Einar Lueck From: Einar Lueck This patch disables the translation of geometry information read from disks on s390. On s390 such translations lead to wrong geometries being advertized to the guest because there is no entity doing these kinds of translation on this architecture. Signed-off-by Einar Lueck Signed-off-by Christian Borntraeger --- hw/hd-geometry.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/hd-geometry.c b/hw/hd-geometry.c index 4cf040d..db1dc81 100644 --- a/hw/hd-geometry.c +++ b/hw/hd-geometry.c @@ -144,6 +144,10 @@ static int guess_disk_msdosgeo(BlockDriverState *bs, continue; } +#ifdef __s390__ + /* on s390 there is no BIOS doing any kind of translation */ + translation = BIOS_ATA_TRANSLATION_NONE; +#else if (heads > 16) { /* LCHS guess with heads > 16 means that a BIOS LBA translation was active, so a standard physical disk @@ -158,6 +162,7 @@ static int guess_disk_msdosgeo(BlockDriverState *bs, the logical geometry */ translation = BIOS_ATA_TRANSLATION_NONE; } +#endif *pheads = heads; *psectors = sectors; *pcylinders = cylinders; -- 1.7.10.1