mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-10-04 15:58:29 +00:00
kvm tools: Add NR_CPUS definition in case of non-configured kernel sources
Pekka reported | | I see this if I ignore the reject: | | penberg@tiger:~/linux/tools/kvm$ make | In file included from mptable.c:10: | ../../arch/x86/include/asm/mpspec_def.h:20:6: error: "NR_CPUS" is not defined This is because the source linux kernel might not be configured (bare sources) so we add own definition in case if there is no NR_CPUS defined. [ penberg@kernel.org: fix up compilation error ] Reported-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
62219c717e
commit
ca99b3d340
@@ -7,6 +7,8 @@
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
#define KVM_NR_CPUS (255)
|
||||
|
||||
struct kvm {
|
||||
int sys_fd; /* For system ioctls(), i.e. /dev/kvm */
|
||||
int vm_fd; /* For VM ioctls() */
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
#define MIN_RAM_SIZE_MB (64ULL)
|
||||
#define MIN_RAM_SIZE_BYTE (MIN_RAM_SIZE_MB << MB_SHIFT)
|
||||
|
||||
#define KVM_NR_CPUS (255)
|
||||
|
||||
static struct kvm *kvm;
|
||||
static struct kvm_cpu *kvm_cpus[KVM_NR_CPUS];
|
||||
static __thread struct kvm_cpu *current_kvm_cpu;
|
||||
|
||||
Reference in New Issue
Block a user