summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2026-09-30 12:36:25 -0700
committerSean Christopherson <seanjc@google.com>2026-09-30 14:22:23 -0700
commit28bb033664eef3c18c6acb2c075fc01d7ada9296 (patch)
tree3a278845779163003cafc7beadaa239e6d0dc54c /arch/x86
parentcc551e8d4f77c278fd0bb0ed45d1103cb5a90889 (diff)
downloadlinux-next-28bb033664eef3c18c6acb2c075fc01d7ada9296.tar.gz
linux-next-28bb033664eef3c18c6acb2c075fc01d7ada9296.zip
KVM: Return an "unsigned long", not "u64" for the fixed-1 DR6 bits
Return an "unsigned long" instead of a "u64" from the helper to get the fixed-1 DR6 bits, as debug registers are natural width registers, not 64-bit registers. No functional change intended (the fixed-1 bits only set bits in 31:0, and the sole caller truncates the value to an "unsigned long"). Link: https://patch.msgid.link/20260930193634.3415089-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/regs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kvm/regs.c b/arch/x86/kvm/regs.c
index 62075443f6b9..f74a29621661 100644
--- a/arch/x86/kvm/regs.c
+++ b/arch/x86/kvm/regs.c
@@ -772,15 +772,16 @@ void kvm_update_dr7(struct kvm_vcpu *vcpu)
}
EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_update_dr7);
-static u64 kvm_get_dr6_fixed_1(struct kvm_vcpu *vcpu)
+static unsigned long kvm_get_dr6_fixed_1(struct kvm_vcpu *vcpu)
{
- u64 fixed = DR6_FIXED_1;
+ unsigned long fixed = DR6_FIXED_1;
if (!guest_cpu_cap_has(vcpu, X86_FEATURE_RTM))
fixed |= DR6_RTM;
if (!guest_cpu_cap_has(vcpu, X86_FEATURE_BUS_LOCK_DETECT))
fixed |= DR6_BUS_LOCK;
+
return fixed;
}