From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaP4m-0003Fj-2E for qemu-devel@nongnu.org; Mon, 19 Nov 2012 05:59:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaP4j-0006xA-0H for qemu-devel@nongnu.org; Mon, 19 Nov 2012 05:59:40 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:44708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaP4i-0006vR-Ny for qemu-devel@nongnu.org; Mon, 19 Nov 2012 05:59:36 -0500 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Nov 2012 10:59:34 -0000 Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAJAxOWd50069730 for ; Mon, 19 Nov 2012 10:59:24 GMT Received: from d06av06.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAJAxV2h008708 for ; Mon, 19 Nov 2012 03:59:31 -0700 Message-ID: <50AA1112.3000205@de.ibm.com> Date: Mon, 19 Nov 2012 11:59:30 +0100 From: Christian Borntraeger MIME-Version: 1.0 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Blue Swirl Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, agraf@suse.de, jfrei@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, Paolo Bonzini , Einar Lueck , Einar Lueck 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 >>>> >>>> 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__ >>> >>> 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. >> >> This symbol is not available because this file is compiled just once. >> Which non-x86 targets actually care about translation stuff? > > I meant TARGET_S390X, sorry. I have no idea, but hosts and targets > should not be confused. Would a modified patch with TARGET_S390X be acceptable?