Branch: refs/heads/coverity_scan
  Home:   https://github.com/siemens/jailhouse
  Commit: 1b7a63610ea8078d940410eb4c1f6c0764f2c3bb
      
https://github.com/siemens/jailhouse/commit/1b7a63610ea8078d940410eb4c1f6c0764f2c3bb
  Author: Luca Cuomo <[email protected]>
  Date:   2018-04-19 (Thu, 19 Apr 2018)

  Changed paths:
    M configs/arm64/jetson-tx2.c

  Log Message:
  -----------
  Jetson TX2: fix root cell config for GPU acceleration

This patch fixes the root cell config for the Jetson TX2 platform to
avoid a deadlock occurring when using accelerated graphics. It maps the
VIC memory regions and increment the number of handled IRQs.

Signed-off-by: Claudio Scordino <[email protected]>
Signed-off-by: Bruno Morelli <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>


  Commit: a2d69a679a4e759221a29d9926107dcc50aea0f0
      
https://github.com/siemens/jailhouse/commit/a2d69a679a4e759221a29d9926107dcc50aea0f0
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  core: Fold map_root_memory_regions into init_late

It is safe to make this the very last step of init_late before
config_commit on all archs: it is only config_commit that depends on it,
and the region setup depends on the IOMMU being ready. And then we can
also fold this function into init_late directly.

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


  Commit: 473a1a2ce83d3f6e8b6f37e723cc6287ef692488
      
https://github.com/siemens/jailhouse/commit/473a1a2ce83d3f6e8b6f37e723cc6287ef692488
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/hypervisor.lds.S

  Log Message:
  -----------
  core: Pull __init_array_start/end into the section definition

This is required to reliably get the desired positions. Practically, we
had no issues so far.

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


  Commit: ff09181c30cbdbf7f7249a3e24589e1ada66777a
      
https://github.com/siemens/jailhouse/commit/ff09181c30cbdbf7f7249a3e24589e1ada66777a
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/control.c
    M hypervisor/hypervisor.lds.S
    A hypervisor/include/jailhouse/unit.h
    M hypervisor/mmio.c
    M hypervisor/setup.c

  Log Message:
  -----------
  core: Introduce unit infrastructure

This introduces the concept of functional units which can register
themselves with the core.

Each unit will then receive a number of callbacks on events of common
interest: hypervisor init and shutdown, cell creation and destruction,
and counting of MMIO regions per cell. All callbacks are mandatory, so
unused ones need to be stubbed. For the more common cases of missing
shutdown or mmio_count_regions callbacks, macros are provided. The init
callbacks are run in linking order, cleanup callbacks in the reverse
order.

Registration is performed by adding a unit structure to the units
section. From there, for_each_unit* iterators can pick them up in
linking order (or reversed).

The goal of this abstraction is to remove explicit hooks for the
mentioned events for each unit. It also allows to add a unit by simply
linking it against the hypervisor. This is specifically useful for
existing target-specific variations (e.g. CAT for Intel or VExpress
extensions) or upcoming optional features.

The reason to call this "unit", instead of "module", is to avoid
confusion with abstractions in Linux or other projects that have broader
semantics. E.g., a unit is not intended to become a runtime loadable
entity.

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


  Commit: 129e16e49788177e266cdf4cc1e09564e8d550b7
      
https://github.com/siemens/jailhouse/commit/129e16e49788177e266cdf4cc1e09564e8d550b7
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/pci.c

  Log Message:
  -----------
  core: Move pci_init to the end of pci.c

This will be needed when pci_cell_init becomes static. No functional
changes.

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


  Commit: f50c32b9eaaaa9904b00ee0625d13bafb3a05ddf
      
https://github.com/siemens/jailhouse/commit/f50c32b9eaaaa9904b00ee0625d13bafb3a05ddf
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/Makefile
    M hypervisor/control.c
    M hypervisor/include/jailhouse/pci.h
    M hypervisor/mmio.c
    M hypervisor/pci.c
    M hypervisor/setup.c

  Log Message:
  -----------
  core: Convert pci to a unit

This registers pci as unit with the core. As it should be initialized
last, we have to ensure this via adjusting the linking order.

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


  Commit: ee42b8d63400cf13c7c41c5881826915c6dd0a6b
      
https://github.com/siemens/jailhouse/commit/ee42b8d63400cf13c7c41c5881826915c6dd0a6b
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  x86: Move cat_init to the end of cat.c

This will be needed when cat_cell_init becomes static. No functional
changes.

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


  Commit: 651f2827c7b397a73c543be1a6d740cd8c6be075
      
https://github.com/siemens/jailhouse/commit/651f2827c7b397a73c543be1a6d740cd8c6be075
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/arch/x86/Kbuild
    R hypervisor/arch/x86/cat-stubs.c
    M hypervisor/arch/x86/cat.c
    M hypervisor/arch/x86/control.c
    M hypervisor/arch/x86/include/asm/cat.h
    M hypervisor/arch/x86/setup.c

  Log Message:
  -----------
  x86: Convert cat to a unit

This registers cat as a unit with the Intel-variant of the hypervisor.
For AMD, we just leave the non-unit'fied cat_update handler as weak stub
behind. cat_update is too special to model it as unit callback.

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


  Commit: c55307fa21772c690dfe07a30a501ae16a6e24bd
      
https://github.com/siemens/jailhouse/commit/c55307fa21772c690dfe07a30a501ae16a6e24bd
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  x86: Move ioapic_init to the end of ioapic.c

This will be needed when ioapic_cell_init becomes static. No functional
changes.

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


  Commit: 9f2843360e8322b9aa7be1655e44d0191fc060e1
      
https://github.com/siemens/jailhouse/commit/9f2843360e8322b9aa7be1655e44d0191fc060e1
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/arch/x86/Kbuild
    M hypervisor/arch/x86/control.c
    M hypervisor/arch/x86/include/asm/ioapic.h
    M hypervisor/arch/x86/ioapic.c
    M hypervisor/arch/x86/mmio.c
    M hypervisor/arch/x86/setup.c

  Log Message:
  -----------
  x86: Convert ioapic to a unit

This registers the ioapic as unit with the core.

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


  Commit: 702fdb50ca1ce31fe7a82133c1d26e24e3587c82
      
https://github.com/siemens/jailhouse/commit/702fdb50ca1ce31fe7a82133c1d26e24e3587c82
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/arch/arm-common/control.c
    M hypervisor/arch/x86/amd_iommu.c
    M hypervisor/arch/x86/control.c
    M hypervisor/arch/x86/include/asm/iommu.h
    M hypervisor/arch/x86/vtd.c
    M hypervisor/control.c
    M hypervisor/include/jailhouse/control.h

  Log Message:
  -----------
  core: Rename arch_shutdown to arch_prepare_shutdown

On x86, arch_shutdown now only contains preparation steps that all have
to be called prior to issuing the shutdown to units. Rename the function
and also the iommu service it calls on x86 to reflect that. ARM and
ARM64 do not use it, thus is unaffected by this.

No functional changes.

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


  Commit: b38068b6e36959eb43a8c0189324fe6bb039be1b
      
https://github.com/siemens/jailhouse/commit/b38068b6e36959eb43a8c0189324fe6bb039be1b
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  x86: Move iommu_init and related functions to the end of amd_iommu.c

This will be needed when [amd_]iommu_cell_init becomes static. Move
amd_prepare_shutdown past it to preserve the logical ordering. No
functional changes.

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


  Commit: ebbb8d47dd6b473bd798f3621dd040e82df4ed2b
      
https://github.com/siemens/jailhouse/commit/ebbb8d47dd6b473bd798f3621dd040e82df4ed2b
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  x86: Move iommu_init and related functions to the end of vtd.c

This will be needed when iommu/vtd_cell_init becomes static. No
functional changes.

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


  Commit: 98df36dbdcf373e084744ef4db9f579eb9439b85
      
https://github.com/siemens/jailhouse/commit/98df36dbdcf373e084744ef4db9f579eb9439b85
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  x86: Convert iommu to a unit

This registers the amd_iommu or vtd a unit with the core, depending on
the hypervisor CPU-vendor variant. We do not use a shutdown hook but
rather continue to rely on the explicitly called iommu_prepare_shutdown
hook because the iommu need to close prior to other units.

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


  Commit: ae21d8823ef62cb6631ba4e386a9e4385d84850f
      
https://github.com/siemens/jailhouse/commit/ae21d8823ef62cb6631ba4e386a9e4385d84850f
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/arch/arm/Kbuild
    M hypervisor/arch/arm/control.c
    R hypervisor/arch/arm/include/asm/mach.h
    R hypervisor/arch/arm/mach-stubs.c
    R hypervisor/arch/arm/mach-vexpress.c
    M hypervisor/arch/arm/mmio.c
    M hypervisor/arch/arm/setup.c
    A hypervisor/arch/arm/vexpress.c

  Log Message:
  -----------
  arm: Convert mach-vexpress to a unit

This registers the VExpress specific hooks as unit with the core and
shows the power of units: no more special mach hooks.

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


  Commit: e1c9e25158605950d73be9b236fee56be8d87f2a
      
https://github.com/siemens/jailhouse/commit/e1c9e25158605950d73be9b236fee56be8d87f2a
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  arm: Fold irqchip_init into irqchip_cpu_init

It's called right before irqchip_cpu_init, so we can also do that in
irqchip_cpu_init directly.

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


  Commit: f8e061bd42c1837a1198c8d3f09ebcc4af5f500c
      
https://github.com/siemens/jailhouse/commit/f8e061bd42c1837a1198c8d3f09ebcc4af5f500c
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/arch/arm-common/include/asm/irqchip.h
    M hypervisor/arch/arm-common/irqchip.c
    M hypervisor/arch/arm-common/setup.c
    M hypervisor/arch/arm/Kbuild
    M hypervisor/arch/arm/control.c
    M hypervisor/arch/arm/mmio.c
    M hypervisor/arch/arm64/Kbuild
    M hypervisor/arch/arm64/control.c
    M hypervisor/arch/arm64/mmio.c

  Log Message:
  -----------
  arm/arm64: Convert irqchip to a unit

This registers the irqchip as unit with the core. While saving already
some lines of code, it will even enable further consolidations.

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


  Commit: b224506d282472b8fcc9ee1a44db17371bb72389
      
https://github.com/siemens/jailhouse/commit/b224506d282472b8fcc9ee1a44db17371bb72389
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/arch/arm/mmio.c
    M hypervisor/arch/arm64/mmio.c
    M hypervisor/arch/x86/mmio.c
    M hypervisor/include/jailhouse/mmio.h
    M hypervisor/mmio.c

  Log Message:
  -----------
  core: Remove always-zero-returning arch_mmio_count_regions

It's now always 0, for all arch, so it's obsolete. Just leave a note in
mmio_cell_init why we do not need to initialize max_mmio_regions
explicitly.

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


  Commit: 746985ab13b19f6006faba018c6f026de1cdcee1
      
https://github.com/siemens/jailhouse/commit/746985ab13b19f6006faba018c6f026de1cdcee1
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  arm/arm64: Make arch_cell_create a common function

It's now identical for both archs.

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


  Commit: 8758c8fdfebbb94a2ede6bb0cf8513a37c8a0b59
      
https://github.com/siemens/jailhouse/commit/8758c8fdfebbb94a2ede6bb0cf8513a37c8a0b59
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  arm/arm64: Make arch_cell_destroy a common function

It's now functionally identical for both archs.

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


  Commit: 0b73e8cb7018d3ded1de39fcea32efcba1301102
      
https://github.com/siemens/jailhouse/commit/0b73e8cb7018d3ded1de39fcea32efcba1301102
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/arch/arm-common/include/asm/setup.h
    M hypervisor/arch/arm-common/setup.c
    M hypervisor/arch/arm/setup.c
    M hypervisor/arch/arm64/setup.c
    M hypervisor/arch/x86/setup.c
    M hypervisor/include/jailhouse/entry.h
    M hypervisor/setup.c

  Log Message:
  -----------
  core: Drop arch_init_late

No one does more than returning 0 by now.

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


  Commit: 19984c4def6f1a036d8f7562378115574ddf246f
      
https://github.com/siemens/jailhouse/commit/19984c4def6f1a036d8f7562378115574ddf246f
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  arm: Remove empty and dead struct pci_cell

Probably a left-over from earlier versions of 018f4afa844b.

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


  Commit: 8b75dac9a1e3772955cc2b33710e24a10da654da
      
https://github.com/siemens/jailhouse/commit/8b75dac9a1e3772955cc2b33710e24a10da654da
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    A hypervisor/arch/arm-common/include/asm/cell.h
    R hypervisor/arch/arm/include/asm/cell.h
    R hypervisor/arch/arm64/include/asm/cell.h

  Log Message:
  -----------
  arm/arm64: Use common asm/cell.h

It's now identical.

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


  Commit: 1a93a245d2100e946f90df03167ea16bcdd4a112
      
https://github.com/siemens/jailhouse/commit/1a93a245d2100e946f90df03167ea16bcdd4a112
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

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

  Log Message:
  -----------
  arm-common: Drop __ASSEMBLY__ guard from asm/cell.h

Header is not pulled by assembler sources.

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


  Commit: 5b0953df77d0e1dfde15b6cf3865529375cd21d5
      
https://github.com/siemens/jailhouse/commit/5b0953df77d0e1dfde15b6cf3865529375cd21d5
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/arch/arm-common/Kbuild
    M hypervisor/arch/arm/Kbuild
    M hypervisor/arch/arm64/Kbuild
    M hypervisor/arch/x86/Kbuild
    M inmates/lib/arm-common/Makefile.lib
    M inmates/lib/arm/Makefile
    M inmates/lib/arm64/Makefile

  Log Message:
  -----------
  build: Cosmetic improvements for COMMON_OBJECTS variables

Rename COMMON_OBJECTS to common-objs-y so that optional objects can more
easily be appended. Also decapitalize OBJS-y to be visually more
friendly.

No functional changes.

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


  Commit: 26390874d6484be0c70ce542f2db83ac7539fc84
      
https://github.com/siemens/jailhouse/commit/26390874d6484be0c70ce542f2db83ac7539fc84
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-20 (Fri, 20 Apr 2018)

  Changed paths:
    M hypervisor/Makefile

  Log Message:
  -----------
  build: Add a dummy recipe to ensure evaluation of arch subdir results

Without this, make may skip over relinking the core against the arch
subdir results while the latter is still being built. This was
reproducible by touching an architecture file and then rebuild with -j.

Fixes: f5a0a36601c2 ("core: Rework architecture subdir build")
Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 53653d76496cac8696c08610d672f93323087999
      
https://github.com/siemens/jailhouse/commit/53653d76496cac8696c08610d672f93323087999
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M hypervisor/arch/x86/Kbuild
    A hypervisor/arch/x86/test-device.c
    M include/jailhouse/cell-config.h

  Log Message:
  -----------
  x86: Add MMIO access test device

On x86, we unfortunately need to parse the guest instruction that
triggered an MMIO access interception. This parser started to be small
and simple - and then real life bit. It already passed the point where
we should have added systematic tests.

This is the hypervisor-located building block for such tests. The test
creates a MMIO target page right after the Communication Page. Write
accesses to the virtual registers 0xff8..0xfff are stored per cell, read
accesses reproduce that written value. The virtual registers are backed
by the Communication Page of the same cell at the same address, thus
create a second channel to validate accesses.

This test device is optional, configured in during build time by setting
CONFIG_TEST_DEVICE in config.h and during runtime by adding
JAILHOUSE_CELL_TEST_DEVICE to the cell's config flags.

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


  Commit: 323eb23a4a40cc3664335820e550f0e63d4dcca5
      
https://github.com/siemens/jailhouse/commit/323eb23a4a40cc3664335820e550f0e63d4dcca5
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M configs/x86/tiny-demo.c
    M inmates/Makefile
    A inmates/tests/arm/Makefile
    A inmates/tests/arm64/Makefile
    A inmates/tests/x86/Makefile
    A inmates/tests/x86/mmio-access.c

  Log Message:
  -----------
  inmates: x86: Add test case for MMIO accessing instructions

This lays the ground for systematic tests of the MMIO instruction parser
in x86. The test-case inmate uses the new MMIO access test device for
writing and reading with yet a small number of instructions variants.
This is supposed to expanded later on with further patterns - but it
already revealed several bugs in the handling of immediate writes.

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


  Commit: 6a43c6de6249a67e24ffe17cf475edd0dca648fe
      
https://github.com/siemens/jailhouse/commit/6a43c6de6249a67e24ffe17cf475edd0dca648fe
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

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

  Log Message:
  -----------
  x86: mmio: Fix instruction length calculation for write-immediate

This fixes one case around mov imm,<addr>: We read the immediate value
to be written, but we forgot to update inst_len. This fixes that issue
by moving the update from ctx.count to inst.inst_len to the very end
of the parser.

Fixes: 95202a038b9e ("x86,mmio: Add support for 1 more instructions on
                the MMIO dispatcher")
Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 95814f73b5bc6f4747ad8ae61d61c213896b9324
      
https://github.com/siemens/jailhouse/commit/95814f73b5bc6f4747ad8ae61d61c213896b9324
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

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

  Log Message:
  -----------
  x86: mmio: Fix handling of displacement bytes when writing immediates

We only skipped over 32-bit displacements in mod 0 so far. But mod 1 and
2 can bring them as well. Moreover, we incremented inst_len even when
skipping via ctx_update, which accounted the displacement twice.

Fix this by pulling out the displacement skip, moving it before the
immediate retrieval. If there is no immediate to read, directly add the
displacement length to inst_len.

Fixes: 95202a038b9e ("x86,mmio: Add support for 1 more instructions on
                the MMIO dispatcher")
Signed-off-by: Jan Kiszka <[email protected]>


  Commit: c9690d988016492d5a32e066a45207edcfd584c2
      
https://github.com/siemens/jailhouse/commit/c9690d988016492d5a32e066a45207edcfd584c2
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

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

  Log Message:
  -----------
  x86: mmio: Reliably identify mov immediate instructions

The opcode of mov imm,<mem> also consists of reg=0 in the ModR/M byte.
Make sure that we do not misinterpret an instruction.

Fixes: 95202a038b9e ("x86,mmio: Add support for 1 more instructions on
                the MMIO dispatcher")
Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 24d326c4c1b88cce21980bed68abe3b958248424
      
https://github.com/siemens/jailhouse/commit/24d326c4c1b88cce21980bed68abe3b958248424
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

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

  Log Message:
  -----------
  x86: mmio: Sign-extend immediate of 64-bit mov

The immediate value of mov imm,<mem> is still 32-bit in case of a 64-bit
write, but it has to be sign-extended in that case. Add the missing
logic.

Fixes: 95202a038b9e ("x86,mmio: Add support for 1 more instructions on
                the MMIO dispatcher")
Signed-off-by: Jan Kiszka <[email protected]>


  Commit: b8cf6db573d88b83233850bd6c45f2503a7d878b
      
https://github.com/siemens/jailhouse/commit/b8cf6db573d88b83233850bd6c45f2503a7d878b
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

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

  Log Message:
  -----------
  x86: mmio: Complete SIB + displacement support

The case of mod=1 or 2 and rm = 4 (SIB) is easy to handle because we do
not need to evaluate the SIB byte and can simply skip over it.

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


  Commit: 262a692efe0446fc4baf5ece359d3716fcc72465
      
https://github.com/siemens/jailhouse/commit/262a692efe0446fc4baf5ece359d3716fcc72465
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

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

  Log Message:
  -----------
  x86: mmio: Refactor code for mod=0 handling

This just improves readability and makes the code more compact. The
rm cases are now dispatched in ascending order.

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


  Commit: 02a85010cc4dff2a7021a6c199a6123f104fc7b6
      
https://github.com/siemens/jailhouse/commit/02a85010cc4dff2a7021a6c199a6123f104fc7b6
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M hypervisor/arch/x86/apic.c
    M hypervisor/arch/x86/include/asm/apic.h
    M hypervisor/arch/x86/include/asm/mmio.h
    M hypervisor/arch/x86/include/asm/vcpu.h
    M hypervisor/arch/x86/mmio.c
    M hypervisor/arch/x86/svm.c
    M hypervisor/arch/x86/vcpu.c
    M hypervisor/arch/x86/vmx.c

  Log Message:
  -----------
  x86: Split up vcpu_vendor_get_execution_state

Rather than always pulling the four fields of vcpu_execution_state at
once, introduce individual accessor functions. This allows to reduce the
number of expensive vmcs_read operations on Intel to 2 for typical
hypercalls and all MMIO interceptions.

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


  Commit: 0699a2569af23768480bc8b1ef0350fecf8a0038
      
https://github.com/siemens/jailhouse/commit/0699a2569af23768480bc8b1ef0350fecf8a0038
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

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

  Log Message:
  -----------
  x86: mmio: Fix parsing for mov ax to/from mem in 64-bit mode

In long mode, we have 64-bit addresses by default, and so we need to
skip over 8 bytes of address for that instruction.

Fixes: ea43ce86f4e3 ("x86,mmio: Add support for 2 more instructions on
                the MMIO dispatcher")
Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 31d19ffc0027ef30e84ab4f1adcfb4720926988c
      
https://github.com/siemens/jailhouse/commit/31d19ffc0027ef30e84ab4f1adcfb4720926988c
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

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

  Log Message:
  -----------
  x86: Remove misleading brackets from mmio instruction dump

The parser my bail out on opcode byte 0-2.

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


  Commit: 89061a400f816d627068073a135f9d3a70d4c9b4
      
https://github.com/siemens/jailhouse/commit/89061a400f816d627068073a135f9d3a70d4c9b4
  Author: Ralf Ramsauer <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M hypervisor/setup.c

  Log Message:
  -----------
  core: amend misleading comment in entry()

The arch independent entry() routine isn't called directly by the kernel
driver, it's rather called by the arch_entry assembler stubs after
setting up the environment.

The current comment might be a bit misleading.

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


  Commit: df648e0c063008c857309026a4984401292e24c2
      
https://github.com/siemens/jailhouse/commit/df648e0c063008c857309026a4984401292e24c2
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M hypervisor/control.c

  Log Message:
  -----------
  core: Instrument failing DEBUG_CONSOLE_PUTC hypercall

If the guest doesn't print anything on the debug console although it
should and you are sure you did everything right, just enable
CONFIG_TRACE_ERROR, and the hypervisor may now tell you (indirectly)
that you forgot to configure this logging privilege in the cell config.

Reported-by: Francois-Frederic Ozog <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>


  Commit: 6f589557d606519746c88f2fd70172eec27ffec7
      
https://github.com/siemens/jailhouse/commit/6f589557d606519746c88f2fd70172eec27ffec7
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M configs/Makefile
    M hypervisor/Makefile
    M inmates/Makefile
    M tools/Makefile

  Log Message:
  -----------
  build: Avoid evaluating linux/compiler_types.h

Since 4.17, kbuild pulls in linux/compiler_types.h via -include in a way
we cannot avoid as long as we are using kbuild. This is not only against
our intention to avoid kernel headers for everything but the driver
module, it also breaks the build as we do not provide a search path for
the headers that compiler_types.h includes itself.

Fortunately, we can avoid the evaluation of that header simply by
defining its include guard.

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


  Commit: 773a80800991688db74c130782da870d46f66979
      
https://github.com/siemens/jailhouse/commit/773a80800991688db74c130782da870d46f66979
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M driver/pci.c

  Log Message:
  -----------
  driver: Use pci_get_domain_bus_and_slot

pci_get_bus_and_slot was removed in 4.17 while the more powerful
alternative exists since 2.6 times.

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


  Commit: 6e35d3e82a995802eae49dc3bf9f3122a2272815
      
https://github.com/siemens/jailhouse/commit/6e35d3e82a995802eae49dc3bf9f3122a2272815
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M hypervisor/Makefile
    M hypervisor/arch/arm/Kbuild
    M hypervisor/arch/arm64/Kbuild
    M hypervisor/arch/x86/Kbuild

  Log Message:
  -----------
  build: Switch to lib.a for architecture parts of hypervisor

We already use this pattern for the inmate library. Moreover, our
current pattern of generating build-in.o no longer works with 4.17.
Switching to a library build is straightforward for arm and arm64, we
just need more explicit rules on x86 because of the need to build two
libraries in the same folder which is not directly supported by kbuild.

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


  Commit: f42bb50414f509ab78130a1980dcc832025eb81b
      
https://github.com/siemens/jailhouse/commit/f42bb50414f509ab78130a1980dcc832025eb81b
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M configs/arm/dts/inmate-bananapi.dts
    M configs/arm/dts/inmate-jetson-tk1.dts
    M configs/arm/dts/inmate-orangepi0.dts
    M configs/arm64/dts/inmate-espressobin.dts
    M configs/arm64/dts/inmate-hikey.dts
    M configs/arm64/dts/inmate-jetson-tx1.dts
    M configs/arm64/dts/inmate-qemu-arm64.dts
    M configs/arm64/dts/inmate-zynqmp-zcu102-2.dts
    M configs/arm64/dts/inmate-zynqmp-zcu102.dts
    M driver/pci.c
    M driver/vpci_template.dts

  Log Message:
  -----------
  configs, driver: Rename virtual PCI DT entries to "pci"

The dtc of 4.17+ checks if a device tree node of device_type "pci" is
also called "pci". Please it by renaming ours.

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


  Commit: ee6caf0ba6de6aa118ba09c8c6a96e6732be6674
      
https://github.com/siemens/jailhouse/commit/ee6caf0ba6de6aa118ba09c8c6a96e6732be6674
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M driver/pci.c
    M driver/vpci_template.dts

  Log Message:
  -----------
  driver: Rework vpci overlay management for 4.17 - and before

As the API of 4.17 changes, replacing of_fdt_unflatten_tree +
of_overlay_apply with just of_overlay_fdt_apply, we have to adjust our
vpci overlay management. We now register the incomplete template, but in
a disabled state. Then we apply the required changes on the live tree,
including the activation of the node. This pattern nicely works for both
newer and older kernels.

Along this, we fix our lifecycle management of the the changeset as well
as its registered properties. The old code pushed in static properties,
but the OF core was implicitly expecting dynamically allocated objects.
Probably only due to resource leakage issues, we so far didn't trigger
any lethal attempt to kfree stack objects.

The new code has been validated extensively via kmemleak and kasan. Note
that, at the time of writing, the of_overlay_fdt_apply has a built-in
resource leakage that we cannot fix from this code. A solutions are
being discussed upstream.

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


  Commit: ee38448bd8c60854148ba7c5e33d047f871a7d0e
      
https://github.com/siemens/jailhouse/commit/ee38448bd8c60854148ba7c5e33d047f871a7d0e
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M configs/arm/jetson-tk1.c
    M configs/arm64/espressobin.c
    M configs/arm64/hikey.c
    M configs/arm64/jetson-tx1.c
    M configs/arm64/qemu-arm64.c
    M configs/arm64/zynqmp-zcu102.c
    M include/jailhouse/cell-config.h
    M tools/jailhouse-cell-linux
    M tools/jailhouse-hardware-check

  Log Message:
  -----------
  config: Add PCI domain number field to platform parameters

This encodes the domain number the virtual PCI host controller should
use. 0..0xfffe are explicitly assigned numbers, 0xffff (-1) is used to
encode the previous semantic: the guest assigns the number itself.

Set all configs with active virtual PCI controllers and known existence
of real PCI hosts to -1 in order to preserve the current behavior.

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


  Commit: 013f060d372426875e93a22df9a69e95dc6beed0
      
https://github.com/siemens/jailhouse/commit/013f060d372426875e93a22df9a69e95dc6beed0
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M driver/pci.c

  Log Message:
  -----------
  driver: Add linux,pci-domain property to DT overlay

If the system config contains a pci_domain value in the range 0..0xfffe,
expose this value via the linux,pci-domain property to the guest so that
the virtual controller will get a fixed domain number.

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


  Commit: c11d1e5d320d5231f57c7a87c289273c5d867602
      
https://github.com/siemens/jailhouse/commit/c11d1e5d320d5231f57c7a87c289273c5d867602
  Author: Jan Kiszka <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M configs/arm/jetson-tk1.c
    M configs/arm64/espressobin.c
    M configs/arm64/hikey.c
    M configs/arm64/jetson-tx1.c
    M configs/arm64/qemu-arm64.c
    M configs/arm64/zynqmp-zcu102.c

  Log Message:
  -----------
  configs: Adjust domains of virtual PCI controllers

We usually expect our virtual PCI controller to take domain 1 on
platforms that already have physical (but unvirtualizable) PCI host. If
we leave the domain at 0, we may accidentally unplug a real device from
the real host on shutdown. And if the virtual bridge should actually be
at domain 0, we will still unplug the device when we remove its host
controller's device tree overlay fragment.

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


  Commit: bbdb3c6620ac8055b42740266ed6c3cae773021f
      
https://github.com/siemens/jailhouse/commit/bbdb3c6620ac8055b42740266ed6c3cae773021f
  Author: Ralf Ramsauer <[email protected]>
  Date:   2018-04-27 (Fri, 27 Apr 2018)

  Changed paths:
    M hypervisor/arch/x86/include/asm/percpu.h

  Log Message:
  -----------
  core: x86: percpu: remove superfluous include

This include is not required.

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


  Commit: 85d89c7fe2282b7ea3648ee717a607fc1b59cbae
      
https://github.com/siemens/jailhouse/commit/85d89c7fe2282b7ea3648ee717a607fc1b59cbae
  Author: Jean-Jacques Hiblot <[email protected]>
  Date:   2018-05-02 (Wed, 02 May 2018)

  Changed paths:
    M tools/jailhouse-cell-linux

  Log Message:
  -----------
  tools: jailhouse-cell-linux: fixed bug in command line generation

args.kernel.name + '-unzipped' if self._kernel_gz else '' is wrong
because '+' takes precedence over 'if ... else ...'. This results in the
kernel image name being absent from the generated command line if the
kernel is not compressed.
Fix it by using parenthesis to apply the condition only to '-unzipped'.

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


Compare: 
https://github.com/siemens/jailhouse/compare/b3c914523493...85d89c7fe228
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

-- 
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