From: "Jan Beulich" Subject: Re: [PATCH V2] firmware: Change level-triggered GPE event to a edge one for qemu-xen Date: Mon, 16 Dec 2013 07:51:17 +0000 Message-ID: <52AEBF05020000780010D76F@nat28.tlf.novell.com> References: <1386613837-27399-1-git-send-email-anthony.perard@citrix.com> <1386862205-17863-1-git-send-email-anthony.perard@citrix.com> <52AB02C7020000780010CF98@nat28.tlf.novell.com> <20131213171157.GX10855@perard.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VsSxZ-0007xa-Ci for xen-devel@lists.xenproject.org; Mon, 16 Dec 2013 07:51:25 +0000 In-Reply-To: <20131213171157.GX10855@perard.uk.xensource.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: Anthony PERARD Cc: Ian Jackson , Stefano Stabellini , Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 13.12.13 at 18:11, Anthony PERARD wrote: > On Fri, Dec 13, 2013 at 11:51:19AM +0000, Jan Beulich wrote: >> >>> On 12.12.13 at 16:30, Anthony PERARD wrote: >> > Change in V2: >> > - better patch comment: >> > patch those not fix race, but reduce the window >> > include patch description of the quoted commit >> >> Thanks - quite a bit better to understand. >> >> > - change also apply to pci hotplug. >> >> The one thing I'm still missing for both changes is a brief word on >> why qemu-xen-traditional doesn't want/need this and - as iirc >> you said - if that one manages to get this implemented without a >> similar race, why upstream qemu can't do things in a similar way. > > In qemu-trad, instead of sending an SCI interrupt for every new vcpu, we > loop through every xenstore key that represent vcpus availability and > only send an SCI only when the loop is over. And it looks like one `xl > vcpu-set` provoc only one loop. > > But adding a vcpu in qemu-xen is done via a QMP command, "cpu-add id=X". > qemu-xen have no way to know if there will be a next cpu-add command, so > we can not apply the same thing. > > For why qemu-xen-traditional doesn't not need this: > - a single `xl vcpu-set` can not trigger the race > > For why qemu-xen-traditional doesn't not want this: > - avoid unnecessary change, especially in the ACPI table > > About the PCI hotplug change and qemu-xen-traditional, I actually don't > know what would be the effect. > > Why qemu-xen-traditional would like this change for vcpu only: > - we might hit the race window via several consecutive `xl vcpu-set` > calls, or via direct change of xenstore entries. > but after few try, I could not manage to have a missing cpu hotplug > event. > > > So should I just add in the patch comment something like: > "Since some measure have been put in place in qemu-xen-traditional > against this race, we don't change the ACPI table for it." > ? Yes please. Jan