]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: VMX: Print VM-instruction error as unsigned
authorJim Mattson <jmattson@google.com>
Tue, 10 May 2022 22:40:35 +0000 (15:40 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 25 May 2022 09:23:39 +0000 (05:23 -0400)
Change the printf format character from 'd' to 'u' for the
VM-instruction error in vmwrite_error().

Fixes: b4d1853ff20b ("[PATCH] kvm: userspace interface")
Reported-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Message-Id: <20220510224035.1792952-2-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c

index 673ba5ca0bebee1e45873007931cfd99caf8970c..e0d3bea73b281fdd1ff0f5a798bd10c56e0879af 100644 (file)
@@ -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));
 }