Jason Baron <jba...@redhat.com> writes: > From: Jason Baron <jba...@redhat.com> > > 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 > }; [...]