aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/kvm_emulate.h
diff options
context:
space:
mode:
authorGravatar Paolo Bonzini <pbonzini@redhat.com> 2021-02-03 03:42:41 -0500
committerGravatar Paolo Bonzini <pbonzini@redhat.com> 2021-02-09 08:17:07 -0500
commit29d6ca41992a771e2441424099695c329d735c28 (patch)
tree98244b59d7d142dcfde4e11a45470e8c9eb216b5 /arch/x86/kvm/kvm_emulate.h
parentKVM: SVM: Remove an unnecessary forward declaration (diff)
downloadlinux-29d6ca41992a771e2441424099695c329d735c28.tar.gz
linux-29d6ca41992a771e2441424099695c329d735c28.tar.bz2
linux-29d6ca41992a771e2441424099695c329d735c28.zip
KVM: x86: reading DR cannot fail
kvm_get_dr and emulator_get_dr except an in-range value for the register number so they cannot fail. Change the return type to void. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/kvm_emulate.h')
-rw-r--r--arch/x86/kvm/kvm_emulate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/kvm_emulate.h b/arch/x86/kvm/kvm_emulate.h
index 43c93ffa76ed..0d359115429a 100644
--- a/arch/x86/kvm/kvm_emulate.h
+++ b/arch/x86/kvm/kvm_emulate.h
@@ -205,7 +205,7 @@ struct x86_emulate_ops {
ulong (*get_cr)(struct x86_emulate_ctxt *ctxt, int cr);
int (*set_cr)(struct x86_emulate_ctxt *ctxt, int cr, ulong val);
int (*cpl)(struct x86_emulate_ctxt *ctxt);
- int (*get_dr)(struct x86_emulate_ctxt *ctxt, int dr, ulong *dest);
+ void (*get_dr)(struct x86_emulate_ctxt *ctxt, int dr, ulong *dest);
int (*set_dr)(struct x86_emulate_ctxt *ctxt, int dr, ulong value);
u64 (*get_smbase)(struct x86_emulate_ctxt *ctxt);
void (*set_smbase)(struct x86_emulate_ctxt *ctxt, u64 smbase);