From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Anthony Liguori" <aliguori@us.ibm.com>,
"Igor Mitsyanko" <i.mitsyanko@samsung.com>,
"qemu-devel qemu-devel" <qemu-devel@nongnu.org>,
"Markus Armbruster" <armbru@redhat.com>,
"Jens Freimann" <jfrei@linux.vnet.ibm.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Cornelia Huck" <cornelia.huck@de.ibm.com>,
"Andreas Färber" <afaerber@suse.de>,
"Einar Lueck" <elelueck@de.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] Support default block interfaces per QEMUMachine
Date: Mon, 19 Nov 2012 14:44:03 +0100 [thread overview]
Message-ID: <50AA37A3.4080002@de.ibm.com> (raw)
In-Reply-To: <3BAFCBD6-D1BB-4270-BB16-DCEC6B124350@suse.de>
On 19/11/12 14:36, Alexander Graf wrote:
>
> On 12.11.2012, at 09:22, Christian Borntraeger wrote:
>
>> There are QEMUMachines that have neither IF_IDE nor IF_SCSI as a
>> default/standard interface to their block devices / drives. Therfore,
>> this patch introduces a new field default_block per QEMUMachine struct.
>> The prior use_scsi field becomes thereby obsolete and is replaced through
>> .default_block = DEFAULT_SCSI.
>>
>> Based on an initial patch from Einar Lueck <elelueck@de.ibm.com>
>>
>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> ---
>> blockdev.c | 4 ++--
>> blockdev.h | 29 ++++++++++++++++++++++++++++-
>> hw/boards.h | 3 ++-
>> hw/device-hotplug.c | 2 +-
>> hw/highbank.c | 2 +-
>> hw/leon3.c | 1 -
>> hw/mips_jazz.c | 4 ++--
>> hw/pc_sysfw.c | 2 +-
>> hw/puv3.c | 1 -
>> hw/realview.c | 7 ++++---
>> hw/s390-virtio.c | 16 +---------------
>> hw/spapr.c | 2 +-
>> hw/sun4m.c | 24 ++++++++++++------------
>> hw/versatilepb.c | 4 ++--
>> hw/vexpress.c | 4 ++--
>> hw/xilinx_zynq.c | 2 +-
>> vl.c | 20 +++++++++++---------
>> 17 files changed, 71 insertions(+), 56 deletions(-)
>>
>> diff --git a/blockdev.c b/blockdev.c
>> index e73fd6e..aca3c14 100644
>> --- a/blockdev.c
>> +++ b/blockdev.c
>> @@ -275,7 +275,7 @@ static bool do_check_io_limits(BlockIOLimit *io_limits)
>> return true;
>> }
>>
>> -DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
>> +DriveInfo *drive_init(QemuOpts *opts, BlockDefault block_default)
>> {
>> const char *buf;
>> const char *file = NULL;
>> @@ -325,7 +325,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
>> return NULL;
>> }
>> } else {
>> - type = default_to_scsi ? IF_SCSI : IF_IDE;
>> + type = block_if_from_default(block_default);
>> }
>>
>> max_devs = if_max_devs[type];
>> diff --git a/blockdev.h b/blockdev.h
>> index 5f27b64..aba6d77 100644
>> --- a/blockdev.h
>> +++ b/blockdev.h
>> @@ -24,6 +24,33 @@ typedef enum {
>> IF_COUNT
>> } BlockInterfaceType;
>>
>> +/* For machine default interface. */
>> +typedef enum {
>> + DEFAULT_IDE = 0,
>> + DEFAULT_SCSI,
>> + DEFAULT_FLOPPY,
>> + DEFAULT_PFLASH,
>> + DEFAULT_MTD,
>> + DEFAULT_SD,
>> + DEFAULT_VIRTIO,
>> + DEFAULT_XEN
>> +} BlockDefault;
>
> Why a new enum? Can't we just reuse the IF_ ones?
>
> Also, traditionally Markus has had very strong opinions on anything IF_ and -drive related. It's probably a good idea to get him in the loop :).
>
> Alex
Review feedback from the first cycle. Anthony wanted to make the default (field is not specified at all) a
sane default, which means IDE must be 0.
next prev parent reply other threads:[~2012-11-19 13:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-12 8:22 [Qemu-devel] [PATCH 0/1] Default block interface per machine Christian Borntraeger
2012-11-12 8:22 ` [Qemu-devel] [PATCH 1/1] Support default block interfaces per QEMUMachine Christian Borntraeger
2012-11-13 8:03 ` Christian Borntraeger
2012-11-19 13:36 ` Alexander Graf
2012-11-19 13:44 ` Christian Borntraeger [this message]
2012-11-19 13:47 ` Alexander Graf
2012-11-19 14:11 ` Markus Armbruster
2012-11-20 11:22 ` Christian Borntraeger
2012-11-20 13:01 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50AA37A3.4080002@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=elelueck@de.ibm.com \
--cc=i.mitsyanko@samsung.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.