xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: Xen Devel <xen-devel@lists.xen.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH] firmware: Fix vcpu hotplug race with qemu-xen
Date: Mon, 9 Dec 2013 18:30:37 +0000	[thread overview]
Message-ID: <1386613837-27399-1-git-send-email-anthony.perard@citrix.com> (raw)

When hotplugging more than one vcpu, some of those vcpus might not be
seen as plugged by the guest.

By using edged-triggered General-Purpose Event instead of a
level-triggered GPE, the race is avoided. This is in sync with how a
different QEMU guest is handeling CPU hotplug event.

There is more information about why in SeaBIOS's commit
9c6635bd48d39a1d17d0a73df6e577ef6bd0037c.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/firmware/hvmloader/acpi/mk_dsdt.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/firmware/hvmloader/acpi/mk_dsdt.c b/tools/firmware/hvmloader/acpi/mk_dsdt.c
index 996f30b..ecbe4cd 100644
--- a/tools/firmware/hvmloader/acpi/mk_dsdt.c
+++ b/tools/firmware/hvmloader/acpi/mk_dsdt.c
@@ -220,9 +220,13 @@ int main(int argc, char **argv)
 
     pop_block();
 
-    /* Define GPE control method '_L02'. */
+    /* Define GPE control method. */
     push_block("Scope", "\\_GPE");
-    push_block("Method", "_L02");
+    if (dm_version == QEMU_XEN) {
+        push_block("Method", "_E02");
+    } else {
+        push_block("Method", "_L02");
+    }
     stmt("Return", "\\_SB.PRSC()");
     pop_block();
     pop_block();
-- 
Anthony PERARD

             reply	other threads:[~2013-12-09 18:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 18:30 Anthony PERARD [this message]
2013-12-10  8:43 ` [PATCH] firmware: Fix vcpu hotplug race with qemu-xen Jan Beulich
2013-12-11 16:12   ` Anthony PERARD
2013-12-12 15:30 ` [PATCH V2] firmware: Change level-triggered GPE event to a edge one for qemu-xen Anthony PERARD
2013-12-13 11:51   ` Jan Beulich
2013-12-13 17:11     ` Anthony PERARD
2013-12-13 17:32       ` Ian Jackson
2013-12-13 17:44       ` Konrad Rzeszutek Wilk
2013-12-13 18:17         ` Anthony PERARD
2013-12-16  7:51       ` Jan Beulich
2013-12-13 19:17   ` [PATCH V3] " Anthony PERARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1386613837-27399-1-git-send-email-anthony.perard@citrix.com \
    --to=anthony.perard@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).