From nobody Mon Feb 9 09:43:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611348338; cv=none; d=zohomail.com; s=zohoarc; b=lUe+3lloSHjuhqz6/JkzHkZsYEfFMWvxafPYuC522WuS8y2ovVP+a1rIDMI/rjg/UEeJGy9gp5GiqGDCWCjuG1lMqnKUSK7DqlSJxKC7HNNhIcnle6Hkgn2b9J3Y03exYewQSx7wnMBI8WFBqj8Uz86+TdUjGTc7De/gptdBw0Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611348338; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=cxJdntCxJ3BjqvkWrgOloscdbx5pYTRX48FDf3Cb8HY=; b=Hgpgdbx7cBptS47wBfG0qbi/cvMx6II6z+OcoeFlhg4UuZNHi6crvor06yL1Msnz/IlZ4oWtakOZIig7yFAmWUbkDfcWZtWCcDzrzRYzT4PLqCDGb7AxnkhMZXdWz68vKmYjzwQW3GxXpWhbHmSVD2+KaWp4pbCquHr0ekjZGSg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1611348338137791.6752640119779; Fri, 22 Jan 2021 12:45:38 -0800 (PST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-587-KX8Qq59HNsWylbu181Yxpg-1; Fri, 22 Jan 2021 15:45:35 -0500 Received: by mail-ed1-f72.google.com with SMTP id k5so3500548edk.15 for ; Fri, 22 Jan 2021 12:45:35 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id f9sm6171331edm.6.2021.01.22.12.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 12:45:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611348337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cxJdntCxJ3BjqvkWrgOloscdbx5pYTRX48FDf3Cb8HY=; b=Jxpep3rhgBzsQ4u7o30WdMArXoFaCDgnPqwyrLMJZRO8FeImLRcUe4O2RFkAcdKSoWPiCd ExGPsLCiTGFzKg0gRwmAbT+cAVJx/L4h8C3+qbjhIoPsqAISBrhFkpxIde2qLnYLPKf13x iz7RD+kC5tBMlJ4kgqnUNIrVcQuqGZ0= X-MC-Unique: KX8Qq59HNsWylbu181Yxpg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cxJdntCxJ3BjqvkWrgOloscdbx5pYTRX48FDf3Cb8HY=; b=uLdE8M79Rb1T6XcRiMeZcsnb7wTA2WZIH/Y4GWtFLBWZle+rnjugFdsssOx7NKdHzk QyF/ETGR///N4nHp8RQ5W12gtPbUwBqS1WvRmGOnwJiLUUG5AdA/Z/rGWoRlAyY0BhVN Q0Ghvu1po9RsaXbhLq8CV8o82bhqW0F1kjZGgLeVtBgyL9MnsWhw4qK0mF1eRHRORjE8 OSx82yfNy8K+sAYSBgaM6kjklvbE7FqkmDnl4mKLI2j8I3kwnvUj4SBcecd2ZjpC/DCm /Yw/hxtDD1tQrobIq9b/GbjuwFW++VRwpCb/TNlssVw6f+22+1DeTtTS1lIX/gooOzax cxZQ== X-Gm-Message-State: AOAM530CbIBIXG8Rn8ZSx+29Y61ZXNk1GomCp7FHkFVIhnboIddMCG+O jtZSs8nVjpo+5Rk8QcG79SK1uhiosaNCRvsxANJHZSQ8rWHHlPJUtmALxfZEAg5oq2Jdxf4tL8p +ogu9LDkeFFqdqQ== X-Received: by 2002:a05:6402:3553:: with SMTP id f19mr4648162edd.271.1611348333285; Fri, 22 Jan 2021 12:45:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJylG3PQPMZ+pmhjaJnFVCvdbv4ETZsUHLRN7de/wqP9aSq+Sp3Aq6Nu3qOMsUHoUuX5l2j/Eg== X-Received: by 2002:a05:6402:3553:: with SMTP id f19mr4648148edd.271.1611348333137; Fri, 22 Jan 2021 12:45:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Paolo Bonzini Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Markus Armbruster , Michael Roth , Claudio Fontana , Thomas Huth , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Subject: [PATCH v2 09/12] qapi/meson: Restrict qdev code to system-mode emulation Date: Fri, 22 Jan 2021 21:44:38 +0100 Message-Id: <20210122204441.2145197-10-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210122204441.2145197-1-philmd@redhat.com> References: <20210122204441.2145197-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Beside a CPU device, user-mode emulation doesn't access anything else from qdev subsystem. Tools don't need anything from qdev. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Cc: Laurent Vivier Cc: Eduardo Habkost --- stubs/qdev.c | 23 +++++++++++++++++++++++ MAINTAINERS | 1 + qapi/meson.build | 6 +++++- stubs/meson.build | 2 ++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 stubs/qdev.c diff --git a/stubs/qdev.c b/stubs/qdev.c new file mode 100644 index 00000000000..92e61431344 --- /dev/null +++ b/stubs/qdev.c @@ -0,0 +1,23 @@ +/* + * QOM stubs + * + * Copyright (c) 2021 Red Hat, Inc. + * + * Author: + * Philippe Mathieu-Daud=C3=A9 + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "qapi/qapi-events-qdev.h" + +void qapi_event_send_device_deleted(bool has_device, + const char *device, + const char *path) +{ + /* Nothing to do. */ +} diff --git a/MAINTAINERS b/MAINTAINERS index 34359a99b8e..d2dd7c24228 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2523,6 +2523,7 @@ F: qapi/qom.json F: qapi/qdev.json F: scripts/coccinelle/qom-parent-type.cocci F: softmmu/qdev-monitor.c +F: stubs/qdev.c F: qom/ F: tests/check-qom-interface.c F: tests/check-qom-proplist.c diff --git a/qapi/meson.build b/qapi/meson.build index ab68e7900e4..2839871b478 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -35,7 +35,6 @@ 'misc-target', 'net', 'pragma', - 'qdev', 'pci', 'qom', 'rdma', @@ -49,6 +48,11 @@ 'ui', 'yank', ] +if have_system + qapi_all_modules +=3D [ + 'qdev', + ] +endif =20 qapi_storage_daemon_modules =3D [ 'block-core', diff --git a/stubs/meson.build b/stubs/meson.build index 1a656cd0704..a054d5877fb 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -53,4 +53,6 @@ if have_system stub_ss.add(files('semihost.c')) stub_ss.add(files('xen-hw-stub.c')) +else + stub_ss.add(files('qdev.c')) endif --=20 2.26.2