From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: xen: PV on HVM: support PV spinlocks Date: Mon, 16 Aug 2010 12:43:08 -0700 Message-ID: <4C6994CC.8080409@goop.org> References: <4C65B681.8040408@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 08/16/2010 04:56 AM, Stefano Stabellini wrote: > On Fri, 13 Aug 2010, Jeremy Fitzhardinge wrote: >> On 08/13/2010 12:06 PM, Stefano Stabellini wrote: >>> xen: PV on HVM: support PV spinlocks >>> >>> Signed-off-by: Stefano Stabellini >>> >>> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c >>> index 6f53453..5643c43 100644 >>> --- a/arch/x86/xen/enlighten.c >>> +++ b/arch/x86/xen/enlighten.c >>> @@ -1290,6 +1290,8 @@ static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self, >>> switch (action) { >>> case CPU_UP_PREPARE: >>> per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu]; >>> + if (xen_have_vector_callback) >>> + xen_init_lock_cpu(cpu); >> Why does this depend on vector_callback? pv spinlocks never have events >> actually delivered. >> > HVM guests cannot receive events on vcpus other than 0 without > vector_callback, this means they wouldn't receive even a vcpu_kick and > would get stuck. Huh, really. So if a vcpu is blocked in a poll hypercall on a masked event channel and you send that vcpu an IPI, the poll won't unblock unless you have a delivery vector? OK, I guess. J