qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 01/26] blockdev: Introduce a default machine


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v3 01/26] blockdev: Introduce a default machine blockdev interface field, QEMUMachine->mach_if
Date: Fri, 26 Oct 2012 11:53:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Jason Baron <address@hidden> writes:

> From: Jason Baron <address@hidden>
>
> The current QEMUMachine definition has a 'use_scsi' field to indicate if a
> machine type should use scsi by default. However, Q35 wants to use ahci by
> default. Thus, introdue a new field in the QEMUMachine defintion, mach_if.
>
> This field should be initialized by the machine type to the default interface
> type which it wants to use (IF_SCSI, IF_AHCI, etc.). If no mach_if is defined,
> or it is set to 'IF_DEFAULT' or 'IF_NONE', we currently assume IF_IDE.
>
> Please use 'static inline int get_mach_if(int mach_if)', when accesssing the
> new mach_if field.
[...]
> diff --git a/hw/boards.h b/hw/boards.h
> index a2e0a54..969fd67 100644
> --- a/hw/boards.h
> +++ b/hw/boards.h
> @@ -20,7 +20,7 @@ typedef struct QEMUMachine {
>      const char *desc;
>      QEMUMachineInitFunc *init;
>      QEMUMachineResetFunc *reset;
> -    int use_scsi;
> +    int mach_if;
>      int max_cpus;
>      unsigned int no_serial:1,
>          no_parallel:1,
[...]
> diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c
> index fd46ba2..c70eb69 100644
> --- a/hw/xilinx_zynq.c
> +++ b/hw/xilinx_zynq.c
> @@ -178,7 +178,7 @@ static QEMUMachine zynq_machine = {
>      .name = "xilinx-zynq-a9",
>      .desc = "Xilinx Zynq Platform Baseboard for Cortex-A9",
>      .init = zynq_init,
> -    .use_scsi = 1,
> +    .if_default = IF_SCSI,

I doubt this compiles, and if it does, the compiler is mean to you :)

>      .max_cpus = 1,
>      .no_sdcard = 1
>  };
[...]



reply via email to

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