From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRgbS-0000eF-TI for qemu-devel@nongnu.org; Fri, 26 Oct 2012 05:53:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRgbO-0000DX-Rj for qemu-devel@nongnu.org; Fri, 26 Oct 2012 05:53:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRgbO-0000DS-JW for qemu-devel@nongnu.org; Fri, 26 Oct 2012 05:53:18 -0400 From: Markus Armbruster References: <88ca80e8aca8fb53089dbcc34bdbe72ce8a18e82.1350677361.git.jbaron@redhat.com> Date: Fri, 26 Oct 2012 11:53:13 +0200 In-Reply-To: <88ca80e8aca8fb53089dbcc34bdbe72ce8a18e82.1350677361.git.jbaron@redhat.com> (Jason Baron's message of "Fri, 19 Oct 2012 16:43:26 -0400") Message-ID: <87r4oltv92.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 01/26] blockdev: Introduce a default machine blockdev interface field, QEMUMachine->mach_if List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Baron Cc: aliguori@us.ibm.com, alex.williamson@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org, agraf@suse.de, blauwirbel@gmail.com, yamahata@valinux.co.jp, juzhang@redhat.com, kevin@koconnor.net, avi@redhat.com, mkletzan@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, afaerber@suse.de, kraxel@redhat.com Jason Baron writes: > From: Jason Baron > > 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 > }; [...]