Branch: refs/heads/wip/ivshmem2
Home: https://github.com/siemens/jailhouse
Commit: 173a3497ca113e76f29ed614d4c0800f2f1bd15f
https://github.com/siemens/jailhouse/commit/173a3497ca113e76f29ed614d4c0800f2f1bd15f
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/include/jailhouse/ivshmem.h
M hypervisor/include/jailhouse/pci.h
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Move shared memory parameters into vendor specific capability
This gives us more flexibility in extending the parameters we expose via
the config space. The capability starts with its ID, the next pointer, a
one-byte length field (these parameters are mandated by the PCI spec),
then a one-byte flags field (currently RsvdZ), and finally the shared
memory region address and size. Proper specification of all this is work
in progress.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: ff96c849ae05da4f2702aa2f2e76e68418426d8b
https://github.com/siemens/jailhouse/commit/ff96c849ae05da4f2702aa2f2e76e68418426d8b
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
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: Move INTx control into PCI config space
This prepares for unprivileged access to the MMIO register space inside
cells. It uses the flags field of the new vendor capability.
To avoid affecting the arch_ivshmem_update_intx handler from further
changes in the enabling logic, pass the new state as parameter.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: a796a12483034431c2d748c371a93694d6812d7e
https://github.com/siemens/jailhouse/commit/a796a12483034431c2d748c371a93694d6812d7e
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Derive MMIO register region size from cell config
The BAR mask encodes the size of a PCI device resource. Use this to
allow a target-dependent setting via the cell configuration so that
alignment to the cell's page size become feasible. This will enable the
cell OS to map the MMIO region as a whole into user space.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 8629a71f1f132b4974fe76ab577f9d4cfbe8bcea
https://github.com/siemens/jailhouse/commit/8629a71f1f132b4974fe76ab577f9d4cfbe8bcea
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Enable unprivileged MMIO register access
Make sure that unsupported accesses to the MMIO register region do not
raise immediate panic. We should rather ignored them. This allows the
cell OS to hand out the region to unprivileged users.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: bd454e0b3c710233a19efe97190bbc5f654d62cc
https://github.com/siemens/jailhouse/commit/bd454e0b3c710233a19efe97190bbc5f654d62cc
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M configs/amd-seattle-linux-demo.c
M configs/amd-seattle.c
M configs/bananapi-linux-demo.c
M configs/bananapi.c
M configs/hikey-linux-demo.c
M configs/hikey.c
M configs/ivshmem-demo.c
M configs/jetson-tk1-linux-demo.c
M configs/jetson-tk1.c
M configs/linux-x86-demo.c
M configs/orangepi0-linux-demo.c
M configs/orangepi0.c
M configs/qemu-vm.c
M configs/zynqmp-zcu102-linux-demo-2.c
M configs/zynqmp-zcu102-linux-demo.c
M configs/zynqmp-zcu102.c
Log Message:
-----------
config: Adjust ivshmem MMIO region to 4K size
Required so that the cell OS can map the region as a whole to its user
space.
If a cell may use larger minimal page sizes, the mask for BAR 0 has to
be adjusted accordingly. For now we assume they are all on 4K.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 9bbe707a6fff909573e2721b870498d5c64950f0
https://github.com/siemens/jailhouse/commit/9bbe707a6fff909573e2721b870498d5c64950f0
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Pack MMIO registers
Reorder the layout and fill gaps that were left due to unsupported
registers of the original ivshmem device. We are breaking with that
design anyway.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: f28704597918a73b252c856a03702070e91db881
https://github.com/siemens/jailhouse/commit/f28704597918a73b252c856a03702070e91db881
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/include/jailhouse/ivshmem.h
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Rename IVPOS register to ID
>From user pespective, there is no specific "position" encoded into
"ivpos". It's just a unique identifier on an ivshmem link.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 906a8b21fb8b3dd5fdd3b22cb8858f607973bf2d
https://github.com/siemens/jailhouse/commit/906a8b21fb8b3dd5fdd3b22cb8858f607973bf2d
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Rename ivshmem_data to ivshmem_link
Represents more clearly what the structure is about: meta data
describing the link between two ivshmem endpoints.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: a1b1ef4864263e09ac16c37072e87d6455e800ce
https://github.com/siemens/jailhouse/commit/a1b1ef4864263e09ac16c37072e87d6455e800ce
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/include/jailhouse/ivshmem.h
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Introduce link pointer to ivshmem_endpoint
Will be used when moving the remote lock to link level.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 57ab99635bb8cf7f50d0f6bf6b33a357a158cb63
https://github.com/siemens/jailhouse/commit/57ab99635bb8cf7f50d0f6bf6b33a357a158cb63
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/include/jailhouse/ivshmem.h
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Promote remote lock to a link level lock
This is required when synchronizing activities (see upcoming remote
state write-back) that require references to both sides: Taking both
remote locks would required lock nesting and creates deadlock risks. It
is simpler to validate that a single lock at link level is acquired and
released correctly.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: c1afbafeed29975e7ebfaea1d7e88c4d161e79e2
https://github.com/siemens/jailhouse/commit/c1afbafeed29975e7ebfaea1d7e88c4d161e79e2
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/arch/arm-common/ivshmem.c
M 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: ivshmem: Reintroduce ivshmem_update_msix
This function consolidates the check for num_msix_vectors > 0 and
ivshmem_is_msix_masked, leaving arch_ivshmem_update_msix with less work.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 30d3be0f7f71e7c1122963c2a47de7f0335f8907
https://github.com/siemens/jailhouse/commit/30d3be0f7f71e7c1122963c2a47de7f0335f8907
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/arch/arm-common/ivshmem.c
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Add PCI-conforming INTx mask
Simple enough to add, and newer PCI specs demand this feature anyway:
allow to mask the INTx line via the command register.
For this purpose, factor out ivshmem_update_intx that determines the
state of the line prior to calling arch_ivshmem_update_intx. It also
skips over this call in case num_msix_vectors is non-null, offloading
this check from the arch function.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 0a04bf439a460720453698226de4560175023e13
https://github.com/siemens/jailhouse/commit/0a04bf439a460720453698226de4560175023e13
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/arch/x86/ivshmem.c
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Move arch_ivshmem_update_msix/intx under link lock
This both ensure atomicity /wrt arch_ivshmem_trigger_interrupt and
provides a barrier so that no further interrupts are in flight (provided
the hardware does not delay IPI delivery) after returning from an
interrupt masking operation.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 4c376f437259e0e64d546d6f27cdab2d227386a2
https://github.com/siemens/jailhouse/commit/4c376f437259e0e64d546d6f27cdab2d227386a2
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/include/jailhouse/ivshmem.h
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Implement remote state write-back to shared memory
Checking the remote state currently requires a MMIO register access
which implies a vmexit. As we only have one interrupt vector so far (and
there won't be more with INTx), this affects even the hot-path of
exchanging I/O-related events with the peer. Also when doing polling,
the check is unnecessary expensive.
Reduce the costs by writing state changes to the shared memory at a
location the peer can decide. This, of course, requires coordination
between both sides to avoid using the location also for different
purposes, but that is out of scope for the shared memory device.
Enabling or updating the write-back address triggers immediate setting
of the target memory so that the user will have the latest state
available when checking the field afterwards.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: cfbd0b96d9cdb1ab7246c64bc446be39deb3f087
https://github.com/siemens/jailhouse/commit/cfbd0b96d9cdb1ab7246c64bc446be39deb3f087
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M configs/amd-seattle-linux-demo.c
M configs/amd-seattle.c
M configs/bananapi-linux-demo.c
M configs/bananapi.c
M configs/hikey-linux-demo.c
M configs/hikey.c
M configs/ivshmem-demo.c
M configs/jetson-tk1-linux-demo.c
M configs/jetson-tk1.c
M configs/linux-x86-demo.c
M configs/orangepi0-linux-demo.c
M configs/orangepi0.c
M configs/qemu-vm.c
M configs/zynqmp-zcu102-linux-demo-2.c
M configs/zynqmp-zcu102-linux-demo.c
M configs/zynqmp-zcu102.c
M hypervisor/include/jailhouse/cell-config.h
M hypervisor/include/jailhouse/ivshmem.h
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Add support for unidirectional memory regions
Extend the ivshmem device to map up to 3 memory regions. Conceptually,
all regions are optional, thus can be empty but have to be listed as
such in the cell configuration. If present, the first region shall be
read/write for both sides. The second shall be read/write for the local
side and read-only for the remote. The third one shall be read-only
locally and read/writable for the remote. Thus, second and third region
need to be specified reversely in the configuration of both peers.
All three regions are reported via the vendor-specific capability of the
ivshmem device. The capability is extended accordingly.
For the shared-memory network devices, we only use the second and third
region, thus the unidirectional ones. Update the cell configurations
accordingly by splitting the existing one into two halves.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: ace1efa5f834af890a02605e5c8518bcf72eb299
https://github.com/siemens/jailhouse/commit/ace1efa5f834af890a02605e5c8518bcf72eb299
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Reindent defines
Pure styling, no functional changes.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: a406bece5a659ea7f3f811ce696c513ee35f1397
https://github.com/siemens/jailhouse/commit/a406bece5a659ea7f3f811ce696c513ee35f1397
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/arch/arm-common/include/asm/ivshmem.h
M hypervisor/arch/x86/include/asm/ivshmem.h
M scripts/header_check
Log Message:
-----------
core: Restrict asm/ivshmem.h to inclusion by jailhouse/ivshmem.h
The asm header will gain a dependency on the generic one and, thus,
should no longer be considered for direct inclusion. Adjust the header
check accordingly.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: bc47dd2c8949d594019f7ade9a3d9454a8916ab2
https://github.com/siemens/jailhouse/commit/bc47dd2c8949d594019f7ade9a3d9454a8916ab2
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M configs/amd-seattle-linux-demo.c
M configs/amd-seattle.c
M configs/ivshmem-demo.c
M configs/linux-x86-demo.c
M configs/qemu-vm.c
M hypervisor/arch/arm-common/include/asm/ivshmem.h
M hypervisor/arch/arm-common/ivshmem.c
M hypervisor/arch/x86/include/asm/ivshmem.h
M hypervisor/arch/x86/ivshmem.c
M hypervisor/arch/x86/vtd.c
M hypervisor/include/jailhouse/ivshmem.h
M hypervisor/ivshmem.c
Log Message:
-----------
core, configs: ivshmem: Add support for up to 16 MSI-X vectors
This allows ivshmem devices with MSI-X support to expose up to 16
(PCI_EMBEDDED_MSIX_VECTS) vectors to its users. The doorbell register is
now interpreting the written value as vector number. It is possible to
restrict the number of available vectors via the cell configuration. Out
of range writes to the doorbell register will simply be ignored.
In case the cell uses less than the exposed vectors, it is now important
to correctly mask them initially in the MSI-X table as the PCI spec
demands, or the hypervisor may find invalid vectors and complain.
With the number of vectors increasing, we also need to adjust the size
of the related resource region in the cell configs accordingly.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: b5d28fc7e24ef26058f2a162afdd6e531afb10ee
https://github.com/siemens/jailhouse/commit/b5d28fc7e24ef26058f2a162afdd6e531afb10ee
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M hypervisor/include/jailhouse/pci.h
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Fold ivshmem_write_msix_control into caller
Using pci_msix_registers to model the update of the MSI-X control
register does not really simplify the code. Rather use a plain mask that
contains all modifiable bits, PCI_MSIX_CTRL_RW_MASK, and perform the
update in ivshmem_pci_cfg_write directly, analogously to the vendor
capability.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 855e415de1d988d1a4222487f3c6f0f74b30cd87
https://github.com/siemens/jailhouse/commit/855e415de1d988d1a4222487f3c6f0f74b30cd87
Author: Jan Kiszka <[email protected]>
Date: 2017-04-01 (Sat, 01 Apr 2017)
Changed paths:
M configs/amd-seattle-linux-demo.c
M configs/amd-seattle.c
M configs/ivshmem-demo.c
M configs/linux-x86-demo.c
M configs/qemu-vm.c
M hypervisor/include/jailhouse/ivshmem.h
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Compress BAR usage
Move BAR 4 to BAR 2, closing the legacy gap. Pure cosmetic.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 63b53b58081008df09f273bf11dc25954604e02e
https://github.com/siemens/jailhouse/commit/63b53b58081008df09f273bf11dc25954604e02e
Author: Jan Kiszka <[email protected]>
Date: 2017-04-02 (Sun, 02 Apr 2017)
Changed paths:
M hypervisor/ivshmem.c
Log Message:
-----------
core: ivshmem: Set PCI device revision to 2
Differentiates us from v1 as provided by QEMU right now as well as "v0"
that we shipped before.
Signed-off-by: Jan Kiszka <[email protected]>
Commit: 44fc69da7e915a1483e4acfa89e39fcbeeb09286
https://github.com/siemens/jailhouse/commit/44fc69da7e915a1483e4acfa89e39fcbeeb09286
Author: Jan Kiszka <[email protected]>
Date: 2017-04-02 (Sun, 02 Apr 2017)
Changed paths:
A Documentation/ivshmem-v2-specification.md
Log Message:
-----------
Documentation: Add specification of IVSHMEM v2 device
Add a WiP specification for the new IVSHMEM version. This documents the
current state and should not be considered stable at this point.
Signed-off-by: Jan Kiszka <[email protected]>
Compare:
https://github.com/siemens/jailhouse/compare/241b300e7cb0...44fc69da7e91
--
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.