From: "Jan Beulich" Subject: Re: [PATCH] Xen/hypercall: Update vcpu_op to take an unsigned vcpuid Date: Fri, 16 Jan 2015 12:38:45 +0000 Message-ID: <54B914650200007800055CBF@mail.emea.novell.com> References: <1421409781-15559-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1421409781-15559-1-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Keir Fraser , Tim Deegan , StefanoStabellini , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 16.01.15 at 13:03, wrote: > This has no guest-visible change, but makes the Hypervisor side bounds > checking more simple. > > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich > There are no functional changes as a result of this patch, but I have an RFC > improvement to suggest. > > The bounds check against MAX_VIRT_CPUS is spurious now that PVH domains can > use vcpu_op hypercalls. It is fine as MAX_VIRT_CPUS (8K) is far higher than > current 128 limit for HVM guests, but there is nothing conceptually > preventing > an HVM domain from having more than 8k CPUs (x2apic allows for 2^32 unique > ids). Not exactly, due to the need to allow for clustered mode, but still a few hundred k. > I propose dropping the MAX_VIRT_CPU bounds check completely, and relying on > d->max_vcpus to be within the approprate bounds. This will result in a guest > visible change insofar that some of their -EINVAL errors will turn into > -ENOENT, which is why this is suggestion is RFC. I don't think changes in error code values is problematic in any way, except in cases where for specific ones specific actions are expected to be taken by the guest. So - go for it. Jan