All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hao Wu <wuhaotsh@google.com>
To: peter.maydell@linaro.org
Cc: richard.henderson@linaro.org, qemu-arm@nongnu.org,
	qemu-devel@nongnu.org,  wuhaotsh@google.com, venture@google.com,
	Avi.Fishman@nuvoton.com,  kfting@nuvoton.com,
	hskinnemoen@google.com, f4bug@amsat.org,  bin.meng@windriver.com,
	qemu-block@nongnu.org, armbru@redhat.com,  thuth@redhat.com
Subject: [PATCH v5 5/8] blockdev: Add a new IF type IF_OTHER
Date: Thu, 14 Jul 2022 11:28:33 -0700	[thread overview]
Message-ID: <20220714182836.89602-6-wuhaotsh@google.com> (raw)
In-Reply-To: <20220714182836.89602-1-wuhaotsh@google.com>

This type is used to represent block devs that are not suitable to
be represented by other existing types.

A sample use is to represent an at24c eeprom device defined in
hw/nvram/eeprom_at24c.c. The block device can be used to contain the
content of the said eeprom device.

Signed-off-by: Hao Wu <wuhaotsh@google.com>
---
 blockdev.c                | 4 +++-
 include/sysemu/blockdev.h | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/blockdev.c b/blockdev.c
index 9230888e34..befd69ac5f 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -82,6 +82,7 @@ static const char *const if_name[IF_COUNT] = {
     [IF_MTD] = "mtd",
     [IF_SD] = "sd",
     [IF_VIRTIO] = "virtio",
+    [IF_OTHER] = "other",
     [IF_XEN] = "xen",
 };
 
@@ -726,7 +727,8 @@ QemuOptsList qemu_legacy_drive_opts = {
         },{
             .name = "if",
             .type = QEMU_OPT_STRING,
-            .help = "interface (ide, scsi, sd, mtd, floppy, pflash, virtio)",
+            .help = "interface (ide, scsi, sd, mtd, floppy, pflash, virtio,"
+                    " other)",
         },{
             .name = "file",
             .type = QEMU_OPT_STRING,
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index 3211b16513..d9dd5af291 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -21,6 +21,7 @@ typedef enum {
      */
     IF_NONE = 0,
     IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
+    IF_OTHER,
     IF_COUNT
 } BlockInterfaceType;
 
-- 
2.37.0.170.g444d1eabd0-goog



  parent reply	other threads:[~2022-07-14 18:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 18:28 [PATCH v5 0/8] Misc NPCM7XX patches Hao Wu
2022-07-14 18:28 ` [PATCH v5 1/8] hw/i2c: Clear ACK bit in NPCM7xx SMBus module Hao Wu
2022-07-14 18:28 ` [PATCH v5 2/8] hw/i2c: Read FIFO during RXF_CTL change in NPCM7XX SMBus Hao Wu
2022-07-15 15:37   ` Peter Maydell
2022-07-14 18:28 ` [PATCH v5 3/8] hw/adc: Fix CONV bit in NPCM7XX ADC CON register Hao Wu
2022-07-14 18:28 ` [PATCH v5 4/8] hw/adc: Make adci[*] R/W in NPCM7XX ADC Hao Wu
2022-07-14 18:28 ` Hao Wu [this message]
2022-07-18  9:49   ` [PATCH v5 5/8] blockdev: Add a new IF type IF_OTHER Markus Armbruster
2022-07-18  9:54     ` Thomas Huth
2022-07-27 19:03     ` Kevin Wolf
2022-07-28  9:46       ` Peter Maydell
2022-07-28 13:29         ` Kevin Wolf
2022-07-28 13:43           ` Peter Maydell
2022-07-28 13:57           ` Cédric Le Goater
2022-07-28 14:50           ` Markus Armbruster
2022-07-28 14:58             ` Peter Maydell
2022-08-04 14:27               ` Markus Armbruster
2022-07-28 17:08             ` Kevin Wolf
2022-08-04 14:34         ` Daniel P. Berrangé
2022-08-04 14:56           ` Markus Armbruster
2022-08-04 15:17             ` Daniel P. Berrangé
2022-08-04 15:30               ` Markus Armbruster
2022-08-04 15:44                 ` Daniel P. Berrangé
2022-08-08  6:26                   ` Markus Armbruster
2022-08-08  8:34                     ` Kevin Wolf
2022-08-08 10:14                       ` Markus Armbruster
2022-07-14 18:28 ` [PATCH v5 6/8] hw/arm: npcm8xx_boards: EEPROMs can take bus as parameter Hao Wu
2022-07-14 18:28 ` [PATCH v5 7/8] hw/arm: Set drive property for at24c eeprom Hao Wu
2022-07-18  9:51   ` Markus Armbruster
2022-07-14 18:28 ` [PATCH v5 8/8] hw/arm: quanta-gbs-bmc add i2c devices Hao Wu
2022-07-15 15:44 ` [PATCH v5 0/8] Misc NPCM7XX patches Peter Maydell

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=20220714182836.89602-6-wuhaotsh@google.com \
    --to=wuhaotsh@google.com \
    --cc=Avi.Fishman@nuvoton.com \
    --cc=armbru@redhat.com \
    --cc=bin.meng@windriver.com \
    --cc=f4bug@amsat.org \
    --cc=hskinnemoen@google.com \
    --cc=kfting@nuvoton.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=venture@google.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.