[siemens/jailhouse] 284d45: x86: Fix potentially inconsistent IOAPIC entries

10 views
Skip to first unread message

GitHub

unread,
Jan 6, 2017, 2:54:29 PM1/6/17
to jailho...@googlegroups.com
Branch: refs/heads/next
Home: https://github.com/siemens/jailhouse
Commit: 284d45f18c73864c1bcb24062840909a05a8ffbf
https://github.com/siemens/jailhouse/commit/284d45f18c73864c1bcb24062840909a05a8ffbf
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-06 (Fri, 06 Jan 2017)

Changed paths:
M hypervisor/arch/x86/ioapic.c

Log Message:
-----------
x86: Fix potentially inconsistent IOAPIC entries

When writing the upper half of a redirection entry while it is masked,
we do not update the physical register so far nor try to map the entry -
which could fail due to an inconsistent state. However, when we then
take the update for the lower half, the upper part will still not be
written. Fix this by writing the upper half along with the lower one.

Likely, we were lucky so far that only the root cell uses the IOAPIC,
and the upper half was left behind from the handover in a usable state.

Fixes: f651754c72e3 ("x86: Virtualize IOAPIC redir table for interrupt remapping support")
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: b1c7efbf383b913c52c5dffa0511c099d561f278
https://github.com/siemens/jailhouse/commit/b1c7efbf383b913c52c5dffa0511c099d561f278
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-06 (Fri, 06 Jan 2017)

Changed paths:
M hypervisor/arch/x86/ioapic.c

Log Message:
-----------
x86: Fix spurious rejection of IOAPIC entries during startup
Only write the lower entry half on ioapic_config_commit

Writing the upper half of the IOAPIC entries in ioapic_config_commit is
no longer needed since 284d45f18c73, and it may trigger false rejections
because it tries to map an inconsistent entry state during handover.

Resolves a startup crash on x86 with xAPIC and interrupt remapping on:

FATAL: Unsupported IOAPIC state, pin 2

Fixes: f651754c72e3 ("x86: Virtualize IOAPIC redir table for interrupt remapping support")
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: b5aa9b917178e28f788dc78933aba340780ff752
https://github.com/siemens/jailhouse/commit/b5aa9b917178e28f788dc78933aba340780ff752
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-06 (Fri, 06 Jan 2017)

Changed paths:
M hypervisor/arch/x86/ioapic.c
M hypervisor/arch/x86/vtd.c

Log Message:
-----------
x86: Fully evaluate redirection hint for VT-d interrupt mapping

So far, we only supported logical destination mode enabled together with
redirection. But it is safe to allow physical mode as well.

What then remains is the case of disabled redirection with DM set.
According to SDM Volume 3, section 10.11 and the VT-d spec on the IRTE
format for remapped interrupts (section 9.10), RH=0 means that the
message is only sent to a single processor, thus effectively falls into
physical destination mode. Clearing dest_logical if redir_hint is 0
allows apic_filter_irq_dest to operate correctly.

That means in turn, ioapic_translate_redir_entry should simply set
redir_hint unconditionally to have dest_logical evaluated correctly.

Resolves another startup crash on x86 with xAPIC and interrupt remapping
on:

FATAL: Unsupported MSI/MSI-X state, device xx.xx.x, cap 5

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: 75d82814b4c4c2ae63f9438cb2b391482fc80ba1
https://github.com/siemens/jailhouse/commit/75d82814b4c4c2ae63f9438cb2b391482fc80ba1
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-06 (Fri, 06 Jan 2017)

Changed paths:
M tools/root-cell-config.c.tmpl

Log Message:
-----------
tools: Append comma to debug_console.flags line in template

Prevents that adding further lines can cause compilation errors.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Compare: https://github.com/siemens/jailhouse/compare/b91a22b6a850...75d82814b4c4

GitHub

unread,
Jan 9, 2017, 3:21:49 AM1/9/17
to jailho...@googlegroups.com
Branch: refs/heads/master
Commit: c6298ef40f93bcbf9561e7d7179db44a07946600
https://github.com/siemens/jailhouse/commit/c6298ef40f93bcbf9561e7d7179db44a07946600
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-07 (Sat, 07 Jan 2017)

Changed paths:
R configs/h87i.c

Log Message:
-----------
configs: Remove h87i config

This version no longer works, and it's now preferred to generate and
customize x86 configs out of tree.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: cbc7f07c09297a1577cba7ad47c3a7562f35306e
https://github.com/siemens/jailhouse/commit/cbc7f07c09297a1577cba7ad47c3a7562f35306e
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-07 (Sat, 07 Jan 2017)

Changed paths:
M hypervisor/ivshmem.c

Log Message:
-----------
core: ivshmem: Print addition message earlier

This simplifies the association of a potential error with the related
device.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: 278c91a8dedf5387d72d04ffcd1ea578e3d1ccf6
https://github.com/siemens/jailhouse/commit/278c91a8dedf5387d72d04ffcd1ea578e3d1ccf6
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-07 (Sat, 07 Jan 2017)

Changed paths:
M hypervisor/ivshmem.c
M hypervisor/pci.c

Log Message:
-----------
core: pci: Move device->cell updates into add/remove functions

In order to reuse upcoming device reset functions during initialization,
we will have to set device->cell earlier than so far. To make things
consistent, give the control over that field into the respective device
addition/removal functions.

This has the side effect of curing cell initialization in case
re-assignment of a physical device to the root cell fails: the field
should be NULL then (no owner).

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: b3ea16639289c33d48562f4ca0bd0ea6e94655b7
https://github.com/siemens/jailhouse/commit/b3ea16639289c33d48562f4ca0bd0ea6e94655b7
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-07 (Sat, 07 Jan 2017)

Changed paths:
M hypervisor/control.c
M hypervisor/include/jailhouse/ivshmem.h
M hypervisor/include/jailhouse/pci.h
M hypervisor/ivshmem.c
M hypervisor/pci.c

Log Message:
-----------
core: pci: Implement device reset on cell (re-)start or ownership changes

This is easy for the virtual ivshmem device but more complex and, thus,
not complete for physical ones: Reset the state of assigned PCI devices
when the owner cell is started, which includes restarts (load/start
cycles), or when ownership changes (physical devices only).

For both device types, we bring all MSI/MSI-X vectors into reset state.
Physical devices get their INTx line masked, just like before on device
removal. Shared memory devices additional reinitialize their config
space and MMIO registers.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: f4313d964bf3c64f67b61e42d9586b62b3d6db64
https://github.com/siemens/jailhouse/commit/f4313d964bf3c64f67b61e42d9586b62b3d6db64
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-07 (Sat, 07 Jan 2017)

Changed paths:
M README.md

Log Message:
-----------
README: Update QEMU command line for Intel on older host kernels

Prior to kernel 4.7, we need x-buggy-eim=on as additional intel-iommu
device parameter. The switch is a nop on recent kernels, so add it
unconditionally.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: abd1fb4776a8ae95073d08a5659272eaefbba24b
https://github.com/siemens/jailhouse/commit/abd1fb4776a8ae95073d08a5659272eaefbba24b
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-07 (Sat, 07 Jan 2017)

Changed paths:
M configs/qemu-vm.c

Log Message:
-----------
configs: Reference README.md from qemu config for command lines

No point in maintaining this lengthy beast twice, only risking
inconsistencies.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: 892d203179efefa695f67c26c8164d9386473cc7
https://github.com/siemens/jailhouse/commit/892d203179efefa695f67c26c8164d9386473cc7
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-07 (Sat, 07 Jan 2017)

Changed paths:
M README.md
M configs/qemu-vm.c

Log Message:
-----------
configs: Switch QEMU example to e1000e network adapter

This allows to test PCI device assignment to non-root cells via a Linux
inmate. Specifically MSI-X can be stressed, in contrast to the default
e1000 model which only comes with INTx.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: 8ba1cf5f634ca41256876f20b480b73fea39d3dd
https://github.com/siemens/jailhouse/commit/8ba1cf5f634ca41256876f20b480b73fea39d3dd
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-07 (Sat, 07 Jan 2017)

Changed paths:
M configs/linux-x86-demo.c

Log Message:
-----------
configs: Allow to pass the QEMU e1000e device to non-root Linux

Stresses PCI device assignment, including MSI-X. Now the earlier
introduced PCI device reset comes into play as it safes Linux from
stumbling over unmasked but unused vectors of the device.

In order to reuse the configuration on physical hosts, the QEMU device
is opt-in, to be enabled in config.h via CONFIG_QEMU_E1000E_ASSIGNMENT.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: 81528e48763c8dfc10851c49968eb3d053d4b85c
https://github.com/siemens/jailhouse/commit/81528e48763c8dfc10851c49968eb3d053d4b85c
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-09 (Mon, 09 Jan 2017)

Changed paths:
M VERSION

Log Message:
-----------
Bump version number

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Compare: https://github.com/siemens/jailhouse/compare/b91a22b6a850...81528e48763c
Reply all
Reply to author
Forward
0 new messages