[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 15/44] pcie: Allow generic PCIe root port to speci
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v3 15/44] pcie: Allow generic PCIe root port to specify link speed and width |
Date: |
Thu, 20 Dec 2018 13:38:54 -0500 |
From: Alex Williamson <address@hidden>
Allow users to experimentally specify speed and width values for the
generic PCIe root port. Defaults remain at 2.5GT/s & x1 for
compatiblity with the intent to only support changing defaults via
machine types for now.
Note for libvirt testing that pcie-root-port controllers are given
default names like "pci.7" which don't play well with using the
"-set device.$name.$prop=$value" options accessible to us via
<qemu:commandline> options. The solution is to add an <alias> to the
pcie-root-port <controller>, for example:
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='7' port='0x15'/>
<alias name='ua-gfx0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x5'/>
</controller>
The "ua-" here is a mandatory prefix. We can then use:
<qemu:commandline>
<qemu:arg value='-set'/>
<qemu:arg value='device.ua-gfx0.x-speed=8'/>
<qemu:arg value='-set'/>
<qemu:arg value='device.ua-gfx0.x-width=16'/>
</qemu:commandline>
or, without an alias, set globals such as:
<qemu:commandline>
<qemu:arg value='-global'/>
<qemu:arg value='pcie-root-port.x-speed=8'/>
<qemu:arg value='-global'/>
<qemu:arg value='pcie-root-port.x-width=16'/>
</qemu:commandline>
Cc: Marcel Apfelbaum <address@hidden>
Tested-by: Geoffrey McRae <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/pci-bridge/gen_pcie_root_port.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/pci-bridge/gen_pcie_root_port.c
b/hw/pci-bridge/gen_pcie_root_port.c
index 299de429ec..ca5418a89d 100644
--- a/hw/pci-bridge/gen_pcie_root_port.c
+++ b/hw/pci-bridge/gen_pcie_root_port.c
@@ -124,6 +124,10 @@ static Property gen_rp_props[] = {
res_reserve.mem_pref_32, -1),
DEFINE_PROP_SIZE("pref64-reserve", GenPCIERootPort,
res_reserve.mem_pref_64, -1),
+ DEFINE_PROP_PCIE_LINK_SPEED("x-speed", PCIESlot,
+ speed, PCIE_LINK_SPEED_2_5),
+ DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot,
+ width, PCIE_LINK_WIDTH_1),
DEFINE_PROP_END_OF_LIST()
};
--
MST
- [Qemu-devel] [PULL v3 05/44] tests: Remove unused include, (continued)
- [Qemu-devel] [PULL v3 05/44] tests: Remove unused include, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 06/44] hw/smbios: Restrict access to "hw/smbios/ipmi.h", Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 02/44] pc:piix4: Update smbus I/O space after a migration, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 09/44] hw/pci-bridge: Fix invalid free(), Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 07/44] hw/smbios: Remove "smbios_ipmi.h", Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 08/44] hw/smbios: Move to the hw/firmware/ subdirectory, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 10/44] pcie: Create enums for link speed and width, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 12/44] qapi: Define PCIe link speed and width properties, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 14/44] pcie: Fill PCIESlot link fields to support higher speeds and widths, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 13/44] pcie: Add link speed and width fields to PCIESlot, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 15/44] pcie: Allow generic PCIe root port to specify link speed and width,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v3 17/44] pcie: Fast PCIe root ports for new machines, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 11/44] pci: Sync PCIe downstream port LNKSTA on read, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 18/44] intel_iommu: dump correct iova when failed, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 19/44] intel_iommu: convert invalid traces into error reports, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 16/44] vfio/pci: Remove PCIe Link Status emulation, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 20/44] intel_iommu: dma read/write draining support, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 21/44] intel_iommu: remove "x-" prefix for "aw-bits", Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 22/44] hw: acpi: The RSDP build API can return void, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 32/44] pci/shpc: rename hotplug handler callbacks, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 24/44] hw: i386: Use correct RSDT length for checksum, Michael S. Tsirkin, 2018/12/20