diff mbox

target/s390x: use "qemu" cpu model in user mode

Message ID 20170130145025.26475-1-david@redhat.com
State New
Headers show

Commit Message

David Hildenbrand Jan. 30, 2017, 2:50 p.m. UTC
"any" does not exist, therefore resulting in a misleading error message.

Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 linux-user/main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alexander Graf Jan. 30, 2017, 2:51 p.m. UTC | #1
On 01/30/2017 03:50 PM, David Hildenbrand wrote:
> "any" does not exist, therefore resulting in a misleading error message.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: David Hildenbrand <david@redhat.com>

I think we support more instructions in user space than in kernel space, 
but for now this change is good as it definitely unbreaks user emulation.

Reviewed-by: Alexander Graf <agraf@suse.de>


Alex

> ---
>   linux-user/main.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 3004958..e588f58 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
>   # endif
>   #elif defined TARGET_SH4
>           cpu_model = TYPE_SH7785_CPU;
> +#elif defined TARGET_S390X
> +        cpu_model = "qemu";
>   #else
>           cpu_model = "any";
>   #endif
Stefan Weil Jan. 30, 2017, 3:09 p.m. UTC | #2
Am 30.01.2017 um 15:50 schrieb David Hildenbrand:
> "any" does not exist, therefore resulting in a misleading error message.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  linux-user/main.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 3004958..e588f58 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
>  # endif
>  #elif defined TARGET_SH4
>          cpu_model = TYPE_SH7785_CPU;
> +#elif defined TARGET_S390X
> +        cpu_model = "qemu";
>  #else
>          cpu_model = "any";
>  #endif


Thanks.

Reviewed-by: Stefan Weil <sw@weilnetz.de>

This fix is also needed for Debian's QEMU user emulation.
Peter Maydell Jan. 30, 2017, 3:11 p.m. UTC | #3
On 30 January 2017 at 15:09, Stefan Weil <sw@weilnetz.de> wrote:
> Am 30.01.2017 um 15:50 schrieb David Hildenbrand:
>> "any" does not exist, therefore resulting in a misleading error message.
>>
>> Reported-by: Stefan Weil <sw@weilnetz.de>
>> Signed-off-by: David Hildenbrand <david@redhat.com>
>> ---
>>  linux-user/main.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/linux-user/main.c b/linux-user/main.c
>> index 3004958..e588f58 100644
>> --- a/linux-user/main.c
>> +++ b/linux-user/main.c
>> @@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
>>  # endif
>>  #elif defined TARGET_SH4
>>          cpu_model = TYPE_SH7785_CPU;
>> +#elif defined TARGET_S390X
>> +        cpu_model = "qemu";
>>  #else
>>          cpu_model = "any";
>>  #endif
>
>
> Thanks.
>
> Reviewed-by: Stefan Weil <sw@weilnetz.de>
>
> This fix is also needed for Debian's QEMU user emulation.

Does it merit a cc: qemu-stable ?

thanks
-- PMM
Stefan Weil Jan. 30, 2017, 3:23 p.m. UTC | #4
Am 30.01.2017 um 16:11 schrieb Peter Maydell:
> On 30 January 2017 at 15:09, Stefan Weil <sw@weilnetz.de> wrote:
>> Am 30.01.2017 um 15:50 schrieb David Hildenbrand:
>>> "any" does not exist, therefore resulting in a misleading error message.
>>>
>>> Reported-by: Stefan Weil <sw@weilnetz.de>
>>> Signed-off-by: David Hildenbrand <david@redhat.com>
>>> ---
>>>  linux-user/main.c | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/linux-user/main.c b/linux-user/main.c
>>> index 3004958..e588f58 100644
>>> --- a/linux-user/main.c
>>> +++ b/linux-user/main.c
>>> @@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
>>>  # endif
>>>  #elif defined TARGET_SH4
>>>          cpu_model = TYPE_SH7785_CPU;
>>> +#elif defined TARGET_S390X
>>> +        cpu_model = "qemu";
>>>  #else
>>>          cpu_model = "any";
>>>  #endif
>>
>> Thanks.
>>
>> Reviewed-by: Stefan Weil <sw@weilnetz.de>
>>
>> This fix is also needed for Debian's QEMU user emulation.
> Does it merit a cc: qemu-stable ?
>
> thanks
> -- PMM

Yes, of course. Thanks for the reminder - I added that list now as cc.
Christian Borntraeger Feb. 1, 2017, 8:04 a.m. UTC | #5
On 01/30/2017 04:23 PM, Stefan Weil wrote:
> Am 30.01.2017 um 16:11 schrieb Peter Maydell:
>> On 30 January 2017 at 15:09, Stefan Weil <sw@weilnetz.de> wrote:
>>> Am 30.01.2017 um 15:50 schrieb David Hildenbrand:
>>>> "any" does not exist, therefore resulting in a misleading error message.
>>>>
>>>> Reported-by: Stefan Weil <sw@weilnetz.de>
>>>> Signed-off-by: David Hildenbrand <david@redhat.com>
>>>> ---
>>>>  linux-user/main.c | 2 ++
>>>>  1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/linux-user/main.c b/linux-user/main.c
>>>> index 3004958..e588f58 100644
>>>> --- a/linux-user/main.c
>>>> +++ b/linux-user/main.c
>>>> @@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
>>>>  # endif
>>>>  #elif defined TARGET_SH4
>>>>          cpu_model = TYPE_SH7785_CPU;
>>>> +#elif defined TARGET_S390X
>>>> +        cpu_model = "qemu";
>>>>  #else
>>>>          cpu_model = "any";
>>>>  #endif
>>>
>>> Thanks.
>>>
>>> Reviewed-by: Stefan Weil <sw@weilnetz.de>
>>>
>>> This fix is also needed for Debian's QEMU user emulation.
>> Does it merit a cc: qemu-stable ?
>>
>> thanks
>> -- PMM
> 
> Yes, of course. Thanks for the reminder - I added that list now as cc.

Added to the kvm/s390 tree (since this tree introduced the regression)
diff mbox

Patch

diff --git a/linux-user/main.c b/linux-user/main.c
index 3004958..e588f58 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -4322,6 +4322,8 @@  int main(int argc, char **argv, char **envp)
 # endif
 #elif defined TARGET_SH4
         cpu_model = TYPE_SH7785_CPU;
+#elif defined TARGET_S390X
+        cpu_model = "qemu";
 #else
         cpu_model = "any";
 #endif