From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsRT8-0007MA-BE for qemu-devel@nongnu.org; Sat, 31 Oct 2015 04:24:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsRT3-0000dV-6V for qemu-devel@nongnu.org; Sat, 31 Oct 2015 04:24:58 -0400 Received: from mga11.intel.com ([192.55.52.93]:48436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsRT3-0000d8-0w for qemu-devel@nongnu.org; Sat, 31 Oct 2015 04:24:53 -0400 References: <1446184587-142784-1-git-send-email-guangrong.xiao@linux.intel.com> <1446184587-142784-15-git-send-email-guangrong.xiao@linux.intel.com> <5633965B.50809@virtuozzo.com> From: Xiao Guangrong Message-ID: <56347944.8010906@linux.intel.com> Date: Sat, 31 Oct 2015 16:18:12 +0800 MIME-Version: 1.0 In-Reply-To: <5633965B.50809@virtuozzo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , pbonzini@redhat.com, imammedo@redhat.com Cc: ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, dan.j.williams@intel.com, rth@twiddle.net On 10/31/2015 12:10 AM, Vladimir Sementsov-Ogievskiy wrote: > On 30.10.2015 08:56, Xiao Guangrong wrote: >> This patch is generated by this script: >> >> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ >> | xargs sed -i "s/PC_DIMM/DIMM/g" >> >> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ >> | xargs sed -i "s/PCDIMM/DIMM/g" >> >> find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ >> | xargs sed -i "s/pc_dimm/dimm/g" >> >> find ./ -name "trace-events" -type f | xargs sed -i "s/pc-dimm/dimm/g" >> >> It prepares the work which abstracts dimm device type for both pc-dimm and >> nvdimm >> >> Signed-off-by: Xiao Guangrong >> --- >> hmp.c | 2 +- >> hw/acpi/ich9.c | 6 +- >> hw/acpi/memory_hotplug.c | 16 ++--- >> hw/acpi/piix4.c | 6 +- >> hw/i386/pc.c | 32 ++++----- >> hw/mem/pc-dimm.c | 148 ++++++++++++++++++++-------------------- >> hw/ppc/spapr.c | 18 ++--- >> include/hw/mem/pc-dimm.h | 62 ++++++++--------- >> numa.c | 2 +- >> qapi-schema.json | 8 +-- >> qmp.c | 2 +- >> stubs/qmp_pc_dimm_device_list.c | 2 +- >> trace-events | 8 +-- >> 13 files changed, 156 insertions(+), 156 deletions(-) > > > In the following patches, dimm is a parent for nv-dimm and pc-dimm, so dimm is more abstract when > nv-dimm and pc-dimm are more concrete. So for me it is strange, that all these files, all old staff > will use an abstract dimm. What the purpose of pc-dimm in this case (which appeared in the following > patches)? > The logic pc-dimm used can be completely shared by NVDIMM, so we abstracted 'dimm' from pc-dimm, and let the common code handle dimm instead of pc-dimm so that the common code will handle NVDIMM automatically. Actually, pc-dimm just inherit things from dimm, it does not have personal data.