Commit a1c42dde authored by Juergen Gross's avatar Juergen Gross Committed by Paolo Bonzini
Browse files

kvm: rename KVM_MAX_VCPU_ID to KVM_MAX_VCPU_IDS



KVM_MAX_VCPU_ID is not specifying the highest allowed vcpu-id, but the
number of allowed vcpu-ids. This has already led to confusion, so
rename KVM_MAX_VCPU_ID to KVM_MAX_VCPU_IDS to make its semantics more
clear

Suggested-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210913135745.13944-3-jgross@suse.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 1e254d0d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ Groups:
  Errors:

    =======  ==========================================
    -EINVAL  Value greater than KVM_MAX_VCPU_ID.
    -EINVAL  Value greater than KVM_MAX_VCPU_IDS.
    -EFAULT  Invalid user pointer for attr->addr.
    -EBUSY   A vcpu is already connected to the device.
    =======  ==========================================
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ the legacy interrupt mode, referred as XICS (POWER7/8).
    Errors:

      =======  ==========================================
      -EINVAL  Value greater than KVM_MAX_VCPU_ID.
      -EINVAL  Value greater than KVM_MAX_VCPU_IDS.
      -EFAULT  Invalid user pointer for attr->addr.
      -EBUSY   A vCPU is already connected to the device.
      =======  ==========================================
+1 −1
Original line number Diff line number Diff line
@@ -1073,7 +1073,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
		r = KVM_MAX_VCPUS;
		break;
	case KVM_CAP_MAX_VCPU_ID:
		r = KVM_MAX_VCPU_ID;
		r = KVM_MAX_VCPU_IDS;
		break;
	case KVM_CAP_MIPS_FPU:
		/* We don't handle systems with inconsistent cpu_has_fpu */
+1 −1
Original line number Diff line number Diff line
@@ -434,7 +434,7 @@ extern int kvmppc_h_logical_ci_store(struct kvm_vcpu *vcpu);
#define SPLIT_HACK_OFFS			0xfb000000

/*
 * This packs a VCPU ID from the [0..KVM_MAX_VCPU_ID) space down to the
 * This packs a VCPU ID from the [0..KVM_MAX_VCPU_IDS) space down to the
 * [0..KVM_MAX_VCPUS) space, using knowledge of the guest's core stride
 * (but not its actual threading mode, which is not available) to avoid
 * collisions.
+2 −2
Original line number Diff line number Diff line
@@ -33,11 +33,11 @@

#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
#include <asm/kvm_book3s_asm.h>		/* for MAX_SMT_THREADS */
#define KVM_MAX_VCPU_ID		(MAX_SMT_THREADS * KVM_MAX_VCORES)
#define KVM_MAX_VCPU_IDS	(MAX_SMT_THREADS * KVM_MAX_VCORES)
#define KVM_MAX_NESTED_GUESTS	KVMPPC_NR_LPIDS

#else
#define KVM_MAX_VCPU_ID		KVM_MAX_VCPUS
#define KVM_MAX_VCPU_IDS	KVM_MAX_VCPUS
#endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */

#define __KVM_HAVE_ARCH_INTC_INITIALIZED
Loading