mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
struct cpu_user_regs is currently used as both internal state
(specifically at the base of the stack) and a guest/toolstack
visible API (via struct vcpu_guest_context used by
XEN_DOMCTL_{g,s}etvcpucontext and VCPUOP_initialise).
This causes problems when we want to make the API 64-bit clean since
we don't really want to change the size of the on-stack struct.
So split into vcpu_guest_core_regs which is the API facing struct
and keep cpu_user_regs purely internal, translate between the two.
In the user API arrange for both 64- and 32-bit registers to be
included in a layout which does not differ depending on toolstack
architecture. Also switch to using the more formal banked register
names (e.g. with the _usr suffix) for clarity.
This is an ABI change. Note that the kernel doesn't currently use
this data structure so it affects the tools interface only.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
59 lines
1.4 KiB
Python
59 lines
1.4 KiB
Python
# configuration: what needs translation
|
|
|
|
unions = [ "vcpu_cr_regs",
|
|
"vcpu_ar_regs" ];
|
|
|
|
structs = [ "start_info",
|
|
"trap_info",
|
|
"cpu_user_regs",
|
|
"vcpu_guest_core_regs",
|
|
"vcpu_guest_context",
|
|
"arch_vcpu_info",
|
|
"vcpu_time_info",
|
|
"vcpu_info",
|
|
"arch_shared_info",
|
|
"shared_info" ];
|
|
|
|
defines = [ "__arm__",
|
|
"__aarch64__",
|
|
"__i386__",
|
|
"__x86_64__",
|
|
|
|
# arm
|
|
# None
|
|
|
|
# x86_{32,64}
|
|
"FLAT_RING1_CS",
|
|
"FLAT_RING1_DS",
|
|
"FLAT_RING1_SS",
|
|
|
|
"FLAT_RING3_CS64",
|
|
"FLAT_RING3_DS64",
|
|
"FLAT_RING3_SS64",
|
|
"FLAT_KERNEL_CS64",
|
|
"FLAT_KERNEL_DS64",
|
|
"FLAT_KERNEL_SS64",
|
|
|
|
"FLAT_KERNEL_CS",
|
|
"FLAT_KERNEL_DS",
|
|
"FLAT_KERNEL_SS",
|
|
|
|
# x86_{32,64}
|
|
"_VGCF_i387_valid",
|
|
"VGCF_i387_valid",
|
|
"_VGCF_in_kernel",
|
|
"VGCF_in_kernel",
|
|
"_VGCF_failsafe_disables_events",
|
|
"VGCF_failsafe_disables_events",
|
|
"_VGCF_syscall_disables_events",
|
|
"VGCF_syscall_disables_events",
|
|
"_VGCF_online",
|
|
"VGCF_online",
|
|
|
|
# all archs
|
|
"xen_pfn_to_cr3",
|
|
"xen_cr3_to_pfn",
|
|
"XEN_LEGACY_MAX_VCPUS",
|
|
"MAX_GUEST_CMDLINE" ];
|
|
|