[LTP] [PATCH 01/10] kvm_read_sregs(): Read the TR segment register
Martin Doucha
mdoucha@suse.cz
Tue Jan 21 17:44:15 CET 2025
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
testcases/kernel/kvm/bootstrap_x86.S | 2 ++
testcases/kernel/kvm/bootstrap_x86_64.S | 2 ++
testcases/kernel/kvm/include/kvm_x86.h | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/kvm/bootstrap_x86.S b/testcases/kernel/kvm/bootstrap_x86.S
index a39c6bea7..79d2218d3 100644
--- a/testcases/kernel/kvm/bootstrap_x86.S
+++ b/testcases/kernel/kvm/bootstrap_x86.S
@@ -215,6 +215,8 @@ kvm_read_sregs:
movw %ax, 8(%edi)
mov %ss, %ax
movw %ax, 10(%edi)
+ str %ax
+ movw %ax, 12(%edi)
pop %edi
ret
diff --git a/testcases/kernel/kvm/bootstrap_x86_64.S b/testcases/kernel/kvm/bootstrap_x86_64.S
index b02dd4d92..32170f7c9 100644
--- a/testcases/kernel/kvm/bootstrap_x86_64.S
+++ b/testcases/kernel/kvm/bootstrap_x86_64.S
@@ -319,6 +319,8 @@ kvm_read_sregs:
movw %ax, 8(%rdi)
mov %ss, %ax
movw %ax, 10(%rdi)
+ str %ax
+ movw %ax, 12(%rdi)
retq
handle_interrupt:
diff --git a/testcases/kernel/kvm/include/kvm_x86.h b/testcases/kernel/kvm/include/kvm_x86.h
index 08d3f6759..f99fedbca 100644
--- a/testcases/kernel/kvm/include/kvm_x86.h
+++ b/testcases/kernel/kvm/include/kvm_x86.h
@@ -178,7 +178,7 @@ struct kvm_cregs {
};
struct kvm_sregs {
- uint16_t cs, ds, es, fs, gs, ss;
+ uint16_t cs, ds, es, fs, gs, ss, tr;
};
struct kvm_regs64 {
--
2.47.0
More information about the ltp
mailing list