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 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41B12CAC5B8 for ; Thu, 2 Oct 2025 08:46:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1135462.1472593 (Exim 4.92) (envelope-from ) id 1v4Eww-0004FU-Tj; Thu, 02 Oct 2025 08:46:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1135462.1472593; Thu, 02 Oct 2025 08:46:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1v4Eww-0004Ey-L1; Thu, 02 Oct 2025 08:46:06 +0000 Received: by outflank-mailman (input) for mailman id 1135462; Thu, 02 Oct 2025 08:46:05 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1v4Etf-00006C-4k for xen-devel@lists.xenproject.org; Thu, 02 Oct 2025 08:42:43 +0000 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [2a00:1450:4864:20::333]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c0ab2ad3-9f6b-11f0-9809-7dc792cee155; Thu, 02 Oct 2025 10:42:39 +0200 (CEST) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-46e48d6b95fso6167545e9.3 for ; Thu, 02 Oct 2025 01:42:39 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8f50b2sm2597515f8f.56.2025.10.02.01.42.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Oct 2025 01:42:38 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c0ab2ad3-9f6b-11f0-9809-7dc792cee155 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1759394559; x=1759999359; darn=lists.xenproject.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=sPyvtamk/7TWz3NLD4QWdvW1Is4VocR+bm6o/kbYsjI=; b=dsuY0OOaPTlyrgbZGF0WuS/+sp5VweXGlFCnZOOlKA3PIdamaOar6QnlHD2mpUJdNW fMV4pnSoF4W3iV5Pm4bBUcpfiSkvhi/gxU4ukGV8qHazLZagNj0U7cxBYFdNnwp/pyRS JOrt8bmoUAl5Uvb7Mx8zZGTPbWbyanUynP5mFjNKdHNZFIuh6PtwaPdRlfCUg4rLoIdW z9uowP4/KijFiifCgrXitzRW9/E7bbVyh4LlV41tK4st5ipTQTb5WYVbJfN6qKbtwGQ8 h486MBppLRGYFrJf3mlflDJ6iZ/h+2Pi+RcKp7L4uR4NDvjhRhxxEDEC5zY7RVGGU8ZE +OnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759394559; x=1759999359; 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=sPyvtamk/7TWz3NLD4QWdvW1Is4VocR+bm6o/kbYsjI=; b=tOn4tijI5Td16K8HooZLI6Bt7RUBO/iOkSrofAhTDZ421cGeeW8FH+wrsvG1Z+DU4E kQLDbXUMc7Y7HjjBN0Ij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5/W6noyWTP2pD3nWUiti/7EsFpua85fKefjjBmssQ== X-Received: by 2002:a05:600c:4fc6:b0:46e:1a07:7bd5 with SMTP id 5b1f17b1804b1-46e61285d7dmr48438525e9.29.1759394558687; Thu, 02 Oct 2025 01:42:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Richard Henderson , Halil Pasic , Christian Borntraeger , Jason Herne , Eric Farman , Matthew Rosato , David Hildenbrand , Ilya Leoshkevich Subject: [PATCH v4 07/17] hw/s390x/sclp: Replace [cpu_physical_memory -> address_space]_r/w() Date: Thu, 2 Oct 2025 10:41:52 +0200 Message-ID: <20251002084203.63899-8-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251002084203.63899-1-philmd@linaro.org> References: <20251002084203.63899-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cpu_physical_memory_read() and cpu_physical_memory_write() are legacy (see commit b7ecba0f6f6), replace by address_space_read() and address_space_write(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- hw/s390x/sclp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 16057356b11..d7cb99482b2 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -304,6 +304,7 @@ int sclp_service_call(S390CPU *cpu, uint64_t sccb, uint32_t code) SCLPDeviceClass *sclp_c = SCLP_GET_CLASS(sclp); SCCBHeader header; g_autofree SCCB *work_sccb = NULL; + AddressSpace *as = CPU(cpu)->as; /* first some basic checks on program checks */ if (env->psw.mask & PSW_MASK_PSTATE) { @@ -318,7 +319,8 @@ int sclp_service_call(S390CPU *cpu, uint64_t sccb, uint32_t code) } /* the header contains the actual length of the sccb */ - cpu_physical_memory_read(sccb, &header, sizeof(SCCBHeader)); + address_space_read(as, sccb, MEMTXATTRS_UNSPECIFIED, + &header, sizeof(SCCBHeader)); /* Valid sccb sizes */ if (be16_to_cpu(header.length) < sizeof(SCCBHeader)) { @@ -331,7 +333,8 @@ int sclp_service_call(S390CPU *cpu, uint64_t sccb, uint32_t code) * the host has checked the values */ work_sccb = g_malloc0(be16_to_cpu(header.length)); - cpu_physical_memory_read(sccb, work_sccb, be16_to_cpu(header.length)); + address_space_read(as, sccb, MEMTXATTRS_UNSPECIFIED, + work_sccb, be16_to_cpu(header.length)); if (!sclp_command_code_valid(code)) { work_sccb->h.response_code = cpu_to_be16(SCLP_RC_INVALID_SCLP_COMMAND); @@ -345,8 +348,8 @@ int sclp_service_call(S390CPU *cpu, uint64_t sccb, uint32_t code) sclp_c->execute(sclp, work_sccb, code); out_write: - cpu_physical_memory_write(sccb, work_sccb, - be16_to_cpu(work_sccb->h.length)); + address_space_write(as, sccb, MEMTXATTRS_UNSPECIFIED, + work_sccb, be16_to_cpu(header.length)); sclp_c->service_interrupt(sclp, sccb); -- 2.51.0