qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/3] hd-geometry.c/s390: Disable geometry translatio


From: Christian Borntraeger
Subject: [Qemu-devel] [PATCH 2/3] hd-geometry.c/s390: Disable geometry translation
Date: Tue, 13 Nov 2012 09:50:11 +0100

From: Einar Lueck <address@hidden>

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 <address@hidden>
Signed-off-by Christian Borntraeger <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]