[siemens/jailhouse] 363318: x86: Remove local cpu_data variable from vcpu_hand...

1 view
Skip to first unread message

GitHub

unread,
Apr 15, 2015, 1:14:06 AM4/15/15
to jailho...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/siemens/jailhouse
Commit: 3633188f6d924d3c43965a71ac6d4a58493cb5d4
https://github.com/siemens/jailhouse/commit/3633188f6d924d3c43965a71ac6d4a58493cb5d4
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_hypercall

Only used once.

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


Commit: 28f936a66cdabf238647f70eea79f4b5e83641d6
https://github.com/siemens/jailhouse/commit/28f936a66cdabf238647f70eea79f4b5e83641d6
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: ca1a5c21dcac6e5cdef2ce702c43c128b83d36ce
https://github.com/siemens/jailhouse/commit/ca1a5c21dcac6e5cdef2ce702c43c128b83d36ce
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: a631fea5db1991dbebd35783e7cf75020f3e763c
https://github.com/siemens/jailhouse/commit/a631fea5db1991dbebd35783e7cf75020f3e763c
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: ba7e3c32371d2408c584a4554a06af6b9490fa21
https://github.com/siemens/jailhouse/commit/ba7e3c32371d2408c584a4554a06af6b9490fa21
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: 5035f578da65ef7f3eb5aa73f75fd52d1ea2b473
https://github.com/siemens/jailhouse/commit/5035f578da65ef7f3eb5aa73f75fd52d1ea2b473
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: 35af38ebdfefd31e43e3b8644bc10b16b990e452
https://github.com/siemens/jailhouse/commit/35af38ebdfefd31e43e3b8644bc10b16b990e452
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: 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: f67a94e567cb274a98895459c9242cc224606040
https://github.com/siemens/jailhouse/commit/f67a94e567cb274a98895459c9242cc224606040
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: 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: cdb7417b71e03f876ef4ec0b782d0ce55766d59e
https://github.com/siemens/jailhouse/commit/cdb7417b71e03f876ef4ec0b782d0ce55766d59e
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: 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: 77f7ca835b53b2f4088e41279123c706bbfcc0ef
https://github.com/siemens/jailhouse/commit/77f7ca835b53b2f4088e41279123c706bbfcc0ef
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: 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: e9e346780e98c49f0a799abdc3463be4e726ab34
https://github.com/siemens/jailhouse/commit/e9e346780e98c49f0a799abdc3463be4e726ab34
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: 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: 698dcf0a5f559f00dcf6587f170ecda7ee3dc218
https://github.com/siemens/jailhouse/commit/698dcf0a5f559f00dcf6587f170ecda7ee3dc218
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_xsetbv

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

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


Commit: 37b9874733fe5bd8422f8eef3ca1674f199f7da1
https://github.com/siemens/jailhouse/commit/37b9874733fe5bd8422f8eef3ca1674f199f7da1
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: 4ef415deb2c94711ab56f277179c1cfad60ec8d9
https://github.com/siemens/jailhouse/commit/4ef415deb2c94711ab56f277179c1cfad60ec8d9
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: e6b0322e3037f5e4c7e8a4bf24d6e3d1965b15c5
https://github.com/siemens/jailhouse/commit/e6b0322e3037f5e4c7e8a4bf24d6e3d1965b15c5
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

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: f23b2df3feb047acd45133e10881bd4044ebcfd6
https://github.com/siemens/jailhouse/commit/f23b2df3feb047acd45133e10881bd4044ebcfd6
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-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: 4b7e0bef9ddb4585c242469c51010d1cc1a96105
https://github.com/siemens/jailhouse/commit/4b7e0bef9ddb4585c242469c51010d1cc1a96105
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: 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: 963d1b2ffc889cff255931d8581f67b439104917
https://github.com/siemens/jailhouse/commit/963d1b2ffc889cff255931d8581f67b439104917
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: 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: 0b82e37052971d00fcdb4e39cc8bc7a40f727c8b
https://github.com/siemens/jailhouse/commit/0b82e37052971d00fcdb4e39cc8bc7a40f727c8b
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: 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: 5233c243dbd19ceb059fbd6ef311bd06b7bac009
https://github.com/siemens/jailhouse/commit/5233c243dbd19ceb059fbd6ef311bd06b7bac009
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: 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: bb784c93249386d40971ec0da1bac0c28fb05677
https://github.com/siemens/jailhouse/commit/bb784c93249386d40971ec0da1bac0c28fb05677
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: 015f5e58d9960c26b013cb6db37aa22cf5a3e79b
https://github.com/siemens/jailhouse/commit/015f5e58d9960c26b013cb6db37aa22cf5a3e79b
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: f691199ac38f1706ce108fd6b5548a882cbcf8bc
https://github.com/siemens/jailhouse/commit/f691199ac38f1706ce108fd6b5548a882cbcf8bc
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: 816b34becc0a8c08965d623e16e7ef88539f2e6d
https://github.com/siemens/jailhouse/commit/816b34becc0a8c08965d623e16e7ef88539f2e6d
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: 13e6affd7cf63411c1e6ae0cf3f16d94ab81fba4
https://github.com/siemens/jailhouse/commit/13e6affd7cf63411c1e6ae0cf3f16d94ab81fba4
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2015-04-10 (Fri, 10 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: 42bcdde82ca5b17d2194b7edd16b7391c4481b8c
https://github.com/siemens/jailhouse/commit/42bcdde82ca5b17d2194b7edd16b7391c4481b8c
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: 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: 5c9a283ab7f5a0bbe5702dbb0f2827f6bf94fdbf
https://github.com/siemens/jailhouse/commit/5c9a283ab7f5a0bbe5702dbb0f2827f6bf94fdbf
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: 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: c51ad30ee60768343a02c97c8e4d2cde62d87a8c
https://github.com/siemens/jailhouse/commit/c51ad30ee60768343a02c97c8e4d2cde62d87a8c
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: 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: 511fcdb207a9bbb2f2229b7f4a75b5ae0a333a5d
https://github.com/siemens/jailhouse/commit/511fcdb207a9bbb2f2229b7f4a75b5ae0a333a5d
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: Remove parameters from vmx_handle_cr

Guest registers can be retrieved inline.

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


Commit: f5132aa90500b2b0913894264e96ca7bb73c1a1f
https://github.com/siemens/jailhouse/commit/f5132aa90500b2b0913894264e96ca7bb73c1a1f
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: Factor out vmx_handle_cpuid

Shortens vcpu_handle_exit and improves readability.

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


Commit: af2dc04444602ec8519d1e9a076b7c58c4b71fa8
https://github.com/siemens/jailhouse/commit/af2dc04444602ec8519d1e9a076b7c58c4b71fa8
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: 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>


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