KVM: x86: move guest_pv_has out of user_access section
From: Paolo Bonzini <pbonzini@redhat.com> commit 3e067fd8 upstream. When UBSAN is enabled, the code emitted for the call to guest_pv_has includes a call to __ubsan_handle_load_invalid_value. objtool complains that this call happens with UACCESS enabled; to avoid the warning, pull the calls to user_access_begin into both arms of the "if" statement, after the check for guest_pv_has. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Rishabh Bhatnagar <risbhat@amazon.com> Tested-by: Allen Pais <apais@linux.microsoft.com> Acked-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
85cfbaa5
Please register or sign in to comment