From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9SYl-0003UI-Rz for qemu-devel@nongnu.org; Mon, 11 Apr 2011 21:38:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9NDO-00065D-U2 for qemu-devel@nongnu.org; Mon, 11 Apr 2011 15:56:04 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:35650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9NDO-00064v-ID for qemu-devel@nongnu.org; Mon, 11 Apr 2011 15:56:02 -0400 Message-ID: <4DA35CC8.6030909@web.de> Date: Mon, 11 Apr 2011 21:55:52 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1301423290-12443-1-git-send-email-anthony.perard@citrix.com> <1301423290-12443-6-git-send-email-anthony.perard@citrix.com> <4D9F1249.6080305@siemens.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB382F21F03F7B7B0A2C414EB" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH V12 05/17] xen: Add xenfv machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: Alexander Graf , Xen Devel , QEMU-devel , Stefano Stabellini This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB382F21F03F7B7B0A2C414EB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-04-11 20:10, Anthony PERARD wrote: >>> } >>> >>> static CPUState *pc_new_cpu(const char *cpu_model) >>> @@ -952,7 +957,12 @@ void pc_cpus_init(const char *cpu_model) >>> #endif >>> } >>> >>> - for(i =3D 0; i < smp_cpus; i++) { >>> + if (!xen_enabled()) { >>> + for(i =3D 0; i < smp_cpus; i++) { >>> + pc_new_cpu(cpu_model); >>> + } >>> + } else { >>> + /* Xen require only one Qemu VCPU */ >>> pc_new_cpu(cpu_model); >> >> This looks a bit fishy. What is the semantic of -smp 2 or more in Xen >> mode? If that is an invalid/unused configuration option, catch that an= d >> reject it instead of installing this workaround. If it has a valid >> semantic, please elaborate why you need to restrict the number of >> instantiated cpus. Just to optimize memory usage? >=20 > I thought in a first place that was needed to avoid errors. But it work= s > also when we initialise other CPUs. But I prefere to keep it that way t= o > save memory and in the case where there is a thread for each cpu that > will also avoid to have many useless threads. How much memory does this save? More than a few KB per VCPU? That should be negligible compared to the normal size of VMs. And as long as we do not support multi-threaded TCG VCPUs, Xen will only create on thread for all VCPUs (once that may change, Xen could control the "execution" model via qemu_init_vcpu). So I would prefer to avoid this additional Xen-specific branch in generic code. Thanks, Jan --------------enigB382F21F03F7B7B0A2C414EB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk2jXMwACgkQitSsb3rl5xSUHgCgzeUhNW+Ct2k9rshKrH/zdM7K 2iwAn2c9mTGniRRWvuL544BVqMgrV3cI =Nu2F -----END PGP SIGNATURE----- --------------enigB382F21F03F7B7B0A2C414EB--