From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: Xen 4.4 Testing: Platform Op XENPF_microcode_update Leaves VCPU Lock Set? Date: Thu, 24 Apr 2014 15:10:16 +0100 Message-ID: <53591B48.7030004@citrix.com> References: <8EF1AEBB-898F-4CA3-812A-F9FAA29A9D03@nrl.navy.mil> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WdKMT-00036E-B5 for xen-devel@lists.xenproject.org; Thu, 24 Apr 2014 14:10:49 +0000 In-Reply-To: <8EF1AEBB-898F-4CA3-812A-F9FAA29A9D03@nrl.navy.mil> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: John McDermott Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 24/04/14 14:35, John McDermott wrote: > Xen Developers, > > In arch/x86/platform_hypercall.c, in function do_platform_op, the case XENPF_microcode_update appears to leave the vcpu_alloc_lock set when creating a hypercall continuation, but I don't understand the hypercall continuation code as releasing that lock. The lock is not released at target label of the following goto, in case XENPF_microcode_update. > > I don't have the facilities to exercise this case on my development platform, but it looks like a possible problem or does the hypercall continuation somehow take care of this lock? > > Sincerely, > > John spin_trylock() will try to take the spinlock, but return failure rather than spinning. The body of the while loop is therefore strictly when the vcpu_alloc_lock is not held, so the goto out is safe in context. > > ps. I tried subscribing to the Xen dev list 3 times but it never worked. That is curious. Any indication of an error? You certainly havn't successfully signed up as I had to approve this email through moderation. ~Andrew