qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v9 14/15] hw/i386: Introduce the microvm machine type


From: Paolo Bonzini
Subject: Re: [PATCH v9 14/15] hw/i386: Introduce the microvm machine type
Date: Tue, 7 Jan 2020 14:35:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 24/12/19 01:09, Philippe Mathieu-Daudé wrote:
> We have CONFIG_SERIAL_ISA declared in "config-devices.h" so we could
> also use:
> 
> -- >8 --
> --- a/hw/i386/microvm.c
> +++ b/hw/i386/microvm.c
> @@ -153,9 +153,11 @@ static void
> microvm_devices_init(MicrovmMachineState *mms)
>          microvm_set_rtc(mms, rtc_state);
>      }
> 
> +#ifdef CONFIG_SERIAL_ISA
>      if (mms->isa_serial) {
>          serial_hds_isa_init(isa_bus, 0, 1);
>      }
> +#endif
> 
>      if (bios_name == NULL) {
>          bios_name = MICROVM_BIOS_FILENAME;
> ---
> 
> The binary links too, and the difference with the other hunk is now the
> device is not listed in 'qemu-system-x86_64 -M microvm -device help'.
> However I guess understand we prefer to avoid that kind of ifdef'ry.

The ifdef'ery is okay in board code, but in this case I think it would
be even better to have a stub for serial_hds_isa_init that gives the
right error (via Error*, and then you can call it with &error_fatal
etc.).  So for now I included your patch that changes it to "select"
from the other series.

Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]