summaryrefslogtreecommitdiffstats
path: root/target/i386/hvf/x86_descr.c
diff options
context:
space:
mode:
authorPaolo Bonzini2017-10-03 13:59:15 +0200
committerPaolo Bonzini2017-12-22 15:02:07 +0100
commit6701d81d74b3fbc7afd73a18d1c82602a811e409 (patch)
tree2fdc41380746ba3b4228ed95f15644c35248d5d3 /target/i386/hvf/x86_descr.c
parenti386: hvf: header cleanup (diff)
downloadqemu-6701d81d74b3fbc7afd73a18d1c82602a811e409.tar.gz
qemu-6701d81d74b3fbc7afd73a18d1c82602a811e409.tar.xz
qemu-6701d81d74b3fbc7afd73a18d1c82602a811e409.zip
i386: hvf: unify register enums between HVF and the rest
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/hvf/x86_descr.c')
-rw-r--r--target/i386/hvf/x86_descr.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/target/i386/hvf/x86_descr.c b/target/i386/hvf/x86_descr.c
index b4a7cdd2a7..8c05c34f33 100644
--- a/target/i386/hvf/x86_descr.c
+++ b/target/i386/hvf/x86_descr.c
@@ -22,12 +22,12 @@
#include "vmx.h"
#include "x86_descr.h"
-#define VMX_SEGMENT_FIELD(seg) \
- [REG_SEG_##seg] = { \
- .selector = VMCS_GUEST_##seg##_SELECTOR, \
- .base = VMCS_GUEST_##seg##_BASE, \
- .limit = VMCS_GUEST_##seg##_LIMIT, \
- .ar_bytes = VMCS_GUEST_##seg##_ACCESS_RIGHTS, \
+#define VMX_SEGMENT_FIELD(seg) \
+ [R_##seg] = { \
+ .selector = VMCS_GUEST_##seg##_SELECTOR, \
+ .base = VMCS_GUEST_##seg##_BASE, \
+ .limit = VMCS_GUEST_##seg##_LIMIT, \
+ .ar_bytes = VMCS_GUEST_##seg##_ACCESS_RIGHTS, \
}
static const struct vmx_segment_field {
@@ -46,34 +46,34 @@ static const struct vmx_segment_field {
VMX_SEGMENT_FIELD(TR),
};
-uint32_t vmx_read_segment_limit(CPUState *cpu, x86_reg_segment seg)
+uint32_t vmx_read_segment_limit(CPUState *cpu, X86Seg seg)
{
return (uint32_t)rvmcs(cpu->hvf_fd, vmx_segment_fields[seg].limit);
}
-uint32_t vmx_read_segment_ar(CPUState *cpu, x86_reg_segment seg)
+uint32_t vmx_read_segment_ar(CPUState *cpu, X86Seg seg)
{
return (uint32_t)rvmcs(cpu->hvf_fd, vmx_segment_fields[seg].ar_bytes);
}
-uint64_t vmx_read_segment_base(CPUState *cpu, x86_reg_segment seg)
+uint64_t vmx_read_segment_base(CPUState *cpu, X86Seg seg)
{
return rvmcs(cpu->hvf_fd, vmx_segment_fields[seg].base);
}
-x68_segment_selector vmx_read_segment_selector(CPUState *cpu, x86_reg_segment seg)
+x68_segment_selector vmx_read_segment_selector(CPUState *cpu, X86Seg seg)
{
x68_segment_selector sel;
sel.sel = rvmcs(cpu->hvf_fd, vmx_segment_fields[seg].selector);
return sel;
}
-void vmx_write_segment_selector(struct CPUState *cpu, x68_segment_selector selector, x86_reg_segment seg)
+void vmx_write_segment_selector(struct CPUState *cpu, x68_segment_selector selector, X86Seg seg)
{
wvmcs(cpu->hvf_fd, vmx_segment_fields[seg].selector, selector.sel);
}
-void vmx_read_segment_descriptor(struct CPUState *cpu, struct vmx_segment *desc, x86_reg_segment seg)
+void vmx_read_segment_descriptor(struct CPUState *cpu, struct vmx_segment *desc, X86Seg seg)
{
desc->sel = rvmcs(cpu->hvf_fd, vmx_segment_fields[seg].selector);
desc->base = rvmcs(cpu->hvf_fd, vmx_segment_fields[seg].base);
@@ -81,7 +81,7 @@ void vmx_read_segment_descriptor(struct CPUState *cpu, struct vmx_segment *desc,
desc->ar = rvmcs(cpu->hvf_fd, vmx_segment_fields[seg].ar_bytes);
}
-void vmx_write_segment_descriptor(CPUState *cpu, struct vmx_segment *desc, x86_reg_segment seg)
+void vmx_write_segment_descriptor(CPUState *cpu, struct vmx_segment *desc, X86Seg seg)
{
const struct vmx_segment_field *sf = &vmx_segment_fields[seg];