From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaPOd-0008CL-IJ for qemu-devel@nongnu.org; Mon, 19 Nov 2012 06:20:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaPOa-0003XZ-GT for qemu-devel@nongnu.org; Mon, 19 Nov 2012 06:20:11 -0500 Received: from cantor2.suse.de ([195.135.220.15]:42419 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaPOa-0003Vs-6Z for qemu-devel@nongnu.org; Mon, 19 Nov 2012 06:20:08 -0500 Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <50AA1112.3000205@de.ibm.com> Date: Mon, 19 Nov 2012 12:20:02 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1352796612-49081-1-git-send-email-borntraeger@de.ibm.com> <1352796612-49081-3-git-send-email-borntraeger@de.ibm.com> <50A9085A.8010704@redhat.com> <50AA1112.3000205@de.ibm.com> Subject: Re: [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: Christian Borntraeger Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, Blue Swirl , jfrei@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, Paolo Bonzini , Einar Lueck , Einar Lueck On 19.11.2012, at 11:59, Christian Borntraeger wrote: > On 18/11/12 20:14, Blue Swirl wrote: >> On Sun, Nov 18, 2012 at 4:10 PM, Paolo Bonzini = wrote: >>> Il 17/11/2012 17:07, Blue Swirl ha scritto: >>>> On Tue, Nov 13, 2012 at 8:50 AM, Christian Borntraeger >>>> wrote: >>>>> From: Einar Lueck >>>>>=20 >>>>> 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. >>>>>=20 >>>>> Signed-off-by Einar Lueck >>>>> Signed-off-by Christian Borntraeger >>>>> --- >>>>> hw/hd-geometry.c | 5 +++++ >>>>> 1 file changed, 5 insertions(+) >>>>>=20 >>>>> 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; >>>>> } >>>>>=20 >>>>> +#ifdef __s390__ >>>>=20 >>>> No, this would make all system emulators (e.g. x86) on s390 host to >>>> use this translation, not just s390. I think you want to use #ifdef >>>> CONFIG_S390X instead. >>>=20 >>> This symbol is not available because this file is compiled just = once. >>> Which non-x86 targets actually care about translation stuff? >>=20 >> I meant TARGET_S390X, sorry. I have no idea, but hosts and targets >> should not be confused. >=20 > Would a modified patch with TARGET_S390X be acceptable? If TARGET_S390X is defined in that file (read: it's compiled = individually for every target), yes. Otherwise please make this a = runtime check and set the runtime checked variable in code that is = target specific. Alex