[siemens/jailhouse] 0fffa4: x86: vtd: Do not overrun while counting IOMMU unit...

5 views
Skip to first unread message

GitHub

unread,
Jul 14, 2015, 1:41:53 AM7/14/15
to jailho...@googlegroups.com
Branch: refs/heads/coverity_scan
Home: https://github.com/siemens/jailhouse
Commit: 0fffa4f24d44234609a0d33c621f7fd7f61df1b4
https://github.com/siemens/jailhouse/commit/0fffa4f24d44234609a0d33c621f7fd7f61df1b4
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-02 (Thu, 02 Jul 2015)

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

Log Message:
-----------
x86: vtd: Do not overrun while counting IOMMU units

Account for the case that we have JAILHOUSE_MAX_IOMMU_UNITS units, thus
no zeroed entry in platform_info.x86.iommu_base.

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


Commit: c0cf70bf7e600c9beb61e5a5968441892f99a3a6
https://github.com/siemens/jailhouse/commit/c0cf70bf7e600c9beb61e5a5968441892f99a3a6
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-02 (Thu, 02 Jul 2015)

Changed paths:
M hypervisor/arch/x86/Makefile
M hypervisor/arch/x86/include/asm/iommu.h
A hypervisor/arch/x86/iommu.c
M hypervisor/arch/x86/vtd.c

Log Message:
-----------
x86: Factor out iommu_count_units

Will be required for both IOMMU variants.

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


Commit: fd58a2c69d7f91895005500b7ab286832d748f36
https://github.com/siemens/jailhouse/commit/fd58a2c69d7f91895005500b7ab286832d748f36
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-06 (Mon, 06 Jul 2015)

Changed paths:
M hypervisor/Makefile

Log Message:
-----------
x86: Prevent usage of MMX, SSE, and AVX by compiler

The compiler may decide to use MMX, SSE or even AVX for copying data or
similar purposes. Prevent this because we neither initialize the related
units nor save/restore their state between the different worlds.

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


Commit: f17685c37f1f70e045a9705527fb5b8e941fd0ac
https://github.com/siemens/jailhouse/commit/f17685c37f1f70e045a9705527fb5b8e941fd0ac
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-06 (Mon, 06 Jul 2015)

Changed paths:
M hypervisor/pci_ivshmem.c

Log Message:
-----------
core: ivshmem: Mark BARs as 64-bit again

Regression of 294110a887: Like physical devices fill their bar array
during setup, virtual devices need to do this as well. Namely, the
64-bit flag got lost during migration to generic BAR emulation.

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


Commit: 72c02cef5a0d8da6187d3c7ac23c411138c2e253
https://github.com/siemens/jailhouse/commit/72c02cef5a0d8da6187d3c7ac23c411138c2e253
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-06 (Mon, 06 Jul 2015)

Changed paths:
M hypervisor/pci_ivshmem.c

Log Message:
-----------
core: ivshmem: Fix cell disconnection

Move the disconnect call before the potential endpoint copy operation.
Otherwise we risk to update the stale second entry, not the now active
first one.

This change also ensures that disconnect is performed even for the last
endpoint. This will allow us to put cleanup tasks into that function
that have to be executed unconditionally.

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


Commit: f457d1cb06177d6daa762dd64bf41e43e3b54ecc
https://github.com/siemens/jailhouse/commit/f457d1cb06177d6daa762dd64bf41e43e3b54ecc
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-06 (Mon, 06 Jul 2015)

Changed paths:
M hypervisor/pci_ivshmem.c

Log Message:
-----------
core: ivshmem: Simplify condition in pci_ivshmem_exit

We already have the cell number available thanks to ivshmem_find and can
evaluate it directly. Makes the code clearer.

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


Commit: 68bd7efbb82b38a188e78587928105bb631bf114
https://github.com/siemens/jailhouse/commit/68bd7efbb82b38a188e78587928105bb631bf114
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-06 (Mon, 06 Jul 2015)

Changed paths:
M hypervisor/pci_ivshmem.c

Log Message:
-----------
core: ivshmem: Convert static virt_pci_bar information into constants

There is no need to carry the virt_pci_bar array in each endpoint
structure. The flags field is unused, and the sizes can easily be
expressed as constants - they do not change.

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


Commit: 862dade8b70c01c7037be9e1920fdb5bc8cd794f
https://github.com/siemens/jailhouse/commit/862dade8b70c01c7037be9e1920fdb5bc8cd794f
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-06 (Mon, 06 Jul 2015)

Changed paths:
M hypervisor/pci_ivshmem.c

Log Message:
-----------
core: ivshmem: Remove unneeded curly braces

Only single-line statements in the conditional blocks.

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


Commit: d922438c156fefe55edb9b9571676cdfa4cb1661
https://github.com/siemens/jailhouse/commit/d922438c156fefe55edb9b9571676cdfa4cb1661
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-06 (Mon, 06 Jul 2015)

Changed paths:
M hypervisor/pci_ivshmem.c

Log Message:
-----------
core: ivshmem: Remove redundant pci_device::cell initialization

Already done in the PCI layer.

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


Commit: b4079e72da77149be0c817dff4cf74a736a87468
https://github.com/siemens/jailhouse/commit/b4079e72da77149be0c817dff4cf74a736a87468
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

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

Log Message:
-----------
core: pci: Add support for devices with more than 16 MSI-X vectors

There are PCI devices with way more than 16 MSI-X vectors on the field,
some users reported up to 80. We don't want to increase the statically
allocated MSI-X shadow table that much as it would quickly increase the
memory usage.

Instead, implement an on-demand allocation pattern like we already use
for CPU bitmaps: up to 16 vectors are allocated statically, if more are
needed, allocation switches to a dynamic scheme.

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


Commit: 786b792c011e44c81155063fb9159107d7bebc26
https://github.com/siemens/jailhouse/commit/786b792c011e44c81155063fb9159107d7bebc26
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

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

Log Message:
-----------
x86: vmx: Remove some no longer needed includes

These headers no longer contribute anything vmx.c depends on - or never
did at all.

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


Commit: f67973ad2dd08908dbc3d9c522ae4dc861bdfd24
https://github.com/siemens/jailhouse/commit/f67973ad2dd08908dbc3d9c522ae4dc861bdfd24
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/include/asm/mmio.h
M hypervisor/arch/arm/include/asm/psci.h

Log Message:
-----------
arm: Fix header_check errors

Add missing includes and struct cell forward declaration.

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


Commit: 1588b43b9c5cce7949e708e4385ec734e6437f71
https://github.com/siemens/jailhouse/commit/1588b43b9c5cce7949e708e4385ec734e6437f71
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/include/asm/bitops.h
M hypervisor/arch/arm/include/asm/processor.h
M hypervisor/arch/arm/include/asm/setup.h
M hypervisor/arch/arm/include/asm/setup_mmu.h
M hypervisor/arch/arm/include/asm/spinlock.h
M hypervisor/arch/arm/mmu_hyp.c
M hypervisor/arch/arm/setup.c

Log Message:
-----------
arm: Fix coding style of asm blocks

This aligns them with our (kernel) coding style: indent multi-line asm
blocks, end each line with \n\t in multi-line blocks, remove the ending
in single-line statements. No functional changes.

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


Commit: 99370e035412819f0503f51c6e44d1ed6185bf36
https://github.com/siemens/jailhouse/commit/99370e035412819f0503f51c6e44d1ed6185bf36
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/include/asm/setup_mmu.h
M hypervisor/arch/arm/mmu_hyp.c

Log Message:
-----------
arm: Move cpu_switch_el2 into calling module

Uninlined functions should not be defined in headers. No functional
changes.

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


Commit: 0a6383beb62de5bd93a0d23373e9b57c71a484e7
https://github.com/siemens/jailhouse/commit/0a6383beb62de5bd93a0d23373e9b57c71a484e7
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/mmu_hyp.c

Log Message:
-----------
arm: Fix comment of switch_exception_level

The referenced function is actually called setup_mmu_el2.

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


Commit: 002d66cb305535058c612a60b43ddee6dccfee5a
https://github.com/siemens/jailhouse/commit/002d66cb305535058c612a60b43ddee6dccfee5a
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/include/asm/smp.h
M hypervisor/arch/arm/smp-vexpress.c
M hypervisor/arch/arm/smp.c

Log Message:
-----------
arm: smp: Concentrate non-PSCI logic in Versatile Express module

We only keep the non-PSCI CPU hotplug support around for the sake of
old Versatile Express boards/models. No new boards will be accepted that
does not support the PSCI standard. Therefore, concentrate all functions
that were once considered reusable in the smp-vexpress module, folding
them into their only callers.

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


Commit: e4aafa49ffb2c4a31d63f036dbbaec7327e52c1e
https://github.com/siemens/jailhouse/commit/e4aafa49ffb2c4a31d63f036dbbaec7327e52c1e
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/include/asm/smp.h
M hypervisor/arch/arm/smp-sun7i.c
M hypervisor/arch/arm/smp-tegra124.c
M hypervisor/arch/arm/smp-vexpress.c

Log Message:
-----------
arm: smp: Remove unused type field from smp_ops

Was never read and actually initialized incorrectly for sun7i and
tegra124.

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


Commit: 5d22e268a97b5bb372f1c8e2794aacacbb797ca2
https://github.com/siemens/jailhouse/commit/5d22e268a97b5bb372f1c8e2794aacacbb797ca2
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/paging.c

Log Message:
-----------
arm: Fix arm_page_table_empty

The size of a pt_entry_t is a reference to an entry, not the entry type
itself. So we were calculating with an entry size of 4 instead of 8,
overrunning the table during empty checks. This specifically caused
page leakages during cell destruction.

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


Commit: 166cd8aa9ce4b300bce0c4425829768d1d254094
https://github.com/siemens/jailhouse/commit/166cd8aa9ce4b300bce0c4425829768d1d254094
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/control.c
M hypervisor/arch/arm/gic-v2.c
M hypervisor/arch/arm/gic-v3.c
M hypervisor/arch/arm/include/asm/irqchip.h
M hypervisor/arch/arm/irqchip.c
M hypervisor/arch/arm/setup.c

Log Message:
-----------
arm: Account for errors during irqchip cell_init

The cell_init callback of GICv2 should report the result of the mapping
request, thus needs a channel to return an error code. Extend the call
chain accordingly.

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


Commit: 4ff905872a39eae048ac0367900807babfab6abc
https://github.com/siemens/jailhouse/commit/4ff905872a39eae048ac0367900807babfab6abc
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/gic-v2.c

Log Message:
-----------
arm: Use paging_create instead of arch_map_memory_region for GICv2 mapping

It's actually simpler to invoke paging_create directly instead of
preparing arguments for arch_map_memory_region first.

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


Commit: 804f7465617d3709bb9320dbba380e189eeb5ede
https://github.com/siemens/jailhouse/commit/804f7465617d3709bb9320dbba380e189eeb5ede
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/control.c
M hypervisor/arch/arm/gic-v2.c

Log Message:
-----------
arm: Unmap virtual GIC on cell destruction

This fixes a leak on cell destruction because we left the GICv2 mapped,
thus didn't free all paging structures. This also means we need to run
the irqchip cleanup before the cell MMU destruction.

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


Commit: 2b86aa27f4d11428656dab74844043522280e3f1
https://github.com/siemens/jailhouse/commit/2b86aa27f4d11428656dab74844043522280e3f1
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/control.c

Log Message:
-----------
arm: Use more panic_printk for fatal error messages

Fatal errors that will leave CPUs unusable and may occur in parallel on
multiple CPUs should be reported via panic_printk to maintain
readability of the output. Adjust some locations for unexpected HYP
exits and failing PSCI_CPU_OFF.

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


Commit: a5779ac0951eeee575ff86359a68361da7c0da46
https://github.com/siemens/jailhouse/commit/a5779ac0951eeee575ff86359a68361da7c0da46
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/dbg-write.c
M hypervisor/arch/x86/dbg-write.c
M hypervisor/printk-core.c
M inmates/lib/arm/printk.c
M inmates/lib/x86/printk.c

Log Message:
-----------
core, inmates: Move \r injection into console_write / arch_dbg_write

This moves the injection of \r on \n into the console_write and
arch_dbg_write implementations, causing some minor duplication but also
fixing injection for %s strings. Furthermore, this allows to skip the
injection for consoles the may not need it.

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


Commit: a76b05d207425ef12d0161381c7019860451c483
https://github.com/siemens/jailhouse/commit/a76b05d207425ef12d0161381c7019860451c483
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-07-14 (Tue, 14 Jul 2015)

Changed paths:
M hypervisor/arch/arm/control.c

Log Message:
-----------
arm: Improve reporting of unhandled HYP exits

Add a simple register dump and unify the reporting format. Specifically
useful to debug hypervisor crashes.

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


Compare: https://github.com/siemens/jailhouse/compare/c5e0c1479918...a76b05d20742

GitHub

unread,
Jul 15, 2015, 5:18:06 AM7/15/15
to jailho...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages