From patchwork Fri Aug 16 16:13:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 819744 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c8:0:b0:367:895a:4699 with SMTP id m8csp368410wrb; Fri, 16 Aug 2024 09:15:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUz2vPwwmVMvQi7mVLsF6O4Qwzl1HQwIJeXZDJxNwDVdL/qkHQ4Ni29D/vUQhiPgPHkpk+y3WqZsilsooGF8IeN X-Google-Smtp-Source: AGHT+IEZQ2qm8iROqUD0SmGmp+kMH2JpqYxKxhnl8HtDaj3Bk4q5lqMutm8yXnRV6ijMBkyoFgmJ X-Received: by 2002:a05:622a:1f92:b0:44f:feb5:b2fe with SMTP id d75a77b69052e-453742477a3mr39865351cf.19.1723824942462; Fri, 16 Aug 2024 09:15:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723824942; cv=none; d=google.com; s=arc-20160816; b=Xpfn0Fo+BdsezZV0nLPAbacKIJE+fYVcdHcIr5sD2IhpnSpwJtMFPyDiPEgDD8J3Dg Owle1PE7iWf0nSkiVMxjV+ITFmM3Pxfp4qyn/zgu7eAD7WBbZf8rgEJXGOUX6P/3sulX GTAopqDyycnlFHbpnrLtsX9YewfUctbJoOtpRUiJMkYCpAU2Ast5zXoiHtT2V+Zee5QI 786wXoeETwKvNJAVo4Txk1XoA7BOGKWvpgSCs5yBZkB0w6o4oH6gEq4a1MxElIrfpEUq v4CMoXYaEyL+jLnNhvyi+D8EwEfprs4l6DDv2alZEfkSM+U6gX1JbuR9knQd6ILN2U67 MBEA== 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=GjWmXs7UD5GkRyRxaGCKBrnzIsbM5XteQpuL4ObGWgY=; fh=xBG+h/75AxrjWvTBYGypsi0VPdhdfXBgniKVRJcdCI4=; b=Bl3wFpmDOMg3zOT9wb1y3qM2qqt3pdfplXoDE5rPxJ5lPuCwy2GXqjAIwnZGHGh47U Z2UMaid6dH5SQLLvWO5s280GvE6KyJPA5K7AyKp23zKJ+SfhVmkh/qMaj7iJnqorfU/z d62ztCdSUmfX0ij1uBXfeltWrdBZWFV3qxgydimouRFqZiNqKf+gtGfLqc0QdReE/BbL eYZc1ShsOu1AtLMPYH5JbMrfZwShrGdmYv12BncalM7pRJinnEWHqR4uv43kkw1z+Zi1 EylCaKnVPDxeNzl0Bs50OKr00djrGzdZusn8Nhg2Aq/qB8OcY+UGwnwR9CEXnuEh9wdk 1qsQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S6jsYj8g; 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 d75a77b69052e-4536a004140si44082471cf.206.2024.08.16.09.15.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Aug 2024 09:15:42 -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=S6jsYj8g; 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 1sezaR-0008KQ-Ka; Fri, 16 Aug 2024 12:13:59 -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 1sezaQ-0008Dr-04 for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:13:58 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sezaN-0007dy-Ha for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:13:57 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3718acbc87fso951724f8f.3 for ; Fri, 16 Aug 2024 09:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723824834; x=1724429634; 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=GjWmXs7UD5GkRyRxaGCKBrnzIsbM5XteQpuL4ObGWgY=; b=S6jsYj8gPgHJAzOPftR/QOtNunJIGW49g6/2mc6qL2U5WK7oE8LwW+upqiLDayKvIP uH+bw9R2kKjNNcWwQdR9JH8XK+Znrd1mkczN8WQ/1FovdawKfohdP4yZPEEcm2cYBv15 0L7apPjT+GORivv6rtacSWNAECFcOW/jot6AW2I0pT8aUcPIHdvkBD8cUD3JiAlgandP Q9lGbt/d7x3+h7ffXPe1Vp4ZsMGL0ewRu/A4IZR0EVz8JqsEV3YV4n/OkvVL5pocssYF CqTOjkuatFs1i7YwFJAoEn2GKP3SW/uAI9New8eWRnEBPVSYBAvQ/aas7QbEXcWDJm2/ vMrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723824834; x=1724429634; 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=GjWmXs7UD5GkRyRxaGCKBrnzIsbM5XteQpuL4ObGWgY=; b=CST640mg0elShZMx8qWgUCzKBL2DsycfRjLzh5d1Zvcd3EmpjHrMMhTFmg1hGXh43Q 9vhdgBQar2v69bHgoP9FrbS5zCPusKUZtqQJk2OyxHdpoDqkn2WVCCQbZg6dIHAdzFVo Q0JuINJPilG529J3RuyRwGgrNIfJaZCBfGG+cJBuQRRT3qr+XwfiVvUNL+RzoAWQv2KU CpB1WPNqbZn+EfOAs7nqBbmf9VN2rFtrxBce7eTeFkXtvBvL7ytsT0FbW6qMJzF84K2s Ib1C4AbWoltxpB/bxi3urgU4f04AgJj1xIRcOvzb/8quu6GJFdOrTmemw1ZO5ggbzEnP FV4A== X-Forwarded-Encrypted: i=1; AJvYcCU7EFhkfMolVpPUEziFovez5ehTvMoryl57fZ6aVuLLStkvvYIwOyM63CMQ705hwUMmGPPoFI3OkK0UYT4qPZSMWrYK2pg= X-Gm-Message-State: AOJu0YzdwDjazgpINZaUDBJKiNIsqhjpuLr5XFmWNXkc2ocIHiM4fI6X Cf/Rm7yp23vEO4IdldBYe9GIBWmiWupZsCFGy4UVTlMaAgwFWkceyhOxIGY4dbA= X-Received: by 2002:a05:6000:141:b0:371:8845:b850 with SMTP id ffacd0b85a97d-371946c2b36mr2406984f8f.54.1723824833988; Fri, 16 Aug 2024 09:13:53 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-371898bb588sm3912269f8f.115.2024.08.16.09.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 09:13:53 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Leif Lindholm , Marcin Juszkiewicz , Eric Auger , Radoslaw Biernacki Subject: [PATCH 4/4] hw/arm/sbsa-ref: Use two-stage SMMU Date: Fri, 16 Aug 2024 17:13:50 +0100 Message-Id: <20240816161350.3706332-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240816161350.3706332-1-peter.maydell@linaro.org> References: <20240816161350.3706332-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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: Marcin Juszkiewicz --- 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);