From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 4/4] xen/many: Drop redundant MAX_VIRT_CPUS bounds checks Date: Tue, 20 Jan 2015 11:06:15 +0000 Message-ID: <1421751975.10440.215.camel@citrix.com> References: <1421666496-10676-1-git-send-email-andrew.cooper3@citrix.com> <1421666496-10676-5-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: <1421666496-10676-5-git-send-email-andrew.cooper3@citrix.com> 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: Stefano Stabellini , Tim Deegan , Keir Fraser , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org On Mon, 2015-01-19 at 11:21 +0000, Andrew Cooper wrote: > In all 4 cases, visible in the context are bounds check against d->max_vcpus. > Domain building will ensure that d->max_vcpus never exceeds an appropriate > bound. In the x86 case, different types of domains have different maxima for > vcpus, making the checks wrong as opposed to simply redundant. > > For vpsci in ARM, 'vcpuid' is an unsigned type so could never be less than 0. > > For the common changes to do_{,compat}_vcpu_op(), these changes do result in a > guest visible change, but only in so far as certain invalid vcpu ids will now > fail with -ENOENT rather than -EINVAL. > > Signed-off-by: Andrew Cooper > CC: Keir Fraser > CC: Jan Beulich > CC: Ian Campbell > CC: Stefano Stabellini > CC: Tim Deegan For ARM: Acked-by: Ian Campbell