diff options
author | Krish Sadhukhan <krish.sadhukhan@oracle.com> | 2020-05-22 18:19:51 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-07-08 16:21:40 -0400 |
commit | f5f6145e41d39c7fd04a17c3b2596c7abe933f10 (patch) | |
tree | ac25f39c23941c1d7697bf18cf0a16a186f9c3f0 /arch/x86/kvm/x86.c | |
parent | 12bc2132b15e0a969b3f455d90a5f215ef239eff (diff) | |
download | lwn-f5f6145e41d39c7fd04a17c3b2596c7abe933f10.tar.gz lwn-f5f6145e41d39c7fd04a17c3b2596c7abe933f10.zip |
KVM: x86: Move the check for upper 32 reserved bits of DR6 to separate function
Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Message-Id: <20200522221954.32131-2-krish.sadhukhan@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ec9aba133c1c..82f457f0e7e0 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1133,7 +1133,7 @@ static int __kvm_set_dr(struct kvm_vcpu *vcpu, int dr, unsigned long val) case 4: /* fall through */ case 6: - if (val & 0xffffffff00000000ULL) + if (!kvm_dr6_valid(val)) return -1; /* #GP */ vcpu->arch.dr6 = (val & DR6_VOLATILE) | kvm_dr6_fixed(vcpu); break; |