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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 D9DC8C07E9B for ; Mon, 19 Jul 2021 14:58:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 593976112D for ; Mon, 19 Jul 2021 14:58:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 593976112D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=NetBSD.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5UiV-0005em-Bb for qemu-devel@archiver.kernel.org; Mon, 19 Jul 2021 10:57:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5Uep-00035J-EM for qemu-devel@nongnu.org; Mon, 19 Jul 2021 10:54:11 -0400 Received: from 13thmonkey.org ([80.100.255.32]:65469 helo=gorilla.13thmonkey.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5Uen-0001Rs-Hs for qemu-devel@nongnu.org; Mon, 19 Jul 2021 10:54:10 -0400 Received: by gorilla.13thmonkey.org (Postfix, from userid 103) id D49612FF07A7; Mon, 19 Jul 2021 16:54:05 +0200 (CEST) Date: Mon, 19 Jul 2021 16:54:05 +0200 From: Reinoud Zandijk To: Peter Maydell Subject: Re: [PATCH v1 2/2] Fix nvmm_ram_block_added() function arguments Message-ID: References: <20210718134650.1191-1-reinoud@NetBSD.org> <20210718134650.1191-3-reinoud@NetBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Received-SPF: none client-ip=80.100.255.32; envelope-from=reinoud@gorilla.13thmonkey.org; helo=gorilla.13thmonkey.org X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Reinoud Zandijk , QEMU Developers Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi, On Sun, Jul 18, 2021 at 05:38:58PM +0100, Peter Maydell wrote: > On Sun, 18 Jul 2021 at 14:54, Reinoud Zandijk wrote: > > A parameter max_size was added to the RAMBlockNotifier > > ram_block_added function. Use the max_size for pre allocation > > of hva space. > > > > Signed-off-by: Reinoud Zandijk > > --- > > target/i386/nvmm/nvmm-all.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c > > index dfa690d65d..fdcd37ed3e 100644 > > --- a/target/i386/nvmm/nvmm-all.c > > +++ b/target/i386/nvmm/nvmm-all.c > > @@ -1134,13 +1134,14 @@ static MemoryListener nvmm_memory_listener = { > > }; > > > > static void > > -nvmm_ram_block_added(RAMBlockNotifier *n, void *host, size_t size) > > +nvmm_ram_block_added(RAMBlockNotifier *n, void *host, size_t size, > > + size_t max_size) > > { > > struct nvmm_machine *mach = get_nvmm_mach(); > > uintptr_t hva = (uintptr_t)host; > > int ret; > > > > - ret = nvmm_hva_map(mach, hva, size); > > + ret = nvmm_hva_map(mach, hva, max_size); > > > > if (ret == -1) { > > error_report("NVMM: Failed to map HVA, HostVA:%p " > > This suggests that this code isn't being covered by our CI. Is > there something we can do to get it tested? NVMM acceleration is currently NetBSD host only so can only be tested on NetBSD hosts. Unless Qemu is smart enough to allow a guest NetBSD to run NetBSD to test NVMM in a nested Qemu I don't think its possible to otherwise automatically test on Linux. Is there a README or documentation on how to modify and run the tests? With regard, Reinoud