* [PATCH 0/2] QAPI: Support NVMe disk type
@ 2022-03-02 8:54 zhenwei pi
2022-03-02 8:54 ` [PATCH 1/2] qapi: Introduce NVMe disk bus type zhenwei pi
2022-03-02 8:54 ` [PATCH 2/2] qga/commands-posix: Support NVMe disk type zhenwei pi
0 siblings, 2 replies; 4+ messages in thread
From: zhenwei pi @ 2022-03-02 8:54 UTC (permalink / raw)
To: michael.roth; +Cc: qemu-devel, zhenwei pi
- Introduce NVMe disk type
- Support NVMe disk type for posix
Zhenwei Pi (2):
qapi: Introduce NVMe disk bus type
qga/commands-posix: Support NVMe disk type
qga/commands-posix.c | 5 ++++-
qga/qapi-schema.json | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] qapi: Introduce NVMe disk bus type
2022-03-02 8:54 [PATCH 0/2] QAPI: Support NVMe disk type zhenwei pi
@ 2022-03-02 8:54 ` zhenwei pi
2022-03-02 9:35 ` Markus Armbruster
2022-03-02 8:54 ` [PATCH 2/2] qga/commands-posix: Support NVMe disk type zhenwei pi
1 sibling, 1 reply; 4+ messages in thread
From: zhenwei pi @ 2022-03-02 8:54 UTC (permalink / raw)
To: michael.roth; +Cc: qemu-devel, zhenwei pi
Assigning a NVMe disk by VFIO or emulating a NVMe controller by QEMU,
a NVMe disk get exposed in guest side. Support NVMe disk bus type for
QAPI.
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
---
qga/qapi-schema.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
index 94e4aacdcc..1b5ea4c5f8 100644
--- a/qga/qapi-schema.json
+++ b/qga/qapi-schema.json
@@ -827,13 +827,14 @@
# @mmc: Win multimedia card (MMC) bus type
# @virtual: Win virtual bus type
# @file-backed-virtual: Win file-backed bus type
+# @nvme: NVMe disks
#
# Since: 2.2; 'Unknown' and all entries below since 2.4
##
{ 'enum': 'GuestDiskBusType',
'data': [ 'ide', 'fdc', 'scsi', 'virtio', 'xen', 'usb', 'uml', 'sata',
'sd', 'unknown', 'ieee1394', 'ssa', 'fibre', 'raid', 'iscsi',
- 'sas', 'mmc', 'virtual', 'file-backed-virtual' ] }
+ 'sas', 'mmc', 'virtual', 'file-backed-virtual', 'nvme' ] }
##
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] qga/commands-posix: Support NVMe disk type
2022-03-02 8:54 [PATCH 0/2] QAPI: Support NVMe disk type zhenwei pi
2022-03-02 8:54 ` [PATCH 1/2] qapi: Introduce NVMe disk bus type zhenwei pi
@ 2022-03-02 8:54 ` zhenwei pi
1 sibling, 0 replies; 4+ messages in thread
From: zhenwei pi @ 2022-03-02 8:54 UTC (permalink / raw)
To: michael.roth; +Cc: qemu-devel, zhenwei pi
Support NVMe disk type, test PCI passthrough case:
~#virsh qemu-agent-command buster '{"execute":"guest-get-disks"}' | jq
...
{
"name": "/dev/nvme0n1",
"dependencies": [],
"partition": false,
"address": {
"serial": "SAMSUNG MZQL23T8HCLS-00A07_S64HNE0N500076",
"bus-type": "nvme",
"bus": 0,
"unit": 0,
"pci-controller": {
"bus": 0,
"slot": 22,
"domain": 0,
"function": 0
},
"dev": "/dev/nvme0n1",
"target": 0
}
...
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
---
qga/commands-posix.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 75dbaab68e..4ec83bbfbc 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -889,7 +889,8 @@ static bool build_guest_fsinfo_for_pci_dev(char const *syspath,
if (driver && (g_str_equal(driver, "ata_piix") ||
g_str_equal(driver, "sym53c8xx") ||
g_str_equal(driver, "virtio-pci") ||
- g_str_equal(driver, "ahci"))) {
+ g_str_equal(driver, "ahci") ||
+ g_str_equal(driver, "nvme"))) {
break;
}
@@ -984,6 +985,8 @@ static bool build_guest_fsinfo_for_pci_dev(char const *syspath,
g_debug("no host for '%s' (driver '%s')", syspath, driver);
goto cleanup;
}
+ } else if (strcmp(driver, "nvme") == 0) {
+ disk->bus_type = GUEST_DISK_BUS_TYPE_NVME;
} else {
g_debug("unknown driver '%s' (sysfs path '%s')", driver, syspath);
goto cleanup;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] qapi: Introduce NVMe disk bus type
2022-03-02 8:54 ` [PATCH 1/2] qapi: Introduce NVMe disk bus type zhenwei pi
@ 2022-03-02 9:35 ` Markus Armbruster
0 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2022-03-02 9:35 UTC (permalink / raw)
To: zhenwei pi; +Cc: michael.roth, qemu-devel
zhenwei pi <pizhenwei@bytedance.com> writes:
> Assigning a NVMe disk by VFIO or emulating a NVMe controller by QEMU,
> a NVMe disk get exposed in guest side. Support NVMe disk bus type for
> QAPI.
>
> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
> ---
> qga/qapi-schema.json | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
> index 94e4aacdcc..1b5ea4c5f8 100644
> --- a/qga/qapi-schema.json
> +++ b/qga/qapi-schema.json
> @@ -827,13 +827,14 @@
> # @mmc: Win multimedia card (MMC) bus type
> # @virtual: Win virtual bus type
> # @file-backed-virtual: Win file-backed bus type
> +# @nvme: NVMe disks
> #
> # Since: 2.2; 'Unknown' and all entries below since 2.4
> ##
> { 'enum': 'GuestDiskBusType',
> 'data': [ 'ide', 'fdc', 'scsi', 'virtio', 'xen', 'usb', 'uml', 'sata',
> 'sd', 'unknown', 'ieee1394', 'ssa', 'fibre', 'raid', 'iscsi',
> - 'sas', 'mmc', 'virtual', 'file-backed-virtual' ] }
> + 'sas', 'mmc', 'virtual', 'file-backed-virtual', 'nvme' ] }
>
>
> ##
Please change the title to something like
qga: Introduce NVMe disk bus type
I'd squash the two patches together.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-02 9:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-02 8:54 [PATCH 0/2] QAPI: Support NVMe disk type zhenwei pi
2022-03-02 8:54 ` [PATCH 1/2] qapi: Introduce NVMe disk bus type zhenwei pi
2022-03-02 9:35 ` Markus Armbruster
2022-03-02 8:54 ` [PATCH 2/2] qga/commands-posix: Support NVMe disk type zhenwei pi
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.