File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,13 @@ cpu_primary_save_32:
32
32
/* Clear Limit field, bit 8-11 */
33
33
andl $0x0000f0ff , %ecx
34
34
mov %ecx , BOOT_CTX_CS_AR_OFFSET(%eax )
35
+
36
+ /* Save CS limit field */
37
+ mov %cs , %cx
38
+ xor %edx , %edx
39
+ lsl %ecx , %edx
40
+ mov %edx , BOOT_CTX_CS_LIMIT_OFFSET(%eax )
41
+
35
42
mov %es , BOOT_CTX_ES_SEL_OFFSET(%eax )
36
43
mov %ss , BOOT_CTX_SS_SEL_OFFSET(%eax )
37
44
mov %ds , BOOT_CTX_DS_SEL_OFFSET(%eax )
@@ -62,6 +69,13 @@ cpu_primary_save_64:
62
69
/* Clear Limit field, bit 8-11 */
63
70
andl $0x0000f0ff , %ecx
64
71
mov %ecx , BOOT_CTX_CS_AR_OFFSET(%r8 )
72
+
73
+ /* Save CS limit field */
74
+ mov %cs , %cx
75
+ xor %edx , %edx
76
+ lsl %ecx , %edx
77
+ mov %edx , BOOT_CTX_CS_LIMIT_OFFSET(%r8 )
78
+
65
79
mov %es , BOOT_CTX_ES_SEL_OFFSET(%r8 )
66
80
mov %ss , BOOT_CTX_SS_SEL_OFFSET(%r8 )
67
81
mov %ds , BOOT_CTX_DS_SEL_OFFSET(%r8 )
Original file line number Diff line number Diff line change 22
22
#define BOOT_CTX_FS_SEL_OFFSET 276
23
23
#define BOOT_CTX_GS_SEL_OFFSET 278
24
24
#define BOOT_CTX_CS_AR_OFFSET 248
25
+ #define BOOT_CTX_CS_LIMIT_OFFSET 252
25
26
#define BOOT_CTX_EFER_LOW_OFFSET 200
26
27
#define BOOT_CTX_EFER_HIGH_OFFSET 204
27
28
#define SIZE_OF_BOOT_CTX 296
40
41
#define BOOT_CTX_FS_SEL_OFFSET 276U
41
42
#define BOOT_CTX_GS_SEL_OFFSET 278U
42
43
#define BOOT_CTX_CS_AR_OFFSET 248U
44
+ #define BOOT_CTX_CS_LIMIT_OFFSET 252U
43
45
#define BOOT_CTX_EFER_LOW_OFFSET 200U
44
46
#define BOOT_CTX_EFER_HIGH_OFFSET 204U
45
47
#define SIZE_OF_BOOT_CTX 296U
Original file line number Diff line number Diff line change @@ -295,7 +295,8 @@ struct acrn_vcpu_regs {
295
295
uint64_t reserved_64 [4 ];
296
296
297
297
uint32_t cs_ar ;
298
- uint32_t reserved_32 [4 ];
298
+ uint32_t cs_limit ;
299
+ uint32_t reserved_32 [3 ];
299
300
300
301
/* don't change the order of following sel */
301
302
uint16_t cs_sel ;
You can’t perform that action at this time.
0 commit comments