From patchwork Fri Aug 16 16:13:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 819746 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c8:0:b0:367:895a:4699 with SMTP id m8csp368428wrb; Fri, 16 Aug 2024 09:15:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW6tkGxhwZL8IfwPvKtMSlA10vFDZJGWyCJrEVjdZodoEjw6SB8r9X3jnuoSiyxEI6peyVdHacbmabvUwU0ajqP X-Google-Smtp-Source: AGHT+IGP/ZRhBcdKw3Jmd7O5EEfdHYhaHjRqFMKbQnbw/jUCaexnV6dkmt1UlEDoJEj0/TyjNy6J X-Received: by 2002:a05:620a:4403:b0:79f:249:9f9f with SMTP id af79cd13be357-7a5069d9b42mr397554785a.62.1723824944584; Fri, 16 Aug 2024 09:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723824944; cv=none; d=google.com; s=arc-20160816; b=K0yQfJyVKOYK4GrxHbzy29zgQA67o8ft3x/d/21SK6p1i36LckZKqCUM/AaxvUhqTy 1ctvnqyR2tj7TH2tTrtbgsIJ9gZDgowZVU5rTDT76qZ4Dpa73K5vGjdHJ9iC0RavdViX /uxmAZ/L5VY/OCBaP/nrvcDc7T3BBzWpDyC52/6MADK1x/xBTGuh2hRmnX8SK3x1mSRG lv5sFJYh/1ML5r74zcBF5U9h9hdVZGIdHV19Gzaw5KsvhXTQDnjWWCQvMwljFDJS6hXs EXdWn8xDiq2+ptgydZhl+plyUQsnvU+/1kCon1xLBg+FR/Ja1+B6SVeo8MdyGCsNbxVi wmQg== 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=LBv9iR1AT6FebtlCaxkUn6qnNvMTch8Z6TJ0HRA2r3E=; fh=TAWVXP5C8baNsnlIDWYYHGC0M/Oj7JA8yOI4P1Z9S1I=; b=ASNloJooHnAFrVURHM4sCP8YiFkITJYGZd5GgfVUia46wvjiqpf1E8nEkq28vmHhTt JEYordi/HnWc01YQV/Ol7VPGhxNerLO0DC5AuJjTe1S8r1p8h37xsMo/pES2Yj0Lulvr bg05fH5x0ORtR2uitVa2G1fsF8mUFXtAEqE814rZJGDCP56JItxL8z2w449/yNPsdXGC UEtcIt2/8wXZ8qglq1lgg1b4oqkiGl8PmOI2J0ZqhkDx8qP024S2atISxtlVMORmtasr Lrf7IvumBemQsOcI6Upy4Bg3AA+Mnm0IceHBcKnxkpIuzUYXZsgEM+bn8Wc/AoYJL1Oa AGqg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IHKrwCqD; 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 af79cd13be357-7a4ff1278basi435982385a.749.2024.08.16.09.15.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Aug 2024 09:15:44 -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=IHKrwCqD; 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-0008La-TT; 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 1sezaP-0008B2-9L for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:13:57 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sezaM-0007dU-0z for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:13:56 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3719753d365so435341f8f.2 for ; Fri, 16 Aug 2024 09:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723824832; x=1724429632; 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=LBv9iR1AT6FebtlCaxkUn6qnNvMTch8Z6TJ0HRA2r3E=; b=IHKrwCqDvhJkgDXry4aHitIRxlVTNCqGHikq6DY07njQX5ZRT3PIH4CgDLHORrlKmv MBlRchVK4Mx3PIjje02f3hRUPlycTCPm/IZ2qaZGqiv6B6EggdMZLHqrc+/cGrI8ZULq XK0hSMVBzaMlsBFQFisjC1rva7UHNUZ6cRAFqdmmVQnDC8NB0Fe6ybwzt631KxNuR9S7 SB5gctS6sIeKZIXzKuS3/wqeZB3ODelJBefievgNrxuYNRiOVZ/43FqIJAB5Se7N7FOc KZRcHf5VqYSXr1tJFKL0SkMFdcXDpjw9Rc/JaEIeSPciBO/MhNP+qHZ25K3k1S7TBcLy uXNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723824832; x=1724429632; 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=LBv9iR1AT6FebtlCaxkUn6qnNvMTch8Z6TJ0HRA2r3E=; b=AGzu4I59EFt8JPwUrxQ7G2htwLY1yBmI7te6UsOjhNsi6Y2xAR1mGp+pgJ7vKaE2L/ TyqoSLPy5Fh6jMItOblFg2adhb0qKtPMFWt0D4/iq68fyxy7ZPPb8/bE8sgiglN4cw2l GjmDcpyaHh9So3x7w3NVb0vXAF8Z9O7sau7MlHNtlWQsz7CFCkoSrBd5pyUwySyOKf7v xtYheo8uJnAxRJD+dhu0b8f6eI9Bc33m0w0PuPDWNj+GzJFcqY18pk0n75y3IgA/N/ER tdPSiqxejn31U06dYiVCNmg/Lu1l9+vUomCbkybFT+zs2HTRBlYNCgmWB0u1OlGftsjB 9wAA== X-Forwarded-Encrypted: i=1; AJvYcCXEd2o0aQ6DArcULuXplxx/ZzNVNrZ8xEp/H3T3+SfoYOybw0Sv7U2PQLKgGgyhnwOOJOyCS7Um91ByScu11x+3VmNkXQY= X-Gm-Message-State: AOJu0YxjF3+uf5CfCkIAVJeGfoLx6UnFF7xiCHJOrcXL5acjTPWwv59Q mn6o7e995jfVAdJJ5nPDu0ByxIM46+cbxsT+Q/CKDeKgjaxUO2S5oJENNjPOIew= X-Received: by 2002:a5d:5a15:0:b0:36b:a3c7:b9fd with SMTP id ffacd0b85a97d-371946bd27emr3451930f8f.56.1723824832356; Fri, 16 Aug 2024 09:13:52 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 09:13:52 -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 1/4] hw: add compat machines for 9.2 Date: Fri, 16 Aug 2024 17:13:47 +0100 Message-Id: <20240816161350.3706332-2-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::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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 From: Cornelia Huck Add 9.2 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck Reviewed-by: Daniel P. Berrangé Message-id: 20240816103723.2325982-1-cohuck@redhat.com Signed-off-by: Peter Maydell --- include/hw/boards.h | 3 +++ include/hw/i386/pc.h | 3 +++ hw/arm/virt.c | 11 +++++++++-- hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 15 ++++++++++++--- hw/i386/pc_q35.c | 13 +++++++++++-- hw/m68k/virt.c | 11 +++++++++-- hw/ppc/spapr.c | 17 ++++++++++++++--- hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++- 10 files changed, 80 insertions(+), 13 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 48ff6d8b93f..9a492770cbb 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -732,6 +732,9 @@ struct MachineState { } \ type_init(machine_initfn##_register_types) +extern GlobalProperty hw_compat_9_1[]; +extern const size_t hw_compat_9_1_len; + extern GlobalProperty hw_compat_9_0[]; extern const size_t hw_compat_9_0_len; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 4e55d7ef6ea..14ee06287da 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -215,6 +215,9 @@ void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size); /* sgx.c */ void pc_machine_init_sgx_epc(PCMachineState *pcms); +extern GlobalProperty pc_compat_9_1[]; +extern const size_t pc_compat_9_1_len; + extern GlobalProperty pc_compat_9_0[]; extern const size_t pc_compat_9_0_len; diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 687fe0bb8bc..a5d3ad9bf9e 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3301,10 +3301,17 @@ static void machvirt_machine_init(void) } type_init(machvirt_machine_init); -static void virt_machine_9_1_options(MachineClass *mc) +static void virt_machine_9_2_options(MachineClass *mc) { } -DEFINE_VIRT_MACHINE_AS_LATEST(9, 1) +DEFINE_VIRT_MACHINE_AS_LATEST(9, 2) + +static void virt_machine_9_1_options(MachineClass *mc) +{ + virt_machine_9_2_options(mc); + compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len); +} +DEFINE_VIRT_MACHINE(9, 1) static void virt_machine_9_0_options(MachineClass *mc) { diff --git a/hw/core/machine.c b/hw/core/machine.c index 27dcda02483..adaba17ebac 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -34,6 +34,9 @@ #include "hw/virtio/virtio-iommu.h" #include "audio/audio.h" +GlobalProperty hw_compat_9_1[] = {}; +const size_t hw_compat_9_1_len = G_N_ELEMENTS(hw_compat_9_1); + GlobalProperty hw_compat_9_0[] = { {"arm-cpu", "backcompat-cntfrq", "true" }, { "scsi-hd", "migrate-emulated-scsi-request", "false" }, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c74931d577a..0cf4cb0d9f2 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -79,6 +79,9 @@ { "qemu64-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },\ { "athlon-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, }, +GlobalProperty pc_compat_9_1[] = {}; +const size_t pc_compat_9_1_len = G_N_ELEMENTS(pc_compat_9_1); + GlobalProperty pc_compat_9_0[] = { { TYPE_X86_CPU, "x-amd-topoext-features-only", "false" }, { TYPE_X86_CPU, "x-l1-cache-per-thread", "false" }, diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d9e69243b4a..746bfe05d38 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -479,13 +479,24 @@ static void pc_i440fx_machine_options(MachineClass *m) "Use a different south bridge than PIIX3"); } -static void pc_i440fx_machine_9_1_options(MachineClass *m) +static void pc_i440fx_machine_9_2_options(MachineClass *m) { pc_i440fx_machine_options(m); m->alias = "pc"; m->is_default = true; } +DEFINE_I440FX_MACHINE(9, 2); + +static void pc_i440fx_machine_9_1_options(MachineClass *m) +{ + pc_i440fx_machine_9_2_options(m); + m->alias = NULL; + m->is_default = false; + compat_props_add(m->compat_props, hw_compat_9_1, hw_compat_9_1_len); + compat_props_add(m->compat_props, pc_compat_9_1, pc_compat_9_1_len); +} + DEFINE_I440FX_MACHINE(9, 1); static void pc_i440fx_machine_9_0_options(MachineClass *m) @@ -493,8 +504,6 @@ static void pc_i440fx_machine_9_0_options(MachineClass *m) PCMachineClass *pcmc = PC_MACHINE_CLASS(m); pc_i440fx_machine_9_1_options(m); - m->alias = NULL; - m->is_default = false; m->smbios_memory_device_size = 16 * GiB; compat_props_add(m->compat_props, hw_compat_9_0, hw_compat_9_0_len); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 9d108b194e4..67162ac8863 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -361,19 +361,28 @@ static void pc_q35_machine_options(MachineClass *m) pc_q35_compat_defaults, pc_q35_compat_defaults_len); } -static void pc_q35_machine_9_1_options(MachineClass *m) +static void pc_q35_machine_9_2_options(MachineClass *m) { pc_q35_machine_options(m); m->alias = "q35"; } +DEFINE_Q35_MACHINE(9, 2); + +static void pc_q35_machine_9_1_options(MachineClass *m) +{ + pc_q35_machine_9_2_options(m); + m->alias = NULL; + compat_props_add(m->compat_props, hw_compat_9_1, hw_compat_9_1_len); + compat_props_add(m->compat_props, pc_compat_9_1, pc_compat_9_1_len); +} + DEFINE_Q35_MACHINE(9, 1); static void pc_q35_machine_9_0_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); pc_q35_machine_9_1_options(m); - m->alias = NULL; m->smbios_memory_device_size = 16 * GiB; compat_props_add(m->compat_props, hw_compat_9_0, hw_compat_9_0_len); compat_props_add(m->compat_props, pc_compat_9_0, pc_compat_9_0_len); diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index cda199af8fa..ea5c4a5a570 100644 --- a/hw/m68k/virt.c +++ b/hw/m68k/virt.c @@ -366,10 +366,17 @@ type_init(virt_machine_register_types) #define DEFINE_VIRT_MACHINE(major, minor) \ DEFINE_VIRT_MACHINE_IMPL(false, major, minor) -static void virt_machine_9_1_options(MachineClass *mc) +static void virt_machine_9_2_options(MachineClass *mc) { } -DEFINE_VIRT_MACHINE_AS_LATEST(9, 1) +DEFINE_VIRT_MACHINE_AS_LATEST(9, 2) + +static void virt_machine_9_1_options(MachineClass *mc) +{ + virt_machine_9_2_options(mc); + compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len); +} +DEFINE_VIRT_MACHINE(9, 1) static void virt_machine_9_0_options(MachineClass *mc) { diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 370d7c35d3a..8aa3ce7449b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4838,14 +4838,25 @@ static void spapr_machine_latest_class_options(MachineClass *mc) DEFINE_SPAPR_MACHINE_IMPL(false, major, minor, _, tag) /* - * pseries-9.1 + * pseries-9.2 */ -static void spapr_machine_9_1_class_options(MachineClass *mc) +static void spapr_machine_9_2_class_options(MachineClass *mc) { /* Defaults for the latest behaviour inherited from the base class */ } -DEFINE_SPAPR_MACHINE_AS_LATEST(9, 1); +DEFINE_SPAPR_MACHINE_AS_LATEST(9, 2); + +/* + * pseries-9.1 + */ +static void spapr_machine_9_1_class_options(MachineClass *mc) +{ + spapr_machine_9_2_class_options(mc); + compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len); +} + +DEFINE_SPAPR_MACHINE(9, 1); /* * pseries-9.0 diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index c483ff8064d..18240a0fd8b 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -871,14 +871,26 @@ static const TypeInfo ccw_machine_info = { DEFINE_CCW_MACHINE_IMPL(false, major, minor) +static void ccw_machine_9_2_instance_options(MachineState *machine) +{ +} + +static void ccw_machine_9_2_class_options(MachineClass *mc) +{ +} +DEFINE_CCW_MACHINE_AS_LATEST(9, 2); + static void ccw_machine_9_1_instance_options(MachineState *machine) { + ccw_machine_9_2_instance_options(machine); } static void ccw_machine_9_1_class_options(MachineClass *mc) { + ccw_machine_9_2_class_options(mc); + compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len); } -DEFINE_CCW_MACHINE_AS_LATEST(9, 1); +DEFINE_CCW_MACHINE(9, 1); static void ccw_machine_9_0_instance_options(MachineState *machine) { From patchwork Fri Aug 16 16:13:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 819743 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c8:0:b0:367:895a:4699 with SMTP id m8csp368043wrb; Fri, 16 Aug 2024 09:15:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWxDTr6qAnftdp/C3lEBEkhQjgx11HWw2d6px8m59nshDkQ7SlJLhaSkOVxWzcG6oxFPQ3TMaN0TqswUqkVsvjN X-Google-Smtp-Source: AGHT+IEzb2UkJXwVTS44Rdxhxg4ctTD5z2zO9cSuAqpdvB3p7hOn2ppPm5jIXpxoOImYF2jwe6er X-Received: by 2002:a05:6214:4a06:b0:6b5:e665:7f7 with SMTP id 6a1803df08f44-6bf7cd7bcc3mr46730846d6.9.1723824900521; Fri, 16 Aug 2024 09:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723824900; cv=none; d=google.com; s=arc-20160816; b=a7wD3V+VhiniJi0P23aNxdaqETUUqxvC+joTcpU2sL0lGcOvA+RhFoGsEPu+xF+3wm kRK2rjIwUVr7k8Ps7tv9q59CqU7YQ2DohXARBSBmMSc9uk9Svb+MsjgxJLlwoMWRnm+s 5QJm0wHHYBBnv2yfpaTPyn2LXJfCkCgS9736LuP/cNWOp3oDUPsb0KIJv2/Nq0bXMzKS YJk7ZRwS8Htm/W4XaGf9KX/tV0BqHKzrV1p/buga96YDJUlHXxFTSEOhkLc9KS0ec+/P SJt2pk36V/87qVbrLc2cfdVJORRo1HuldPvFFnYpMKMKKcd312mwc82hj1oLIoI5Hsp4 6sjg== 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=bz0afNFWYytxnrxwkdvFof0HvXopb2DbUZl03+TROWI=; fh=oFv4bQEo4zDSnKaQe1NZpqCCefXIVXPx3JoKYak1kOg=; b=yPEQyJ5XAAn4q8FrWZddHmmCM2mN7W1bByITCTATM0or27DD2zrddXjv3ZVq9LwpPw 3Jd8xZPXFemhT5aM6FekJG2UoJ4vBMZXckkeB4eS3bxOiKFvaGgi1MwrxZ1+Bchthz2Q nclwXy/SCFmhd07YhJd7v2h9649m6OCPpZoEvWcqgG+43UbZSmig7z78Fu7uFzMdB0Y/ tVHdebxsyqW7/tnBSluUT2QUprDqKcZLYeTzipKYdxPwUVvB2c1OzVae3NZRheUYq3c6 ouFLWOfzUJgZFCkkMW2QiSvuTOvfg86pk26wK/zcq+VdbMhiyf1kGDjRMKB03aLk0RaX BLHA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=grRigugJ; 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-6bf6ff25e65si44445276d6.525.2024.08.16.09.15.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Aug 2024 09:15:00 -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=grRigugJ; 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-0008IY-4n; 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 1sezaO-00089F-Rz for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:13:56 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sezaM-0007df-PD for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:13:56 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-37196229343so458629f8f.0 for ; Fri, 16 Aug 2024 09:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723824833; x=1724429633; 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=bz0afNFWYytxnrxwkdvFof0HvXopb2DbUZl03+TROWI=; b=grRigugJfg1IPLuCkhTX2/p/CjKdndFJDbR/dHFikfU9afmb5w+5xQIERGVNvv0yRE wbpRgho78lTlUC33jj2nLHnvv4HzkkuqdwUKVwK+0NT5jRyvJX8xRYKGNEYJWMs2u2nj +lRRz6tfwfdNjXuhkZ1y7heooKedGjcS3emoEIcaKtZbnbfttUHB7TueSRFQnqk8u2x7 MXuNZld2zDAycPSPTKFCOAGDUoGHKrXynYDjVLFrFHk12j9t1ZdHHfJKASk0oAhTQgYN jWyKsx1fi8jSmi67ZNqT1MRd2aW9GyeYB9ythuu33BerlOzGAlyJn/QbfFruvVn71wtF yRig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723824833; x=1724429633; 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=bz0afNFWYytxnrxwkdvFof0HvXopb2DbUZl03+TROWI=; b=S+zHXS07hO3a0Fv9DRc7/+YCpNnLoVz0o/9nVCkmLSVIZU/189urnlL8VKza+GrV9k MHElkG0g1MPzNChu5izGuWkt6se+FzLeoVNl5cjw+fR0kzLRHOBvrTJgiMyPrrp2r+4h 7W07xDyCRlNtnnTNl+yKx8njIOB6uAgGJW8LK/CQMekP9ZW7fuwGcIYgVJNQtuD11bGu FiLYxY+w03IbNL+DU7cC2QGm1urToDtefImnQAXlAnQT1b3dr6rCrz1UUeo9dtD9allO hqZkNtIE6+sD5+UzE1NSo7WugU89MbwTJAYAkLdZ/+5QwcdBfNsO6SJ5fdRTFKpSLtUB lvHA== X-Forwarded-Encrypted: i=1; AJvYcCWb+aN4MAqyec1dq2qtbrDKVeFVdCDWg6+b12Jpb6x64WslngQpfdblJIf5PqaCfjdCIZH0xu3KnFFHMXHNZ1zl1i3Up3E= X-Gm-Message-State: AOJu0YydqnSIi5lYn5LTwbjqPhtmU6goIcL3rpcBGZvENzWcr+8OWQDM zY+TZb8/g9WiWOoviA8f7lgnlhvRUmgA0YZYQ9O+Vv/4rU8Z/6AdgyD1htuR4fumjggI3eWCECf 1 X-Received: by 2002:adf:f0c6:0:b0:368:5b0c:7d34 with SMTP id ffacd0b85a97d-37194641a3cmr2535447f8f.22.1723824832920; Fri, 16 Aug 2024 09:13:52 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 09:13:52 -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 2/4] hw/arm/smmuv3: Update comment documenting "stage" property Date: Fri, 16 Aug 2024 17:13:48 +0100 Message-Id: <20240816161350.3706332-3-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::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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 When we added support for nested (stage 1 + stage 2) translation to the SMMU in commit 58377c363291d we forgot to update the comment that documents the valid values of the "stage" property. Add the new "nested" value to it. Fixes: 58377c363291d ("hw/arm/smmuv3: Support and advertise nesting") Signed-off-by: Peter Maydell --- hw/arm/smmuv3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 39719763897..4c49b5a885f 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -1981,6 +1981,7 @@ static Property smmuv3_properties[] = { * Stages of translation advertised. * "1": Stage 1 * "2": Stage 2 + * "nested": Both stage 1 and stage 2 * Defaults to stage 1 */ DEFINE_PROP_STRING("stage", SMMUv3State, stage), From patchwork Fri Aug 16 16:13:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 819745 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c8:0:b0:367:895a:4699 with SMTP id m8csp368425wrb; Fri, 16 Aug 2024 09:15:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjdKAFkh6EhsdW+rtbSP1eQRus405Qw+RHcTMQcwBDksbBad7BlaSjgyeiDV68hVhJ7LDvB3Y8ml0rD5rUUbXb X-Google-Smtp-Source: AGHT+IF5A5Sq1MWXllOjxJ6G4zQsupGQhwuBBoWiHtsjN9l/pB1soHUnVey4jiVxwlSSL5G5XOiB X-Received: by 2002:a05:6214:4a07:b0:6bf:745e:d48e with SMTP id 6a1803df08f44-6bf7ce67f9dmr43569016d6.51.1723824944268; Fri, 16 Aug 2024 09:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723824944; cv=none; d=google.com; s=arc-20160816; b=OaYVgtCOLGEsJjHWlU/Jp4zMxXrSK5WzhdJoGIJr9IEX/O8rL/bHI2oznDJfJaa2Q3 0abe+8QAPKIcwJYFLuBfzkvwnq+rcwe/TU6ypxU6P6AMVtZ3xKpHuGqiEel0QgM0iZbM oBdTCYwzkqfZ7LatNI258JYPdAsYRAOpTJtVrEgpaAwhQB44b9xf2tOFEu3oNAsVg101 nXIGRjBbku1ezm0knGtRirgVl8N6kyJla9FzLQsguT8KMp+lVyeQ98zTIVB4HZT1E72O IbwIEJs+nW7kkHYAq1P/RRhIWTfNTcT27jEhe0jEC6ki7Cp8jSx3y6Eng43zQ+keOgUX ab1w== 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=RhHY2mwb1dwmyJC3ZOyMGrBB8Z2DIi78BFy4b8vQ1Pg=; fh=eb3BmfEaAsxvSXyk2/EEPP3pgLxqBATnQH+1/G8j398=; b=sxJQnU79BoGa4m/TAe1b+LIfb4P8qg+wOXlcja1b/TpnYGf7l7pmICIxgV1nCbX6YY In+vt0DzrDQKk6GXL0CDXrdkIgJ7hpNzRZ+OJNREaSZ4NTUc15cTOhxcVx0bwhzh/WKr BgQpmBG3e2aSU2c5z8hX6cFQy6RaFoM3SZsQm5LmCXorseL5lItDV2+dho7tAfrtL8N0 p1WF2DAO6lA28YLWLee37qZJkGifShfTk5qkd97BFSpB/JZxLcwjf4fa5l2cNZGkxyj7 C+WxitfktfmzOMDZXg0E9LIt6CQCVWjj3H7da9KAxBDOuAISnVSbJ6LSwLRW01n2uifx IVOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="eXWdA4c/"; 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-6bf6fdcbf1dsi43927866d6.113.2024.08.16.09.15.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Aug 2024 09:15:44 -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="eXWdA4c/"; 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-0008LE-Py; 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 1sezaP-0008BH-Am for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:13:57 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sezaM-0007ds-SS for qemu-devel@nongnu.org; Fri, 16 Aug 2024 12:13:57 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-428101fa30aso15664365e9.3 for ; Fri, 16 Aug 2024 09:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723824833; x=1724429633; 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=RhHY2mwb1dwmyJC3ZOyMGrBB8Z2DIi78BFy4b8vQ1Pg=; b=eXWdA4c/ewN9lCK7I0lr1HAAcsNc9+bNK+hu4TBPHHktOPuIgX9sFsMxKZVYgPqZEa GlgX76b1pyXeqElpq3sgnTP13TvHPxuHLE7OrLHCfvQ4yEzH+GUqEZQjqgzn2w2v5+gz J8xt0xSTYojn2HD9F4zwr1gcDgGIy1tdqArrAw10TTbcSeMdV1c5nuISwb9APT3rImBC ohZ3PuXjEUIKAxQCtEPnjBZzAycB5opO3WIPFeZOBL/xriq+S9ewDvlnzdh/Bwq907v7 Qq1W+8OXRG5kmTkFrfOOQL8FAcRbB01aXU1OHwpAmAVH8hlcMAdZFzBHopK4BF1fFCPR BnSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723824833; x=1724429633; 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=RhHY2mwb1dwmyJC3ZOyMGrBB8Z2DIi78BFy4b8vQ1Pg=; b=kjAilZK6CEPun1fZUBfPpw9C10fwLQpgCDZ35GmJXJcQGoe7758qR4oLZzClrtf+MT BOZ+Nb4oCC69nnHr0EuZe6d3FG4dccys63swnr1OrhwT63Hl3sIE04l6Vgqq6pLolmsP XuUZGn0h1IMg9x7+RDAmhfWdW4+sKbebobKaS79BOsFaE9rFf4WqOVsf/qdH21LZtDRH L+AEyIMl0UERy3vh6jFGO5zhv6lzBxvXc7QBS0yuvWKxTM+mJXumvb95BxYzQiZkGA2B JR023k1ake2uFaN+dNApcOflBuBg/8YqhoKkJNmodx5ds7NPmi1cui9sUapKY+uBxLEt YN9w== X-Forwarded-Encrypted: i=1; AJvYcCUSYARKjmbAHBLg3xeIvceQuKqBFJB0DWzbYciTmX3XcV+d2bX2hSbIrkz8NA2gFPX9ps2XANxD7xZRqjyXBQJyDcoPoZc= X-Gm-Message-State: AOJu0Yz1wdwiLpUiL/dHq45LTlAZgL/J2bjOk2tB0gHiKW2oZv9byjqh Du4ax4yt9bD6A0vsKWm4QE6aPHcrdGDt9BBcI5acuFCjGBTFDmJL8i1sjz8puiA= X-Received: by 2002:adf:fc44:0:b0:371:7e73:de6e with SMTP id ffacd0b85a97d-371946897d8mr2727433f8f.52.1723824833475; 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 3/4] hw/arm/virt: Default to two-stage SMMU from virt-9.2 Date: Fri, 16 Aug 2024 17:13:49 +0100 Message-Id: <20240816161350.3706332-4-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::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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 virt board. This is no change in behaviour for guests, because if they simply ignore stage 2 and never configure it then it has no effect. For the usual backwards compatibility reasons we enable this only for machine types starting with 9.2. (Note that the SMMU is disabled by default on the virt board and is only created if the user passes the 'iommu=smmuv3' machine option.) Signed-off-by: Peter Maydell --- include/hw/arm/virt.h | 1 + hw/arm/virt.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index a4d937ed45a..aca4f8061b1 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -134,6 +134,7 @@ struct VirtMachineClass { bool no_cpu_topology; bool no_tcg_lpa2; bool no_ns_el2_virt_timer_irq; + bool no_nested_smmu; }; struct VirtMachineState { diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a5d3ad9bf9e..7934b236516 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1408,6 +1408,7 @@ static void create_pcie_irq_map(const MachineState *ms, static void create_smmu(const VirtMachineState *vms, PCIBus *bus) { + VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms); char *node; const char compat[] = "arm,smmu-v3"; int irq = vms->irqmap[VIRT_SMMU]; @@ -1424,6 +1425,9 @@ static void create_smmu(const VirtMachineState *vms, dev = qdev_new(TYPE_ARM_SMMUV3); + if (!vmc->no_nested_smmu) { + object_property_set_str(OBJECT(dev), "stage", "nested", &error_fatal); + } object_property_set_link(OBJECT(dev), "primary-bus", OBJECT(bus), &error_abort); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); @@ -3308,8 +3312,12 @@ DEFINE_VIRT_MACHINE_AS_LATEST(9, 2) static void virt_machine_9_1_options(MachineClass *mc) { + VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc)); + virt_machine_9_2_options(mc); compat_props_add(mc->compat_props, hw_compat_9_1, hw_compat_9_1_len); + /* 9.1 and earlier have only a stage-1 SMMU, not a nested s1+2 one */ + vmc->no_nested_smmu = true; } DEFINE_VIRT_MACHINE(9, 1) 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);