From patchwork Tue Oct 3 18:30:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 728816 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp2286030wrt; Tue, 3 Oct 2023 11:33:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlmz58vV3pLtN3/n7LcLrEJ7DHupFdIvUbJvl2KNbLubI+/Lj5sSgPpFDC8uKOmUFW8AEl X-Received: by 2002:a05:620a:2888:b0:768:1572:e9af with SMTP id j8-20020a05620a288800b007681572e9afmr499980qkp.8.1696358033023; Tue, 03 Oct 2023 11:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696358033; cv=none; d=google.com; s=arc-20160816; b=vHqShl/9bVCDCUbACxjvDYbDk4d7rLOxvgBRWRktDS6FSbjXrFGrq2AzCL5FpPhlBh 4pHRUXi0HoZkWLUjKIZM0rhxK3+B+KwPHrWXL7CfCKKivnID0/G2IuCoCZX+g0Gp9aJv C8/vZsc9BLSI8YEe6QqORHNz7nfwXLDKYcS7kO3plwIzyRUmVTynW27DRGBNvufbLyXc cmKbWiu/528L47+J2fUiD0m7p/1sxvmnTt3Ie6ox3pOUl1g2sNoEx8yMZAqEfUiVWlu0 /c3uCalMyu8C3l9dkXOORSCOsdShRbDfwlTEpfjfmG80Lt2u9pVNQCaWxeh9m2F/GB8k bmRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A7XCl0qp/obfnCpndkgxp3n8szX7HRfUMiRlfSbBwN0=; fh=JxWBtSZstwhZxj1nqbhkYnE1e7Ds6gYyoAtro8tkvc0=; b=WljsmQPPZV4N27qDzAk284szKRH35rYTfaUObX0M7AjYi9OhgsfwoIylJWpRCvHHPB rFqpZL7DqP1LASYp0zNyBOVaDVMc9E2knapmff5JWEqGVEZfu+yjPVBExB6vGXDvU+vp TOvS3g0tDsqH11NQ1os2FYRIWFT81640YDMLTflQw+Z7nJD6uHWehp6ceJ8WBpLkZ4Ic UilGn6ynHUHmaiq7VtK1Uhsv8m46JwzDiBCQ0az901HtyFPvPh/ohhoLxsBabLZl8RDW g/tKnwUDG/D1GARYuZis1WyUabmVX0pJKkjfduLRj94AzRNOl0M+ivoHAxiuszRF0a+1 nMDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IZC+cuCP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bi41-20020a05620a31a900b007759ca17486si767579qkb.560.2023.10.03.11.33.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 11:33:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IZC+cuCP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnkAv-000870-0L; Tue, 03 Oct 2023 14:31:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnkAs-000851-VB for qemu-devel@nongnu.org; Tue, 03 Oct 2023 14:31:14 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnkAr-0001gl-4k for qemu-devel@nongnu.org; Tue, 03 Oct 2023 14:31:14 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1c5ff5f858dso9834145ad.2 for ; Tue, 03 Oct 2023 11:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696357871; x=1696962671; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A7XCl0qp/obfnCpndkgxp3n8szX7HRfUMiRlfSbBwN0=; b=IZC+cuCPV9xju/wVWSzvrRQbflt5yNBkSfW2yuHVeznB2G+/NQX0AIi//0tDLdxK5R g0LIdWG2o9tPoqYezIVbaLJRP9WeLFTA3/DnerNSY1dHfRhHCnToI9grWm+JUIxe2YKo YFuQJMFE+X1wB2DOMgtrd0DhOeDBXjjm4I4HLGggUVQ0VI2AyscUhvzojjmQCdi0Jl4W 5+UqolGtf6t6EFu5dNqLWKE0MTsD80wEQ25AKPu8lVmZ3pv3UJqsc7+3ApR7hnC8Ri1h vE93K2Gk2Oh0Lh84EVS916TBomLLXK7xsCeTNPBNftcIQ4jLUa7y5ddMNFSOnz4RH0xR w8uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696357871; x=1696962671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A7XCl0qp/obfnCpndkgxp3n8szX7HRfUMiRlfSbBwN0=; b=aeh4jXH1jZQKH+2NMaU3TXhkTJ5hVVopM+5i69iXh181Tls1K13iprerPw308qQomD 5VJaUpDtd/36x6ZaQJy68ikRJJOJg2A3OKNtuPUSK66ehlhT3EyDu2FXZKeHIne+OwXQ DlxpaC+xLS3sFHlCO3VmEEDhdDqV0s3eoGVAeE8CEBe/MG+HSuR+LrHZU+5YuwsFLspi aAVPSYdM7BqhYXR0Mr2xe8O1nemk0P5G+crm6AXlqNTmd4TEHVJxjHZxSZINuYE6166X QrxEl9BiLeTSsxQGEclco9vJ5vlyAYfsNcFgYSwaLtox7m6BC6s1nYJ7VxqN4v8G6Bjj PRZg== X-Gm-Message-State: AOJu0YyU8lgFGNTrSwn5SGDgWba4cQ3SJpZXcV6czxk/UlvkQBysmqse iU+AlJS34gtn/6YLNsmIoQbyAc7jVCTsGNdmej8= X-Received: by 2002:a17:903:187:b0:1c3:749f:6a5d with SMTP id z7-20020a170903018700b001c3749f6a5dmr430295plg.4.1696357871395; Tue, 03 Oct 2023 11:31:11 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id g7-20020a170902934700b001b7cbc5871csm1920432plp.53.2023.10.03.11.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 11:31:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: fei2.wu@intel.com Subject: [PATCH v17 12/16] softmmu: Export qemu_ram_ptr_length Date: Tue, 3 Oct 2023 11:30:54 -0700 Message-Id: <20231003183058.1639121-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231003183058.1639121-1-richard.henderson@linaro.org> References: <20231003183058.1639121-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 2 ++ softmmu/physmem.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index ef23d65afc..ebdecf64a6 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2874,6 +2874,8 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr, hwaddr len, hwaddr addr1, hwaddr l, MemoryRegion *mr); void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr); +void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, + hwaddr *size, bool lock); /* Internal functions, part of the implementation of address_space_read_cached * and address_space_write_cached. */ diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 309653c722..69a853c27a 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -2182,8 +2182,8 @@ void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr) * * Called within RCU critical section. */ -static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, - hwaddr *size, bool lock) +void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, + hwaddr *size, bool lock) { RAMBlock *block = ram_block; if (*size == 0) {