From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, jsnow@redhat.com, armbru@redhat.com,
stefanha@redhat.com, agraf@suse.de
Subject: [Qemu-devel] [RFC 2/4] blockdev: add IF_AHCI to support -cdrom and -hd[a-d]
Date: Mon, 18 Aug 2014 18:05:18 -0400 [thread overview]
Message-ID: <1408399520-12778-3-git-send-email-jsnow@redhat.com> (raw)
In-Reply-To: <1408399520-12778-1-git-send-email-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
blockdev.c | 9 ++++++---
include/sysemu/blockdev.h | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 58da77f..a9efe1f 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -57,6 +57,7 @@ static const char *const if_name[IF_COUNT] = {
[IF_SD] = "sd",
[IF_VIRTIO] = "virtio",
[IF_XEN] = "xen",
+ [IF_AHCI] = "ahci",
};
static const int if_max_devs[IF_COUNT] = {
@@ -76,6 +77,7 @@ static const int if_max_devs[IF_COUNT] = {
*/
[IF_IDE] = 2,
[IF_SCSI] = 7,
+ [IF_AHCI] = 1,
};
/*
@@ -876,7 +878,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
if (qemu_opts_id(all_opts) == NULL) {
char *new_id;
const char *mediastr = "";
- if (type == IF_IDE || type == IF_SCSI) {
+ if (type == IF_IDE || type == IF_SCSI || type == IF_AHCI) {
mediastr = (media == MEDIA_CDROM) ? "-cd" : "-hd";
}
if (max_devs) {
@@ -918,7 +920,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
werror = qemu_opt_get(legacy_opts, "werror");
if (werror != NULL) {
if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO &&
- type != IF_NONE) {
+ type != IF_NONE && type != IF_AHCI) {
error_report("werror is not supported by this bus type");
goto fail;
}
@@ -928,7 +930,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
rerror = qemu_opt_get(legacy_opts, "rerror");
if (rerror != NULL) {
if (type != IF_IDE && type != IF_VIRTIO && type != IF_SCSI &&
- type != IF_NONE) {
+ type != IF_NONE && type != IF_AHCI) {
error_report("rerror is not supported by this bus type");
goto fail;
}
@@ -966,6 +968,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type)
switch(type) {
case IF_IDE:
+ case IF_AHCI:
case IF_SCSI:
case IF_XEN:
case IF_NONE:
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index 2420abd..6b02cf4 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -25,7 +25,7 @@ typedef enum {
*/
IF_IDE = 0,
IF_NONE,
- IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
+ IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN, IF_AHCI,
IF_COUNT
} BlockInterfaceType;
--
1.9.3
next prev parent reply other threads:[~2014-08-18 22:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-18 22:05 [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35 John Snow
2014-08-18 22:05 ` [Qemu-devel] [RFC 1/4] blockdev: add if_get_max_devs John Snow
2014-08-18 22:05 ` John Snow [this message]
2014-08-18 22:05 ` [Qemu-devel] [RFC 3/4] ide: update ide_drive_get to work with both PCI-IDE and AHCI interfaces John Snow
2014-08-18 22:05 ` [Qemu-devel] [RFC 4/4] ahci: implement -cdrom and -hd[a-d] John Snow
2014-08-19 8:05 ` [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35 Markus Armbruster
2014-08-19 15:56 ` John Snow
2014-08-19 18:08 ` Markus Armbruster
2014-08-19 18:59 ` John Snow
2014-08-20 7:22 ` Markus Armbruster
2014-08-19 16:12 ` Dr. David Alan Gilbert
2014-08-19 16:31 ` John Snow
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=1408399520-12778-3-git-send-email-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).