From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E748CC433E0 for ; Tue, 9 Jun 2020 03:06:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1B912078C for ; Tue, 9 Jun 2020 03:06:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbgFIDGL (ORCPT ); Mon, 8 Jun 2020 23:06:11 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:40242 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726884AbgFIDGK (ORCPT ); Mon, 8 Jun 2020 23:06:10 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R781e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07425;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=39;SR=0;TI=SMTPD_---0U.29n7._1591671962; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U.29n7._1591671962) by smtp.aliyun-inc.com(127.0.0.1); Tue, 09 Jun 2020 11:06:03 +0800 Subject: Re: [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory To: David Hildenbrand , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, virtio-dev@lists.oasis-open.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, Michal Hocko , Andrew Morton , "Michael S . Tsirkin" , Sebastien Boeuf , Samuel Ortiz , Robert Bradford , Luiz Capitulino , Alexander Duyck , Alexander Potapenko , Alexander Viro , Anshuman Khandual , Anthony Yznaga , Dan Williams , Dave Young , Igor Mammedov , Jason Wang , Johannes Weiner , Juergen Gross , Konrad Rzeszutek Wilk , Len Brown , Mel Gorman , Michal Hocko , Mike Rapoport , Oscar Salvador , Oscar Salvador , Pavel Tatashin , Pavel Tatashin , Pingfan Liu , Qian Cai , "Rafael J. Wysocki" , Stefan Hajnoczi , Vlastimil Babka , Wei Yang References: <20191212171137.13872-1-david@redhat.com> <9acc5d04-c8e9-ef53-85e4-709030997ca6@redhat.com> <1cfa9edb-47ea-1495-4e28-4cf391eab44c@linux.alibaba.com> <6b4724bf-84b5-9880-5464-1908425d106d@redhat.com> <95c6ef21-23e0-c768-999d-3af7f69d02d3@linux.alibaba.com> From: Alex Shi Message-ID: Date: Tue, 9 Jun 2020 11:05:50 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/6/5 下午8:18, David Hildenbrand 写道: > On 05.06.20 12:46, Alex Shi wrote: >> >> >> 在 2020/6/5 下午6:05, David Hildenbrand 写道: >>>> I guess I know what's happening here. In case we only have DMA memory >>>> when booting, we don't reserve swiotlb buffers. Once we hotplug memory >>>> and online ZONE_NORMAL, we don't have any swiotlb DMA bounce buffers to >>>> map such PFNs (total 0 (slots), used 0 (slots)). >>>> >>>> Can you try with "swiotlb=force" on the kernel cmdline? >>> Alternative, looks like you can specify "-m 2G,maxmem=16G,slots=1", to >>> create proper ACPI tables that indicate hotpluggable memory. (I'll have >>> to look into QEMU to figure out to always indicate hotpluggable memory >>> that way). >>> >> >> >> That works too. Yes, better resolved in qemu, maybe. :) >> > > You can checkout > > git@github.com:davidhildenbrand/qemu.git virtio-mem-v4 yes, it works for me. Thanks! > > (prone to change before officially sent), which will create srat tables > also if no "slots" parameter was defined (and no -numa config was > specified). > > Your original example should work with that. > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Shi Subject: Re: [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory Date: Tue, 9 Jun 2020 11:05:50 +0800 Message-ID: References: <20191212171137.13872-1-david@redhat.com> <9acc5d04-c8e9-ef53-85e4-709030997ca6@redhat.com> <1cfa9edb-47ea-1495-4e28-4cf391eab44c@linux.alibaba.com> <6b4724bf-84b5-9880-5464-1908425d106d@redhat.com> <95c6ef21-23e0-c768-999d-3af7f69d02d3@linux.alibaba.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Sender: kvm-owner@vger.kernel.org To: David Hildenbrand , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, virtio-dev@lists.oasis-open.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, Michal Hocko , Andrew Morton , "Michael S . Tsirkin" , Sebastien Boeuf , Samuel Ortiz , Robert Bradford , Luiz Capitulino , Alexander Duyck , Alexander Potapenko , Alexander Viro , Anshuman Khandual , Anthony Yznaga , Dan Williams , Dave Young , Igor Mammedov , Jason Wang List-Id: virtualization@lists.linuxfoundation.org 在 2020/6/5 下午8:18, David Hildenbrand 写道: > On 05.06.20 12:46, Alex Shi wrote: >> >> >> 在 2020/6/5 下午6:05, David Hildenbrand 写道: >>>> I guess I know what's happening here. In case we only have DMA memory >>>> when booting, we don't reserve swiotlb buffers. Once we hotplug memory >>>> and online ZONE_NORMAL, we don't have any swiotlb DMA bounce buffers to >>>> map such PFNs (total 0 (slots), used 0 (slots)). >>>> >>>> Can you try with "swiotlb=force" on the kernel cmdline? >>> Alternative, looks like you can specify "-m 2G,maxmem=16G,slots=1", to >>> create proper ACPI tables that indicate hotpluggable memory. (I'll have >>> to look into QEMU to figure out to always indicate hotpluggable memory >>> that way). >>> >> >> >> That works too. Yes, better resolved in qemu, maybe. :) >> > > You can checkout > > git@github.com:davidhildenbrand/qemu.git virtio-mem-v4 yes, it works for me. Thanks! > > (prone to change before officially sent), which will create srat tables > also if no "slots" parameter was defined (and no -numa config was > specified). > > Your original example should work with that. >