[siemens/jailhouse] dd38b4: x86: Do not call vcpu_cell_exit after failing vcpu...

2 views
Skip to first unread message

GitHub

unread,
Aug 28, 2015, 5:03:59 AM8/28/15
to jailho...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/siemens/jailhouse
Commit: dd38b4f788d812a716913d55c26353000748336a
https://github.com/siemens/jailhouse/commit/dd38b4f788d812a716913d55c26353000748336a
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-12 (Wed, 12 Aug 2015)

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

Log Message:
-----------
x86: Do not call vcpu_cell_exit after failing vcpu_vendor_cell_init

Regression of 328e10028d: vcpu_cell_init does not allocate any
resources prior to calling vcpu_vendor_cell_init. So there is no point
of calling vcpu_cell_exit if the vendor init functions failed, because
the latter is already rolling back. Even worse, the I/O bitmap will not
have been allocated, and vcpu_cell_exit will run into a NULL pointer
dereference.

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


Commit: 7599320a0670c45eff1f726253de909e2b00a4e7
https://github.com/siemens/jailhouse/commit/7599320a0670c45eff1f726253de909e2b00a4e7
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-12 (Wed, 12 Aug 2015)

Changed paths:
M hypervisor/control.c

Log Message:
-----------
core: Rework cleanup on cell destruction

Rename destroy_cpu_set to cell_exit and move it into
cell_destroy_internal. The background is that this function will be used
for more cleanups, and the refactoring will avoid cleanup code
duplications.

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


Commit: 018f4afa844b40dd39bf012bc3d3f5342ccb3735
https://github.com/siemens/jailhouse/commit/018f4afa844b40dd39bf012bc3d3f5342ccb3735
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-12 (Wed, 12 Aug 2015)

Changed paths:
M hypervisor/arch/arm/gic-common.c
M hypervisor/arch/arm/include/asm/cell.h
M hypervisor/arch/arm/include/asm/control.h
M hypervisor/arch/arm/include/asm/percpu.h
M hypervisor/arch/arm/smp-sun7i.c
M hypervisor/arch/arm/smp-tegra124.c
M hypervisor/arch/x86/amd_iommu.c
M hypervisor/arch/x86/include/asm/cell.h
M hypervisor/arch/x86/include/asm/ioapic.h
M hypervisor/arch/x86/include/asm/iommu.h
M hypervisor/arch/x86/include/asm/percpu.h
M hypervisor/arch/x86/include/asm/vcpu.h
M hypervisor/arch/x86/include/asm/vtd.h
M hypervisor/arch/x86/ioapic.c
M hypervisor/arch/x86/pci.c
M hypervisor/arch/x86/svm.c
M hypervisor/arch/x86/vmx.c
M hypervisor/arch/x86/vtd.c
A hypervisor/include/jailhouse/cell.h

Log Message:
-----------
core: Split struct cell into generic and arch-dependent parts

ARM already did this, now also introduce this split at top level: move
all arch-specific cell states into the substructure arch_cell. This
refactoring simplifies the management of common cell states across all
architectures.

The common struct cell is now defined in jailhouse/cell.h. From now on,
asm/cell.h shall only be included directly by jailhouse/cell.h.

Generic PCI-related fields are moved into the common structure even
though ARM will not use them. That happens for two reasons:
- 2 of the 3 fields will be removed soon and the remaining one will be
negligible
- ARM is expected to gain PCI support as well one day

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


Commit: 3f0c56ad5ceb621efc4f955f8e3deed9e5dafd87
https://github.com/siemens/jailhouse/commit/3f0c56ad5ceb621efc4f955f8e3deed9e5dafd87
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
x86: vtd: Use pci_get_assigned_device to look up interrupt invalidation targets

Stop using the virtual device list which will be removed eventually and
switch to the pci_get_assigned_device service. It is a bit slower than
the current approach, but we don't consider the emulation of interrupt
invalidation requests as fast path. On the positive side, this change
will allow to simplify the PCI layer a bit.

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


Commit: 64e102bfc537bbb67d81da578c7133f9af4cd19f
https://github.com/siemens/jailhouse/commit/64e102bfc537bbb67d81da578c7133f9af4cd19f
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
arm: Rework arch_mmio_access to arm_mmio_perform_access

First, this is an ARM-specific function, so "arch" is an improper
prefix. And then we always ignored the return value anyway. Drop it and
instead report unsupported sizes via a printk (a candidate for BUG() if
we ever decide to add that).

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


Commit: dd870a0cc40884102533370145efa11dc414ca23
https://github.com/siemens/jailhouse/commit/dd870a0cc40884102533370145efa11dc414ca23
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

Changed paths:
M hypervisor/arch/arm/gic-common.c
M hypervisor/arch/arm/gic-v2.c
M hypervisor/arch/arm/gic-v3.c
M hypervisor/arch/arm/include/asm/mmio.h
M hypervisor/arch/arm/mmio.c
M hypervisor/arch/arm/smp-vexpress.c
M hypervisor/include/jailhouse/mmio.h

Log Message:
-----------
arm, mmio: Introduce generic mmio_access structure

Move ARM's mmio_access structure into the generic MMIO header and polish
it for broader use. It will become the keystone of generic MMIO access
dispatching.

No functional changes, but a lot of variable and field renamings in
order to align ARM in advance with the naming scheme's we will use
throughout the whole core soon.

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


Commit: 5c6e736084fc364d72b9bc33e4e80483ccbf7ba3
https://github.com/siemens/jailhouse/commit/5c6e736084fc364d72b9bc33e4e80483ccbf7ba3
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

Changed paths:
M hypervisor/arch/arm/gic-common.c
M hypervisor/arch/arm/gic-v2.c
M hypervisor/arch/arm/gic-v3.c
M hypervisor/arch/arm/include/asm/gic_common.h
M hypervisor/arch/arm/include/asm/gic_v3.h
M hypervisor/arch/arm/include/asm/irqchip.h
M hypervisor/arch/arm/include/asm/smp.h
M hypervisor/arch/arm/irqchip.c
M hypervisor/arch/arm/mmio.c
M hypervisor/arch/arm/smp-vexpress.c
M hypervisor/arch/arm/smp.c
M hypervisor/arch/arm/traps.c

Log Message:
-----------
arm: Remove cpu_data parameters from MMIO handling paths

MMIO handling is always CPU-local, thus there is no point in passing the
per_cpu context around.

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


Commit: 712f7678137571eac2298270da6e9a060cdff88f
https://github.com/siemens/jailhouse/commit/712f7678137571eac2298270da6e9a060cdff88f
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
arm: Remove cpu_data parameters from trap handling paths

Traps handling is always CPU-local, and the cpu_data parameters were
also widely unused already.

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


Commit: 0993685e882f5767290d9712e898e019003de6b9
https://github.com/siemens/jailhouse/commit/0993685e882f5767290d9712e898e019003de6b9
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

Changed paths:
M hypervisor/Makefile
M hypervisor/arch/arm/mmio.c
M hypervisor/arch/x86/mmio.c
M hypervisor/control.c
M hypervisor/include/jailhouse/cell.h
M hypervisor/include/jailhouse/mmio.h
A hypervisor/mmio.c

Log Message:
-----------
core: Add generic MMIO access dispatching

This introduces the infrastructure for generically dispatching MMIO
accesses. Handlers can now be registered for MMIO regions on a pre-cell
basis, removing the need for probing multiple handlers that decide
themselves if they are in charge.

The backing data structures consist of two sorted tables: one is
describing the region locations and sizes, the other one is holding, in
identical order, the handler and a corresponding opaque parameter.

Dispatching works lock-free and can even run in parallel with region
registration or removal. That latter two steps are protected against
concurrent invocation via a per-cell spinlock.

In order to preallocate sufficient space during cell setup, arch
architecture has to implement arch_mmio_count_regions that calculates
the maximum number of MMIO regions a cell may register during its
lifetime, typically based on static values and the cell configuration.
So far these functions are implemented as dummies because the MMIO
infrastructure is not yet used.

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


Commit: 6f908009533f5bf1e8675ae0c935dbdce5788955
https://github.com/siemens/jailhouse/commit/6f908009533f5bf1e8675ae0c935dbdce5788955
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
x86: Prepare generic MMIO dispatching

Hook up the generic MMIO dispatcher into vcpu_handle_mmio_access without
removing existing handlers. This allows for a step-wise migration of
subsystems to the new dispatcher. Note that the return values of current
handlers are compatible with the mmio_result enum.

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


Commit: 185e1e4c114c0e5db82ad475ae0db8b82c871690
https://github.com/siemens/jailhouse/commit/185e1e4c114c0e5db82ad475ae0db8b82c871690
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
x86: ioapic: Move ioapic_access_handler unmodified

We will make this function static and then need it earlier in the code.
Move it up unmodified to prepare this. No functional change.

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


Commit: ae447bf83817741c7df83cbd4ee75865330d4d63
https://github.com/siemens/jailhouse/commit/ae447bf83817741c7df83cbd4ee75865330d4d63
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

Changed paths:
M hypervisor/arch/x86/include/asm/ioapic.h
M hypervisor/arch/x86/ioapic.c
M hypervisor/arch/x86/mmio.c
M hypervisor/arch/x86/vcpu.c

Log Message:
-----------
x86: Migrate IOAPIC to generic MMIO dispatcher

Register the IOAPIC MMIO pages with the dispatcher and drop the direct
handler invocation from vcpu_handle_mmio_access.

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


Commit: 5c79677439dedcef41d862ab93307446a663f4dc
https://github.com/siemens/jailhouse/commit/5c79677439dedcef41d862ab93307446a663f4dc
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

Changed paths:
M hypervisor/arch/x86/amd_iommu.c
M hypervisor/arch/x86/include/asm/iommu.h
M hypervisor/arch/x86/mmio.c
M hypervisor/arch/x86/vcpu.c
M hypervisor/arch/x86/vtd.c

Log Message:
-----------
x86: Migrate VT-d interrupt remapping emulation to generic MMIO dispatcher

Register the VT-d unit MMIO pages with the dispatcher and drop the
direct handler invocation from vcpu_handle_mmio_access.

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


Commit: 939fdeda480ec29e2a9a31cbf6de6a14e6dcfcd9
https://github.com/siemens/jailhouse/commit/939fdeda480ec29e2a9a31cbf6de6a14e6dcfcd9
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

Changed paths:
M hypervisor/pci_ivshmem.c

Log Message:
-----------
core: ivshmem: Move functions unmodified

We will need ivshmem_write_doorbell, ivshmem_register_mmio and
ivshmem_msix_mmio earlier in the code. Move them up unmodified to
prepare this. No functional change.

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


Commit: 4b6f522c3218c4ccb5cf89f39105208aead120b9
https://github.com/siemens/jailhouse/commit/4b6f522c3218c4ccb5cf89f39105208aead120b9
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

Changed paths:
M hypervisor/arch/x86/mmio.c
M hypervisor/include/jailhouse/pci.h
M hypervisor/pci.c
M hypervisor/pci_ivshmem.c

Log Message:
-----------
core: ivshmem: Migrate to generic MMIO dispatcher

This only migrates the ivshmem parts of the PCI subsystem to the new
MMIO dispatcher, namely its MMIO BAR 0 and the MSI-X BAR 4.

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


Commit: 3f3aecc4621d8ca2d1900ff2a6a458c276152404
https://github.com/siemens/jailhouse/commit/3f3aecc4621d8ca2d1900ff2a6a458c276152404
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
core: pci: Drop list of virtual devices

No longer used.

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


Commit: e17d52525dfd0bfddaa33d4e9eeaf057483ff164
https://github.com/siemens/jailhouse/commit/e17d52525dfd0bfddaa33d4e9eeaf057483ff164
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

Changed paths:
M hypervisor/pci.c

Log Message:
-----------
core: pci: Migrate MMCONFIG access handling to the new MMIO dispatcher

Register the MMCONFIG memory region, if available, with the generic MMIO
dispatcher and drop the related handler invocation from
pci_mmio_access_handler.

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


Commit: 3c0e3c48a8373ab4e7ed44fe8b7653e0375bea02
https://github.com/siemens/jailhouse/commit/3c0e3c48a8373ab4e7ed44fe8b7653e0375bea02
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
core, x86: pci: Migrate MSI-X emulation to generic MMIO dispatcher

Register the MMIO BARs of PCI devices with the generic MMIO dispatcher
and remove direct invocation of pci_mmio_access_handler from
vcpu_handle_mmio_access. This particularly avoid having to scan all
PCI devices of a cell with MSI-X support to find out the target of an
MSI-X access.

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


Commit: 2c97f10b5c753e38b693dec7d54e2fa7687e9c67
https://github.com/siemens/jailhouse/commit/2c97f10b5c753e38b693dec7d54e2fa7687e9c67
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
core: pci: Remove list of MSI-X devices

No longer used.

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


Commit: fc99023ea8cbba39eb822c05319e1c5bd254c81a
https://github.com/siemens/jailhouse/commit/fc99023ea8cbba39eb822c05319e1c5bd254c81a
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
arm: Prepare generic MMIO dispatching

Hook up the generic MMIO dispatcher into arch_handle_dabt without
removing existing handlers. This allows for a step-wise migration of
subsystems to the new dispatcher.

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


Commit: 2a4f65d88b02b5665e52c7bbf68b464d951302b4
https://github.com/siemens/jailhouse/commit/2a4f65d88b02b5665e52c7bbf68b464d951302b4
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
arm: Migrate SMP mailbox to generic MMIO dispatcher

Where needed, register the SMP mailbox MMIO page with the generic
dispatcher and remove the SMP-specific dispatcher invocation from
arch_handle_dabt.

This further concentrates the Versatile Express-specific SMP services in
that module.

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


Commit: 1cb54c033c7933d07a0841ba549d374450b599d4
https://github.com/siemens/jailhouse/commit/1cb54c033c7933d07a0841ba549d374450b599d4
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
arm: Move gic_handle_redist_access unmodified

We will need it earlier in the module.

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


Commit: 849a8803f55171d29f7366f49eed8024058916d2
https://github.com/siemens/jailhouse/commit/849a8803f55171d29f7366f49eed8024058916d2
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

Changed paths:
M hypervisor/arch/arm/gic-common.c
M hypervisor/arch/arm/gic-v3.c
M hypervisor/arch/arm/include/asm/gic_common.h
M hypervisor/arch/arm/include/asm/gic_v3.h
M hypervisor/arch/arm/traps.c

Log Message:
-----------
arm: Remove return codes from gic[v3]_handle_sgir_write

Those services always succeed.

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


Commit: dda4c03ff0932c54feedad7e34b700eb9b424040
https://github.com/siemens/jailhouse/commit/dda4c03ff0932c54feedad7e34b700eb9b424040
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-08-14 (Fri, 14 Aug 2015)

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

Log Message:
-----------
arm: Migrate irqchips to generic MMIO dispatcher

Register the GIC distributor and, for the GICv3, also the redistributor
regions with the generic MMIO dispatcher. This allows to drop the GIC-
specific MMIO dispatching from arch_handle_dabt.

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


Compare: https://github.com/siemens/jailhouse/compare/7424142bb878...dda4c03ff093
Reply all
Reply to author
Forward
0 new messages