Branch: refs/heads/wip/arm-ivshmem
  Home:   https://github.com/siemens/jailhouse
  Commit: 7d903a4225bf718fea32bef38edc1ec6708edcf1
      
https://github.com/siemens/jailhouse/commit/7d903a4225bf718fea32bef38edc1ec6708edcf1
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/x86/vtd.c
    A hypervisor/include/jailhouse/ivshmem.h
    M hypervisor/include/jailhouse/pci.h
    M hypervisor/pci.c
    M hypervisor/pci_ivshmem.c

  Log Message:
  -----------
  core: ivshmem: Introduce separate header file

Stop piggybacking with PCI for ivshmem-specific prototypes. This will
help making non-x86 support for ivshmem cleaner.

We already move the struct pci_ivshmem_endpoint into the header because
the arch-specific code will need it.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 0c5b45bf4fb6fb11badbed2632bec22d7015909a
      
https://github.com/siemens/jailhouse/commit/0c5b45bf4fb6fb11badbed2632bec22d7015909a
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/x86/Kbuild
    M hypervisor/arch/x86/vtd.c
    M hypervisor/include/jailhouse/ivshmem.h
    M hypervisor/include/jailhouse/pci.h
    A hypervisor/ivshmem.c
    M hypervisor/pci.c
    R hypervisor/pci_ivshmem.c

  Log Message:
  -----------
  core: ivshmem: Remove "pci" tagging from function and module names

The ivshmem device is PCI-only, and it seems it will remain like that,
even when expanding to targets without physical PCI support. Therefore,
it adds no value to have "pci_" in its names all over the place because
the will be no PCI-free variant in parallel.

Besides the renaming, this also consolidates pci_ivshmem_update_msix and
ivshmem_update_msix into a single service.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: e271bdb6d3ca107051989d215a3dfcc394be13d7
      
https://github.com/siemens/jailhouse/commit/e271bdb6d3ca107051989d215a3dfcc394be13d7
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/x86/include/asm/apic.h
    M hypervisor/arch/x86/include/asm/pci.h
    M hypervisor/arch/x86/pci.c
    M hypervisor/ivshmem.c

  Log Message:
  -----------
  x86: pci: Rename pci_translate_msi_vector and move prototype to asm/pci.h

The name should reflect that this is an x86-only function. And it is a
PCI service, implemented in x86/pci.c. Thus the prototype rather belongs
into asm/pci.h.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: ce9b5c36853d0f8c3cb611a19c62ba344e07fcad
      
https://github.com/siemens/jailhouse/commit/ce9b5c36853d0f8c3cb611a19c62ba344e07fcad
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/x86/Kbuild
    A hypervisor/arch/x86/include/asm/ivshmem.h
    A hypervisor/arch/x86/ivshmem.c
    M hypervisor/arch/x86/vtd.c
    M hypervisor/include/jailhouse/ivshmem.h
    M hypervisor/ivshmem.c
    M hypervisor/pci.c

  Log Message:
  -----------
  core: ivhsmem: Factor out architecture-specific parts

So far the ivshmem code assumed to run only on x86. In order to prepare
it for reuse on other architectures (ARM, ARM64), factor out the bits
and pieces that are arch-specific and implement them for x86.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: ab91185fb6736e1379c9cbc4d224812a6e7c5be1
      
https://github.com/siemens/jailhouse/commit/ab91185fb6736e1379c9cbc4d224812a6e7c5be1
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/pci.c

  Log Message:
  -----------
  core: pci: Add byte and word access support for mmconfig

Supporting more accesses sizes actually makes the case slightly simpler,
thanks to mmio_perform_access. Moreover, this will help introducing PCI
support on ARM where accesses of less than 4 bytes take place.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: b553ea5b7a0d8f04ae580a9cd20e6f3e011b57fc
      
https://github.com/siemens/jailhouse/commit/b553ea5b7a0d8f04ae580a9cd20e6f3e011b57fc
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M configs/f2a88xm-hd3.c
    M configs/h87i.c
    M configs/imb-a180.c
    M configs/qemu-vm.c
    M hypervisor/include/jailhouse/cell-config.h
    M hypervisor/pci.c
    M tools/root-cell-config.c.tmpl

  Log Message:
  -----------
  core, configs, tools: Make mmconfig PCI platform parameters generic

We will reuse them non-x86 architectures.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 599e7c03f21867f3b132f572a50872440967c644
      
https://github.com/siemens/jailhouse/commit/599e7c03f21867f3b132f572a50872440967c644
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/arm/Kbuild
    A hypervisor/arch/arm/lib.c

  Log Message:
  -----------
  arm: Provide __aeabi_llsl and __aeabi_llsr

Will be required by the PCI layer. It's not worth optimizing this in
assembly, the compiler is already pretty good in this.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: ac12d6b55427e1b40cbd54d8de25be680a0263d3
      
https://github.com/siemens/jailhouse/commit/ac12d6b55427e1b40cbd54d8de25be680a0263d3
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/Makefile
    M hypervisor/arch/arm-common/Kbuild
    A hypervisor/arch/arm-common/include/asm/ivshmem.h
    A hypervisor/arch/arm-common/ivshmem.c
    A hypervisor/arch/arm-common/pci.c
    M hypervisor/arch/arm/include/asm/paging.h
    M hypervisor/arch/arm/mmio.c
    M hypervisor/arch/arm64/include/asm/paging.h
    M hypervisor/arch/x86/Kbuild

  Log Message:
  -----------
  arm, arm64: Prepare for PCI support

This adds the required stubs and functions of physical PCI support on
ARM and ARM64. It also switches to building the generic PCI and ivshmem
modules unconditionally for all archs. Mapping the MMCONFIG space will
require a larger remapping region, so this is extended on both ARM and
ARM64.

This does not yet initialize PCI for the new archs, though. Moreover,
ivshmem interrupt delivery is not yet implemented.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 6fb870e95bfb1c93db48f119f8c09b787785f7fd
      
https://github.com/siemens/jailhouse/commit/6fb870e95bfb1c93db48f119f8c09b787785f7fd
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/control.c

  Log Message:
  -----------
  core: Rename shutdown to hypervisor_disable

We will use "shutdown" for encapsulating arch_shutdown + generic steps.
No functional changes.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 8ac7016f29b52198c081b9029026e4663ac5385a
      
https://github.com/siemens/jailhouse/commit/8ac7016f29b52198c081b9029026e4663ac5385a
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/x86/control.c
    M hypervisor/arch/x86/mmio.c
    M hypervisor/arch/x86/setup.c
    M hypervisor/control.c
    M hypervisor/include/jailhouse/control.h
    M hypervisor/mmio.c
    M hypervisor/setup.c

  Log Message:
  -----------
  core: Make PCI a generic feature

Move PCI initialization functions from x86 into the core, effectively
enabling it for all architectures.

PCI is now initialized last, both during common setup as well as on cell
creation. This means an ordering change for x86, but that is without
side effects.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: bb71a6147f30c27ba79a768767fb97fbfbaf684b
      
https://github.com/siemens/jailhouse/commit/bb71a6147f30c27ba79a768767fb97fbfbaf684b
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/pci.c

  Log Message:
  -----------
  core: pci: Permit write access to read-only Header Type register

On ARM, Linux will update BIST, Latency Timer and Cache Line Size in a
single 32-bit write, which includes the Header Type register. This traps
so far. But Header Type is specified to be read-only, thus writes have
no effect and can safely be allowed as well.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 11e0e3ad227a751b8154c485dad652a1ed97e995
      
https://github.com/siemens/jailhouse/commit/11e0e3ad227a751b8154c485dad652a1ed97e995
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/arm-common/gic-common.c
    M hypervisor/arch/arm-common/include/asm/gic.h
    M hypervisor/arch/arm-common/irqchip.c

  Log Message:
  -----------
  arm-common: Add support for interrupt injection via GICD

This will be useful for injecting interrupts on behalf of virtual
devices, namely ivshmem. It allows to let the hardware do the routing to
the target CPU, instead of implementing this in software.

Reuse the existing irqchip_set_pending interface for this, defining
GICD-based injection being requested if a NULL target CPU is passed.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 015835ef5ad21df82118916d37e2b15e7c32452f
      
https://github.com/siemens/jailhouse/commit/015835ef5ad21df82118916d37e2b15e7c32452f
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/arm-common/include/asm/ivshmem.h
    M hypervisor/arch/arm-common/ivshmem.c

  Log Message:
  -----------
  arm-common: Add MSI-X support for ivshmem devices based on GICv2m

If system comes with a GICv2m, we can piggyback with it to emulate MSI-X
vector support of ivshmem. GICv2m means that the MSI data field contains
the target interrupt number, to be injected into the GICD. We validate
and cache the value on arch_ivshmem_update_msix and simply inject it via
the physical GICD on arch_ivshmem_write_doorbell.

Yet missing is validation of the MSI address field. Also, we do not have
any of the GICv2m quirk workaround implemented that Linux carries
because our reference system, AMD Seattle, is implemented according to
the Server Base System Architecture spec.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: c619a8543aa8dd2ea1084d679854afdb4fb6937e
      
https://github.com/siemens/jailhouse/commit/c619a8543aa8dd2ea1084d679854afdb4fb6937e
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/include/jailhouse/cell-config.h
    M hypervisor/pci.c

  Log Message:
  -----------
  core: pci: Add virtual host controller

Yes, it is that simple: For targets without physical PCI support, we can
simply expose an mmconfig region in order to provide ivshmem devices to
the guests. All we need to do is to register the configured MMIO region
but skip the mapping of the region physically. A new flag in the system
config controls this.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: b30be4ec3f5a9e239aa6e67e532cf1851d660027
      
https://github.com/siemens/jailhouse/commit/b30be4ec3f5a9e239aa6e67e532cf1851d660027
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/include/jailhouse/cell-config.h
    M tools/jailhouse-cell-linux

  Log Message:
  -----------
  core, tools: Add IRQ base number for virtual PCI hosts to cell config

In order to inject interrupts from virtual devices, we need to know the
(virtual) mapping of the VPCI host controller interrupts on the system
interrupt space. Introduce a per-cell config field that encodes this
base. It will only be used on targets without (suitable) physical MSI
support, which excludes x86.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 9483d00f9744a6e5bddc21483dd6fa8aa3fbbbd8
      
https://github.com/siemens/jailhouse/commit/9483d00f9744a6e5bddc21483dd6fa8aa3fbbbd8
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/arm-common/ivshmem.c
    M hypervisor/arch/x86/ivshmem.c
    M hypervisor/include/jailhouse/ivshmem.h
    M hypervisor/ivshmem.c

  Log Message:
  -----------
  core: ivshmem: Introduce arch_ivshmem_init

Called at the end of the endpoint device setup, will be needed for
initialization INTx emulation.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 9974d68ae4aede3e3a9a109ce7f1f574498afeba
      
https://github.com/siemens/jailhouse/commit/9974d68ae4aede3e3a9a109ce7f1f574498afeba
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M hypervisor/arch/arm-common/ivshmem.c
    M hypervisor/ivshmem.c

  Log Message:
  -----------
  arm: ivshmem: Add support for INTx-based interrupt injection

Fall back to INTx in case an ivshmem device comes without MSI-X vectors.
This is now implemented for ARM, using standard PCI pin rotation based
on the device slot.

x86 has no need for INTx as MSI-X is always supported (plus there is a
less uniform legacy INTx injection path which prevents a generic
solution).

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 70d2f1531bf6e46ddb49e6e630b3f31fa8bbf1b5
      
https://github.com/siemens/jailhouse/commit/70d2f1531bf6e46ddb49e6e630b3f31fa8bbf1b5
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M driver/cell.c
    M driver/main.c
    M driver/pci.c
    M driver/pci.h

  Log Message:
  -----------
  driver: Remove shared memory devices prior to disabling the hypervisor

Once the Jailhouse is disabled, there is no one handling accesses to the
virtual shared memory devices anymore. So better remove them from Linux
before the actual disabling hypercall. To remain symmetric, we also pull
adding out of jailhouse_cell_register_root.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 8a16614e969cf2225709691e752c0d0026c55754
      
https://github.com/siemens/jailhouse/commit/8a16614e969cf2225709691e752c0d0026c55754
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M driver/Makefile
    M driver/main.c
    M driver/pci.c
    M driver/pci.h
    A driver/vpci_template.dts

  Log Message:
  -----------
  driver: Register virtual PCI controller via device tree overlay

In order to add a virtual PCI host controller to the root cell after
Jailhouse activation on ARM/ARM64, we need to inject a device tree
modification. For this purpose, overlays were invented and are already
support by upstream since 3.19.

All we need to do is to fill a fragment template with some variable
parameters that can be derived from the system configuration: virtual
IRQ base, ECAM base address, and the uncached memory window size, which
can be derived from the number of ivshmem devices. We also need to
resolve the link to the GIC as the host's device tree may not have the
required symbols included.

Once the fragment is patched, we can register it, and Linux will detect
and handle the new platform device.

Note that the upstream pci-host-generic Linux driver still has issues
when it comes to unloading (and actually also rollback on errors).
Fixing this is WiP.

To use this feature with the Tegra K1, the kernel has to be patched to
allow multi-domain PCI so that a second PCI host controller can be
enabled besides the non-extensible physical controller (see
https://groups.google.com/d/msg/jailhouse-dev/5BnCAFAzykI/wHgj2UUbCwAJ).

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 31890aa6878f703a3d598eff5dec47f9605de006
      
https://github.com/siemens/jailhouse/commit/31890aa6878f703a3d598eff5dec47f9605de006
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M configs/amd-seattle-linux-demo.c
    M configs/amd-seattle.c
    M configs/dts/inmate-amd-seattle.dts

  Log Message:
  -----------
  config: Enable PCI and inter-cell communication for AMD Seattle

Describe the PCI resources of the AMD Seattle so that devices can be
reassigned.

Also add one ivshmem device for networking purposes and extend the
non-root Linux cell accordingly. We can safely expose the physical
GICv2m for this purpose, but read-only. To avoid that root and non-root
cell use the same MSI frame (which are reported by the GICv2m),
overwrite the frame parameter in the non-root cell device tree.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 6cbeec4e5db2ca799da7f57601277f64774db5ce
      
https://github.com/siemens/jailhouse/commit/6cbeec4e5db2ca799da7f57601277f64774db5ce
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M configs/dts/inmate-jetson-tk1.dts
    M configs/jetson-tk1-linux-demo.c
    M configs/jetson-tk1.c

  Log Message:
  -----------
  configs: Enable inter-cell communication for Jetson TK1

Add ivshmem devices to root cell and linux-demo for networking purposes.
A virtual PCI host is introduced and INTx SPIs are carefully selected
for both sides so that they fall into the supported set of the GICD and
do not overlap with actually used interrupts.

The K1 only supports 160 SPIs, so adjust the root cell mask at this
chance as well.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: ef331236bd1a915397ddf6edf38b6cd910f8b357
      
https://github.com/siemens/jailhouse/commit/ef331236bd1a915397ddf6edf38b6cd910f8b357
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M configs/bananapi-linux-demo.c
    M configs/bananapi.c
    M configs/dts/inmate-bananapi.dts

  Log Message:
  -----------
  configs: Enable inter-cell communication for Banana Pi

Add ivshmem devices to root cell and linux-demo for networking purposes.
A virtual PCI host is introduced and INTx SPIs are carefully selected
for both sides so that they fall into the supported set of the GICD and
do not overlap with actually used interrupts.

Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 1400f0b55961f3deecdd3d486fbffc16236e843e
      
https://github.com/siemens/jailhouse/commit/1400f0b55961f3deecdd3d486fbffc16236e843e
  Author: Jan Kiszka <[email protected]>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M configs/dts/inmate-hikey.dts
    M configs/hikey-linux-demo.c
    M configs/hikey.c

  Log Message:
  -----------
  configs: Enable inter-cell communication for HiKey

Add ivshmem devices to root cell and linux-demo for networking purposes.
A virtual PCI host is introduced and INTx SPIs are carefully selected
for both sides so that they fall into the supported set of the GICD and
do not overlap with actually used interrupts.

Signed-off-by: Jan Kiszka <[email protected]>


Compare: 
https://github.com/siemens/jailhouse/compare/6ff6cd97cbb0...1400f0b55961

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to