aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2018-12-12 12:39:08 -0700
committerMichael S. Tsirkin <mst@redhat.com>2018-12-19 16:48:16 -0500
commit4695a2c50076879000ddde9f80d07bbcacfa0f26 (patch)
tree36128e0fa00550422f872594ad242df509a6e0ff /qapi
parent727b48661f757678f7f42f557ddac072c5a49721 (diff)
downloadqemu-4695a2c50076879000ddde9f80d07bbcacfa0f26.zip
qemu-4695a2c50076879000ddde9f80d07bbcacfa0f26.tar.gz
qemu-4695a2c50076879000ddde9f80d07bbcacfa0f26.tar.bz2
qapi: Define PCIe link speed and width properties
Create properties to be able to define speeds and widths for PCIe links. The only tricky bit here is that our get and set callbacks translate from the fixed QAPI automagic enums to those we define in PCI code to represent the actual register segment value. Cc: Eric Blake <eblake@redhat.com> Tested-by: Geoffrey McRae <geoff@hostfission.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/common.json42
1 files changed, 42 insertions, 0 deletions
diff --git a/qapi/common.json b/qapi/common.json
index 021174f..99d313e 100644
--- a/qapi/common.json
+++ b/qapi/common.json
@@ -128,6 +128,48 @@
'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' ] }
##
+# @PCIELinkSpeed:
+#
+# An enumeration of PCIe link speeds in units of GT/s
+#
+# @2_5: 2.5GT/s
+#
+# @5: 5.0GT/s
+#
+# @8: 8.0GT/s
+#
+# @16: 16.0GT/s
+#
+# Since: 4.0
+##
+{ 'enum': 'PCIELinkSpeed',
+ 'data': [ '2_5', '5', '8', '16' ] }
+
+##
+# @PCIELinkWidth:
+#
+# An enumeration of PCIe link width
+#
+# @1: x1
+#
+# @2: x2
+#
+# @4: x4
+#
+# @8: x8
+#
+# @12: x12
+#
+# @16: x16
+#
+# @32: x32
+#
+# Since: 4.0
+##
+{ 'enum': 'PCIELinkWidth',
+ 'data': [ '1', '2', '4', '8', '12', '16', '32' ] }
+
+##
# @SysEmuTarget:
#
# The comprehensive enumeration of QEMU system emulation ("softmmu")