.set_default_value = qdev_propinfo_set_default_value_enum,
};
-/* --- PCIELinkSpeed 2_5/5/8/16 -- */
+/* --- PCIELinkSpeed 2_5/5/8/16/32/64 -- */
static void get_prop_pcielinkspeed(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
case QEMU_PCI_EXP_LNK_16GT:
speed = PCIE_LINK_SPEED_16;
break;
+ case QEMU_PCI_EXP_LNK_32GT:
+ speed = PCIE_LINK_SPEED_32;
+ break;
+ case QEMU_PCI_EXP_LNK_64GT:
+ speed = PCIE_LINK_SPEED_64;
+ break;
default:
/* Unreachable */
abort();
case PCIE_LINK_SPEED_16:
*p = QEMU_PCI_EXP_LNK_16GT;
break;
+ case PCIE_LINK_SPEED_32:
+ *p = QEMU_PCI_EXP_LNK_32GT;
+ break;
+ case PCIE_LINK_SPEED_64:
+ *p = QEMU_PCI_EXP_LNK_64GT;
+ break;
default:
/* Unreachable */
abort();
const PropertyInfo qdev_prop_pcie_link_speed = {
.name = "PCIELinkSpeed",
- .description = "2_5/5/8/16",
+ .description = "2_5/5/8/16/32/64",
.enum_table = &PCIELinkSpeed_lookup,
.get = get_prop_pcielinkspeed,
.set = set_prop_pcielinkspeed,
pci_long_test_and_set_mask(exp_cap + PCI_EXP_LNKCAP2,
PCI_EXP_LNKCAP2_SLS_16_0GB);
}
+ if (s->speed > QEMU_PCI_EXP_LNK_16GT) {
+ pci_long_test_and_set_mask(exp_cap + PCI_EXP_LNKCAP2,
+ PCI_EXP_LNKCAP2_SLS_32_0GB);
+ }
+ if (s->speed > QEMU_PCI_EXP_LNK_32GT) {
+ pci_long_test_and_set_mask(exp_cap + PCI_EXP_LNKCAP2,
+ PCI_EXP_LNKCAP2_SLS_64_0GB);
+ }
}
}
#
# @16: 16.0GT/s
#
+# @32: 32.0GT/s
+#
+# @64: 64.0GT/s
+#
# Since: 4.0
##
{ 'enum': 'PCIELinkSpeed',
- 'data': [ '2_5', '5', '8', '16' ] }
+ 'data': [ '2_5', '5', '8', '16', '32', '64' ] }
##
# @PCIELinkWidth: