From patchwork Mon Jan 27 10:26:06 2025 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: 860222 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1946549wrq; Mon, 27 Jan 2025 02:27:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW8HBAGfyeziiBjdKiZqFAnPWLrvll5zwNvlKYusOg+1NC9xfjdOtJ/pKZdvutiNbKDnYXCFQ==@linaro.org X-Google-Smtp-Source: AGHT+IG4cxiWmt4TfDlcJKcfF3VZYo8kP80mh516UE7Z+EJ+3dFt64A03e4bz5joBOoPh95w9RlO X-Received: by 2002:ad4:5dc8:0:b0:6d4:3593:2def with SMTP id 6a1803df08f44-6e1b217882dmr555212556d6.5.1737973637662; Mon, 27 Jan 2025 02:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737973637; cv=none; d=google.com; s=arc-20240605; b=fbDaWGXX/69s1a0WBFfhwqjvZe7XjY8LhRmpeV0muWgZ3JaUm6cU/5ApAy7+b9oQqh gpFl9mWjavroIoRvrKsJZLtTj/P2U1UlQ7yrM2TAcb4ROpHmLPi4XBYPXduC62+8IpfL 2WKjp3lhUnX3llDokh2T8zuVcJg8N5+WIP2Oink8uHxPl8ERs7lK2e4qg0uakFpiKPxU pep2bJTA4RMAo91mewLfk53PnzYrhfCETjZdcU+PWBOntQ0ryMYk459J0QY1GtfVjORQ 5/j43n72NHA/vJctK7bAcsjBly7ihlxrNcFmN+vJORzN3dqHQkIfLIC/elJ8JiY5XY+p ONcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=bH5J3cRQDjcVRgPq7zp3SpsLhqrv1PdlyvsdQnQjIBk=; fh=G3zkgtM0+U9rHQHdLuIT+YnPlKRaM6qSFCr7Ftnx4LQ=; b=KZPd/FdYrgmQfQpcZTy7XaYpOPfw+XIBW9m9f9fW7tqua2HNy0OjtAo8FTL+0lO5Za JNLEY1YiZQmcUrMLfaoseRHwETRmrjohXGzLffUMVAkKwi9Wrp57MF0lTWXwTKhPnoay geFTmYLPtaYjUMuEQlDiIyI66NBYziBSfu80o22PGs965kiow3TY4MUu8mcgEy99Xl8M OFHKJMGcHCE1n70AtyBpHEfCaAzQVXq2BcGuxVAmLoEXNz8ctmO9nTBh3IZbO9Th3ko4 H1v92AO/hoE90AwMqe1lvZ6m3CNHvq6WHNHfKBKzGA8RJHJXibSXFGW4YCUrjHp5yGrl YIKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hO4QeLnU; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e206022771si102944026d6.423.2025.01.27.02.27.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Jan 2025 02:27:17 -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=hO4QeLnU; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tcMKF-0001eT-Mp; Mon, 27 Jan 2025 05:26: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 1tcMKA-0001du-FV for qemu-devel@nongnu.org; Mon, 27 Jan 2025 05:26:35 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcMK9-0001wV-37 for qemu-devel@nongnu.org; Mon, 27 Jan 2025 05:26:34 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso45246295e9.0 for ; Mon, 27 Jan 2025 02:26:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737973591; x=1738578391; 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=bH5J3cRQDjcVRgPq7zp3SpsLhqrv1PdlyvsdQnQjIBk=; b=hO4QeLnUNQzmx1/A9EnbkSxkQdplD/25G00bDnbdJvh0Kf6ywRWEgPtZiUP6IqQ/V2 GHAyWGotNNyyDjPg7IOeBW+RyqrH3PcXbDwNArrg4yj+kvvsgWrfvRanl1mh4jN5oaRe AQOBpx3RyTCXtsgL7lIFSCjNcCfvGffqMwulKU/wd8PiEXoJ9RHRi+OY2tfmQDiVm2gj JnDoxODhXn2kWrHh7NOJA1YsqRI9yTM7pmemiqDkRK0OrDZJPPXTnM7/8KUhAR8m2vkI jEfpSsR0rbAT1Fz0dDXPHCfbjni6VFQ2pJLwSX7oeHm1okSfoG8WGxL3o6WZ0r4QylIY BSKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737973591; x=1738578391; 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=bH5J3cRQDjcVRgPq7zp3SpsLhqrv1PdlyvsdQnQjIBk=; b=QI22fMu0NNUz1R5SYT1gokyAiX69x4simBygeqtESIADeQAo9EteQB8LArgAn19aYJ KOz4KfkVPxaN6Ml+uvEQxaopfmA9a3yivyJyyKr0iVkVeH23ZG8PLXErUaMIwCkw2ERX sLz8CWQNMBqyt2VXY3V9T9dkzNlGovQXsmdh6TwpTf9vhIDB4r27dwjSBXno3wfNFYnr 0Cd8XrFUqI3q5p1A1TOiLle4gvPmPq+MamE1kpXUnLpfO8IucMh8PBUPoxbePHZ+UwZF sve6fGoePQ8O5j1IlM8R1CwFMupJih7rnbGaPo4tNgbVnAuTZS1aGYHt3yNoP8drQwYY lfMQ== X-Gm-Message-State: AOJu0YzXhUu+ZxiSE6UqJgs1RYWDyfpJyoqK9D0bZDpQqSKzam0RwSkm 7TEJPFGvN6DzS45ik03DAdzdIMNOYYGS9HCVGoCOmy+hdWQx6w3IvEYqqtw7ljHjHTP1JmZDIxU e/VY= X-Gm-Gg: ASbGncu3mNt6S4OUvD0LUreroedlj9nNJo9HRet40nstp5knv0QVQiCffRlpdeMe5mi 19BhpEfp7McwbLLMhkwJuG3zFNoUkepFFESx+P8UjuKfEQiaWHWJw1Wy49xI+LdDjD1BIOhK1rA 6/GNSdGCmoRfz4rVrrnTQtGU3TKGvf4H9Z06WapFGUGuP+DVeWtILHP6HqKmDu8tr6zmla+Mk6b eUgWfLzyG5h3Kx+BajyHRnepfXsHHrd17cZaxeVE+dLOxFexLj7L0HvdwanYoYikneq7DTr3XeK weU+EsB4XrnnjjAl1HqL6IGW3PlDfZYW9FZJWhHNAMv7/n8+4S9q4cs= X-Received: by 2002:a05:600c:4fc1:b0:435:1a2:2633 with SMTP id 5b1f17b1804b1-438913dee3amr354620255e9.15.1737973591413; Mon, 27 Jan 2025 02:26:31 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd57325csm127482275e9.34.2025.01.27.02.26.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Jan 2025 02:26:30 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , Richard Henderson , Harsh Prateek Bora , qemu-ppc@nongnu.org, Nicholas Piggin , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 02/15] hw/ppc/spapr: Restrict part of PAGE_INIT hypercall to TCG Date: Mon, 27 Jan 2025 11:26:06 +0100 Message-ID: <20250127102620.39159-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250127102620.39159-1-philmd@linaro.org> References: <20250127102620.39159-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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=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 Restrict the tb_flush() call to TCG. Assert we are using KVM or TCG. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Harsh Prateek Bora --- hw/ppc/spapr_hcall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index dbf30358a1a..4f1933b8da6 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -299,8 +299,10 @@ static target_ulong h_page_init(PowerPCCPU *cpu, SpaprMachineState *spapr, if (flags & (H_ICACHE_SYNCHRONIZE | H_ICACHE_INVALIDATE)) { if (kvm_enabled()) { kvmppc_icbi_range(cpu, pdst, len); - } else { + } else if (tcg_enabled()) { tb_flush(CPU(cpu)); + } else { + g_assert_not_reached(); } }