x86/vmx: Update DR7 type

Use the new vmread() accessor and shrink dr7 to it's preferred size.

No functional change.

Signed-off-by: Denis Mukhin <dmukhin@ford.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Denis Mukhin authored and Andrew Cooper committed 2025-04-28 21:01:24 +01:00
1 parent 881e5993df
commit 48c9e67594
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -926,7 +926,7 @@ static void vmx_save_dr(struct vcpu *v)
v->arch.dr[3] = read_debugreg(3);
v->arch.dr6 = read_debugreg(6);
/* DR7 must be saved as it is used by vmx_restore_dr(). */
__vmread(GUEST_DR7, &v->arch.dr7);
v->arch.dr7 = vmread(GUEST_DR7);
}
static void __restore_debug_registers(struct vcpu *v)
+1 -1
View File
@@ -595,8 +595,8 @@ struct arch_vcpu
/* Debug registers. */
unsigned long dr[4];
unsigned long dr7; /* Ideally int, but __vmread() needs long. */
unsigned int dr6;
unsigned int dr7;
/* other state */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.