[siemens/jailhouse] d7d5ea: x86: Fix hypercall dispatching assembly

2 views
Skip to first unread message

GitHub

unread,
Mar 20, 2015, 8:53:21 AM3/20/15
to jailho...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/siemens/jailhouse
Commit: d7d5ea916f8309788a9ba07095997e70fa2337fb
https://github.com/siemens/jailhouse/commit/d7d5ea916f8309788a9ba07095997e70fa2337fb
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-09 (Mon, 09 Mar 2015)

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

Log Message:
-----------
x86: Fix hypercall dispatching assembly

The macro reads jailhouse_use_vmcall, a bool variable that is mapped on
a byte on x86. Specify the width to avoid that we test more than we
should.

This bug was revealed by adding further global bool variables that
happen to line up after jailhouse_use_vmcall. The current memory layout
may make the issue harmless in practice.

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


Commit: 3e48054871c244b077c7a38ccd75fc7567308552
https://github.com/siemens/jailhouse/commit/3e48054871c244b077c7a38ccd75fc7567308552
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-09 (Mon, 09 Mar 2015)

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

Log Message:
-----------
x86: Improve readability of JAILHOUSE_CALL_CODE

Give the symbol we test in JAILHOUSE_CALL_CODE a name and use "jne" as
we are comparing for equality.

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


Commit: d4679047e5e067117998e468926b4a8b2a7aaf44
https://github.com/siemens/jailhouse/commit/d4679047e5e067117998e468926b4a8b2a7aaf44
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-09 (Mon, 09 Mar 2015)

Changed paths:
M Kbuild

Log Message:
-----------
build: Let inmates depend on hypervisor build unconditionally

$(clean) is no longer set only for clean runs with recent kernels. Thus
the dependency is now never set. At the same time, setting it also for
clean runs causes no unwanted side effects anymore. So remove the test.

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


Commit: 037744d9c518d83bf33728d2c03e451ce086be7b
https://github.com/siemens/jailhouse/commit/037744d9c518d83bf33728d2c03e451ce086be7b
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-09 (Mon, 09 Mar 2015)

Changed paths:
M .gitignore
M Kbuild
R driver.c
A driver/Makefile
A driver/jailhouse.h
A driver/main.c
R jailhouse.h
M tools/Makefile

Log Message:
-----------
driver: Move to separate directory

The top-level directory is starting to fill up, and the driver requires
some split-up into multiple modules. This should better be done in a
dedicated directory.

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


Commit: eb788af4535da9a2dd07339c2009ddda93db54f6
https://github.com/siemens/jailhouse/commit/eb788af4535da9a2dd07339c2009ddda93db54f6
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M hypervisor/Makefile

Log Message:
-----------
hypervisor: Fix cleaning of generated files for latest kernels

Recent kernels seem to add their own prefix to clean-files, thus won't
remove our files as the paths gets wrong. We can simply remove $(obj),
that works both for current and older kernels.

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


Commit: f205a40d0cbb47b854879d33a0afe2cc0e312f1c
https://github.com/siemens/jailhouse/commit/f205a40d0cbb47b854879d33a0afe2cc0e312f1c
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M .gitignore
M driver/Makefile
M driver/main.c
M hypervisor/Makefile
M hypervisor/setup.c

Log Message:
-----------
core/driver: Move version.h to generated directory

Now that we have such a directory, we should also use it for all files
generated during the build. This moves version.h.

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


Commit: 5a2bbcc5f84a95b4b9aab4984d71ca2a4e3187ea
https://github.com/siemens/jailhouse/commit/5a2bbcc5f84a95b4b9aab4984d71ca2a4e3187ea
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M .gitignore
M hypervisor/Makefile
M inmates/lib/arm/Makefile.lib

Log Message:
-----------
core: Move config.mk to generated directory

Analogously to version.h, this moves the generated config.mk to the
proper directory. We can switch from clean-files to clean-dirs for the
header directory at that chance.

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


Commit: 15c16bc3cdb20d1c34fb18f1164785033f6dd89a
https://github.com/siemens/jailhouse/commit/15c16bc3cdb20d1c34fb18f1164785033f6dd89a
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M driver/main.c

Log Message:
-----------
driver: Adjust description

The driver does more than loading.

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


Commit: 338618d90daed447a9c49c2b1e23caa289248f5c
https://github.com/siemens/jailhouse/commit/338618d90daed447a9c49c2b1e23caa289248f5c
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
A driver/cell.h
M driver/main.c

Log Message:
-----------
driver: Factor out cell.h

Another step towards multiple compilation modules for the driver: this
data structure will be used by most of them.

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


Commit: 4696dca0998184d26c7b495072a51fa7d4bb36ae
https://github.com/siemens/jailhouse/commit/4696dca0998184d26c7b495072a51fa7d4bb36ae
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M driver/Makefile
M driver/cell.h
M driver/main.c
A driver/pci.c
A driver/pci.h

Log Message:
-----------
driver: Factor out PCI related services

This moves all PCI-related functions in a separate module. Consequently,
the module is only built if PCI is enabled. Encapsulation also
simplifies to include PCI-related fields of struct cell only when used.

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


Commit: 9f6116a713c95651802412ff9e61d4717b4ea39f
https://github.com/siemens/jailhouse/commit/9f6116a713c95651802412ff9e61d4717b4ea39f
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M driver/main.c
A driver/main.h

Log Message:
-----------
driver: Export driver lock and enabled flag

The lock and the flag will be needed outside of main.c.

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


Commit: 474f26ff64da24809f93821f81696a1b52791fc1
https://github.com/siemens/jailhouse/commit/474f26ff64da24809f93821f81696a1b52791fc1
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M driver/Makefile
M driver/main.c
M driver/main.h
A driver/sysfs.c
A driver/sysfs.h

Log Message:
-----------
driver: Factor out sysfs module

Push all functions that build and serve the driver's sysfs view into a
separate module. This reduces the size of main.c significantly and makes
it more readable again.

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


Commit: 66b2150fab2b2b026b04358a957270a9f34fbba3
https://github.com/siemens/jailhouse/commit/66b2150fab2b2b026b04358a957270a9f34fbba3
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M driver/Makefile
A driver/cell.c
M driver/cell.h
M driver/jailhouse.h
M driver/main.c
M driver/main.h

Log Message:
-----------
driver: Move cell-related services to separate module

This moves all cell-related work out of main.c, shrinking it below 500
lines again.

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


Commit: 2c9a14087115eff2faeb28f3f4cdb68e99fbb17a
https://github.com/siemens/jailhouse/commit/2c9a14087115eff2faeb28f3f4cdb68e99fbb17a
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M hypervisor/arch/x86/include/asm/paging.h
M hypervisor/arch/x86/svm.c

Log Message:
-----------
x86: Fix no-execute tagging of SVM NPT structures

Two bugs in one: flags is too small, and PAGE_FLAG_EXECUTE is actually
PAGE_FLAG_NOEXECUTE.

Revealed by sparse while walking through a number of "constant XXX is so
big it is unsigned long" warnings.

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


Commit: 19c332d089e1f72f6a60fbc56d749c2e28399c49
https://github.com/siemens/jailhouse/commit/19c332d089e1f72f6a60fbc56d749c2e28399c49
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M hypervisor/arch/arm/control.c
M hypervisor/arch/arm/setup.c
M hypervisor/arch/x86/control.c
M hypervisor/arch/x86/setup.c
M hypervisor/arch/x86/svm.c
M hypervisor/arch/x86/vmx.c
M hypervisor/control.c

Log Message:
-----------
core: Ensure consistent function attributes

Take function attributes also the definition. Silences related sparse
errors.

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


Commit: 32bdb80bfd66f3a2b89c960b8dc449c991d19402
https://github.com/siemens/jailhouse/commit/32bdb80bfd66f3a2b89c960b8dc449c991d19402
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

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

Log Message:
-----------
x86: Silence sparse warning about non-ANSI function declaration

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


Commit: fc8f2bb758506c55f07ddc60ca7eab30e3ccdd00
https://github.com/siemens/jailhouse/commit/fc8f2bb758506c55f07ddc60ca7eab30e3ccdd00
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

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

Log Message:
-----------
arm: Remove spurious inline tags from function prototypes

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


Commit: 5678aa68e0c595c8e33a7ac1c50bca6571177211
https://github.com/siemens/jailhouse/commit/5678aa68e0c595c8e33a7ac1c50bca6571177211
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

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

Log Message:
-----------
arm: Make target_cpu_map static

No user outside of this file.

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


Commit: 6175d4544439e66fffa6a0054ace1cce514c977a
https://github.com/siemens/jailhouse/commit/6175d4544439e66fffa6a0054ace1cce514c977a
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M hypervisor/arch/x86/include/asm/jailhouse_hypercall.h
M hypervisor/arch/x86/setup.c
M hypervisor/arch/x86/svm.c
M inmates/demos/x86/ivshmem-demo.c

Log Message:
-----------
x86: Address sparse warnings about missing UL tags for constants

Automatic type conversion saved us in all these cases so far, but better
avoid surprises in the future and another finding turned out to be a bug
in fact.

JAILHOUSE_BASE requires special wrapping as it is also used in assembly
(the linker script) where the UL tag is not understood.

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


Commit: f25792d958741bad87e433c425008cde96763d65
https://github.com/siemens/jailhouse/commit/f25792d958741bad87e433c425008cde96763d65
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M driver/cell.c
M driver/main.c

Log Message:
-----------
driver: Silence sparse warnings about incompatible address spaces

All conversion cases are harmless, just ensure that sparse is told this.

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


Commit: 899c16c26d104943ff72ab4dbf069fea9699ebe3
https://github.com/siemens/jailhouse/commit/899c16c26d104943ff72ab4dbf069fea9699ebe3
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M driver/cell.c
M driver/main.c
M driver/pci.c

Log Message:
-----------
driver: Improve input validation to make code scanners happier

We trust the configuration files passed down to the driver already
because they define the isolation set up by the hypervisor and can
therefore screw up the system in various ways.

Nevertheless, we can and should improve basic consistency checks of
config fields that influences allocations and copy operations. This will
detect some corruptions/inconsistencies earlier and also satisfies the
Coverity scanner.

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


Commit: 5976889a7943fa5df471b0b0eafca954a5a660db
https://github.com/siemens/jailhouse/commit/5976889a7943fa5df471b0b0eafca954a5a660db
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M driver/cell.c

Log Message:
-----------
driver: Correctly tag kmalloc allocation on behalf of user space

When the provided config size if beyond kmalloc limits, it may raise a
WARN_ON. Avoid this by tagging the allocation with __GFP_NOWARN. Also
properly tag it as GFP_USER instead of GFP_KERNEL.

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


Commit: 222cb1e8ffb9bcc39b498e35991fe4d019bd8829
https://github.com/siemens/jailhouse/commit/222cb1e8ffb9bcc39b498e35991fe4d019bd8829
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
A ci/coverity_model.c

Log Message:
-----------
ci: Add Coverity model for kmalloc

kmalloc can actually sanitize a tained size parameter if given the right
GFP flags, namely GFP_USER (to properly tag the request origin) and
__GFP_NOWARN (to avoid WARN_ON when hitting the kmalloc limit). Model
this for Coverity so that it no longer complains about the correct
pattern we use in jailhouse_cmd_cell_create.

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


Commit: 2e13421eb39e4c16a6ed54b3c8ce856bac416941
https://github.com/siemens/jailhouse/commit/2e13421eb39e4c16a6ed54b3c8ce856bac416941
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M README.md
M configs/jetson-tk1.c

Log Message:
-----------
README/configs: Improve Jetson TK1 documentation

Add the board to the list of supported targets and document the required
kernel command line extension.

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


Commit: 6bb0812b443d0cbb0d96bb8036f75ee4d7498f02
https://github.com/siemens/jailhouse/commit/6bb0812b443d0cbb0d96bb8036f75ee4d7498f02
Author: Valentine Sinitsyn <valentine...@gmail.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M configs/h87i.c
M configs/qemu-vm.c
M hypervisor/arch/x86/vtd.c
M hypervisor/include/jailhouse/cell-config.h
M tools/jailhouse-config-create
M tools/root-cell-config.c.tmpl

Log Message:
-----------
core: Adapt config structures for non-Intel IOMMU

Rename dmar_units_base to iommu_base, and JAILHOUSE_MAX_DMAR_UNITS to
JAILHOUSE_MAX_IOMMU_UNITS.

Update configuration files and root cell config template to account for
new cell definition parameters names.

Signed-off-by: Valentine Sinitsyn <valentine...@gmail.com>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: 5fe206927c05013826e824bc98605572e26ac885
https://github.com/siemens/jailhouse/commit/5fe206927c05013826e824bc98605572e26ac885
Author: Valentine Sinitsyn <valentine...@gmail.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

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

Log Message:
-----------
tools: Implement ACPI IVRS table parser

Add parse_ivrs() function that extracts relevant bits of information
from ACPI IVRS table which describes AMD IOMMU units found in the system.

As VT-d and AMD-Vi impose slightly different requirements on PCI devices
configuration (eg PCI root complex), move sanity checks to corresponding
functions to account for these discrepancies.

Signed-off-by: Valentine Sinitsyn <valentine...@gmail.com>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: 07a57f3e7a101dd0d55d38878ee759a8ea7b4e4e
https://github.com/siemens/jailhouse/commit/07a57f3e7a101dd0d55d38878ee759a8ea7b4e4e
Author: Valentine Sinitsyn <valentine...@gmail.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M configs/f2a88xm-hd3.c

Log Message:
-----------
configs: Update F2A88XM-HD3 config

Add single IOMMU entry that covers all built-in peripherals.
Also, include all missing bits of configuration data (mostly
PCI-related anyway).

Signed-off-by: Valentine Sinitsyn <valentine...@gmail.com>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Compare: https://github.com/siemens/jailhouse/compare/0de30494b896...07a57f3e7a10
Reply all
Reply to author
Forward
0 new messages