From patchwork Sat Dec 17 15:24:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 634846 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1413581pvb; Sat, 17 Dec 2022 07:25:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf57Enpg206LhbrWhlMR8CCv4WPR7iU46fmmXsmjaEBlYIZXe3hzusnJ7JY0BKF4P8w5XXo1 X-Received: by 2002:a05:6214:186d:b0:4c7:b0f:6751 with SMTP id eh13-20020a056214186d00b004c70b0f6751mr44747843qvb.4.1671290733909; Sat, 17 Dec 2022 07:25:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671290733; cv=none; d=google.com; s=arc-20160816; b=zybLiY9KXgrL5Vq1hDAyGDixkaxIQTw3ZbappG75yxXq2jRKvK3guTy0XgR9eLMh1I ww+dWgApd/ZwMw5YQ0z5+8j71W3WGHL5pY7TVp0fbf2OA7Af4MV24UvkKMDJtixMGh1m O9dFPbutMzsh1Vaa1godTnO6Q70g3FdJVDerGd0NcnoEgxG1Fsxie/ILFaAMWoDrIo44 18izHIEkoYmLfpiZ573ZWCOBPHvi1FhX3etR1AXmi88iLh9j0yf2kHxUYfV7VVE7HB03 mCSkZwEL6uC24inXipSlDOi/ThUUbkNHyhxCePhN2SmbYXDB8Ttm5QgTE+2yCwvxo2Ie Shbg== 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=1e1FU0aKLX/Wox+fFOeQyUefxVtLx/iUwvcr67HGk04=; b=nYccmV+1fkzAHNbcJoGMpiNIdR4xBhD08luicUn2SOgzC/JuDYI1k87tH5dxZ0slMB pSGaRvM7yRBe2A9jqAdLMDykV4w/IIZ3XeFPlmyGpvyqdWGmEmxRaRBaIwHtFHFwWIzG YV4NwtcDs7lLCSkXvGw3J0WppV3AJDKVb6OXhwkd4SQaPqxOMN9RB7QmjJvAG3R0zT0/ BY+oZlAXLVJEzoVyLtVQGEhuOiTSRKPeAcy3tDfjx53fzwqcQxsAqH4WC4ukAqyCGbdE QKdVdT5SGCfUlOAtzIjuechAjv3RCHF5N4wkzAQg+O0y8HFhjuRrNWNIUFXMBRwndBIx DYyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TT1kpYQ7; 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 f14-20020a05620a408e00b006fc57bff3d6si2408318qko.449.2022.12.17.07.25.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Dec 2022 07:25:33 -0800 (PST) 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=TT1kpYQ7; 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 1p6Z3k-0003OJ-UC; Sat, 17 Dec 2022 10:25:08 -0500 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 1p6Z3j-0003NX-3z for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:07 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Z3h-0005NK-Fi for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:06 -0500 Received: by mail-ej1-x635.google.com with SMTP id x22so12471435ejs.11 for ; Sat, 17 Dec 2022 07:25:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=1e1FU0aKLX/Wox+fFOeQyUefxVtLx/iUwvcr67HGk04=; b=TT1kpYQ7q4riX6ORm/KG5TWUOXTRtJ5kCfAslzTQuZinHAYhh1pYP37n6H1Vm/MsnC jwrpE5ArHSvimmvTlI7ttGoXCJNLP4OapfI/KvOP9zfVpEzC6G7L8lpjlPimLVhb4/Yn UCAjB2wESg8aZbGffQ6XrDDF0xv09AtY+0qXOIlGZX7wzZkgvkr5nzjmAcynUpIsGZic Gdmbwh43CQr1GdoM1k4SiCouFvgI9qh5dQS/X7y0TmDlBXuS/YC0SKsSmkWT7NLiftCY hIe68tpcmM7fkwOkvqLoKm8Ak65c+Fd/Lgy6B8N27/7S4X9WkIAvJv265a0MRLwvWosj 11fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=1e1FU0aKLX/Wox+fFOeQyUefxVtLx/iUwvcr67HGk04=; b=Y7VODphqqgOAhlolwTqbHK4ILzRQwNaTZXxju8Kliza2hScvS6N1vRpj6H8XnYT2pJ I94Px4kCGo4ZRorLkjGzh2esqRNCWcmlSLv6D/OxJhjd1TCPfpGBNgSINrxdlhDCwdd1 mbKC9/7Kl/X24y2aLvFdIMWcgD2sygTFI81kz1RgXXIddKjNpCGt3g/Az6FJ4WgBfGZG E0nRI4fV22yglAC7D8KrvPAkmQyHmEpdg1eYvvlWp+eODmnssWs82QR/J6ZQsc9PPERA CV8xcS4gsrzjdIOJYJyHH9d0PSJaMpV8O+BNMxywP9mEf1tme6sYiNUb6VLA+IAgtN5t wSuA== X-Gm-Message-State: AFqh2koI7ECQynt37l8nRw+82TAtj9tx3ngIqVnIvCiqzYTDC1pBBL6S pu4nRJdCYTeshFpMgH6AYiTQgRbjLXNQB8UN9LI= X-Received: by 2002:a17:907:8b89:b0:7c9:6e0e:1428 with SMTP id tb9-20020a1709078b8900b007c96e0e1428mr9329800ejc.47.1671290703991; Sat, 17 Dec 2022 07:25:03 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id q13-20020a1709064c8d00b007c0c91eae04sm2108592eju.151.2022.12.17.07.25.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 17 Dec 2022 07:25:03 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Paolo Bonzini , Peter Xu , Matthew Rosato , Halil Pasic , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Hildenbrand , Christian Borntraeger , Thomas Huth , Eric Farman , Ilya Leoshkevich Subject: [PATCH v2 1/5] exec/memory: Expose memory_region_access_valid() Date: Sat, 17 Dec 2022 16:24:50 +0100 Message-Id: <20221217152454.96388-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221217152454.96388-1-philmd@linaro.org> References: <20221217152454.96388-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=philmd@linaro.org; helo=mail-ej1-x635.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=unavailable 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 Instead of having hardware device poking into memory internal API, expose memory_region_access_valid(). Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Farman Reviewed-by: Thomas Huth --- hw/s390x/s390-pci-inst.c | 2 +- include/exec/memory-internal.h | 4 ---- include/exec/memory.h | 4 ++++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 66e764f901..35db7777e4 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "exec/memop.h" -#include "exec/memory-internal.h" +#include "exec/memory.h" #include "qemu/error-report.h" #include "sysemu/hw_accel.h" #include "hw/s390x/s390-pci-inst.h" diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 9fcc2af25c..100c1237ac 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -38,10 +38,6 @@ void flatview_unref(FlatView *view); extern const MemoryRegionOps unassigned_mem_ops; -bool memory_region_access_valid(MemoryRegion *mr, hwaddr addr, - unsigned size, bool is_write, - MemTxAttrs attrs); - void flatview_add_to_dispatch(FlatView *fv, MemoryRegionSection *section); AddressSpaceDispatch *address_space_dispatch_new(FlatView *fv); void address_space_dispatch_compact(AddressSpaceDispatch *d); diff --git a/include/exec/memory.h b/include/exec/memory.h index 91f8a2395a..c37ffdbcd1 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2442,6 +2442,10 @@ void memory_global_dirty_log_stop(unsigned int flags); void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled); +bool memory_region_access_valid(MemoryRegion *mr, hwaddr addr, + unsigned size, bool is_write, + MemTxAttrs attrs); + /** * memory_region_dispatch_read: perform a read directly to the specified * MemoryRegion. From patchwork Sat Dec 17 15:24:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 634849 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1414102pvb; Sat, 17 Dec 2022 07:27:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXuBa0JQDTeu+ohTi/Mmq56Ry9LKEkgJflqluXszwS7gIZLSZKwqoGNhC73ApwJkzkcVcwe9 X-Received: by 2002:ac8:4743:0:b0:3a9:6b96:f14b with SMTP id k3-20020ac84743000000b003a96b96f14bmr12747256qtp.38.1671290822054; Sat, 17 Dec 2022 07:27:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671290822; cv=none; d=google.com; s=arc-20160816; b=TgOSneMYTQ/IA33+W2Mfp9TpfWHRGIAK97f/7lIn2PjdPbv8wvbQ7g/TewFm6mQ97Y HPR3h6zroqBTH3Wb8w0aR2Gd1I8V3lvkrdN/RnlqOvDxCkF04H8TlonkOMlMa2NM9n6D SfLoLC447/y4VK8Nmzm1b3IkaqqyUwxBiFs45mLWb4jnWeYEGKGcuA299nqbx8K8FgmA sI4V4qpFUS6LOw/C/CB/s4Klnqd2g5EYuYDHtxBuoAHfNFurnayxJq5uG5PZYtjZfjBq +xigMWDSxr4nJ0CXFluTlXqW2qUZlTzKuyirU36KUDJIyaC2jJCo5Pb6xZKzl7UQ1YSA PxXw== 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=Kw1OjQ5bJTHVjNVBcrbAjUuHpYpt+dRXG1ISohyf01M=; b=KHc4c/04+d0DseIqtD/uw4PS46w0TJgPmMyfcaYAw6sC24yQBTf6XsHdMUh5ignWzh DxvOSb/tOW1wNyDYZrwOQOtXlqDOh2ie9waQkM1f6YnieS9jGpVjUfPWfvNO332ItpLm +kcwwQKPIudSNrBl5vdC5Z7FC7NXxU+99c2TMeonzPanNDOz+tSO90tSc4JcJbBFtvQm nPvNDH3w4oXnkBfoSyP9y5NWzi94Kqu+m3zpyO/3KVdSk4j6QAmVHvqwuIM2O++a+sNu gjSeEy5aL2Vwp4qnF9S7DXpjDSGwNINb3ITumwBv4/EwRRvxur0rTJuq6sGH8P2puyaL vlfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Di4wYeCN; 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 d17-20020ac86691000000b003a5504674e8si163720qtp.278.2022.12.17.07.27.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Dec 2022 07:27:02 -0800 (PST) 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=Di4wYeCN; 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 1p6Z3q-0003PD-Nn; Sat, 17 Dec 2022 10:25:14 -0500 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 1p6Z3o-0003Of-Uv for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:12 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Z3n-0005OV-8H for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:12 -0500 Received: by mail-ej1-x62b.google.com with SMTP id gh17so12537579ejb.6 for ; Sat, 17 Dec 2022 07:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=Kw1OjQ5bJTHVjNVBcrbAjUuHpYpt+dRXG1ISohyf01M=; b=Di4wYeCNcUyETg+kjFT1GZF088S+YKhSQ/hQikA498Yoh2hFhvDjzBvfVBhaaBNeDY aWXeupZsRnSvD1VpmMCnyu51LaHvwMHSPAQ46CtM5GqiEc1wAbK4SGYvfJahnZ3xkGWz wHqQxaVmvKsFOv2A/JRHmhRWGptfwRMwYui+mVLD1j9lRkJVS2ibrTbqCPxpqQeAEAD/ fZOp/H+WJIRux5XUm3UXjsggcWtIM4FXCO8HrOhspWqtwbHURozpvi2+k8rOZ5DFNdrX 5C55tXi7nSm9FG0o5wAx+09B5VBgRrVxKKzAEuf4FMBNGVWp6o9D1jOUfZc51/WltiwU jnLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Kw1OjQ5bJTHVjNVBcrbAjUuHpYpt+dRXG1ISohyf01M=; b=gUvC89mOX8es0hhI6bbTlRY7PPRNlBJRFb5ZxbphORAlkLhUZFfhEKPn5rPOPcPtHZ mfDE0droFv+nm7KklBJPHahSy4Ja9DfomwkT0qCvz24f+ALsQFVvE3uawR5TngwiwjSU q2IJO9CTyJdb6FLzoBSjrthhUySxrSb8Ygw5S1aS0KQvyxExiQD75XBALUHmWmGRkQJp ERAP1Xc6IyFE3BvL5pQyWs8mg/oU6qLUS4LpSTsghhev6/7IK11HVtlvVP4vs+fsISPA QYcJy9t8lx1fEWW7QUB3GaqKuoyuF5WVpXGzZ7h9I68emCT92KB6hPThJJFPmV10WzDs hjtA== X-Gm-Message-State: AFqh2kr7Jv5vU6ddKEHPPsAx+7iwpMxI75OoR5/mer0FcLN5AyObBajn KaEA2Yr44m+7VCBrEzY+YYqVUbV6sMe0WsF2Xm0= X-Received: by 2002:a17:906:a4d:b0:7f7:a985:1849 with SMTP id x13-20020a1709060a4d00b007f7a9851849mr3854942ejf.24.1671290709697; Sat, 17 Dec 2022 07:25:09 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id f1-20020a17090631c100b007c07b23a79bsm2089711ejf.213.2022.12.17.07.25.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 17 Dec 2022 07:25:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Paolo Bonzini , Peter Xu , Matthew Rosato , Halil Pasic , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Hildenbrand , Christian Borntraeger , Thomas Huth , Eric Farman , Ilya Leoshkevich Subject: [PATCH v2 2/5] hw/s390x/pv: Un-inline s390_pv_init() Date: Sat, 17 Dec 2022 16:24:51 +0100 Message-Id: <20221217152454.96388-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221217152454.96388-1-philmd@linaro.org> References: <20221217152454.96388-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.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=unavailable 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 There is no point in having s390_pv_init() inlined. Directly call s390_pv_kvm_init() guarded by kvm_enabled() so the compiler can elide when CONFIG_KVM is not set. Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/pv.c | 4 +++- hw/s390x/s390-virtio-ccw.c | 6 ++++-- include/hw/s390x/pv.h | 13 ------------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c index 8dfe92d8df..17c658402d 100644 --- a/hw/s390x/pv.c +++ b/hw/s390x/pv.c @@ -251,7 +251,9 @@ struct S390PVGuestClass { int s390_pv_kvm_init(ConfidentialGuestSupport *cgs, Error **errp) { - if (!object_dynamic_cast(OBJECT(cgs), TYPE_S390_PV_GUEST)) { + assert(kvm_enabled()); + + if (!cgs || !object_dynamic_cast(OBJECT(cgs), TYPE_S390_PV_GUEST)) { return 0; } diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 2e64ffab45..d9a96e315e 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -255,8 +255,10 @@ static void ccw_init(MachineState *machine) /* init CPUs (incl. CPU model) early so s390_has_feature() works */ s390_init_cpus(machine); - /* Need CPU model to be determined before we can set up PV */ - s390_pv_init(machine->cgs, &error_fatal); + if (kvm_enabled()) { + /* Need CPU model to be determined before we can set up PV */ + s390_pv_kvm_init(machine->cgs, &error_fatal); + } s390_flic_init(); diff --git a/include/hw/s390x/pv.h b/include/hw/s390x/pv.h index 9360aa1091..fad61cc6c6 100644 --- a/include/hw/s390x/pv.h +++ b/include/hw/s390x/pv.h @@ -12,7 +12,6 @@ #ifndef HW_S390_PV_H #define HW_S390_PV_H -#include "qapi/error.h" #include "sysemu/kvm.h" #ifdef CONFIG_KVM @@ -78,17 +77,5 @@ static inline int kvm_s390_dump_completion_data(void *buff) { return 0; } #endif /* CONFIG_KVM */ int s390_pv_kvm_init(ConfidentialGuestSupport *cgs, Error **errp); -static inline int s390_pv_init(ConfidentialGuestSupport *cgs, Error **errp) -{ - if (!cgs) { - return 0; - } - if (kvm_enabled()) { - return s390_pv_kvm_init(cgs, errp); - } - - error_setg(errp, "Protected Virtualization requires KVM"); - return -1; -} #endif /* HW_S390_PV_H */ From patchwork Sat Dec 17 15:24:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 634850 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1414327pvb; Sat, 17 Dec 2022 07:27:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf5GqlLv7mxRBRS96TGHJ8Tt4ZGHmsezajzU6J6GIn9ZX8oL5/sBe2GKLrcMl3aJiEpIIUq9 X-Received: by 2002:a05:622a:1f8d:b0:3a8:19a4:4004 with SMTP id cb13-20020a05622a1f8d00b003a819a44004mr34845006qtb.33.1671290856988; Sat, 17 Dec 2022 07:27:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671290856; cv=none; d=google.com; s=arc-20160816; b=hZoRQPCc8WslTMi1Rv/RAgAX2vjTPIZjXyozRBtM8wyzEGpUcD0JnW9NchR8ZhIrXp SAdGSN5OXhyUahIGM18TbbW4NbA+yVB5HaOaB/qvDrW5IwLyEK+7W6eSK1c4b7xx9xUh IA9/kMZzUT+dqHmlJ0dhuAiCMJ45qLNIqfDK9Xu99ysliARpsaTi2c3N7BX1cH6XKCSk +eVcQlPQjx8SfMDrFaYm4wyGYesvA5HJ4Oy9FOp7e6ryQkH0fgJlQRkLmcR0QIifz2E5 iBUMxlrzLoGT1QSLXN3k3LizG7i0pNStdBTSIlqV3TCEWYO/eoKfMvV3eedKhUcKyFmt Kzgg== 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=m3BLA48xNHLVgpYtc5xcAlbVIvNCftpdVHH8TeBr2fM=; b=AECdM1WohMRFRFUSEDOqZGE+pJDPDt59XKrpnf1TU6YcStD4ga5L3aq/JpIa3OHb6P gsVNaCq+iGH6n46+MuckBtABadCJ/fu59W8JCJtTYI42psaei4AqaRHTPG1VDSwQ+3cw Ws0Xz7vT2E5X5gsQhGCXK54U/VUnjO+hgFTdOtgYAg2wommNSHs9tuKeqssdzupD71Rg HVmXDGGXHa6P8OlfKpX3rebbL1fzqXo+vzdgiqX2BGekgKOiINFl/wK81lIcy6LSkXhz iIUyDi4m+wxln6fru0jyaJrk4dWd3OGP6YuFFZ0bxAfwTsAYd5HAwSE0C3I/TXVPYEn3 spVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ap1mJF0A; 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 z25-20020ac86b99000000b003a7f93a0df9si2226985qts.413.2022.12.17.07.27.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Dec 2022 07:27:36 -0800 (PST) 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=ap1mJF0A; 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 1p6Z3y-0003Ru-Fk; Sat, 17 Dec 2022 10:25:22 -0500 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 1p6Z3v-0003RI-Rc for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:19 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Z3t-0005Pg-4v for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:19 -0500 Received: by mail-ed1-x52a.google.com with SMTP id c17so7356763edj.13 for ; Sat, 17 Dec 2022 07:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=m3BLA48xNHLVgpYtc5xcAlbVIvNCftpdVHH8TeBr2fM=; b=ap1mJF0AaUvEOAbk2a+bCaChfHX0HNw7ei51hoapYvVdLctPOSsJsHc/n8VA707MkE gpyR85b+A6RbRQK7K8szl6Z+eM9RtGWL+or9F9rNnc7zmOcmTnF1xaZsxkEvDmr2TDlb +eRWhG+GjuVCQB6JZKAYT64qlutv/n9uypru7KYeCdgZEu3CqlLCalTsuqTaAywPC5mJ 3fdgX197zxDkzU7qBN291FueRr/XuNa6FL5fGz7RYzEc9lVWiJn60HgXSdLK9ZQF3aaR yk4zspviXTzYGAVbnHCtJWpvPradsSk9ec2pmMrSngNycauVFEFIdkDk7IgLC6fbbBAX g2mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=m3BLA48xNHLVgpYtc5xcAlbVIvNCftpdVHH8TeBr2fM=; b=5HBccS7RLxXhDQWfv3FUgwuyiZ88JChFtW+LsKOKTVq1a6xI6HnCHqusR6Z3/0mJQo bEZMlNjzX9AoI5mjLlHwTceqL4t3II6l/BOo6ej2cgsZ9Ss07CzNi1vJoCeLZ8W6ag9d MoItPve8/bH4G4ahJweJNEiJr26DeM6zkUw1Mk7EDfAb1jFi2TJyCnxxnaIctyalSeR1 jKGwEs3iWatJovNGb/ugKLtckVL5rppvQDf5AQFWZ9d5sQVPdIqvSp3bS7yO2CthQ7uZ Kd9j+GYMyyVgfSJtQkuNGVPpWbxkHBWy57UYTFKmo1s5w6iW2MgT3eZbamu1ke825XxY i5Mg== X-Gm-Message-State: ANoB5plcJPag2BoOAd+xxfEYeX844JAug3+0XmZGkNLsUY8wjyYBfFS7 R7+FldwKioy0KzG6ryNcc0EQhlMbBS5aAcUwfq4= X-Received: by 2002:a05:6402:7ca:b0:46b:aa:8564 with SMTP id u10-20020a05640207ca00b0046b00aa8564mr27004505edy.30.1671290715342; Sat, 17 Dec 2022 07:25:15 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id ck29-20020a0564021c1d00b0046f73b46c5csm2071998edb.23.2022.12.17.07.25.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 17 Dec 2022 07:25:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Paolo Bonzini , Peter Xu , Matthew Rosato , Halil Pasic , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Hildenbrand , Christian Borntraeger , Thomas Huth , Eric Farman , Ilya Leoshkevich Subject: [PATCH v2 3/5] hw/s390x/pv: Restrict Protected Virtualization to sysemu Date: Sat, 17 Dec 2022 16:24:52 +0100 Message-Id: <20221217152454.96388-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221217152454.96388-1-philmd@linaro.org> References: <20221217152454.96388-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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=unavailable 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 Protected Virtualization is irrelevant in user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- target/s390x/cpu_features.c | 4 ++++ target/s390x/cpu_models.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 5528acd082..2e4e11d264 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -14,7 +14,9 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "cpu_features.h" +#ifndef CONFIG_USER_ONLY #include "hw/s390x/pv.h" +#endif #define DEF_FEAT(_FEAT, _NAME, _TYPE, _BIT, _DESC) \ [S390_FEAT_##_FEAT] = { \ @@ -107,6 +109,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type, feat = find_next_bit(features, S390_FEAT_MAX, feat + 1); } +#ifndef CONFIG_USER_ONLY if (!s390_is_pv()) { return; } @@ -147,6 +150,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type, default: return; } +#endif } void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type, diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index c3a4f80633..065ec6d66c 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -23,8 +23,8 @@ #include "qemu/qemu-print.h" #ifndef CONFIG_USER_ONLY #include "sysemu/sysemu.h" -#endif #include "hw/s390x/pv.h" +#endif #define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \ { \ @@ -236,6 +236,7 @@ bool s390_has_feat(S390Feat feat) return 0; } +#ifndef CONFIG_USER_ONLY if (s390_is_pv()) { switch (feat) { case S390_FEAT_DIAG_318: @@ -259,6 +260,7 @@ bool s390_has_feat(S390Feat feat) break; } } +#endif return test_bit(feat, cpu->model->features); } From patchwork Sat Dec 17 15:24:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 634848 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1414000pvb; Sat, 17 Dec 2022 07:26:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf6jLyveA8wO4gQQjWb3ak9rN8+g3x1KoOoFGSNLbIR23CjorcCiidEZlVizx5S2//AM88Ds X-Received: by 2002:a0c:ec05:0:b0:4c6:f778:f906 with SMTP id y5-20020a0cec05000000b004c6f778f906mr47375531qvo.3.1671290806656; Sat, 17 Dec 2022 07:26:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671290806; cv=none; d=google.com; s=arc-20160816; b=KLdHV7RzvxqgUfG0vGVH/8WivtqDh1YJ6Pp5OV9lDMF2Tc1vc6jODHo0sEIjsMCTkF 2pJ8H5ne5zUYxaPqlIdkHgpUFnKsJovS8G7ChgCnr67GY1jYT/UKb/JPPlVBNn7lT8DW mwzn8tlifyDKGNlW2mzMUPJ0j870Aqfi4uiwIWP5j3GX8+hkWmd50sf/+RtYH7/0pyTo h1rc/auiFGz7i0yCzPQSzhMUwgXu6zZHS8T4mObUcRn/fVSP5xuZLP2EPjvcCHJOQs2z uJW3cTfSNtg/4fr8Be4T+6UyCFdIppUEnsMRPivEzitzUhTxoag2DXbH6YfuJIK4rZ8Y RI5g== 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=241xuWhhObSETZNdWpk3wWzEiWP/G0ELuzzxSlPjcGI=; b=mcviM7jq8TXPhHxqg23FvOPTsKLAN3NyQpLZLkppVN1Ra6eeH3O7dMxS6BytMufjmN jb0f7uTcsohRpsQVrERr70VrbrRCFvxJJ/OgbvkZ6cron60+odUV/hyrrK0gHSxvjzwW jraCO7jXASM+yDzwAHJXh8/yZtEJbO4R3XspM43Hvsi1ercRx988vn6OHWwr9dlb9Zc/ ywFWh1cJuwYFdPxw1HN1bmqZjICw6EYim4lPgj51vXCzpGwBA7aIHn2tIklfD5E1QScw yx0C8bZxf0/zCGefYeN75XVuYZzVSw2RlLznx4EREtSeEX+5u/WcPo9Zw6rbG1TApPNz /U9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bZbND38K; 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 r10-20020ad4576a000000b004c72a5613c8si2400517qvx.329.2022.12.17.07.26.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Dec 2022 07:26:46 -0800 (PST) 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=bZbND38K; 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 1p6Z42-0003Sm-SE; Sat, 17 Dec 2022 10:25:27 -0500 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 1p6Z3z-0003SB-O1 for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:23 -0500 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Z3y-0005NE-6x for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:23 -0500 Received: by mail-ej1-x630.google.com with SMTP id n20so12652513ejh.0 for ; Sat, 17 Dec 2022 07:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=241xuWhhObSETZNdWpk3wWzEiWP/G0ELuzzxSlPjcGI=; b=bZbND38KikIhh4+ZlbY40kD2Lk5nBF1Vog7hvwWJ/Va+k1vB0CDlmtB1rUm0mzge5I 0jAFSzkC/A41rJe/h6XBRMaAiedP0BOAXkUnybg9m5hdrqEtdhz9SotNa6Jv8eSV/oCL FWfqmkM/Enl05fbrt9p0P4Kj9HCA7dC31WnmnBGzMb1gWj3wfyTABNyqJZiC0xzwopLh kvuLIgawz2sOKKI/rea5TTtA1XooOqH2Hsx1UibdAkgQNJ/Z5dKtezAwPq7hv47AGdI+ 621Q7iZPwvRfozY8aqEolQx554JwfSQPpQoqnCT5/owe8USLJLEK+hpsTVW6O7E7zvm6 a6LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=241xuWhhObSETZNdWpk3wWzEiWP/G0ELuzzxSlPjcGI=; b=5IZE9QPOBvuD6rUKXNdKlmsahGlDtd+esHXbGrI4c6msOFdXYUsUX53mrTDEYd4QIH y9llJJXGVnTxV7kmsKNcplF50Cuz2CmP46oIrlsWlo3H5DMBjEwJrVrlcweDphG8qQNQ wTmZnf83Rb+g2yN2/b2XDfG5Gh7SgYfzASFzioaodnwRdK7MeqHWjMrmsW0GVYAbCM0K SkOyhXv8l9a6kvSwndr3VHk7aupK+hOatevmWEZKv9E78qRRr6kfjEUGRqUVs7su474R cyU9twE65mOXUUFuAKAJP8kbDCiKtbgyYbLOrpYi/ITzci/A1S1wRB5ZFwYmgE6edPQ9 NC0g== X-Gm-Message-State: ANoB5pnJ6DoL5hwTy70N7qqSG3OadT5ryZLK0gNL2iPQ12HxqS3oRleb Sw7vV8uWgd0AelRVfsQBxPxgWzOsUvfDb8bZpuc= X-Received: by 2002:a17:907:110a:b0:7c1:4bb2:f62b with SMTP id qu10-20020a170907110a00b007c14bb2f62bmr26167088ejb.27.1671290721053; Sat, 17 Dec 2022 07:25:21 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id kx22-20020a170907775600b007c17b3a4163sm2146838ejc.15.2022.12.17.07.25.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 17 Dec 2022 07:25:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Paolo Bonzini , Peter Xu , Matthew Rosato , Halil Pasic , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Hildenbrand , Christian Borntraeger , Thomas Huth , Eric Farman , Ilya Leoshkevich Subject: [PATCH v2 4/5] target/s390x/tcg/misc_helper: Remove unused "memory.h" include Date: Sat, 17 Dec 2022 16:24:53 +0100 Message-Id: <20221217152454.96388-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221217152454.96388-1-philmd@linaro.org> References: <20221217152454.96388-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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, TVD_SPACE_RATIO=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 Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/s390x/tcg/misc_helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index 71388a7119..576157b1f3 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -23,7 +23,6 @@ #include "qemu/main-loop.h" #include "cpu.h" #include "s390x-internal.h" -#include "exec/memory.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "qemu/timer.h" From patchwork Sat Dec 17 15:24:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 634851 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1414358pvb; Sat, 17 Dec 2022 07:27:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf7jSQvNwPW3EUOXL1McYONbxz8Pd2fdbWja86ttvKBlvX1BRQLFv81ITqLbboEvf3W41KVu X-Received: by 2002:a05:6214:4411:b0:4b4:a3d6:6877 with SMTP id oj17-20020a056214441100b004b4a3d66877mr48844534qvb.28.1671290862166; Sat, 17 Dec 2022 07:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671290862; cv=none; d=google.com; s=arc-20160816; b=CF5GzVniEJ2/CruTHp/vrKP7VEXDvDfowFi6h3magQ5RFnOVC40+7uwJywjof0gsXp CBKRjnIzhnB6bqrHUz1wNLCbXb+tIHTEyFj+41B2tqqtQjHE5YwNZGWSg72c022XvnVy aObc4X+/189yM1jGpvdFtESw9eu8AQsBZIP7SIwgONXrJHDAG7dhc9+fSiz4xgMaIWnl BwsHY46Pmse3iCtQaZjvt9uj8CO9ak+5l6q2GrCOd/YHVJfcU/rKIe2k7Op9zKk1g6kO ftU4ZnoLZg+zdbiaJHGzdYHRZGM2eo15Ui6YRRs6QjeBPeZNBPbBzmtMxCyxh0tdWgml ufxA== 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=Kga5RZQ0pXj6oEgyCnjUh8d8RvnKnrRGTcdOKmgX+hQ=; b=oTtntE2uZso4YCntezVIGr7Vl2m2o8wvvQ62JQ7s8ojWEOQ7USDPJIGJ+0AFTgZHb6 YIE3s9+a1MqYLuZBiqzRVjVq7xPyfMtItzxz4UHNlX8mm9z4UIrYrt190jZOqQca1TGS gdBHplC66Bs8J+cu7QnRvLRVs1yhFmxW5gf81ZXkUra4yU0oZNaMhMN4zz2CxRIodOpT XaoMFz6s/q8DLPRD9rp+p37idIMy59OLcvdgneTFH32kPX1qLLbW6sUvLozuhcOk198D E3p304w28nGA28ig356ZzPbTikoiFksRCdIQfW8sx0ERJ+nyWmQpWIKF1oLQcZL00L4L 6dig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XkmpCIpK; 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 iw14-20020a0562140f2e00b00496fd123f0asi2292095qvb.272.2022.12.17.07.27.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Dec 2022 07:27:42 -0800 (PST) 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=XkmpCIpK; 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 1p6Z4H-0003YY-9A; Sat, 17 Dec 2022 10:25:41 -0500 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 1p6Z4A-0003XU-8d for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:36 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Z48-0005Pg-5i for qemu-devel@nongnu.org; Sat, 17 Dec 2022 10:25:33 -0500 Received: by mail-ed1-x52a.google.com with SMTP id c17so7357126edj.13 for ; Sat, 17 Dec 2022 07:25:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=Kga5RZQ0pXj6oEgyCnjUh8d8RvnKnrRGTcdOKmgX+hQ=; b=XkmpCIpKYHTvM2Dm6YUZyA46vCplj7PS+ruKN1s+dRusjSPoffF9n7Hg2/t065zYMj 6TpdgCGxUAa3bc+z9vSGfjM/m+so3Pug/ZlLZ1fTYBz1N/xdEASxfX1eRPfFtCiQTymi q3kFJ4t6mD4IyUn/i+VGZb+UDAXyCOZVBQir2j42oC5L3G+Xtm1WEeneer3nL3Ds9t+d tZt+fhS30Xse+nOYxweUvl2GjhfBveoJWhl1aHI0678aPHET78/6DHZFzTduUDdzgtxt hXUCPqSojReFPzHTKa/5/FX1JYDuRHQPaz1zhvEZ6uSWOFW82bEhKdz9RGl2m3Cxqf+Y f5ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Kga5RZQ0pXj6oEgyCnjUh8d8RvnKnrRGTcdOKmgX+hQ=; b=dlJqTN8/baIzYaHWIq0UuXsZx5Xz0IP+ONGjU/J77qodzeuXEhYw/5coacoRiKrqAe 1Q+k2xkG6NGCcRYUnInyVaQbNAujsipQu0vuunCYLZSgjM3767rMqHSOZo91vYbcVLOT Zkqn3GD0lOffvUiCXWa8ZrLAiZ0xdE+6cO1vum/jbPfuBJejhQFJVHdYPb7rOHgcowR1 4ELy+bwgTVHzBmxszBaVXB9QEjRCx8NTbaHB74axuygtkm82MArp1hzWkrcU6kUf4pq/ cJx1BN8nBbjglnjBjKUzg1ykcc3Keu8Z/Vns+ArsQ6ugKV46BVMwp16My/pPmQ80PUXt xljg== X-Gm-Message-State: AFqh2kq85Lp6fUpS6M9+OSLI78uyWlQa80cB4WHUcqXdlTdT3cWQUVQQ +1pfV4B9JlsLqIS/UVS7jeEG8LNsYw+NWkrnqao= X-Received: by 2002:aa7:d6da:0:b0:474:c69:9ada with SMTP id x26-20020aa7d6da000000b004740c699adamr14327571edr.24.1671290726727; Sat, 17 Dec 2022 07:25:26 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id lx5-20020a170906af0500b007af75e6b6fesm2138192ejb.147.2022.12.17.07.25.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 17 Dec 2022 07:25:26 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Paolo Bonzini , Peter Xu , Matthew Rosato , Halil Pasic , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Hildenbrand , Christian Borntraeger , Thomas Huth , Eric Farman , Ilya Leoshkevich Subject: [PATCH v2 5/5] target/s390x/tcg/excp_helper: Restrict system headers to sysemu Date: Sat, 17 Dec 2022 16:24:54 +0100 Message-Id: <20221217152454.96388-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221217152454.96388-1-philmd@linaro.org> References: <20221217152454.96388-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- target/s390x/tcg/excp_helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index fe02d82201..bc767f0443 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -21,15 +21,15 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "cpu.h" -#include "s390x-internal.h" #include "exec/helper-proto.h" -#include "qemu/timer.h" #include "exec/exec-all.h" #include "exec/cpu_ldst.h" -#include "hw/s390x/ioinst.h" -#include "exec/address-spaces.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #ifndef CONFIG_USER_ONLY +#include "qemu/timer.h" +#include "exec/address-spaces.h" +#include "hw/s390x/ioinst.h" #include "hw/s390x/s390_flic.h" #include "hw/boards.h" #endif