From nobody Mon Feb 9 08:41:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) client-ip=209.85.128.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1621249929; cv=none; d=zohomail.com; s=zohoarc; b=a7BxRs/JxYcORHyk/QFB2H48qnPKkm6k89RTwZeMRrEmCL4kZ0BFEPDW+BPp6femDm7T0yn6AOKOW9GvHy5KHQrdwYbRCJWAkyTogKrKSbtQcbtg/u/kuMppowK4XCp6NoE9+KUgEBvlr/4bsIpo7y4sF10LIRRcoZ4tFSwnBpE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621249929; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EMgUQW0usIbC3Xh5eHeXBZBc/9XCoZrI2HXiiIOGatY=; b=kYWXx5ok9URxCed/dUpMRX7I7TT+9qwV3QDtKyJiKfiNV2XtLlD7FFOGqRna2Ut5af+QytriU5Wc8gbrVOZ1h0M7IspucTnnpvZ/OhKDbpSpkhpvmHBwkyJ80gs1ouQcnOb75qIjyKbb8lX3MpJLVOCUhT6qYHwkXv/0SU3cx68= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.zohomail.com with SMTPS id 162124992934940.52918468521227; Mon, 17 May 2021 04:12:09 -0700 (PDT) Received: by mail-wm1-f41.google.com with SMTP id z130so3347939wmg.2 for ; Mon, 17 May 2021 04:12:07 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id c8sm16619684wrx.4.2021.05.17.04.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EMgUQW0usIbC3Xh5eHeXBZBc/9XCoZrI2HXiiIOGatY=; b=G8UIhZOxwi+kZfVpn2N+AUxeaawT3KAaro3nMtlmbQLZdQCXXzFWbNooteGR77hwqa xISrj2GZ2QQFXaXSDAjEWizmDGNLWlb/wYo8QukB5MpizUi6tu2mwNYkQhAJQ0IAjelQ jduY7aT+E0j1cvsHbMB7cizASg3VMvSod3Qg8D4cb04/ndeoknZ/IVNugzAUEsXNqAOx TizyYgVss1x+y1MepFiEszQAMEuhImbATnsCE6o/DriroSes3hft2WcfFVkInTtZOHm/ vFatVv1CXrMEFTJc98h0pOUbM6hBm7okzxHsAZjUZDvIMGIXD0E4NVUcfoebYLck3myx P/YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=EMgUQW0usIbC3Xh5eHeXBZBc/9XCoZrI2HXiiIOGatY=; b=sXLFEQM30jatRHNgH6YcbtHoaKCNa6mfXIeRDfaMwia8eU8n7MxneqQ27G5YglAkc+ X81cK0ye47JPxVgBUY5Dvc3PCkx3L9Q1aCgraBdirQpgoZ+2altCVbsIh5vINT1weQu2 tNQyefVtBapWHNh6OgKil1fPi+teDnLknG7VOWPRP65riXQTboqNw6yZ+QfTkHd6P2bJ QYPUB+eQ5Hqizsa/PxS8KPY3BIOZdxiDkoP4t13Y3P+q3dYLPtK20rp6vZTMZgRVh0ez GyVnTS3UFyHE2aUjVGUW9HTq265DG01vzAc4qSh1CahAzwF/tOWZM2zXg+wOvYQNJyzD GUBg== X-Gm-Message-State: AOAM530utq5npHhZ+zOoxnspyc5dbUtcHXlzUtnf3T+htp8E9au5mBa4 a/RrimMCmnxTmW2ukF/hpTw= X-Google-Smtp-Source: ABdhPJwRYqtg8TClglBQpnVlli5s5Oy/nls+QqQ6ID60kt61sUh/ePFt6ZVKFJf7pWr3NJsB9JHn1w== X-Received: by 2002:a05:600c:2298:: with SMTP id 24mr61695580wmf.167.1621249926034; Mon, 17 May 2021 04:12:06 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Claudio Fontana , Laurent Vivier , Paolo Bonzini , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 11/11] exec: Restrict confidential-guest-support.h to sysemu/ Date: Mon, 17 May 2021 13:11:11 +0200 Message-Id: <20210517111111.1068153-12-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) To make it clearer the confidential-guest-support.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/confidential-guest-support.h,sysemu/confidential-guest-su= pport.h, \ $(git grep -l exec/confidential-guest-support.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/{exec =3D> sysemu}/confidential-guest-support.h | 6 +++--- backends/confidential-guest-support.c | 2 +- hw/core/machine.c | 2 +- hw/ppc/pef.c | 2 +- hw/s390x/pv.c | 2 +- softmmu/vl.c | 2 +- target/i386/sev.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) rename include/{exec =3D> sysemu}/confidential-guest-support.h (95%) diff --git a/include/exec/confidential-guest-support.h b/include/sysemu/con= fidential-guest-support.h similarity index 95% rename from include/exec/confidential-guest-support.h rename to include/sysemu/confidential-guest-support.h index ba2dd4b5dfc..3b52d086642 100644 --- a/include/exec/confidential-guest-support.h +++ b/include/sysemu/confidential-guest-support.h @@ -18,7 +18,9 @@ #ifndef QEMU_CONFIDENTIAL_GUEST_SUPPORT_H #define QEMU_CONFIDENTIAL_GUEST_SUPPORT_H =20 -#ifndef CONFIG_USER_ONLY +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif =20 #include "qom/object.h" =20 @@ -57,6 +59,4 @@ typedef struct ConfidentialGuestSupportClass { ObjectClass parent; } ConfidentialGuestSupportClass; =20 -#endif /* !CONFIG_USER_ONLY */ - #endif /* QEMU_CONFIDENTIAL_GUEST_SUPPORT_H */ diff --git a/backends/confidential-guest-support.c b/backends/confidential-= guest-support.c index 052fde8db04..bc141504451 100644 --- a/backends/confidential-guest-support.c +++ b/backends/confidential-guest-support.c @@ -13,7 +13,7 @@ =20 #include "qemu/osdep.h" =20 -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" =20 OBJECT_DEFINE_ABSTRACT_TYPE(ConfidentialGuestSupport, confidential_guest_support, diff --git a/hw/core/machine.c b/hw/core/machine.c index 1bf0e687b94..6ab11140ef0 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -32,7 +32,7 @@ #include "hw/mem/nvdimm.h" #include "migration/global_state.h" #include "migration/vmstate.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-pci.h" =20 diff --git a/hw/ppc/pef.c b/hw/ppc/pef.c index 573be3ed79b..d469326a480 100644 --- a/hw/ppc/pef.c +++ b/hw/ppc/pef.c @@ -14,7 +14,7 @@ #include "qom/object_interfaces.h" #include "sysemu/kvm.h" #include "migration/blocker.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" #include "hw/ppc/pef.h" =20 #define TYPE_PEF_GUEST "pef-guest" diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c index 401b63d6cb6..799d8b047b2 100644 --- a/hw/s390x/pv.c +++ b/hw/s390x/pv.c @@ -17,7 +17,7 @@ #include "qemu/error-report.h" #include "sysemu/kvm.h" #include "qom/object_interfaces.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" #include "hw/s390x/ipl.h" #include "hw/s390x/pv.h" =20 diff --git a/softmmu/vl.c b/softmmu/vl.c index 93e78469bce..d79c15cd4dc 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -102,7 +102,7 @@ #include "qemu/plugin.h" #include "qemu/queue.h" #include "sysemu/arch_init.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" =20 #include "ui/qemu-spice.h" #include "qapi/string-input-visitor.h" diff --git a/target/i386/sev.c b/target/i386/sev.c index 41f7800b5f7..f2a92cf9126 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -31,7 +31,7 @@ #include "migration/blocker.h" #include "qom/object.h" #include "monitor/monitor.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" #include "hw/i386/pc.h" =20 #define TYPE_SEV_GUEST "sev-guest" --=20 2.26.3