summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorJessica Clarke2020-11-16 21:04:14 +0100
committerPaolo Bonzini2020-11-18 09:32:17 +0100
commitc6a89b45bd625c6ea745cba550cffd8220602ce7 (patch)
tree01075e8c3f9734582a61fe69f76f238fcb92e8fd /target
parenthvf: Gate RDTSCP on CPU_BASED2_RDTSCP, not just CPU_BASED_TSC_OFFSET (diff)
downloadqemu-c6a89b45bd625c6ea745cba550cffd8220602ce7.tar.gz
qemu-c6a89b45bd625c6ea745cba550cffd8220602ce7.tar.xz
qemu-c6a89b45bd625c6ea745cba550cffd8220602ce7.zip
hvf: Fix segment selector format
The Requested Privilege Level field is 2 bits, the Table Indicator field is 1 bit and the Index field is the remaining 15 bits, with TI=0 meaning GDT and TI=1 meaning LDT. Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Message-Id: <20201116200414.28286-1-jrtc27@jrtc27.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/i386/hvf/x86.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/i386/hvf/x86.h b/target/i386/hvf/x86.h
index 9e2c0039e6..782664c2ea 100644
--- a/target/i386/hvf/x86.h
+++ b/target/i386/hvf/x86.h
@@ -214,16 +214,16 @@ static inline uint32_t x86_call_gate_offset(x86_call_gate *gate)
return (uint32_t)((gate->offset1 << 16) | gate->offset0);
}
-#define LDT_SEL 0
-#define GDT_SEL 1
+#define GDT_SEL 0
+#define LDT_SEL 1
typedef struct x68_segment_selector {
union {
uint16_t sel;
struct {
- uint16_t rpl:3;
+ uint16_t rpl:2;
uint16_t ti:1;
- uint16_t index:12;
+ uint16_t index:13;
};
};
} __attribute__ ((__packed__)) x68_segment_selector;