From patchwork Fri Apr 22 10:04:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 564791 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp341639map; Fri, 22 Apr 2022 03:33:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbpH+WCy0Pk9w+x6ERkW01Zex1aM5CVkmdKUMOkbiw6pJN2VqlZ+0FufJSAv8l2NEJopqL X-Received: by 2002:ad4:5842:0:b0:444:5137:44c6 with SMTP id de2-20020ad45842000000b00444513744c6mr2720337qvb.27.1650623593502; Fri, 22 Apr 2022 03:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650623593; cv=none; d=google.com; s=arc-20160816; b=KprrQ3Mk3bBSfY7R1/3zldIjzuWjX/8N8r/su16WVzO7vARZ2l9ziTQxo0e4fNXWE+ ceK6QCmo0hQyuj98oXKxWM+CwnmXJFMXz8duaE6WYkPFWQTsbs5MLxocrZX1wZQrPIk5 t4VpWH9Hdf4K287UT+JYoOdMIrydR3HWmnkS8Yv6mlvNz2R1XUXB9GBuaFKJ41fRlOGB wFMdq/9ES8GTFzcSOhver9LnliH/D7Vid7Fbc2HD5Wcy7OufQr+QvUvnWhUNuWbIdTUH 7GLN/5cLithQ+t6uvHK7iOy1LwcoFe1SXQCF8q3CzIdpAqBrESpnY82+8DTRC2hlT2bQ UZsA== 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:to:from :dkim-signature; bh=ZEhoOIoK2+oeX738Kznp6czGDdThyWg3QrQY8i6NzM0=; b=mLb+qo+O14pULqUc9ily51oQO8lX4Clyj7XGGajjLlwM7n/lrZ88UyLA8geCgYgdWS wr4Z6Lqfhj7MFocmkivDfmZTPP5NuV24edw22JbUaB/nobpveFgLUCwOa11aBQM2k3y3 sYIF2sxDhoAST+ApgmkI4Vidn3YuOB8/EJ58rBNgQB2VmMWS7IOiSD1on3nKO3xDRx5s 70mwTrbGsU5COHIxbzQrDshIeEnsvypWcrDUI4a3qXo/bbSJF3Ec49sgstQ/VAPqILIC QxHEuB0O6yKT6hnvh28QbBb8EVyffUFBth0ANsXje6zKetZ8X1zFP7uGcsc9E1ZTihDw cvaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MoyIsUrh; 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 s5-20020a05622a1a8500b002ef63b951adsi2201217qtc.116.2022.04.22.03.33.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Apr 2022 03:33:13 -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=MoyIsUrh; 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]:38940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhqbB-0006b5-1G for patch@linaro.org; Fri, 22 Apr 2022 06:33:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhqA2-0004wt-2N for qemu-devel@nongnu.org; Fri, 22 Apr 2022 06:05:10 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:35597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhqA0-0002qs-Gw for qemu-devel@nongnu.org; Fri, 22 Apr 2022 06:05:09 -0400 Received: by mail-wm1-x32c.google.com with SMTP id c190-20020a1c35c7000000b0038e37907b5bso7650563wma.0 for ; Fri, 22 Apr 2022 03:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZEhoOIoK2+oeX738Kznp6czGDdThyWg3QrQY8i6NzM0=; b=MoyIsUrhbX8z+D1d/v09P6DK6oMWiIkQEzXOLO/MRfPRCpubjk/HgHNJIvjCsGa706 B8qI/wJx4bEykrOF9x1CY0gu0xc08SX6ew3y36Ao2CzEK23NYQrDWCoEISkA3I7k13N1 aIE/FIeaG1npI3jRHcuXle16PP65NdtYZM4O1P7DY0rv2gYPql2c5VhvueMjI9FEWAfc 6O2/jrWqp4GA2LHbvlUMPVcaRCzGGm79UM+XedGTWncoVAWUtrZNwLF2Wka1V8tB0DyZ J4KlCUFYohV941cf+yUBNe5nap8BwdJHCOOdRw8X2WQzDSNP/0+pktSWXn8+V/kEu1bH K8xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZEhoOIoK2+oeX738Kznp6czGDdThyWg3QrQY8i6NzM0=; b=5vB7I/vlr8xrvSdwzxDfdOmZplW0+E5w3Q66uezmU2uidiaAdvs8HyCv/KR3ABSinw j4VO9krcQpYK3/bP/snQlJkK/81Ic5Jy9lGq2KXi9S1Hfxccmqcyt1xFN5dGYEQRdo13 sCLWVIzs5M1B4rI/axA4yqNOxVD4dJBvDvI1Ydh8KzsfDTfpmCHtGXG/fDPOre0PZTJd RGnwKV/+VH1jRWkuWNjT7HIesXJVrWYuiBdJ25UppjHFUgrDWnZlmtoIB/AR76/3da6+ MwmBVB+aU97fI/+XTIKyv4ZBpTll8Z4K921ZTX+Ijpqt6jO7IyriJX8QS+lKOI1n61bQ v4iw== X-Gm-Message-State: AOAM530I7qdoapSM+SuH8e2AmE67FKe/sWi90sMN7m1woDB6dHs+4TKg O23sMPFGoXP0DcmUJ12CHnwROwLg0RxQSw== X-Received: by 2002:a1c:f415:0:b0:37f:ab4d:1df2 with SMTP id z21-20020a1cf415000000b0037fab4d1df2mr12281839wma.75.1650621906733; Fri, 22 Apr 2022 03:05:06 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id e16-20020a05600c2dd000b0038ed449cbdbsm4312148wmh.3.2022.04.22.03.05.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 03:05:06 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 35/61] hw/intc/arm_gicv3_redist: Implement gicv3_redist_vinvall() Date: Fri, 22 Apr 2022 11:04:06 +0100 Message-Id: <20220422100432.2288247-36-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220422100432.2288247-1-peter.maydell@linaro.org> References: <20220422100432.2288247-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.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, T_SCC_BODY_TEXT_LINE=-0.01 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" Implement the gicv3_redist_vinvall() function (previously left as a stub). This function handles the work of a VINVALL command: it must invalidate any cached information associated with a specific vCPU. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220408141550.1271295-36-peter.maydell@linaro.org --- hw/intc/arm_gicv3_redist.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/intc/arm_gicv3_redist.c b/hw/intc/arm_gicv3_redist.c index 78dcdcc7621..34f4308e980 100644 --- a/hw/intc/arm_gicv3_redist.c +++ b/hw/intc/arm_gicv3_redist.c @@ -1090,7 +1090,13 @@ void gicv3_redist_mov_vlpi(GICv3CPUState *src, uint64_t src_vptaddr, void gicv3_redist_vinvall(GICv3CPUState *cs, uint64_t vptaddr) { - /* The redistributor handling will be added in a subsequent commit */ + if (!vcpu_resident(cs, vptaddr)) { + /* We don't have anything cached if the vCPU isn't resident */ + return; + } + + /* Otherwise, our only cached information is the HPPVLPI info */ + gicv3_redist_update_vlpi(cs); } void gicv3_redist_inv_vlpi(GICv3CPUState *cs, int irq, uint64_t vptaddr)