From patchwork Mon Dec 16 14:18:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Romero X-Patchwork-Id: 851229 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp2872621wry; Mon, 16 Dec 2024 06:19:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWCFfxq0scSu/VXccz0MmZ2Kju9ur8fXNlOA3cYtuAqxUsjZoRMosXkPhh7v7nNH73BJ6B73g==@linaro.org X-Google-Smtp-Source: AGHT+IHBcpjlTpVWYJ8inXYT2JBzkYRD3GJw6cv1xqGjs/jJOKjwHxpE88fYQXidvsT26YUvsoCQ X-Received: by 2002:ac8:7dd6:0:b0:458:5716:fbd8 with SMTP id d75a77b69052e-467a578fbe2mr262275071cf.32.1734358799156; Mon, 16 Dec 2024 06:19:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734358799; cv=none; d=google.com; s=arc-20240605; b=PIzMdRK7NqvaJJUFm6We2EZzv33kF2VGqN3aeBd0WJPVu2vruHXpi2wKwwHnZN1lTl qQjdTPZlYq7T/iMWZpmBpraWLLKMq0s9xbDQFY7QVUqKl4Nqj0PDfR1RVb3EFJ6w0Dd/ +6ORnYlgF+yCZbt8XBz8lHY14ZP1siI0sAkW/XDWDe/8EYjvQ+SKBt6zUFenlwokQB2i 8Modj84PA/dLC6ZH9+j/8JuwZbkLVU+vt3nPxMgg8PqMr+YAZc1WtHI+aAf9XN5c2ptp Wndpm6ngHKf+bj6oNM8hKhUog7hOAOyKKS7GSnhwDArfFxRFMhWK3VCIQMf9gQ9QH3Do VouA== 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=8/OmY2WmEI/8k66B1EkRdUwbupmt1vgrU/5PDZqVbRs=; fh=jfd24O/GUpQfDSGxn8P/HXLb4WlfrJJDNmj5ELhosqU=; b=QK3bQ0baImzFO1ayz9oq3/jphpnfLXZHT9/rVLaD/KYSxO47UukHIa5G+AxyybAGlX h4ttvUznp0jobmI9uxT+n1wxBjmndZgOvj7AopjqAy882JSOWOtfz5RU/flbArmO6CaL 959kvVAbPrZsQVUOfA9Sbz6XZEUop+IJ8AdmKZ/RPkRYWQ/GKhRj8V5FHz4JR1xbCzrA dQTOecwv4OFZtKDmFSj8S6JJDDlh39TlZzvzLQqiSbvMZh4pueM3sU0kbet2gNoBXGlU ZbCWnR62s+ST+5I8s9Hiu04kPw1Rxd0P60SuvOHDDpRJg5/k6RGH5jVowFR5rXjTgJjw 4MeA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rbUgrm2r; 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-467b2f1d8aesi77506191cf.617.2024.12.16.06.19.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2024 06:19:59 -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=rbUgrm2r; 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 1tNBwA-0003y2-QG; Mon, 16 Dec 2024 09:19:06 -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 1tNBw8-0003ww-CR for qemu-devel@nongnu.org; Mon, 16 Dec 2024 09:19:04 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNBw6-0000Cm-R5 for qemu-devel@nongnu.org; Mon, 16 Dec 2024 09:19:04 -0500 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-725ee27e905so5437264b3a.2 for ; Mon, 16 Dec 2024 06:19:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734358741; x=1734963541; 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=8/OmY2WmEI/8k66B1EkRdUwbupmt1vgrU/5PDZqVbRs=; b=rbUgrm2rcoQ82YIryG0fnnEGvoc70ic23f2rkQ2jOcBjfpBgMVBjxUxKrTqcIwl/5q 3+ko+Qdi8SS/xdE501xDxDFWqrx0KRKaUKaNrrnV+PtVEwt9e0CyPLCEHGzJ6Ck5okia sjlkQVuRQFYVn3sUITOVnQuGZAhQFyhjXarg/cu/J9w4vN1iV4dmq89Cdq7LK2ADyHx0 JG84yBGhZJr/rXwW3NKuvIUg9MaBULr6iRojItYzuIX1mUd99PpmoMWDSkTR2KnuStjT 8UC6Gxe4fDPlUL3YStci50mQJ78jjGU/ex8VVQ+2LyQOYciEKzZAIMTAUjukGbib1pSD kGdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734358741; x=1734963541; 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=8/OmY2WmEI/8k66B1EkRdUwbupmt1vgrU/5PDZqVbRs=; b=g1OCYWq1A87JTxf/1F1GNBfcxYokSj7yx3dHO6YuiS3KWRjeBv4Ng4ZGi7kALW4aQh tNuxHy0IVAGDp0U68qtHcrrwEazf/r/gM9GeEXvgqM9Dx+Ctk5th4CzX7Xuxjsm5dMQ+ NLm4EjFJeCdtyRmI4EkJGZU/KwPKg0UmTlakOJv5vWnUDwmbRLaM/qQ1e5ZMWbL1Sc4c bz1898ieFHCau491gPypxTBOvTae7TQUMWXIkafwCpfGl7YAdoMOTsFbrkcjnasuH5RJ X4I6uVkHcMNx+x7zrSgc/kgzpONPR3PdQS2newQYO/pH+T68Ylz4fxzmc9iPYrHATzRI dXUQ== X-Gm-Message-State: AOJu0YwEqsAUYQ19Dvfr0oMtCDg7RScVonarMjPCQ2U+oIAAIPhPgoan jESJ/bgBXZt/AaweAemv8JHJzcUoxYbePkGcdZhAqRs0bDTqU4VIlRWlH2r/BJ778kneGEweOmD k X-Gm-Gg: ASbGncszGIwj8vWLFsuYl8DbS8ZVIrahDeJqgn5xiuCG/bYkWwyTM4paNW7GJzabgxB kQepdS3UkFBRk8UPr3uO91QAGh06DwfZZJ7rhl7tYYLM9tnU/Mlrab3Xqnu+gNtoin/v6QeTzL5 HUyJMdEFClVAGO3hUKsb/mVWvfKCaFBmqe56AKwFA/zZp19M+m/p6LXFYeydDqnxtXqjA9zkzPI yZLYghCWy8Wh960QzLclyQxweEkMo8qAnSIym/HdpjXC0P2isy8uNgv9eY8GNs= X-Received: by 2002:a05:6a20:7285:b0:1e0:c50c:9842 with SMTP id adf61e73a8af0-1e1dfdda805mr26287311637.31.1734358741211; Mon, 16 Dec 2024 06:19:01 -0800 (PST) Received: from gromero0.. ([177.189.100.90]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918bad8acsm4948815b3a.146.2024.12.16.06.18.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 06:19:00 -0800 (PST) From: Gustavo Romero To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, philmd@linaro.org, alex.bennee@linaro.org, thuth@redhat.com, armbru@redhat.com Cc: gustavo.romero@linaro.org Subject: [PATCH v3 3/7] hw/arm: Allow some machines to use the ivshmem-flat device Date: Mon, 16 Dec 2024 14:18:14 +0000 Message-Id: <20241216141818.111255-4-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241216141818.111255-1-gustavo.romero@linaro.org> References: <20241216141818.111255-1-gustavo.romero@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=gustavo.romero@linaro.org; helo=mail-pf1-x42f.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 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 Allow Arm machine lm3s6965evb and the mps2 ones, like the mps2-an385, to use the ivshmem-flat device. Message-ID: <20231127052024.435743-2-gustavo.romero@linaro.org> Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Gustavo Romero --- hw/arm/mps2.c | 3 +++ hw/arm/stellaris.c | 3 +++ hw/arm/virt.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 50919ee46d..fe158dfbc0 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -42,6 +42,7 @@ #include "hw/timer/cmsdk-apb-dualtimer.h" #include "hw/misc/mps2-scc.h" #include "hw/misc/mps2-fpgaio.h" +#include "hw/misc/ivshmem-flat.h" #include "hw/ssi/pl022.h" #include "hw/i2c/arm_sbcon_i2c.h" #include "hw/net/lan9118.h" @@ -472,6 +473,8 @@ static void mps2_class_init(ObjectClass *oc, void *data) mc->max_cpus = 1; mc->default_ram_size = 16 * MiB; mc->default_ram_id = "mps.ram"; + + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_IVSHMEM_FLAT); } static void mps2_an385_class_init(ObjectClass *oc, void *data) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 376746251e..6725d83f1b 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -28,6 +28,7 @@ #include "hw/watchdog/cmsdk-apb-watchdog.h" #include "migration/vmstate.h" #include "hw/misc/unimp.h" +#include "hw/misc/ivshmem-flat.h" #include "hw/timer/stellaris-gptm.h" #include "hw/qdev-clock.h" #include "qom/object.h" @@ -1404,6 +1405,8 @@ static void lm3s6965evb_class_init(ObjectClass *oc, void *data) mc->init = lm3s6965evb_init; mc->ignore_memory_transaction_failures = true; mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3"); + + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_IVSHMEM_FLAT); } static const TypeInfo lm3s6965evb_type = { diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 333eaf67ea..67a4d3b838 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -85,6 +85,7 @@ #include "hw/virtio/virtio-iommu.h" #include "hw/char/pl011.h" #include "qemu/guest-random.h" +#include "hw/misc/ivshmem-flat.h" static GlobalProperty arm_virt_compat[] = { { TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "48" }, @@ -3120,6 +3121,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_AMD_XGBE); machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE); machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_PLATFORM); + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_IVSHMEM_FLAT); #ifdef CONFIG_TPM machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS); #endif