From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0737B38DD8 for ; Thu, 15 May 2025 08:05:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747296341; cv=none; b=uojOE3QbR3+/RSd/TNKDvPpdsLeNaVPojbLdZvms2WquA9m5UsBt/n1evtEF9tVPAiWkWt/SsbdyVpDn2U+QA3Nv1H1dCPt2BSf0InQ3QczhksuXNC++zmQhtbC2oYVW/2AwDvFBjM4e0xyE4pUHS68weJi9zdtVlOe8hPRadoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747296341; c=relaxed/simple; bh=UJuyTxivS+g0xlBTa/B4ds5HvhahR14P6k02iRItjz0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XYCYqkrf8Ht/gWWSTQ1RlxJhkp+U+lVzaExz3EtVBQYmwQsi7vRRHgG4VhfSJYS9/fG3/6bbhZjCloagMkaABqvqCsRMssFLxIuhO4cCzKwIIivBtMmKLKPuMoW9p7YfPEDSUBp2tcbVt7W/D6aQIjzCUFwO9dOxUcn3sEcFLwc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=J4SxSqb4; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="J4SxSqb4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747296340; x=1778832340; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=UJuyTxivS+g0xlBTa/B4ds5HvhahR14P6k02iRItjz0=; b=J4SxSqb42+G6/xE3mP3aRaDx2qnPXWfeqjwCy7MfMaGY0Gafy/IZxAC4 jV/txh3E1M5PFQlD2zVsYmlemLILSvcOZj9SrmZvlSih/lAzanph+rVzI 5WMAb9fZV+l2iUYAFU2guCRDrDVINg0BbeVw13Bc7oPt/r/VXDk4xrV/T 24DrhmuvjAEYTYr8/Pmfjz0oAEqUDn88cuSCuFiMSTxxNim6aWeyJ+HJA MVbkw5tNtFtkeZFk8li7nrLXyZr1AAYPAv75rXb910mPZgK2f7i4LGkg+ VmUEugI7l2AY7W/7udnzH4Fg8StCFRgYcxqyv8usXNEnghfOEfPR6r33U Q==; X-CSE-ConnectionGUID: 8R+Hu86jSnGrQ4ptTO2HXg== X-CSE-MsgGUID: uo6ZaSNMRUqyqvsfEs1Jyw== X-IronPort-AV: E=McAfee;i="6700,10204,11433"; a="60230585" X-IronPort-AV: E=Sophos;i="6.15,290,1739865600"; d="scan'208";a="60230585" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2025 01:05:39 -0700 X-CSE-ConnectionGUID: 29do6jHcSNKogpDnvvqQaQ== X-CSE-MsgGUID: jDXGiLCiRNi3nxFHLXAR5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,290,1739865600"; d="scan'208";a="138177981" Received: from xiaoyaol-hp-g830.ccr.corp.intel.com (HELO [10.124.247.1]) ([10.124.247.1]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2025 01:05:19 -0700 Message-ID: Date: Thu, 15 May 2025 16:05:15 +0800 Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 04/27] hw/mips/loongson3_virt: Prefer using fw_cfg_init_mem_nodma() To: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Cc: Richard Henderson , kvm@vger.kernel.org, Sergio Lopez , Gerd Hoffmann , Peter Maydell , Laurent Vivier , Jiaxun Yang , Yi Liu , "Michael S. Tsirkin" , Eduardo Habkost , Marcel Apfelbaum , Alistair Francis , Daniel Henrique Barboza , Marcelo Tosatti , qemu-riscv@nongnu.org, Weiwei Li , Amit Shah , Zhao Liu , Yanan Wang , Helge Deller , Palmer Dabbelt , Ani Sinha , Igor Mammedov , Fabiano Rosas , Paolo Bonzini , Liu Zhiwei , =?UTF-8?Q?Cl=C3=A9ment_Mathieu--Drif?= , qemu-arm@nongnu.org, =?UTF-8?Q?Marc-Andr=C3=A9_Lureau?= , Huacai Chen , Jason Wang References: <20250508133550.81391-1-philmd@linaro.org> <20250508133550.81391-5-philmd@linaro.org> Content-Language: en-US From: Xiaoyao Li In-Reply-To: <20250508133550.81391-5-philmd@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/8/2025 9:35 PM, Philippe Mathieu-Daudé wrote: > fw_cfg_init_mem_wide() is prefered to initialize fw_cfg > with DMA support. Without DMA, use fw_cfg_init_mem_nodma(). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Xiaoyao Li > --- > hw/mips/loongson3_virt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c > index de6fbcc0cb4..654a2f0999f 100644 > --- a/hw/mips/loongson3_virt.c > +++ b/hw/mips/loongson3_virt.c > @@ -286,7 +286,7 @@ static void fw_conf_init(void) > FWCfgState *fw_cfg; > hwaddr cfg_addr = virt_memmap[VIRT_FW_CFG].base; > > - fw_cfg = fw_cfg_init_mem_wide(cfg_addr, cfg_addr + 8, 8, 0, NULL); > + fw_cfg = fw_cfg_init_mem_nodma(cfg_addr, cfg_addr + 8, 8); > fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)current_machine->smp.cpus); > fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)current_machine->smp.max_cpus); > fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, loaderparams.ram_size);