From: Alexander Graf <agraf@suse.de>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com,
qemu-devel@nongnu.org, Blue Swirl <blauwirbel@gmail.com>,
jfrei@linux.vnet.ibm.com, cornelia.huck@de.ibm.com,
Paolo Bonzini <pbonzini@redhat.com>,
Einar Lueck <elelueck@linux.vnet.ibm.com>,
Einar Lueck <elelueck@de.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] hd-geometry.c/s390: Disable geometry translation
Date: Mon, 19 Nov 2012 12:20:02 +0100 [thread overview]
Message-ID: <D996852F-795C-44C8-B5BC-9DB53743D59A@suse.de> (raw)
In-Reply-To: <50AA1112.3000205@de.ibm.com>
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 <pbonzini@redhat.com> wrote:
>>> Il 17/11/2012 17:07, Blue Swirl ha scritto:
>>>> On Tue, Nov 13, 2012 at 8:50 AM, Christian Borntraeger
>>>> <borntraeger@de.ibm.com> wrote:
>>>>> From: Einar Lueck <elelueck@linux.vnet.ibm.com>
>>>>>
>>>>> 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 <elelueck@linux.vnet.ibm.com>
>>>>> Signed-off-by Christian Borntraeger <borntraeger@de.ibm.com>
>>>>> ---
>>>>> 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?
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
next prev parent reply other threads:[~2012-11-19 11:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 8:50 [Qemu-devel] [PATCH 0/3] block patches for auto detection of geometry and block size Christian Borntraeger
2012-11-13 8:50 ` [Qemu-devel] [PATCH 1/3] hd-geometry.c: Integrate HDIO_GETGEO in guessing Christian Borntraeger
2012-11-19 15:08 ` Markus Armbruster
2012-11-19 15:30 ` Christian Borntraeger
2012-11-13 8:50 ` [Qemu-devel] [PATCH 2/3] hd-geometry.c/s390: Disable geometry translation Christian Borntraeger
2012-11-17 16:07 ` Blue Swirl
2012-11-18 16:10 ` Paolo Bonzini
2012-11-18 19:14 ` Blue Swirl
2012-11-19 10:59 ` Christian Borntraeger
2012-11-19 11:20 ` Alexander Graf [this message]
2012-11-13 8:50 ` [Qemu-devel] [PATCH 3/3] block: support auto-sensing of block sizes Christian Borntraeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D996852F-795C-44C8-B5BC-9DB53743D59A@suse.de \
--to=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=elelueck@de.ibm.com \
--cc=elelueck@linux.vnet.ibm.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).