Skip to content

Commit 10eb8b8

Browse files
mdouchapevik
authored andcommitted
kvm_read_sregs(): Read the TR segment register
Link: https://lore.kernel.org/ltp/[email protected]/ Acked-by: Petr Vorel <[email protected]> Signed-off-by: Martin Doucha <[email protected]>
1 parent a437718 commit 10eb8b8

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

testcases/kernel/kvm/bootstrap_x86.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ kvm_read_sregs:
215215
movw %ax, 8(%edi)
216216
mov %ss, %ax
217217
movw %ax, 10(%edi)
218+
str %ax
219+
movw %ax, 12(%edi)
218220
pop %edi
219221
ret
220222

testcases/kernel/kvm/bootstrap_x86_64.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ kvm_read_sregs:
319319
movw %ax, 8(%rdi)
320320
mov %ss, %ax
321321
movw %ax, 10(%rdi)
322+
str %ax
323+
movw %ax, 12(%rdi)
322324
retq
323325

324326
handle_interrupt:

testcases/kernel/kvm/include/kvm_x86.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ struct kvm_cregs {
178178
};
179179

180180
struct kvm_sregs {
181-
uint16_t cs, ds, es, fs, gs, ss;
181+
uint16_t cs, ds, es, fs, gs, ss, tr;
182182
};
183183

184184
struct kvm_regs64 {

0 commit comments

Comments
 (0)