diff mbox series

[v4,13/19] hw/block/fdc-isa: Remove 'fallback' property

Message ID 20250512083948.39294-14-philmd@linaro.org
State New
Headers show
Series hw/i386/pc: Remove deprecated 2.4 and 2.5 PC machines | expand

Commit Message

Philippe Mathieu-Daudé May 12, 2025, 8:39 a.m. UTC
The "fallback" property was only used by the hw_compat_2_5[] array,
as 'fallback=144'. We removed all machines using that array, lets
remove ISA floppy drive 'fallback' property, manually setting the
default value in isabus_fdc_realize().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
---
 hw/block/fdc-isa.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Thomas Huth May 27, 2025, 5:20 p.m. UTC | #1
On 12/05/2025 10.39, Philippe Mathieu-Daudé wrote:
> The "fallback" property was only used by the hw_compat_2_5[] array,
> as 'fallback=144'. We removed all machines using that array, lets
> remove ISA floppy drive 'fallback' property, manually setting the
> default value in isabus_fdc_realize().
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
> ---
>   hw/block/fdc-isa.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)

FWIW, this needs a fixup for iotest 172:

  https://gitlab.com/thuth/qemu/-/jobs/10166450223#L466

  Thomas
Thomas Huth May 28, 2025, 8:30 a.m. UTC | #2
On 27/05/2025 19.20, Thomas Huth wrote:
> On 12/05/2025 10.39, Philippe Mathieu-Daudé wrote:
>> The "fallback" property was only used by the hw_compat_2_5[] array,
>> as 'fallback=144'. We removed all machines using that array, lets
>> remove ISA floppy drive 'fallback' property, manually setting the
>> default value in isabus_fdc_realize().
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
>> ---
>>   hw/block/fdc-isa.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> FWIW, this needs a fixup for iotest 172:
> 
>   https://gitlab.com/thuth/qemu/-/jobs/10166450223#L466

FYI, since I was testing this series anyway, I'll fix up this patch with:

diff --git a/tests/qemu-iotests/172.out b/tests/qemu-iotests/172.out
--- a/tests/qemu-iotests/172.out
+++ b/tests/qemu-iotests/172.out
@@ -14,7 +14,6 @@ Testing:
              dma = 2 (0x2)
              fdtypeA = "auto"
              fdtypeB = "auto"
-            fallback = "288"
              bus: floppy-bus.0
                type floppy-bus
                dev: floppy, id ""
@@ -43,7 +42,6 @@ Testing: -fda TEST_DIR/t.qcow2
              dma = 2 (0x2)
              fdtypeA = "auto"
              fdtypeB = "auto"
-            fallback = "288"
              bus: floppy-bus.0
                type floppy-bus
                dev: floppy, id ""
@@ -79,7 +77,6 @@ Testing: -fdb TEST_DIR/t.qcow2
              dma = 2 (0x2)
              fdtypeA = "auto"
              fdtypeB = "auto"
-            fallback = "288"
              bus: floppy-bus.0
                type floppy-bus
                dev: floppy, id ""

etc.

and I will queue this series (without the "Remove X86CPU::check_cpuid field" 
patch as mentioned by Xiaoyao Li), unless Paolo or another x86 maintainer 
wants to do this instead (please let me know!).

  Thomas
Thomas Huth May 28, 2025, 8:37 a.m. UTC | #3
On 28/05/2025 10.30, Thomas Huth wrote:
> On 27/05/2025 19.20, Thomas Huth wrote:
>> On 12/05/2025 10.39, Philippe Mathieu-Daudé wrote:
>>> The "fallback" property was only used by the hw_compat_2_5[] array,
>>> as 'fallback=144'. We removed all machines using that array, lets
>>> remove ISA floppy drive 'fallback' property, manually setting the
>>> default value in isabus_fdc_realize().
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>>> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
>>> ---
>>>   hw/block/fdc-isa.c | 4 +---
>>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> FWIW, this needs a fixup for iotest 172:
>>
>>   https://gitlab.com/thuth/qemu/-/jobs/10166450223#L466
> 
> FYI, since I was testing this series anyway, I'll fix up this patch
...
> and I will queue this series (without the "Remove X86CPU::check_cpuid field" 
> patch as mentioned by Xiaoyao Li), unless Paolo or another x86 maintainer 
> wants to do this instead (please let me know!).

Hmm, looking at this twice, hw/block/fdc-sysbus.c has a "fallback" property, 
too, and there are people out there who set this property manually, e.g.:

  https://github.com/mariuz/linux-0.01/issues/4#issuecomment-974768898

So it seems like this property is meant as a config knob for the user, 
indeed, not just an internal one. I'll drop this patch for now.

  Thomas
Michael S. Tsirkin May 30, 2025, 11:45 a.m. UTC | #4
On Wed, May 28, 2025 at 10:30:17AM +0200, Thomas Huth wrote:
> On 27/05/2025 19.20, Thomas Huth wrote:
> > On 12/05/2025 10.39, Philippe Mathieu-Daudé wrote:
> > > The "fallback" property was only used by the hw_compat_2_5[] array,
> > > as 'fallback=144'. We removed all machines using that array, lets
> > > remove ISA floppy drive 'fallback' property, manually setting the
> > > default value in isabus_fdc_realize().
> > > 
> > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > > Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> > > Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
> > > ---
> > >   hw/block/fdc-isa.c | 4 +---
> > >   1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > FWIW, this needs a fixup for iotest 172:
> > 
> >   https://gitlab.com/thuth/qemu/-/jobs/10166450223#L466
> 
> FYI, since I was testing this series anyway, I'll fix up this patch with:
> 
> diff --git a/tests/qemu-iotests/172.out b/tests/qemu-iotests/172.out
> --- a/tests/qemu-iotests/172.out
> +++ b/tests/qemu-iotests/172.out
> @@ -14,7 +14,6 @@ Testing:
>              dma = 2 (0x2)
>              fdtypeA = "auto"
>              fdtypeB = "auto"
> -            fallback = "288"
>              bus: floppy-bus.0
>                type floppy-bus
>                dev: floppy, id ""
> @@ -43,7 +42,6 @@ Testing: -fda TEST_DIR/t.qcow2
>              dma = 2 (0x2)
>              fdtypeA = "auto"
>              fdtypeB = "auto"
> -            fallback = "288"
>              bus: floppy-bus.0
>                type floppy-bus
>                dev: floppy, id ""
> @@ -79,7 +77,6 @@ Testing: -fdb TEST_DIR/t.qcow2
>              dma = 2 (0x2)
>              fdtypeA = "auto"
>              fdtypeB = "auto"
> -            fallback = "288"
>              bus: floppy-bus.0
>                type floppy-bus
>                dev: floppy, id ""
> 
> etc.
> 
> and I will queue this series (without the "Remove X86CPU::check_cpuid field"
> patch as mentioned by Xiaoyao Li), unless Paolo or another x86 maintainer
> wants to do this instead (please let me know!).
> 
>  Thomas

No, pls go ahead.
Philippe Mathieu-Daudé June 2, 2025, 8:03 a.m. UTC | #5
On 30/5/25 13:45, Michael S. Tsirkin wrote:
> On Wed, May 28, 2025 at 10:30:17AM +0200, Thomas Huth wrote:
>> On 27/05/2025 19.20, Thomas Huth wrote:
>>> On 12/05/2025 10.39, Philippe Mathieu-Daudé wrote:
>>>> The "fallback" property was only used by the hw_compat_2_5[] array,
>>>> as 'fallback=144'. We removed all machines using that array, lets
>>>> remove ISA floppy drive 'fallback' property, manually setting the
>>>> default value in isabus_fdc_realize().
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>>>> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
>>>> ---
>>>>    hw/block/fdc-isa.c | 4 +---
>>>>    1 file changed, 1 insertion(+), 3 deletions(-)
>>>
>>> FWIW, this needs a fixup for iotest 172:
>>>
>>>    https://gitlab.com/thuth/qemu/-/jobs/10166450223#L466


>> and I will queue this series (without the "Remove X86CPU::check_cpuid field"
>> patch as mentioned by Xiaoyao Li), unless Paolo or another x86 maintainer
>> wants to do this instead (please let me know!).
>>
>>   Thomas
> 
> No, pls go ahead.

Thanks both!
diff mbox series

Patch

diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c
index 6d1790e0e61..5d746d73165 100644
--- a/hw/block/fdc-isa.c
+++ b/hw/block/fdc-isa.c
@@ -97,6 +97,7 @@  static void isabus_fdc_realize(DeviceState *dev, Error **errp)
                              isa->iobase, fdc_portio_list, fdctrl,
                              "fdc");
 
+    fdctrl->fallback = FLOPPY_DRIVE_TYPE_288;
     fdctrl->irq = isa_bus_get_irq(bus, isa->irq);
     fdctrl->dma_chann = isa->dma;
     if (fdctrl->dma_chann != -1) {
@@ -293,9 +294,6 @@  static const Property isa_fdc_properties[] = {
     DEFINE_PROP_SIGNED("fdtypeB", FDCtrlISABus, state.qdev_for_drives[1].type,
                         FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type,
                         FloppyDriveType),
-    DEFINE_PROP_SIGNED("fallback", FDCtrlISABus, state.fallback,
-                        FLOPPY_DRIVE_TYPE_288, qdev_prop_fdc_drive_type,
-                        FloppyDriveType),
 };
 
 static void isabus_fdc_class_init(ObjectClass *klass, const void *data)