diff mbox series

[v3,2/2] KVM: VMX: Print VM-instruction error as unsigned

Message ID 20220510224035.1792952-2-jmattson@google.com (mailing list archive)
State New, archived
Headers show
Series [v3,1/2] KVM: VMX: Print VM-instruction error when it may be helpful | expand

Commit Message

Jim Mattson May 10, 2022, 10:40 p.m. UTC
Change the printf format character from 'd' to 'u' for the
VM-instruction error in vmwrite_error().

Fixes: 6aa8b732ca01 ("[PATCH] kvm: userspace interface")
Reported-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sean Christopherson May 10, 2022, 11:51 p.m. UTC | #1
On Tue, May 10, 2022, Jim Mattson wrote:
> Change the printf format character from 'd' to 'u' for the
> VM-instruction error in vmwrite_error().
> 
> Fixes: 6aa8b732ca01 ("[PATCH] kvm: userspace interface")
> Reported-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Jim Mattson <jmattson@google.com>
> ---

Reviewed-by: Sean Christopherson <seanjc@google.com>
Jim Mattson May 17, 2022, 8:21 p.m. UTC | #2
On Tue, May 10, 2022 at 4:51 PM Sean Christopherson <seanjc@google.com> wrote:
>
> On Tue, May 10, 2022, Jim Mattson wrote:
> > Change the printf format character from 'd' to 'u' for the
> > VM-instruction error in vmwrite_error().
> >
> > Fixes: 6aa8b732ca01 ("[PATCH] kvm: userspace interface")
> > Reported-by: Sean Christopherson <seanjc@google.com>
> > Signed-off-by: Jim Mattson <jmattson@google.com>
> > ---
>
> Reviewed-by: Sean Christopherson <seanjc@google.com>

Paolo?
diff mbox series

Patch

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 3a76730584cd..f558a14851f1 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -386,7 +386,7 @@  asmlinkage void vmread_error(unsigned long field, bool fault)
 
 noinline void vmwrite_error(unsigned long field, unsigned long value)
 {
-	vmx_insn_failed("kvm: vmwrite failed: field=%lx val=%lx err=%d\n",
+	vmx_insn_failed("kvm: vmwrite failed: field=%lx val=%lx err=%u\n",
 			field, value, vmcs_read32(VM_INSTRUCTION_ERROR));
 }