#
95f47968 |
| 14-Feb-2022 |
Alexandru Elisei <alexandru.elisei@arm.com> |
arm: pci: Generate "msi-parent" property only with a MSI controller
The "msi-parent" PCI root complex property describes the MSI parent of the root complex. When the VM is created with a GICv2 or GI
arm: pci: Generate "msi-parent" property only with a MSI controller
The "msi-parent" PCI root complex property describes the MSI parent of the root complex. When the VM is created with a GICv2 or GICv3 irqchip (--irqchip=gicv3 or --irqchip=gicv2), there is no MSI controller present on the system and the corresponding phandle is not generated, leaving the "msi-parent" property to point to a non-existing phandle. Skip creating the "msi-parent" property when no MSI controller exists.
Reported-by: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> Link: https://lore.kernel.org/r/20220214165830.69207-4-alexandru.elisei@arm.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
7a60af05 |
| 11-Nov-2021 |
Sathyam Panda <panda.sathyam9@gmail.com> |
arm/pci: update interrupt-map only for legacy interrupts
The interrupt pin cell in "interrupt-map" property is defined only for legacy interrupts with a valid range in [1-4] corrspoding to INTA#..IN
arm/pci: update interrupt-map only for legacy interrupts
The interrupt pin cell in "interrupt-map" property is defined only for legacy interrupts with a valid range in [1-4] corrspoding to INTA#..INTD#. And the PCI endpoint devices that support advance interrupt mechanism like MSI or MSI-X should not have an entry with value 0 in "interrupt-map". This patch takes care of this problem by avoiding redundant entries.
Signed-off-by: Sathyam Panda <sathyam.panda@arm.com> Reviewed-by: Vivek Kumar Gautam <vivek.gautam@arm.com> Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com> Link: https://lore.kernel.org/r/20211111120231.5468-1-sathyam.panda@arm.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
e69b7663 |
| 13-Jul-2021 |
Alexandru Elisei <alexandru.elisei@arm.com> |
arm/arm64: Add PCI Express 1.1 support
PCI Express comes with an extended addressing scheme, which directly translated into a bigger device configuration space (256->4096 bytes) and bigger PCI confi
arm/arm64: Add PCI Express 1.1 support
PCI Express comes with an extended addressing scheme, which directly translated into a bigger device configuration space (256->4096 bytes) and bigger PCI configuration space (16->256 MB), as well as mandatory capabilities (power management [1] and PCI Express capability [2]).
However, our virtio PCI implementation implements version 0.9 of the protocol and it still uses transitional PCI device ID's, so we have opted to omit the mandatory PCI Express capabilities. For VFIO, the power management and PCI Express capability are left for a subsequent patch.
[1] PCI Express Base Specification Revision 1.1, section 7.6 [2] PCI Express Base Specification Revision 1.1, section 7.8
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Link: https://lore.kernel.org/r/20210713170631.155595-4-alexandru.elisei@arm.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
c94286f0 |
| 14-Apr-2020 |
Alexandru Elisei <alexandru.elisei@arm.com> |
arm/pci: Advertise only PCI bus 0 in the DT
The "bus-range" property encodes the PCI bus number of the PCI controller and the largest bus number of any PCI buses that are subordinate to this node [1
arm/pci: Advertise only PCI bus 0 in the DT
The "bus-range" property encodes the PCI bus number of the PCI controller and the largest bus number of any PCI buses that are subordinate to this node [1]. kvmtool emulates only PCI bus 0. Advertise this in the PCI DT node by setting "bus-range" to <0,0>.
[1] IEEE Std 1275-1994, Section 3 "Bus Nodes Properties and Methods"
Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
6078a454 |
| 18-Jun-2018 |
Jean-Philippe Brucker <jean-philippe.brucker@arm.com> |
Add PCI device passthrough using VFIO
Assigning devices using VFIO allows the guest to have direct access to the device, whilst filtering accesses to sensitive areas by trapping config space accesse
Add PCI device passthrough using VFIO
Assigning devices using VFIO allows the guest to have direct access to the device, whilst filtering accesses to sensitive areas by trapping config space accesses and mapping DMA with an IOMMU.
This patch adds a new option to lkvm run: --vfio-pci=<BDF>. Before assigning a device to a VM, some preparation is required. As described in Linux Documentation/vfio.txt, the device driver needs to be changed to vfio-pci:
$ dev=0000:00:00.0
$ echo $dev > /sys/bus/pci/devices/$dev/driver/unbind $ echo vfio-pci > /sys/bus/pci/devices/$dev/driver_override $ echo $dev > /sys/bus/pci/drivers_probe
Adding --vfio-pci=$dev to lkvm-run will pass the device to the guest. Multiple devices can be passed to the guest by adding more --vfio-pci parameters.
This patch only implements PCI with INTx. MSI-X routing will be added in a subsequent patch, and at some point we might add support for passing platform devices to guests.
Reviewed-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
show more ...
|
#
ff01b5db |
| 18-Jun-2018 |
Jean-Philippe Brucker <jean-philippe.brucker@arm.com> |
pci: allow to specify IRQ type for PCI devices
Currently all our virtual device interrupts are edge-triggered. But we're going to need level-triggered interrupts when passing physical devices. Let t
pci: allow to specify IRQ type for PCI devices
Currently all our virtual device interrupts are edge-triggered. But we're going to need level-triggered interrupts when passing physical devices. Let the device configure its interrupt kind. Keep edge as default, to avoid changing existing users.
Reviewed-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
show more ...
|
#
14421de9 |
| 25-Apr-2017 |
Andre Przywara <andre.przywara@arm.com> |
arm: FDT: create MSI controller DT node
The ARM GICv3 ITS requires a separate device tree node to describe the ITS. Add this as a child to the GIC interrupt controller node to let a guest discover a
arm: FDT: create MSI controller DT node
The ARM GICv3 ITS requires a separate device tree node to describe the ITS. Add this as a child to the GIC interrupt controller node to let a guest discover and use the ITS if the user requests it. Since we now need to specify #address-cells for the GIC node, we have to add two zeroes to the interrupt map to match that.
Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
show more ...
|
#
0063d50c |
| 25-Apr-2017 |
Andre Przywara <andre.przywara@arm.com> |
arm: use static DT phandle for the GIC
As KVM supports only onc (v)GIC per guest and it's hard to imagine that we will ever need more than that, lets simplify the FDT generation by not passing that
arm: use static DT phandle for the GIC
As KVM supports only onc (v)GIC per guest and it's hard to imagine that we will ever need more than that, lets simplify the FDT generation by not passing that single, constant phandle around. Let's just reference that one global symbol from enum phandles instead.
Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
show more ...
|
#
9a8af7e3 |
| 31-Jan-2017 |
Robin Murphy <robin.murphy@arm.com> |
virtio: Describe virtio coherency in DT
We use cacheable accesses on our end of the virtio ring, so make sure the guest is aware of that, and thus doesn't try to use non-cacheable DMA buffers, by in
virtio: Describe virtio coherency in DT
We use cacheable accesses on our end of the virtio ring, so make sure the guest is aware of that, and thus doesn't try to use non-cacheable DMA buffers, by including the dma-coherent property on its DT node.
Signed-off-by: Robin Murphy <robin.murphy@arm.com> [will: do the same for the PCI node for virtio-pci devices] Signed-off-by: Will Deacon <will.deacon@arm.com>
show more ...
|
#
045fc040 |
| 17-Dec-2014 |
Andre Przywara <andre.przywara@arm.com> |
kvmtool: replace GIC specific IRQ type #defines
We had GIC specific defines for the IRQ type identifiers in kvmtool. But in fact the specification of being a level or edge interrupt is quite generic
kvmtool: replace GIC specific IRQ type #defines
We had GIC specific defines for the IRQ type identifiers in kvmtool. But in fact the specification of being a level or edge interrupt is quite generic, with the GIC binding using the generic Linux defines. So lets replace the GIC specific #defines in favour of the more general names copied from Linux' include/linux/irq.h.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
show more ...
|
#
1fcf0d77 |
| 17-Apr-2014 |
Will Deacon <will.deacon@arm.com> |
kvm tools: ARM: bring generated pci FDT node in-line with kernel binding
Now that the dust has settled on the devicetree bindings for the generic PCI host controller in the Linux kernel, update the
kvm tools: ARM: bring generated pci FDT node in-line with kernel binding
Now that the dust has settled on the devicetree bindings for the generic PCI host controller in the Linux kernel, update the node generated by kvmtool to match what mainline kernels will expect.
Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
16242d27 |
| 04-Feb-2014 |
Will Deacon <will.deacon@arm.com> |
kvm tools: ARM: generate an fdt node for our PCI emulation
This patch factors out some of the openfirmware PCI binding definitions from the powerpc spapr PCI code and uses them to generate appropria
kvm tools: ARM: generate an fdt node for our PCI emulation
This patch factors out some of the openfirmware PCI binding definitions from the powerpc spapr PCI code and uses them to generate appropriate FDT properties for the PCI node on ARM.
Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|