aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/omap_intc.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-03-18 16:23:47 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2022-03-20 20:38:52 +0100
commit3ec5ad40081b14af28496198b4d08dbe13386790 (patch)
tree316f10a515bdc38709a65fd0b0a08e182abb718c /hw/intc/omap_intc.c
parente2fb7d8aa218256793df99571d16f92074258447 (diff)
target/i386: kvm: do not access uninitialized variable on older kernels
KVM support for AMX includes a new system attribute, KVM_X86_XCOMP_GUEST_SUPP. Commit 19db68ca68 ("x86: Grant AMX permission for guest", 2022-03-15) however did not fully consider the behavior on older kernels. First, it warns too aggressively. Second, it invokes the KVM_GET_DEVICE_ATTR ioctl unconditionally and then uses the "bitmask" variable, which remains uninitialized if the ioctl fails. Third, kvm_ioctl returns -errno rather than -1 on errors. While at it, explain why the ioctl is needed and KVM_GET_SUPPORTED_CPUID is not enough. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/intc/omap_intc.c')
0 files changed, 0 insertions, 0 deletions