From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1g5u-0008Qb-1z for qemu-devel@nongnu.org; Tue, 23 Jul 2013 13:09:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1g5s-0007a6-Pg for qemu-devel@nongnu.org; Tue, 23 Jul 2013 13:09:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1g5s-0007Zt-GK for qemu-devel@nongnu.org; Tue, 23 Jul 2013 13:09:48 -0400 Message-ID: <51EEB8C6.1030601@redhat.com> Date: Tue, 23 Jul 2013 19:09:26 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1374596592-7027-1-git-send-email-imammedo@redhat.com> <1374596592-7027-11-git-send-email-imammedo@redhat.com> In-Reply-To: <1374596592-7027-11-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 10/16] dimm: add busy slot check and slot auto-allocation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: vasilis.liaskovitis@profitbricks.com, hutao@cn.fujitsu.com, qemu-devel@nongnu.org Il 23/07/2013 18:23, Igor Mammedov ha scritto: > - if slot property is not specified on -device/device_add command, > treat default value as request for assigning DimmDevice to > the first free slot. Even with "-m" instead of "-numa mem", I think this is problematic because we still need to separate the host and guest parts of the DIMM device. "-numa mem" (or the QMP command that Wanlong added) will be necessary to allocate memory on the host side before adding a DIMM. So slots will have three states: free (created with "-m"), allocated (a free slot moves to this state with "-numa mem...,populated=no" when migrating, or with the QMP command for regular hotplug), populated (an allocated slot moves to this state with "-device dimm"). You would be able to plug a DIMM only into an allocated slot, and the size will be specified on the slot rather than the DIMM device. In general, I don't think free slots should be managed by the DimmBus, and host vs. guest separation should be there even if we accept your "-m" extension (doesn't look bad at all, I must say). Paolo