linux/arch/x86
Juergen Gross 7a94dfe5e2 x86/kvm: fix vcpu-id indexed array sizes
commit 76b4f357d0e7d8f6f0013c733e6cba1773c266d3 upstream.

KVM_MAX_VCPU_ID is the maximum vcpu-id of a guest, and not the number
of vcpu-ids. Fix array indexed by vcpu-id to have KVM_MAX_VCPU_ID+1
elements.

Note that this is currently no real problem, as KVM_MAX_VCPU_ID is
an odd number, resulting in always enough padding being available at
the end of those arrays.

Nevertheless this should be fixed in order to avoid rare problems in
case someone is using an even number for KVM_MAX_VCPU_ID.

Signed-off-by: Juergen Gross <jgross@suse.com>
Message-Id: <20210701154105.23215-2-jgross@suse.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-04 12:27:37 +02:00
..
boot x86/boot: Add .text.* to setup.ld 2021-06-16 11:59:38 +02:00
configs
crypto
entry
events
hyperv
ia32
include x86/asm: Ensure asm/proto.h can be included stand-alone 2021-08-04 12:27:37 +02:00
kernel x86/fpu: Limit xstate copy size in xstateregs_set() 2021-07-20 16:10:50 +02:00
kvm x86/kvm: fix vcpu-id indexed array sizes 2021-08-04 12:27:37 +02:00
lib
math-emu
mm
net
oprofile
pci PCI: Add AMD RS690 quirk to enable 64-bit DMA 2021-06-30 08:47:49 -04:00
platform
power
purgatory
ras
realmode
tools
um
video
xen
.gitignore
Kbuild
Kconfig
Kconfig.cpu
Kconfig.debug
Makefile
Makefile_32.cpu
Makefile.um