qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/sparc/sun4m: Fix implicit creation of "-drive if=scsi" devices
@ 2018-03-07  9:39 Thomas Huth
  2018-03-07 18:43 ` Mark Cave-Ayland
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2018-03-07  9:39 UTC (permalink / raw)
  To: qemu-devel, Mark Cave-Ayland; +Cc: Artyom Tarasenko, Paolo Bonzini

The global hack for creating SCSI devices has recently been removed,
but this apparently broke SCSI devices on some boards that were not
ready for this change yet. For the sun4m machines you now get:

$ sparc-softmmu/qemu-system-sparc -boot d -cdrom x.iso
qemu-system-sparc: -cdrom x.iso: machine type does not support if=scsi,bus=0,unit=2

Fix it by calling scsi_bus_legacy_handle_cmdline() after creating the
corresponding SCSI controller.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fixes: 1454509726719e0933c800fad00d6999752688ea
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/sparc/sun4m.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index 61eb424..0f5804b 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -324,6 +324,7 @@ static void *sparc32_dma_init(hwaddr dma_base,
 
     esp = ESP_STATE(object_resolve_path_component(OBJECT(espdma), "esp"));
     sysbus_mmio_map(SYS_BUS_DEVICE(esp), 0, esp_base);
+    scsi_bus_legacy_handle_cmdline(&esp->esp.bus);
 
     ledma = SPARC32_LEDMA_DEVICE(object_resolve_path_component(
                                  OBJECT(dma), "ledma"));
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/sparc/sun4m: Fix implicit creation of "-drive if=scsi" devices
  2018-03-07  9:39 [Qemu-devel] [PATCH] hw/sparc/sun4m: Fix implicit creation of "-drive if=scsi" devices Thomas Huth
@ 2018-03-07 18:43 ` Mark Cave-Ayland
  2018-03-08  4:33   ` Thomas Huth
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Cave-Ayland @ 2018-03-07 18:43 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: Paolo Bonzini, Artyom Tarasenko

On 07/03/18 09:39, Thomas Huth wrote:

> The global hack for creating SCSI devices has recently been removed,
> but this apparently broke SCSI devices on some boards that were not
> ready for this change yet. For the sun4m machines you now get:
> 
> $ sparc-softmmu/qemu-system-sparc -boot d -cdrom x.iso
> qemu-system-sparc: -cdrom x.iso: machine type does not support if=scsi,bus=0,unit=2
> 
> Fix it by calling scsi_bus_legacy_handle_cmdline() after creating the
> corresponding SCSI controller.
> 
> Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Fixes: 1454509726719e0933c800fad00d6999752688ea
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   hw/sparc/sun4m.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
> index 61eb424..0f5804b 100644
> --- a/hw/sparc/sun4m.c
> +++ b/hw/sparc/sun4m.c
> @@ -324,6 +324,7 @@ static void *sparc32_dma_init(hwaddr dma_base,
>   
>       esp = ESP_STATE(object_resolve_path_component(OBJECT(espdma), "esp"));
>       sysbus_mmio_map(SYS_BUS_DEVICE(esp), 0, esp_base);
> +    scsi_bus_legacy_handle_cmdline(&esp->esp.bus);
>   
>       ledma = SPARC32_LEDMA_DEVICE(object_resolve_path_component(
>                                    OBJECT(dma), "ledma"));
> 

Hi Thomas,

Thanks for the patch - I can confirm that it resolves the issue with 
qemu-system-sparc.

Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

I presume it makes sense for this to go through a tree along with the 
other patches in the set rather than me taking this via my qemu-sparc 
branch?


ATB,

Mark.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/sparc/sun4m: Fix implicit creation of "-drive if=scsi" devices
  2018-03-07 18:43 ` Mark Cave-Ayland
@ 2018-03-08  4:33   ` Thomas Huth
  2018-03-08 18:51     ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2018-03-08  4:33 UTC (permalink / raw)
  To: Mark Cave-Ayland, qemu-devel; +Cc: Paolo Bonzini, Artyom Tarasenko

On 07.03.2018 19:43, Mark Cave-Ayland wrote:
> On 07/03/18 09:39, Thomas Huth wrote:
> 
>> The global hack for creating SCSI devices has recently been removed,
>> but this apparently broke SCSI devices on some boards that were not
>> ready for this change yet. For the sun4m machines you now get:
>>
>> $ sparc-softmmu/qemu-system-sparc -boot d -cdrom x.iso
>> qemu-system-sparc: -cdrom x.iso: machine type does not support
>> if=scsi,bus=0,unit=2
>>
>> Fix it by calling scsi_bus_legacy_handle_cmdline() after creating the
>> corresponding SCSI controller.
>>
>> Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> Fixes: 1454509726719e0933c800fad00d6999752688ea
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   hw/sparc/sun4m.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
>> index 61eb424..0f5804b 100644
>> --- a/hw/sparc/sun4m.c
>> +++ b/hw/sparc/sun4m.c
>> @@ -324,6 +324,7 @@ static void *sparc32_dma_init(hwaddr dma_base,
>>         esp = ESP_STATE(object_resolve_path_component(OBJECT(espdma),
>> "esp"));
>>       sysbus_mmio_map(SYS_BUS_DEVICE(esp), 0, esp_base);
>> +    scsi_bus_legacy_handle_cmdline(&esp->esp.bus);
>>         ledma = SPARC32_LEDMA_DEVICE(object_resolve_path_component(
>>                                    OBJECT(dma), "ledma"));
>>
> 
> Hi Thomas,
> 
> Thanks for the patch - I can confirm that it resolves the issue with
> qemu-system-sparc.
> 
> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> 
> I presume it makes sense for this to go through a tree along with the
> other patches in the set rather than me taking this via my qemu-sparc
> branch?

The patches are independent from each other, so it doesn't really
matter. So if you're planning to send a PULL request before soft freeze
next Tuesday, please include this patch. Otherwise I hope that Paolo can
take this through his misc / scsi tree.

 Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/sparc/sun4m: Fix implicit creation of "-drive if=scsi" devices
  2018-03-08  4:33   ` Thomas Huth
@ 2018-03-08 18:51     ` Paolo Bonzini
  2018-03-08 18:57       ` Mark Cave-Ayland
  0 siblings, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2018-03-08 18:51 UTC (permalink / raw)
  To: Thomas Huth, Mark Cave-Ayland, qemu-devel; +Cc: Artyom Tarasenko

On 08/03/2018 05:33, Thomas Huth wrote:
> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Queued, thanks.

Paolo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/sparc/sun4m: Fix implicit creation of "-drive if=scsi" devices
  2018-03-08 18:51     ` Paolo Bonzini
@ 2018-03-08 18:57       ` Mark Cave-Ayland
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Cave-Ayland @ 2018-03-08 18:57 UTC (permalink / raw)
  To: Paolo Bonzini, Thomas Huth, qemu-devel; +Cc: Artyom Tarasenko

On 08/03/18 18:51, Paolo Bonzini wrote:

> On 08/03/2018 05:33, Thomas Huth wrote:
>> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> 
> Queued, thanks.

Hi Paolo,

I quickly added this to my pull request this morning for the leon3 MMU 
patch, so it has already been applied.


ATB,

Mark.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-08 18:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07  9:39 [Qemu-devel] [PATCH] hw/sparc/sun4m: Fix implicit creation of "-drive if=scsi" devices Thomas Huth
2018-03-07 18:43 ` Mark Cave-Ayland
2018-03-08  4:33   ` Thomas Huth
2018-03-08 18:51     ` Paolo Bonzini
2018-03-08 18:57       ` Mark Cave-Ayland

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).