Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp176855ybg; Mon, 8 Jun 2020 20:08:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2O1hVVK/JN6Pxq6unrickECTsgFQY2Zwp9B8NnlR/KbsHGXjWjgIUMJgYNDOiCSwdPNGk X-Received: by 2002:a17:906:4c81:: with SMTP id q1mr5756538eju.273.1591672113440; Mon, 08 Jun 2020 20:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591672113; cv=none; d=google.com; s=arc-20160816; b=sZma36FnHePvoWJpK/2C67pCs0uayME+331YK8JnR7I53nHw/OBQSrIi4980wMWvjg j6xU7fBFzRZnZ9JAS80vo5e3zBesMDelCqeZoBGBpUQi1SQN96Y0DcdFlvLhjKfTD+xM uZ35/89caakx/QWsyJbKQBbGC6Iy8Akr7nTBwGyxaNoRFxXhjb3H3KrlZfORYdQeM+a6 XS9LNoN8le8rB2yCMSQB6THMb2qxnoRAFuT4NVrwEY/+1jCwlU9qLnDNSv7lLOT429KC p/t3X3eVC5XYsltFMmU/mhvunm3LNTR9PaHWC9MyJE1Ew9jpf3uNn/Gqffjp/+CggWpK RB8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=8cuVZQGrFcTTk5/bobq16BZ9J3Ncf3VXbTRjd8f1pSw=; b=zSRriHEK+Kj2LTw8yexGit6PHs3geEk9/6cH/BZJr/A1pJ15/69cRjmMAtiIGdgQOV BuRTxzNpMVUxswcBynuLG0SusDbp5MTjoxWJTc3zDyLJtSLpS84EpGTqwLD5F7YMDjlv 0+kglLaDolgBV7eyyM199inj/8EthDvBZfLYnHtEAF0aJvgLf2F4OHva0yyoxD/gG4c3 72lEtpqIn1dbGUhpOFbik9nTSxB2x/TpGGheesPAC2KC5o5YEvc9YLgfpbHsbYHmnc0l KCIchSBQ8sV2vwZ9waPhzcKMuqRls/OIt6F8+tjHq8+ukLN9uKJCz79c1oF1oUFaH7/q j1cQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si9495699ejh.52.2020.06.08.20.08.08; Mon, 08 Jun 2020 20:08:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727032AbgFIDGL (ORCPT + 99 others); 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. >