[siemens/jailhouse] af8a85: x86: Add MSR whitelisting to to-do list

1 view
Skip to first unread message

GitHub

unread,
Mar 20, 2015, 9:14:57 AM3/20/15
to jailho...@googlegroups.com
Branch: refs/heads/next
Home: https://github.com/siemens/jailhouse
Commit: af8a8530a2e15e5feb3d831bf821e4e8cdd02a64
https://github.com/siemens/jailhouse/commit/af8a8530a2e15e5feb3d831bf821e4e8cdd02a64
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-03-20 (Fri, 20 Mar 2015)

Changed paths:
M TODO.md
M hypervisor/arch/x86/svm.c
M hypervisor/arch/x86/vmx.c

Log Message:
-----------
x86: Add MSR whitelisting to to-do list

We currently allow access to almost all MSRs (except for APIC-related
ones). This has to be changed into a whitelist approach to avoid that
the cell manipulates a CPU state in a way we didn't validate as safe.

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


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

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

Log Message:
-----------
x86: Fix comment wording

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


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

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

Log Message:
-----------
x86: Drop redundant stgi from SVM's vcpu_deactivate_vmm

Already done via arch_cpu_restore -> vcpu_exit.

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


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

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

Log Message:
-----------
x86: Reformat and extend CR0 constants

Encode CR0 constants in an easier readable form and add some bits we
will need soon. Also add a mask of the reserved bits that need to be
left as-is on modifications.

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


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

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

Log Message:
-----------
x86: Rework CR0/CR4 restriction handling for VMX

First of all, we want to reuse the restrictions also for setting the
host CRx values. And then the current implementation would benefit from
more documentation, caching of those static values and checking their
consistency across all CPUs.

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


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

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

Log Message:
-----------
x86: Rename SVM_CR0_CLEARED_BITS to SVM_CR0_ALLOWED_BITS

Clarifies the semantic.

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


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

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

Log Message:
-----------
x86: Bring host CR0 into well-defined state during setup

Avoid any uncertainty about the state of CR0 left behind by Linux: check
for unexpectedly set reserved bits or required-1 bits, and otherwise set
our own state.

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


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

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

Log Message:
-----------
x86: Reformat and cleanup CR4 constants

Encode CR0 constants in an easier readable form, add soon required XSAVE
feature bit and remove unused PGE. Also add a mask of the reserved bits
that need to be left as-is on modifications.

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


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

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

Log Message:
-----------
x86: Sort and document feature bits

Sort feature bit constants according to their leafs and document their
locations.

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


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

Changed paths:
M hypervisor/arch/x86/include/asm/processor.h
M hypervisor/arch/x86/vmx.c

Log Message:
-----------
x86: Check for availability of xsetbv before executing it for the guest

Practically, this feature is also available on VMX-capable CPUs, but we
should not rely on it.

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


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

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

Log Message:
-----------
x86: Bring host CR4 into well-defined state during setup

Analogously to CR0: Avoid any uncertainty about the state of CR4 left
behind by Linux: check for unexpectedly set reserved bits or required-1
bits, and otherwise set our own state.

A side effect of this change is the VMX's vcpu_exit will no longer clear
VMXE in CR4 but only in the cached Linux state that arch_cpu_restore
will write back.

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


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

Changed paths:
M hypervisor/include/jailhouse/printk.h

Log Message:
-----------
core: Introduce error return code tracing

A number of errors that can be reported during setup or while
reconfiguring cells are hard to trace down to their detailed reasons
because of the limited number of error codes available through POSIX.
This Introduces a non-invasive mechanism to instrument error return
paths in the hypervisor and report the origin of a specific error code
in the form

hypervisor/arch/x86/vmx.c:592: returning error -ENODEV

This can then be matched against the source code to find out which check
on the hardware, the system state or the configuration data failed
precisely.

The feature is off by default, requiring CONFIG_TRACE_ERROR to be set in
config.h.

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


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

Changed paths:
M hypervisor/control.c
M hypervisor/paging.c
M hypervisor/pci.c
M hypervisor/pci_ivshmem.c

Log Message:
-----------
core: Instrument relevant return paths for error tracing

This instruments return paths so that the origin of important errors can
be tracked down. Two so far explicit error outputs are replaced with
trace_error.

We do not instrument -ENOMEM cases unless they relate to allocations
from the remapping pool. All other -ENOMEM cases boil down to a too
small hypervisor region.

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


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

Changed paths:
M hypervisor/arch/x86/apic.c
M hypervisor/arch/x86/ioapic.c
M hypervisor/arch/x86/svm.c
M hypervisor/arch/x86/vcpu.c
M hypervisor/arch/x86/vmx.c
M hypervisor/arch/x86/vtd.c

Log Message:
-----------
x86: Instrument relevant return paths for error tracing

Add trace_error to return paths so that the origin of important errors
can be tracked down.

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


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

Changed paths:
M hypervisor/paging.c

Log Message:
-----------
core: Simplify error reporting of paging_init

If -ENOMEM shows up at the user, this always means we ran out of pages.

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


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

Changed paths:
M ci/jailhouse-config-vexpress.h
M ci/jailhouse-config-x86.h

Log Message:
-----------
ci: Test CONFIG_TRACE_ERROR in specific targets

Make sure we test both CONFIG_TRACE_ERROR enabled and disabled by
leaving it off for the Banana Pi, and also test it on both
architectures.

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


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

Changed paths:
M configs/qemu-vm.c

Log Message:
-----------
configs: Tune qemu config for X mode changes

X triggers accesses to the QEMU VBE ports and some non-existent port
402. Allow both to (re-)enable graphic mode changes.

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


Compare: https://github.com/siemens/jailhouse/compare/c1b677e61a96...e9da2d4231c3
Reply all
Reply to author
Forward
0 new messages