[siemens/jailhouse] 34d235: core: Fix documentation of paging_get_guest_pages

2 views
Skip to first unread message

GitHub

unread,
Apr 7, 2015, 2:04:55 AM4/7/15
to jailho...@googlegroups.com
Branch: refs/heads/next
Home: https://github.com/siemens/jailhouse
Commit: 34d23502113cc288f2b44aa6ec6366532a82bca4
https://github.com/siemens/jailhouse/commit/34d23502113cc288f2b44aa6ec6366532a82bca4
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-06 (Mon, 06 Apr 2015)

Changed paths:
M hypervisor/paging.c

Log Message:
-----------
core: Fix documentation of paging_get_guest_pages

We neglected the difference between pg_structs being NULL and non-NULL.

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


Commit: 780b36b889b20bb0373c73e91534c74c45745d9d
https://github.com/siemens/jailhouse/commit/780b36b889b20bb0373c73e91534c74c45745d9d
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-06 (Mon, 06 Apr 2015)

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

Log Message:
-----------
x86: Clear high-order bits in RAX/RDX on x2APIC MSR read

The Intel SDM explicitly states that the higher 32 bits of RAX and RDX
are cleared by rdmsr.

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


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

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

Log Message:
-----------
x86: Remove obsolete comment from struct per_cpu

The "defines above" were removed by 68be464005.

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


Commit: 6d581dae921b2d99ba538807b63f4ea14b6356f3
https://github.com/siemens/jailhouse/commit/6d581dae921b2d99ba538807b63f4ea14b6356f3
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-06 (Mon, 06 Apr 2015)

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

Log Message:
-----------
x86: Consolidate cpuid helpers

cpuid() is not used outside of the CPUID_REG macro, only __cpuid. Let's
get rid of the former and reuse its name for the latter.

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


Commit: 23c9616254e46f5a148299bbda201fe96fcfa08b
https://github.com/siemens/jailhouse/commit/23c9616254e46f5a148299bbda201fe96fcfa08b
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-06 (Mon, 06 Apr 2015)

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

Log Message:
-----------
x86: Stop printing PCI address port in vcpu_handle_io_access

This information is provided by x86_pci_config_handler since b1be672359.

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


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

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

Log Message:
-----------
x86: Adjust output of SVM's dump_guest_regs

Aligns us with VMX.

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


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

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

Log Message:
-----------
x86: Prevent interference by Intel perf counters

Make it simple but safe: Disable perf counters during setup and prevent
that cells can modify the corresponding MSR. This avoids that we have
to switch the MSR during vmentry/exit, but it also blocks perf & friends
while Jailhouse is active.

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


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

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

Log Message:
-----------
x86: Improve readability of VMX constants

Convert from magic number to shifted value to improve readability.

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


Commit: 386110c2162dd98947bf4f66f1888416d5bfee0c
https://github.com/siemens/jailhouse/commit/386110c2162dd98947bf4f66f1888416d5bfee0c
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-06 (Mon, 06 Apr 2015)

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

Log Message:
-----------
x86: Validate EFER save/restore feature on Intel

This feature practically comes with unrestricted guest mode, but the
spec does not guarantee this.

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


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

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

Log Message:
-----------
x86: Switch between host and guest PAT

Do not allow the guest to mess with the PAT MSR in a was that also
affects the host. This may cause the host to run in uncached mode,
slowing it down, or - even worse- access MMIO with caches enabled which
will cause inconsistencies.

On Intel, we have to require and enable the related save/restore
feature. On AMD, we need to intercept the MSR accesses and map them on
the g_pat field of the VMCB.

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


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

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

Log Message:
-----------
x86: Refactor svm_handle_msr_read/write

Convert to switch-case and simplify the exit path of the write handler.

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


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

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

Log Message:
-----------
x86: Factor out vcpu_handle_msr_read/write

This will simplify the emulation of MTRR_DEF_TYPE. It already allows to
consolidate filtering for x2APIC MSRs and error reporting.

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


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

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

Log Message:
-----------
x86: Factor out set_rdmsr_value and get_wrmsr_value

This improves readability of the code and scales better with more MSRs
being intercepted.

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


Commit: 292e90ed1485298f3e66a2827a1f7b6db619e566
https://github.com/siemens/jailhouse/commit/292e90ed1485298f3e66a2827a1f7b6db619e566
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-06 (Mon, 06 Apr 2015)

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

Log Message:
-----------
x86: Introduce vcpu_reset

So far this just encapsulates the general purpose register reset, but
more will follow.

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


Commit: 8881f1f2d58a267b4b640a82bb4cc306818cdb7f
https://github.com/siemens/jailhouse/commit/8881f1f2d58a267b4b640a82bb4cc306818cdb7f
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-06 (Mon, 06 Apr 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/vcpu.c
M hypervisor/arch/x86/vmx.c

Log Message:
-----------
x86: Maintain PAT shadow

For emulating the MTRR-disabled state, we will have to modify the
effective guest PAT state soon. This prepares for it by keeping PAT in
a shadow per-cpu field and intercept access to the MSR.

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


Commit: 3a3c4e61574cbaa2ba81d6839c825f35f7cb71b5
https://github.com/siemens/jailhouse/commit/3a3c4e61574cbaa2ba81d6839c825f35f7cb71b5
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-06 (Mon, 06 Apr 2015)

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

Log Message:
-----------
x86: Emulate MTRR enable/disable

We assume that cells will only flip the enabled flag of
IA32_MTRR_DEF_TYPE, leaving the rest of the register in default state
(the one found during handover). SVM already implemented this but
emulated the disabled state by modifying the host PAT.

This approach works less invasively by only changing the effective guest
PAT to 0 in case MTRRs are off. And it provides this for Intel as well.

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


Commit: 2e794cfd5adaf54c23914533ed9d6b260d7e56c7
https://github.com/siemens/jailhouse/commit/2e794cfd5adaf54c23914533ed9d6b260d7e56c7
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-06 (Mon, 06 Apr 2015)

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

Log Message:
-----------
x86: Block write access to MTRR registers

Linux does not try to rewrite them on CPU hotplug if they are identical
to other CPUs' registers, and our non-root cells have no business in
touching them as well. This effectively freezes MTRRs after handover
ensures consistent states for both the hypervisor and all cells across
all CPUs.

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


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

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

Log Message:
-----------
x86: Remove local cpu_data variable from vcpu_handle_hypercall

Only used once.

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


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

Changed paths:
M hypervisor/arch/x86/apic.c
M hypervisor/arch/x86/control.c
M hypervisor/arch/x86/include/asm/apic.h

Log Message:
-----------
x86: Remove cpu_data parameter from apic_clear

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The necessary reference can be obtained
inline.

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


Commit: 8a9b9f60f5a4446030787b9991d82060a7639fa9
https://github.com/siemens/jailhouse/commit/8a9b9f60f5a4446030787b9991d82060a7639fa9
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Remove unused parameter from apic_valid_ipi_mode

No use case in sight.

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


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

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

Log Message:
-----------
x86: Remove cpu_data parameter from apic_send_[logical_dest_]ipi

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The necessary reference can be obtained
inline.

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


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

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

Log Message:
-----------
x86: Update apic_handle_icr_write signature

apic_handle_icr_write became locally used only by 3da0bd91d9, and we
also no longer use the cpu_data parameter.

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


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

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

Log Message:
-----------
x86: Remove cpu_data parameter from vcpu_park

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The implementations can obtain the
reference inline as needed.

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


Commit: 612d736e6cbe759687e9ef5132545eeedbb2e8f1
https://github.com/siemens/jailhouse/commit/612d736e6cbe759687e9ef5132545eeedbb2e8f1
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Obtain execution state inside vcpu_handle_hypercall

This simplifies the invocation of the handler and aligns it with
vcpu_handle_pt_violation.

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


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

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

Log Message:
-----------
x86: Retrieve vcpu_io_intercept from vcpu_handle_io_access

Convert the vendor-specific functions into vcpu_vendor_get_io_intercept
and invoke that one from vcpu_handle_io_access. That offloads this
burden from the callers of vcpu_handle_io_access and takes us further
towards consistent vendor callbacks for such purposes.

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


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

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

Log Message:
-----------
x86: Rename parameter of vcpu_vendor_get_io_intercept

This aligns the internal names with those used externally. No functional
changes.

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


Commit: 1c68cca64ed4bfcaee1ccfc3eb7d3ad472bb83d5
https://github.com/siemens/jailhouse/commit/1c68cca64ed4bfcaee1ccfc3eb7d3ad472bb83d5
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Rename vcpu_handle_pt_violation to vcpu_handle_mmio_access

This describes more accurately what the handler does and aligns us with
vcpu_handle_io_access.

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


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

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

Log Message:
-----------
x86: Retrieve vcpu_mmio_intercept from vcpu_handle_mmio_access

Analogously to vcpu_handle_io_access, define the vendor callback
vcpu_vendor_get_mmio_intercept and call it from vcpu_handle_mmio_access
instead of passing it to the handler. For consistency reasons, rename
vcpu_pf_intercept to vcpu_mmio_intercept.

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


Commit: 74cd99343c49068a1f09f2b08dffef4993700d2c
https://github.com/siemens/jailhouse/commit/74cd99343c49068a1f09f2b08dffef4993700d2c
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Factor out vcpu_handle_xsetbv

The handling logic is fully shared between AMD and Intel CPUs.
Consolidate it.

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


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

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

Log Message:
-----------
x86: Allow index-based guest register access without type casts

Convert struct registers into a union and provide a by_index array for
index-based access. This is used by various handlers that parse guest
instructions and so far use a blunt type case on the structure.

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


Commit: 659182d9f45c61c3da608cbb42c2fc52fab05e6a
https://github.com/siemens/jailhouse/commit/659182d9f45c61c3da608cbb42c2fc52fab05e6a
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

Changed paths:
M hypervisor/arch/x86/svm-vmexit.S

Log Message:
-----------
x86: Reorder stack layout in svm_vmexit

Push the guest registers first so that they end up at the same location
on the stack as on Intel. This will allow to address them generically
via the per_cpu structure.

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


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

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

Log Message:
-----------
x86: Enable direct access to per-cpu guest registers

Now that the guest registers are saved at the same location on the
per-cpu stack for both Intel and AMD, we can enable direct access via
the per-cpu data structure. This will allow to drop the guest registers
parameter from most functions.

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


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

Changed paths:
M hypervisor/arch/x86/include/asm/vcpu.h
M hypervisor/arch/x86/svm-vmexit.S
M hypervisor/arch/x86/svm.c
M hypervisor/arch/x86/vmx-vmexit.S
M hypervisor/arch/x86/vmx.c

Log Message:
-----------
x86: Remove guest registers parameter from vcpu_handle_exit

We can retrieve them from the per-cpu data structure now.

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


Commit: 72bc631d4cbc3bd2d547f32b97c5e0dc0aaf573b
https://github.com/siemens/jailhouse/commit/72bc631d4cbc3bd2d547f32b97c5e0dc0aaf573b
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Remove guest registers parameter from vcpu_reset

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The necessary reference can be obtained
from the per-cpu data structure now.

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


Commit: 6c82e0d8ac896a4299945099b3ce98ca0894f9c8
https://github.com/siemens/jailhouse/commit/6c82e0d8ac896a4299945099b3ce98ca0894f9c8
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Remove guest registers parameter from vcpu_deactivate_vmm

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The necessary reference can be obtained
from the per-cpu data structure now.

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


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

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

Log Message:
-----------
x86: Remove guest registers parameter from vcpu_handle_hypercall

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The necessary reference can be obtained
from the per-cpu data structure now.

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


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

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

Log Message:
-----------
x86: Remove guest registers parameter from vcpu_handle_xsetbv

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The necessary reference can be obtained
from the per-cpu data structure now.

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


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

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

Log Message:
-----------
x86: Remove parameters from x2apic_handle_read/write

The function only works against the current CPU, thus should avoid to
take the misleading parameters. We can retrieve the per-cpu data
structure and the guest registers in the function now.

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


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

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

Log Message:
-----------
x86: Remove guest registers and cpu_data parameters from apic_mmio_access

The function only works on the current CPU, thus should avoid to take
misleading parameters. The necessary references can be obtained inline.

With the parameters no longer needed, the callers
svm/vmx_handle_apic_access can drop some of them as well.

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


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

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

Log Message:
-----------
x86: Remove guest registers parameter from i8042_access_handler

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The necessary reference can be obtained
from the per-cpu data structure now.

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


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

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

Log Message:
-----------
x86: Rework RAX register accessors of PCI layer

Stop requiring that the guest registers are passed down to the
accessors. Access handlers always work over the issuing CPU, thus can
obtain the register state themselves. Rename the accessors to make it
clear that they work against guest registers.

This allows to drop the guest_regs parameters from
data_port_in/out_handler.

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


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

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

Log Message:
-----------
x86: Remove guest registers and cell parameters from x86_pci_config_handler

The function only works against the current CPU, thus should avoid to
take the misleading parameters. Guest registers are no long er required,
and the cell reference can be obtained inline.

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


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

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

Log Message:
-----------
x86: Remove unused guest registers parameter from vcpu_handle_io_access

All filter functions obtain the reference themselves now.

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


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

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

Log Message:
-----------
x86: Remove guest registers parameter from vcpu_handle_mmio_access

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The necessary reference can be obtained
from the per-cpu data structure now.

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


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

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

Log Message:
-----------
x86: Remove guest registers parameter from vcpu_handle_msr_read/write

The function only works against the current CPU, thus should avoid to
take the misleading parameter. The necessary reference can be obtained
from the per-cpu data structure now.

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


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

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

Log Message:
-----------
x86: Remove parameters from vmx_handle_cr

Guest registers can be retrieved inline.

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


Commit: 359280bfc254ea50988509ccf4e3b33f33b0f734
https://github.com/siemens/jailhouse/commit/359280bfc254ea50988509ccf4e3b33f33b0f734
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Factor out vmx_handle_cpuid

Shortens vcpu_handle_exit and improves readability.

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


Commit: 78d542ab5deeb6923d3403acb62b90fb1110a0af
https://github.com/siemens/jailhouse/commit/78d542ab5deeb6923d3403acb62b90fb1110a0af
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Drop local guest_regs variable from VMX version of vcpu_handle_exit

No need to cache it. It can be derived from cpu_data now.

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


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

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

Log Message:
-----------
x86: Drop some unneeded local variables from SVM functions

No need to maintain cpu_data or even vmcb as local variable if they are
only used once.

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


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

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

Log Message:
-----------
x86: Remove traces of cpuid interception from SVM

There is no foreseeable need to intercept cpuid on AMD. On Intel, we
are not asked if we want to, so we have to execute it on behalf of the
cell.But here we can simple let it happen.

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


Commit: 87406539ed2412715ccc777888e61810ebb4bc81
https://github.com/siemens/jailhouse/commit/87406539ed2412715ccc777888e61810ebb4bc81
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Remove guest registers parameter from svm_handle_cr

We can retrieve them from the per-cpu data structure now.

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


Commit: 00c9354681a07e64e426661caf55d074581dbb2e
https://github.com/siemens/jailhouse/commit/00c9354681a07e64e426661caf55d074581dbb2e
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Cache vmcb instead of cpu_data in SVM's vcpu_vendor_get_execution_state

Easier to read.

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


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

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

Log Message:
-----------
x86: Rename x86_parse_mov_to_cr to svm_parse_mov_to_cr

This functions is SVM-specific.

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


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

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

Log Message:
-----------
x86: Pass vmcb instead of cpu_data to some internal SVM functions

update_efer, svm_parse_mov_to_cr and svm_handle_apic_access have no use
for cpu_data and rather convert it into a vmcb reference directly. So
pass that one instead to save some statements.

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


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

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

Log Message:
-----------
x86: Remove guest registers parameter from svm_handle_msr_write

We can retrieve them from the per-cpu data structure now.

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


Commit: 1687c46e2c826b52f48852d957e74cffe705c84b
https://github.com/siemens/jailhouse/commit/1687c46e2c826b52f48852d957e74cffe705c84b
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Drop local guest_regs variable from SVM version of vcpu_handle_exit

No need to cache it. It can be derived from cpu_data now.

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


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

Changed paths:
M hypervisor/arch/x86/asm-defines.c
M hypervisor/arch/x86/svm-vmexit.S

Log Message:
-----------
x86: Drop PERCPU_VMCB and VMCB_RAX

We can calculate PERCPU_VMCB_RAX directly and save the two intermediate
steps.

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


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

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

Log Message:
-----------
x86: Simplify set_svm_segment_from_segment

No need to complain: segment.access_rights is generic as it simply holds
bits 8..23 of the second descriptor dword. The additional invalid bit
used by VMX only can be ignored by SVM - and it is already, even when
leaving out the explicit test.

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


Commit: 59b3d9be4288f943edf5cd1f1963741726a437c8
https://github.com/siemens/jailhouse/commit/59b3d9be4288f943edf5cd1f1963741726a437c8
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Simplify set_svm_segment_from_dtr

By using set_svm_segment_from_segment for ldtr, we can remove the
condition from set_svm_segment_from_dtr.

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


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

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

Log Message:
-----------
x86: Simplify descriptor reset in svm_vcpu_reset

Reduce boilerplate code by using constants for common reset states.

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


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

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

Log Message:
-----------
x86: Drop constant return values from SVM functions

vmcb writing cannot fail on AMD, thus neither vmcb_setup nor
svm_set_cell_config can. Simply remove the error codes and related
handling.

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


Commit: 842b76a344d697adaa8c6a7620e6e7ad8f4dd482
https://github.com/siemens/jailhouse/commit/842b76a344d697adaa8c6a7620e6e7ad8f4dd482
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-07 (Tue, 07 Apr 2015)

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

Log Message:
-----------
x86: Simplify error exit of svm_parse_mov_to_cr and svm_handle_cr

No need to maintain a return code variable when we can simply return
false directly.

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


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

Changed paths:
M hypervisor/arch/x86/include/asm/svm.h
M hypervisor/arch/x86/svm-vmexit.S
M hypervisor/arch/x86/svm.c

Log Message:
-----------
x86: Refactor SVM version of vcpu_activate_vmm

We can reduce the assembly required in vcpu_activate_vmm by reordering
svm_vmexit to svm_vmentry, i.e. pulling the VM entry logic to the front.
Moreover, RAX can be loaded directly. There is furthermore no need to
declare clobbered variables as we won't return from the assembly block,
which is already declared via __builtin_unreachable.

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


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

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

Log Message:
-----------
x86: Remove unneeded MSR restoring from SVM's vcpu_deactivate_vmm

None of these MSRs is modified by Jailhouse after VM exit, thus they
still contain the state the Linux guest left behind.

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


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

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

Log Message:
-----------
x86: Make SYSENTER MSR restoration VMX-specific

SVM does not overwrite these MSRs on VM exit, thus does not require the
restoration done in arch_cpu_restore so far. Make them VMX-specific so
that we can drop a few lines of code.

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


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

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

Log Message:
-----------
x86: Remove write-only linux_sysenter_* fields

The vendor code reads the state directly from the MSRs during setup.

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


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

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

Log Message:
-----------
x86: Make FS_BASE MSR restoration VMX-specific

SVM does not touch this MSR on VM exit, thus does not require the
restoration done in arch_cpu_restore so far. Make it VMX-specific so
that we can drop a few lines of code.

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


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

Changed paths:
M hypervisor/arch/x86/svm-vmexit.S
M hypervisor/arch/x86/svm.c

Log Message:
-----------
x86: Do not call vmload/vmsave on every VM exit

Benchmarks indicate that we can gain about 160 cycles per VM exit &
reentry by only saving/restoring MSR_GS_BASE. We don't touch the other
states that vmload/vmsave deals with.

We still need to perform vmload on handover (actually, we only need to
load MSR_GS_BASE, but vmload is simpler) and after VCPU reset. And as we
no longer save the full state, also for shutdown, we need to pull the
missing information for arch_cpu_restore directly from the registers.


Compare: https://github.com/siemens/jailhouse/compare/18ced1bf1631...dbf2fe479ac0

GitHub

unread,
Apr 12, 2015, 1:22:31 AM4/12/15
to jailho...@googlegroups.com
Branch: refs/heads/master
Commit: 5fbd3e16cedd321d6183b1efb8b3ad045461bcc8
https://github.com/siemens/jailhouse/commit/5fbd3e16cedd321d6183b1efb8b3ad045461bcc8
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Stop printing PCI address port in vcpu_handle_io_access

This information is provided by x86_pci_config_handler since b1be672359.

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


Commit: a9cf03589778b2f0ccf634e3faf6462efe5b133e
https://github.com/siemens/jailhouse/commit/a9cf03589778b2f0ccf634e3faf6462efe5b133e
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Adjust output of SVM's dump_guest_regs

Aligns us with VMX.

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


Commit: 25226b50279cb6a99c67a8a2813488dbcbef51bb
https://github.com/siemens/jailhouse/commit/25226b50279cb6a99c67a8a2813488dbcbef51bb
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Prevent interference by Intel perf counters

Make it simple but safe: Disable perf counters during setup and prevent
that cells can modify the corresponding MSR. This avoids that we have
to switch the MSR during vmentry/exit, but it also blocks perf & friends
while Jailhouse is active.

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


Commit: e0623d3134b80e93a8f18e13a32754b51c6a4cb5
https://github.com/siemens/jailhouse/commit/e0623d3134b80e93a8f18e13a32754b51c6a4cb5
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Improve readability of VMX constants

Convert from magic number to shifted value to improve readability.

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


Commit: 355118aac51e4f39338049a349debc0dfa44f5af
https://github.com/siemens/jailhouse/commit/355118aac51e4f39338049a349debc0dfa44f5af
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Validate EFER save/restore feature on Intel

This feature practically comes with unrestricted guest mode, but the
spec does not guarantee this.

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


Commit: f4cdab01af711f5628bf5f8d734d72255f70a263
https://github.com/siemens/jailhouse/commit/f4cdab01af711f5628bf5f8d734d72255f70a263
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Switch between host and guest PAT

Do not allow the guest to mess with the PAT MSR in a was that also
affects the host. This may cause the host to run in uncached mode,
slowing it down, or - even worse- access MMIO with caches enabled which
will cause inconsistencies.

On Intel, we have to require and enable the related save/restore
feature. On AMD, we need to intercept the MSR accesses and map them on
the g_pat field of the VMCB.

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


Commit: 176c4db2176c863ab47e7e23b99070f002e26e41
https://github.com/siemens/jailhouse/commit/176c4db2176c863ab47e7e23b99070f002e26e41
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Refactor svm_handle_msr_read/write

Convert to switch-case and simplify the exit path of the write handler.

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


Commit: dac2a01ed68c3180306ed952c95d02dd10899e56
https://github.com/siemens/jailhouse/commit/dac2a01ed68c3180306ed952c95d02dd10899e56
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Factor out vcpu_handle_msr_read/write

This will simplify the emulation of MTRR_DEF_TYPE. It already allows to
consolidate filtering for x2APIC MSRs and error reporting.

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


Commit: 30927c3a2bfeb04171361b9ba761e6ae01e33872
https://github.com/siemens/jailhouse/commit/30927c3a2bfeb04171361b9ba761e6ae01e33872
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Factor out set_rdmsr_value and get_wrmsr_value

This improves readability of the code and scales better with more MSRs
being intercepted.

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


Commit: 6dcdf86a1fb228cbdf37d2ac7ae45e3ad4231160
https://github.com/siemens/jailhouse/commit/6dcdf86a1fb228cbdf37d2ac7ae45e3ad4231160
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Introduce vcpu_reset

So far this just encapsulates the general purpose register reset, but
more will follow.

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


Commit: dd6a4d8d185e5b45dc94d0fbf4c233e6b1dc9f50
https://github.com/siemens/jailhouse/commit/dd6a4d8d185e5b45dc94d0fbf4c233e6b1dc9f50
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 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/vcpu.c
M hypervisor/arch/x86/vmx.c

Log Message:
-----------
x86: Maintain PAT shadow

For emulating the MTRR-disabled state, we will have to modify the
effective guest PAT state soon. This prepares for it by keeping PAT in
a shadow per-cpu field and intercept access to the MSR.

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


Commit: fe8fac80d74cd592f9ad3a99be521dc8b7771d80
https://github.com/siemens/jailhouse/commit/fe8fac80d74cd592f9ad3a99be521dc8b7771d80
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Emulate MTRR enable/disable

We assume that cells will only flip the enabled flag of
IA32_MTRR_DEF_TYPE, leaving the rest of the register in default state
(the one found during handover). SVM already implemented this but
emulated the disabled state by modifying the host PAT.

This approach works less invasively by only changing the effective guest
PAT to 0 in case MTRRs are off. And it provides this for Intel as well.

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


Commit: e8c40f62906b5b2f1ff1cc2f2c0ec8a0790a0ca3
https://github.com/siemens/jailhouse/commit/e8c40f62906b5b2f1ff1cc2f2c0ec8a0790a0ca3
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Block write access to MTRR registers

Linux does not try to rewrite them on CPU hotplug if they are identical
to other CPUs' registers, and our non-root cells have no business in
touching them as well. This effectively freezes MTRRs after handover
ensures consistent states for both the hypervisor and all cells across
all CPUs.

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


Commit: 12414a41a75baf0f66a78a908a89bbcdc249657c
https://github.com/siemens/jailhouse/commit/12414a41a75baf0f66a78a908a89bbcdc249657c
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 Apr 2015)

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

Log Message:
-----------
x86: Remove local cpu_data variable from vcpu_handle_io_access

Only used once.

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


Compare: https://github.com/siemens/jailhouse/compare/8918cd931be7...12414a41a75b
Reply all
Reply to author
Forward
0 new messages