From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v10 11/20] x86/VPMU: Interface for setting PMU mode and flags Date: Fri, 19 Sep 2014 07:51:30 +0100 Message-ID: <541BEE9202000078000366AE@mail.emea.novell.com> References: <1409802080-6160-1-git-send-email-boris.ostrovsky@oracle.com> <1409802080-6160-12-git-send-email-boris.ostrovsky@oracle.com> <541B53BE.4000909@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <541B53BE.4000909@oracle.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: "Aravind.Gopalakrishnan@amd.com" , Boris Ostrovsky Cc: "tim@xen.org" , Kevin Tian , "keir@xen.org" , "suravee.suthikulpanit@amd.com" , "andrew.cooper3@citrix.com" , Eddie Dong , "xen-devel@lists.xen.org" , Jun Nakajima List-Id: xen-devel@lists.xenproject.org >>> On 18.09.14 at 23:50, wrote: > On 09/18/2014 12:11 AM, Tian, Kevin wrote: >>> From: Boris Ostrovsky [mailto:boris.ostrovsky@oracle.com] >>> +{ >>> + unsigned i, j, allbutself_num, tasknum, mycpu; >>> + static s_time_t start; >>> + static struct tasklet **sync_task; >>> + struct vcpu *curr_vcpu = current; >>> + static struct vcpu *sync_vcpu; >>> + int ret = 0; >>> + >>> + tasknum = allbutself_num = num_online_cpus() - 1; >>> + >>> + if ( sync_task ) /* if set, we are in hypercall continuation */ >>> + { >>> + if ( (sync_vcpu != NULL) && (sync_vcpu != curr_vcpu) ) >>> + /* We are not the original caller */ >>> + return -EAGAIN; >> I assume hypercall continuation will happen on original vcpu context. Under >> which situation the hypercall will be continued on a different vcpu? If yes, >> would it be an unbounded situation where you may wait unexpected time >> to have sync_vcpu==curr_vcpu? > > The continuation call is gone in v11. If we are stuck waiting for more > than 5 seconds we'll simply return -EAGAIN and have the caller retry. That reads wrong, but I'd of course have to see whether the just wording above is incorrectly reflecting the code changes you did. Also, both of you - please trim your replies. Jan