From patchwork Tue Jun 14 17:23:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9176349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 539196048C for ; Tue, 14 Jun 2016 17:26:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EB8A2793B for ; Tue, 14 Jun 2016 17:26:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3380A2823D; Tue, 14 Jun 2016 17:26:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B017F2793B for ; Tue, 14 Jun 2016 17:26:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCs4L-0003Dw-LU; Tue, 14 Jun 2016 17:24:05 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCs4K-0003DY-A4 for xen-devel@lists.xenproject.org; Tue, 14 Jun 2016 17:24:04 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 2A/E2-25713-3BD30675; Tue, 14 Jun 2016 17:24:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXitHRDpO5m24R wg2nPxC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oyT1y6xFxzjqVj5uIWtgfE7ZxcjJ4eEgL/E meYm5i5GDg4WAVWJtf26IGE2AWWJn529bCC2iIC2xItV64BsLg5mga+MEqe3n2YCSQgLuEgs6 lzODmLzCuhL/J99iBmkSEhgKbNE+85WZoiEoMTJmU9YQGxmAR2JBbs/sYEsYxaQllj+jwMkzC lgILH06jmwclEBFYkrE96CzRQSUJDomH6MCaRcQoBb4m+3/QRG/llIhs5CMnQWwtAFjMyrGNW LU4vKUot0DfWSijLTM0pyEzNzdA0NzPRyU4uLE9NTcxKTivWS83M3MQLDjwEIdjDufO50iFGS g0lJlPeyTkK4EF9SfkplRmJxRnxRaU5q8SFGGQ4OJQneBhugnGBRanpqRVpmDjASYNISHDxKI rwPQdK8xQWJucWZ6RCpU4yKUuK8p0ESAiCJjNI8uDZY9F1ilJUS5mUEOkSIpyC1KDezBFX+Fa M4B6OSMO8Ba6ApPJl5JXDTXwEtZgJabDM9HmRxSSJCSqqBUSzUPz90ns7jjfVzuPdvLvXkM9A 79GV5+49HC/0KNVbzhJ14m9B3yPiy9LxyF4nrL/N+K2lEJr3U2Xog6cnSF15KjZq8pZsvdLEx 2BzVCGD9t+PA1GVBgTG3i6Te2pyqKWK4WT6LJUh2+UO7T0a6Ez3qJBjfsyoWty51i557KWnC5 bsz+l6sV2Ipzkg01GIuKk4EAFAd1i65AgAA X-Env-Sender: prvs=966959e1a=wei.liu2@citrix.com X-Msg-Ref: server-11.tower-21.messagelabs.com!1465925041!18913646!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 33984 invoked from network); 14 Jun 2016 17:24:03 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-11.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 14 Jun 2016 17:24:03 -0000 X-IronPort-AV: E=Sophos;i="5.26,471,1459814400"; d="scan'208";a="360400285" Date: Tue, 14 Jun 2016 18:23:52 +0100 From: Wei Liu To: Ian Jackson Message-ID: <20160614172352.GU28116@citrix.com> References: <5751B36302000078000F1A67@prv-mh.provo.novell.com> <20160603163519.GO14588@citrix.com> <20160606171806.GM14588@citrix.com> <20160606172023.GO14588@citrix.com> <5755B434.3070203@citrix.com> <20160607083021.GD25922@citrix.com> <22368.12814.881534.414079@mariner.uk.xensource.com> <20160614163947.GQ28116@citrix.com> <22368.14172.762223.551307@mariner.uk.xensource.com> <20160614170301.GS28116@citrix.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160614170301.GS28116@citrix.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-DLP: MIA1 Cc: Stefano Stabellini , Wei Liu , Andrew Cooper , Jan Beulich , Anthony PERARD , xen-devel Subject: Re: [Xen-devel] "xl vcpu-set" not persistent across reboot? X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jun 14, 2016 at 06:03:01PM +0100, Wei Liu wrote: > On Tue, Jun 14, 2016 at 05:57:00PM +0100, Ian Jackson wrote: > > Wei Liu writes ("Re: [Xen-devel] "xl vcpu-set" not persistent across reboot?"): > > > What Andrew means is that QEMU shouldn't have kept the CPU state > > > structures in the first place. My response explains why that is not > > > possible from a QEMU upstream point of view. > > > > I don't think it addresses my point. > > > > > Hence the unfortunate fact is that we need to live with it for now. To > > > start QEMU we need to create a bunch of dummy CPUs to keep QEMU happy. > > > All those dummy states need to be kept. > > > > Why do we need one dummy state per actual vcpu rather than just one > > dummy state no matter how many vcpus ? > > > > We can't because ... > > > Or is qemu involved in hvm cpu hotplug ? > > > > when doing hotplug, libxl uses QMP command to tell QEMU to create > CPUs. > > Whether this can be changed I will let Anthony and Stefano to answer. > OK, a quick check shows that the current state of affairs does require QEMU to get involved. If we skip the QMP call, guest gets no new cpus -- CPU hotplug is completely broken. Wei. ---8<--- > Wei. > > > Ian. diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 0e2c15a..1cd8e00 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -5756,6 +5756,8 @@ static int libxl__set_vcpuonline_qmp(libxl__gc *gc, uint32_t domid, int i, rc; libxl_bitmap current_map, final_map; + return 0; + libxl_bitmap_init(¤t_map); libxl_bitmap_init(&final_map);