Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into sta…
Browse files Browse the repository at this point in the history
…ging

virtio,pc: features, cleanups, fixes

virtio introspection commands
Part of ACPI ERST support
fixes, cleanups

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Sat 05 Feb 2022 01:41:11 GMT
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream: (32 commits)
  util/oslib-posix: Fix missing unlock in the error path of os_mem_prealloc()
  ACPI ERST: step 6 of bios-tables-test.c
  ACPI ERST: bios-tables-test testcase
  ACPI ERST: qtest for ERST
  ACPI ERST: create ACPI ERST table for pc/x86 machines
  ACPI ERST: build the ACPI ERST table
  ACPI ERST: support for ACPI ERST feature
  ACPI ERST: header file for ERST
  ACPI ERST: PCI device_id for ERST
  ACPI ERST: bios-tables-test.c steps 1 and 2
  hmp: add virtio commands
  qmp: add QMP command x-query-virtio-queue-element
  qmp: add QMP commands for virtio/vhost queue-status
  qmp: decode feature & status bits in virtio-status
  qmp: add QMP command x-query-virtio-status
  qmp: add QMP command x-query-virtio
  virtio: add vhost support for virtio devices
  virtio: drop name parameter for virtio_init()
  libvhost-user: Map shared RAM with MAP_NORESERVE to support virtio-mem with hugetlb
  libvhost-user: handle removal of identical regions
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Feb 5, 2022
2 parents 31f59af + 593a841 commit ee049bc
Show file tree
Hide file tree
Showing 67 changed files with 3,776 additions and 81 deletions.
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -2768,7 +2768,7 @@ cat > $TMPC << EOF
#include <cpuid.h>
int main(void) {
unsigned a, b, c, d;
int max = __get_cpuid_max(0, 0);
unsigned max = __get_cpuid_max(0, 0);
if (max >= 1) {
__cpuid(1, a, b, c, d);
Expand Down
70 changes: 70 additions & 0 deletions hmp-commands-info.hx
Expand Up @@ -879,3 +879,73 @@ SRST
``info sgx``
Show intel SGX information.
ERST

{
.name = "virtio",
.args_type = "",
.params = "",
.help = "List all available virtio devices",
.cmd = hmp_virtio_query,
.flags = "p",
},

SRST
``info virtio``
List all available virtio devices
ERST

{
.name = "virtio-status",
.args_type = "path:s",
.params = "path",
.help = "Display status of a given virtio device",
.cmd = hmp_virtio_status,
.flags = "p",
},

SRST
``info virtio-status`` *path*
Display status of a given virtio device
ERST

{
.name = "virtio-queue-status",
.args_type = "path:s,queue:i",
.params = "path queue",
.help = "Display status of a given virtio queue",
.cmd = hmp_virtio_queue_status,
.flags = "p",
},

SRST
``info virtio-queue-status`` *path* *queue*
Display status of a given virtio queue
ERST

{
.name = "virtio-vhost-queue-status",
.args_type = "path:s,queue:i",
.params = "path queue",
.help = "Display status of a given vhost queue",
.cmd = hmp_vhost_queue_status,
.flags = "p",
},

SRST
``info virtio-vhost-queue-status`` *path* *queue*
Display status of a given vhost queue
ERST

{
.name = "virtio-queue-element",
.args_type = "path:s,queue:i,index:i?",
.params = "path queue [index]",
.help = "Display element of a given virtio queue",
.cmd = hmp_virtio_queue_element,
.flags = "p",
},

SRST
``info virtio-queue-element`` *path* *queue* [*index*]
Display element of a given virtio queue
ERST
2 changes: 1 addition & 1 deletion hw/9pfs/virtio-9p-device.c
Expand Up @@ -216,7 +216,7 @@ static void virtio_9p_device_realize(DeviceState *dev, Error **errp)
}

v->config_size = sizeof(struct virtio_9p_config) + strlen(s->fsconf.tag);
virtio_init(vdev, "virtio-9p", VIRTIO_ID_9P, v->config_size);
virtio_init(vdev, VIRTIO_ID_9P, v->config_size);
v->vq = virtio_add_queue(vdev, MAX_REQ, handle_9p_output);
}

Expand Down
6 changes: 6 additions & 0 deletions hw/acpi/Kconfig
Expand Up @@ -10,6 +10,7 @@ config ACPI_X86
select ACPI_HMAT
select ACPI_PIIX4
select ACPI_PCIHP
select ACPI_ERST

config ACPI_X86_ICH
bool
Expand Down Expand Up @@ -60,3 +61,8 @@ config ACPI_HW_REDUCED
select ACPI
select ACPI_MEMORY_HOTPLUG
select ACPI_NVDIMM

config ACPI_ERST
bool
default y
depends on ACPI && PCI
4 changes: 2 additions & 2 deletions hw/acpi/aml-build.c
Expand Up @@ -1724,9 +1724,9 @@ void acpi_table_begin(AcpiTable *desc, GArray *array)
build_append_int_noprefix(array, 0, 4); /* Length */
build_append_int_noprefix(array, desc->rev, 1); /* Revision */
build_append_int_noprefix(array, 0, 1); /* Checksum */
build_append_padded_str(array, desc->oem_id, 6, ' '); /* OEMID */
build_append_padded_str(array, desc->oem_id, 6, '\0'); /* OEMID */
/* OEM Table ID */
build_append_padded_str(array, desc->oem_table_id, 8, ' ');
build_append_padded_str(array, desc->oem_table_id, 8, '\0');
build_append_int_noprefix(array, 1, 4); /* OEM Revision */
g_array_append_vals(array, ACPI_BUILD_APPNAME8, 4); /* Creator ID */
build_append_int_noprefix(array, 1, 4); /* Creator Revision */
Expand Down

0 comments on commit ee049bc

Please sign in to comment.