Message ID | 20250210204204.54407-13-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4e42:0:b0:385:e875:8a9e with SMTP id r2csp1791309wrt; Mon, 10 Feb 2025 12:43:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXPDI8pbWhyZb6g9SkelksN9OxBxvpVe4zp9tQ5bFmGyQbolgVbIDuy6bethAWMLkz/WXFd+w==@linaro.org X-Google-Smtp-Source: AGHT+IGdJ2p+rxQhx7V+G8GiyQuEypqM1U2NCi24Q6ljhiv/8sQTDDlUFSVcP+qawybsUR26cvxn X-Received: by 2002:a05:620a:2b99:b0:7a9:aba6:d012 with SMTP id af79cd13be357-7c047c1386dmr2275396585a.22.1739220210344; Mon, 10 Feb 2025 12:43:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739220210; cv=none; d=google.com; s=arc-20240605; b=Bp/oJNHIJbAseEAKxFTWTLXBEpUU0IJ661IjkWFalQsWPzNY64IGi8LSJrYBRGKzSI ZcNDqijqSnP1pugYb0RGi15HWn81QgwSPyoIOXdNCL35q012cRC2kbH+22B4tCO0NlfR j2O03hLag9XPmiNWWd5JlkMThbODZCciQZoJNH6etigroscxFPE1HdYm/++vC+y/LPN9 x6aJ0K62Z+1XGr9zbSpADxoC4wNEqwfxRTonK5/YblJgNph2mdmn8XPXmcjc7MmV7gca JdGMxDBxMLldDWTRip8hSMNGv5Dcjpj2/mKpkZUhHFuvD/Ly0sTSyvpkWAl7ZShdKENT kioA== 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=jXLAth+OcKN5qmuSWCVnQNPPe3Rb89yPkhZvLN1aBKY=; fh=brSo76fyPvhtbCe44w+kpwbe2Yhys79ZGQu8l5lsO38=; b=B8vUIy19QRvNukvIP9t0dW2nAP856AW0dbIhyKk2EJjlNubEi6GQnEEnt32//WeTlq k396WjEnFufvCn20HJ5KAKwlGUZ6PxLHG0VTmAuYl0/weFUSCNRV73XXYShJiBTt2A/r YRtcWBSVDYepr2v7RbTz70KisXYzafEvZF2H+VXkCLX1dn96F4fsLETsj3o+Z20cumm6 tHo3cL3JJRnr0cQqJQWKI3wAYxmEqkq520BO+Dn1aiaI1iecgiDZf/hJEKkOp02DzT6A LSM4gE4IAOzw15VUkQSqwgAAWfAUeT6rH072Qhux/+ObiW/SMQgjMu5DjL6snlQDL4Yg 34xw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KvFD17cN; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c05515d47fsi485820885a.391.2025.02.10.12.43.30 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Feb 2025 12:43:30 -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=KvFD17cN; 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 <qemu-devel-bounces@nongnu.org>) id 1thacj-0007GI-6y; Mon, 10 Feb 2025 15:43:21 -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 <philmd@linaro.org>) id 1thacZ-00076S-V3 for qemu-devel@nongnu.org; Mon, 10 Feb 2025 15:43:15 -0500 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 <philmd@linaro.org>) id 1thacY-0003fS-7b for qemu-devel@nongnu.org; Mon, 10 Feb 2025 15:43:11 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43675b1155bso53845365e9.2 for <qemu-devel@nongnu.org>; Mon, 10 Feb 2025 12:43:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739220188; x=1739824988; 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=jXLAth+OcKN5qmuSWCVnQNPPe3Rb89yPkhZvLN1aBKY=; b=KvFD17cNrPOqMmZJYsD60HwSgeRhJDZAd+UXjBoUrXzi+oNdi7YMZdebeHPcOiNtbT nIvsw1M+fTmnXKr7VSnxjr7g3NPNd5gn9pEwHAIzmCqbYP2ZXLqNmlW9fIyhwEG6TgAW SEm4/wMtKyXbajhidTi6mtI1LlnF3d3xzTdzlACAyZWqMij85xWo40X245DdIDX7JaT1 hExWE6GQHBQLLqVwzOBaYPjHsj5p2GGLJFY8FKI8jJeN/eYllURtYQQfd9pkPu7in4wQ LN+TXHKOh1+NIxWeWBaR3Wlj9YyBxktmlaf78B6+XUPATr8NNaikeSv7m0vePF2FzjPo uZ0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739220188; x=1739824988; 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=jXLAth+OcKN5qmuSWCVnQNPPe3Rb89yPkhZvLN1aBKY=; b=Yi8KmnjtkAIhI00s7dqqwIfz/Xug2SI2ophSx8SSEmQfGtWhCZAyIAH5ly6+a0BEnH MCJPqv+gdVrV50z6L0ijBzJTjzpe1dstPn92paz7HC7xkRR7zM1gF8ToxdqHNK/JBF8a J8nXc8GftLrSYyPhzdhJWlNoGj/QstckyHMD0gsv3iHHGmbHbhIzUeoSVYoZG+oaQc7I 8PWyNHZlpSlt7KXU+2srmVQSh4G5euD3kmawB1zX0kk5/KedU/eKplfGTS1nS/gt+oes AGITQyvC70NaeH9F7cJPdYc72o+Aw3UzonuXmlILG/cMLqEOZUmqyj2D6S49IyZVs8jm DQNw== X-Gm-Message-State: AOJu0YzCY42iJWbWkruZktz9f5IbMTMv7P5uv5q32REtD+kT373e2r5v bgjMrZOgPrieDXKX8brzl0qJk47fhpOIJYR4ZEs6uAoAH47FVzTj5uIj6ZGfFG9C2VmroajtTF7 KVXM= X-Gm-Gg: ASbGnctOOiuTXbwZ7Cu+FuFNEm1Rx6GwHPmEkaEF1XfD75VLQJQhNQteAqf0J8LpHMb xQ64Qvf/f3frTZzuX2hlhlo7zhELbDhpeOktF+3gUSFyKm02oM0vMGh2i2+KLd9J0AHC3mW5PLk w3JM7KHU++je+rJReYNvp7sHIqyGi+I9ArDevSb6fwLkjNuqedXboU/YoHQa/BytjFcMv7i9A46 WHQSZxH+1y7gdvDU95edrSihWXHvUvZD9s3OS4qZjr2SK6IFtGMs8jMvfde//+oafeTMQx69GzQ Vw9nPW6RTON4YxHbwRazQC0vNbVXTmvJb45DYaEEUIoCIUs49frvkB8hIhWc3lAVTA== X-Received: by 2002:a05:600c:4e89:b0:439:45ce:15c0 with SMTP id 5b1f17b1804b1-43945ce18d2mr33383405e9.25.1739220188332; Mon, 10 Feb 2025 12:43:08 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dc5839877sm11545288f8f.3.2025.02.10.12.43.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Feb 2025 12:43:07 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Richard Henderson <richard.henderson@linaro.org>, Alexander Graf <graf@amazon.com>, =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= <clement.mathieu--drif@eviden.com> Subject: [PULL 12/32] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE Date: Mon, 10 Feb 2025 21:41:44 +0100 Message-ID: <20250210204204.54407-13-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250210204204.54407-1-philmd@linaro.org> References: <20250210204204.54407-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@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 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/32] backends/tpm: Use qemu_hexdump_line() to avoid sprintf()
|
expand
|
diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index c9b1e0e90e3..81bbda10d37 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -19,6 +19,8 @@ DECLARE_INSTANCE_CHECKER(BusState, SYSTEM_BUS, OBJECT_DECLARE_TYPE(SysBusDevice, SysBusDeviceClass, SYS_BUS_DEVICE) +#define TYPE_DYNAMIC_SYS_BUS_DEVICE "dynamic-sysbus-device" + /** * SysBusDeviceClass: * diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 075c7dfd69b..98819d5dc61 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -320,6 +320,14 @@ BusState *sysbus_get_default(void) return main_system_bus; } +static void dynamic_sysbus_device_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *k = DEVICE_CLASS(klass); + + k->user_creatable = true; + k->hotpluggable = false; +} + static const TypeInfo sysbus_types[] = { { .name = TYPE_SYSTEM_BUS, @@ -335,6 +343,12 @@ static const TypeInfo sysbus_types[] = { .class_size = sizeof(SysBusDeviceClass), .class_init = sysbus_device_class_init, }, + { + .name = TYPE_DYNAMIC_SYS_BUS_DEVICE, + .parent = TYPE_SYS_BUS_DEVICE, + .class_init = dynamic_sysbus_device_class_init, + .abstract = true, + } }; DEFINE_TYPES(sysbus_types)