From patchwork Thu Sep 5 13:00:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 825647 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp287870wrb; Thu, 5 Sep 2024 06:05:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWw9lJp4/JWKBH7x8Ek3MtVtJ04+yxhVeDaGFcoQsm7vA1eNSeXfDrDOwx2VgWCWaJ+/25C1A==@linaro.org X-Google-Smtp-Source: AGHT+IGHzP/9nwu4WcR6YB24LqrV6upxHQDYMscQCrmQui+a816OnCxUZCFPOY6uFVDkT3x+izmZ X-Received: by 2002:a5d:4601:0:b0:374:baeb:2ec with SMTP id ffacd0b85a97d-3776f452f5bmr4144067f8f.19.1725541511101; Thu, 05 Sep 2024 06:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725541511; cv=none; d=google.com; s=arc-20160816; b=Sr+NIrhx8acEMuAlCe0IZaRQwHepkMWzJcmlz1GaiKiBhh3pOINBigZz83GgJ30iR2 BqV69NsegC1jHXtr+pfWKL9GU76LZgEU3edkbAciR+LwNccn0JLXDqfqZw/YosO1jR19 kV/ywdg1f+y9DPdwrHbRU6IEZc6bNi0AGkuj4MHjHNCdbrw3NarEOEIcZT0T3+GoHyAl hQVNr1xMbm84X+E7aUGNyUTb6ce7aylX9eJJYmR1nV+aVhQ1Ah9OqkxwxEACUwfSHZt9 4oA8Enb8h9XIxb5qKE0q7brFakqalR6MTnw9T/GgIpuEi5inLPHqBY47hHe4czfQn7w8 ClKw== 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=/1zEM1x6OVqIhqR0ynhG68F5R1rKfetSPpPKrgmLcWE=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=kCngURjXe1FOSDqaFFrqr4MCJ4GxlAbnU9oWKeZtrpl3qw4ovKbci+24xQZ6nedQLE e28OfJ5XG5xEsIpavaBZUAsT3Y4cUzBNTpQ4I+zITMVvoVmTp5QEreXpVFDzzplDSiV6 IrfKUBGNAQWuwOHIQOVS6TS2VEt5LesmS47mtuaJyXuphqo+86vrHwz8RJrQEjIIPSFU FJvKaDk0LkZW/y1CNKGSwBgqfsNwqD7k40LTinI9797Fwz3ZcfgkxsGZ0XyVuKx/7c3Q woRshPZPm8Q8YFdXiAQs8KUdy746BdgA/wIutIEF2r43fQHArFcjEzVLDgGYHVVa5dl0 iDbQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vo8NTsrL; 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 ffacd0b85a97d-374ba5fc9aesi5832948f8f.214.2024.09.05.06.05.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Sep 2024 06:05:11 -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=Vo8NTsrL; 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 1smC74-0001UG-Gm; Thu, 05 Sep 2024 09:01:26 -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 1smC6v-00010j-Q6 for qemu-devel@nongnu.org; Thu, 05 Sep 2024 09:01:17 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smC6s-0001kO-7k for qemu-devel@nongnu.org; Thu, 05 Sep 2024 09:01:17 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-427fc97a88cso5996405e9.0 for ; Thu, 05 Sep 2024 06:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725541272; x=1726146072; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/1zEM1x6OVqIhqR0ynhG68F5R1rKfetSPpPKrgmLcWE=; b=Vo8NTsrLVRGPN/5ista5TiplIwnOm195CBK5hXTku/488R1FpF/OU6RbGhBEWjNTl2 J7xzVOBg8Dtqfh8ZJZWQzKqYbX/mef0Gy7sl75ueuqnvs94Urjwze3tscIgA2TxRahyf lYpKJcNrWcF7/UJ+qvWnCGFZFXy7+f/u+/VN3X4PyupmlwAczvvaZtrejtQ7NjM4R69Y HDaLQtOLLt0PZ4PzKq8F7wLU8XA4xbjFKDwldOezTBKbuGcjFv4te/HVt6Ph9i8Mzvpd 9229EufOP/ECNsyIuYRGg+LTSgRb7fuvXAu6LY68W86QF7zewHS9+kvO5WqjslvNGnBM FXoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725541272; x=1726146072; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/1zEM1x6OVqIhqR0ynhG68F5R1rKfetSPpPKrgmLcWE=; b=iT55Qgi4np1s1UEid9bgfHoIyqSYvi3lUAvKgxiSVkC7q5XDkYF4jYRPCBpbExIjiW IyWhNAxYTavFtZEbSLy4FKLID0vRzDO/LmEbd8PKao7XkOY73GMB7TN1I/kwYu4lQAQA BrzEXL3a5WFR7kzU4wQgokOWkznYAcMKMS/M6aQcpAePIuLfX2RcAZQIlJCiQSVpWCJz 9F4s7qa5axy44b3+H4ecUSgxb/7J86VIbTQp8kkogB2HLwx4Wq7+HCfTzTiH1YVBV+s+ 6vvv2Pf1bF39z87s54KMTuVEteNELb7E2JzyR9KeC7PPTrucl/s6AAmauSeurHPaQC9/ yBiA== X-Gm-Message-State: AOJu0Yye2EPSAafHTvaob6tJwYtu0l49v5wnXmXF0Q/scX2f7jZXPbzr GqsWeMjcGGwgH4udeTpwr/QKOU2i3oPuOseSXBch1W7YWdXbH+MdMsY5lYVWD+qETvj86BEIQeL v X-Received: by 2002:a05:600c:4509:b0:426:6153:5318 with SMTP id 5b1f17b1804b1-42c9545f8bamr39624475e9.19.1725541271976; Thu, 05 Sep 2024 06:01:11 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6e355dfsm232251365e9.46.2024.09.05.06.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 06:01:11 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/25] hw/arm/sbsa-ref: Use two-stage SMMU Date: Thu, 5 Sep 2024 14:00:48 +0100 Message-Id: <20240905130100.298768-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240905130100.298768-1-peter.maydell@linaro.org> References: <20240905130100.298768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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-bounces+patch=linaro.org@nongnu.org Now that our SMMU model supports enabling both stages of translation at once, we can enable this in the sbsa-ref board. Existing guest code that only programs stage 1 and doesn't care about stage 2 should continue to run with the same behaviour, but guests that do want to do nested SMMU configurations can now do so. Signed-off-by: Peter Maydell Reviewed-by: Eric Auger Reviewed-by: Daniel P. Berrangé Reviewed-by: Marcin Juszkiewicz Message-id: 20240816161350.3706332-5-peter.maydell@linaro.org --- hw/arm/sbsa-ref.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index ae37a923015..396abe9c1bd 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -621,6 +621,7 @@ static void create_smmu(const SBSAMachineState *sms, PCIBus *bus) dev = qdev_new(TYPE_ARM_SMMUV3); + object_property_set_str(OBJECT(dev), "stage", "nested", &error_abort); object_property_set_link(OBJECT(dev), "primary-bus", OBJECT(bus), &error_abort); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);