From nobody Mon Feb 9 08:41:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) client-ip=209.85.128.54; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f54.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1621249926; cv=none; d=zohomail.com; s=zohoarc; b=hmDMVuNI7RPQtT4XbzTMfmhOKX9MPOqsWGaioYxBmBp9MbZtb19YdpqVg+c7o04wV3Rj0AC35BDio4Z3D3KD1ggeJTPajGA+ruLsvtCQYyyeeZzbD6gDpJC+juzrpTkYTHK59q97lBFsbJQlrf43qTBEz3vQgiU0AvYe6+F7COs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621249926; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=21MwD1xvRVhA8I16eM1nxg+vXsRbeWwb/Kbif9L3QsM=; b=j4q1n51EhZGvARxCCzeQZdTKc8ISHKLzKmzfMbDPFxNx1SlRsEJ+pkbma3hMmj47PpTMDaLBnIH53EboAqV4C67ReUIKp3cnG2jIcGHpaZMElXb94L0J0Ss57W0+YvovFWq6YYB2KBT48KzPZuZJvDKQx6h0RR42lyw3ditUkXs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.zohomail.com with SMTPS id 1621249925999413.718095201565; Mon, 17 May 2021 04:12:05 -0700 (PDT) Received: by mail-wm1-f54.google.com with SMTP id o6-20020a05600c4fc6b029015ec06d5269so3372435wmq.0 for ; Mon, 17 May 2021 04:12:02 -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 e10sm17265551wrw.20.2021.05.17.04.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:12:00 -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=21MwD1xvRVhA8I16eM1nxg+vXsRbeWwb/Kbif9L3QsM=; b=vGiP9QaoS3wdF7FHK6pPeKt6izqO1z8+Pcci5542gknK0pjX3PERdcL9HBDahB1qFr cICfiuRnwJVjO6XTc7I+5sRkv+BRl3tYO8Ijumg0mz3o1kgFqQDzMidHO19stOnDDp06 MBgFA0sje6BBb1ERHs01ku2/JqIwGHPxnEc5husjL+W4BkffRg/wL9qA1AkkJmHzg1b8 GuuU0h4gK+2iGR8J++gS9XbvN4p1UrMm4tq2StQeIYH/RswiL/IwZj3cLvIRVOf0ilGj ceQOXkmPmNo/LvX61d+5awrXm1+Vlc5Du51tRJA6bPF3ogrvXr0sNYxzQa+e36DZ050E RwxQ== 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=21MwD1xvRVhA8I16eM1nxg+vXsRbeWwb/Kbif9L3QsM=; b=nw1uYdvHCAAqWDOReBjA7wQprZAX+MAA55/ZU1+w2X32LB7wLQPObeKjzl291ntAlp oNei3ol/l9REcWunAL5ntvsLTogdMXs5TSlw8ddryu/x/YjMecJhujs6qmbrgdoO6hLb zUoZoMTNlYQ8IOZlZOzSfpd84nnRXQaPVKyyBPwVjnBFJvEwlul44klBc1VB3ltrh01Y VgMWlC3OiToQmEed+J+UPSYafOcjqS6nGCb8AaPnjT+XJ3zMepx7JMCm1ZoP0kEOni4O DmD0rIxpKX9c0cwdPuoQmGWxIzsCn13Q1Obyg/B0dsCr2EvP+mDAJ0hYLvtF0WN8TEr6 vfvg== X-Gm-Message-State: AOAM530zREnKxw8PHrNAlyER1VbeS7L3iNQHBO0VpivfRjIOFrW6/FMm S9DarqVQ50S8DCrIP0L93vE= X-Google-Smtp-Source: ABdhPJzKRoWRCs6oszN1DCNCHFx34Mc9kIJToD+X3rBQ94jP+QQ/MJJm47E7DIn1nsrD4z8quQct7Q== X-Received: by 2002:a7b:c056:: with SMTP id u22mr22676141wmc.181.1621249921208; Mon, 17 May 2021 04:12:01 -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 10/11] exec: Restrict ramblock.h to sysemu/ Date: Mon, 17 May 2021 13:11:10 +0200 Message-Id: <20210517111111.1068153-11-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 ramblock.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/ramblock.h,sysemu/ramblock.h, $(git grep -l exec/ramblock= .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/sysemu/ram_addr.h | 2 +- include/{exec =3D> sysemu}/ramblock.h | 13 ++++++++----- migration/dirtyrate.c | 2 +- migration/multifd.c | 2 +- migration/postcopy-ram.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 2 +- MAINTAINERS | 2 +- 7 files changed, 14 insertions(+), 11 deletions(-) rename include/{exec =3D> sysemu}/ramblock.h (92%) diff --git a/include/sysemu/ram_addr.h b/include/sysemu/ram_addr.h index d495c969f9f..aea30dfeb4e 100644 --- a/include/sysemu/ram_addr.h +++ b/include/sysemu/ram_addr.h @@ -27,7 +27,7 @@ #include "sysemu/xen.h" #include "sysemu/tcg.h" #include "exec/ramlist.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" =20 /** * clear_bmap_size: calculate clear bitmap size diff --git a/include/exec/ramblock.h b/include/sysemu/ramblock.h similarity index 92% rename from include/exec/ramblock.h rename to include/sysemu/ramblock.h index 664701b7594..12a1b90a19b 100644 --- a/include/exec/ramblock.h +++ b/include/sysemu/ramblock.h @@ -16,11 +16,14 @@ * The functions declared here will be removed soon. */ =20 -#ifndef QEMU_EXEC_RAMBLOCK_H -#define QEMU_EXEC_RAMBLOCK_H +#ifndef QEMU_SYSEMU_RAMBLOCK_H +#define QEMU_SYSEMU_RAMBLOCK_H =20 -#ifndef CONFIG_USER_ONLY -#include "cpu-common.h" +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif + +#include "exec/cpu-common.h" =20 struct RAMBlock { struct rcu_head rcu; @@ -70,5 +73,5 @@ struct RAMBlock { */ ram_addr_t postcopy_length; }; -#endif + #endif diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index ccb98147e89..5422b39784f 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -14,7 +14,7 @@ #include #include "qapi/error.h" #include "cpu.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" #include "qemu/rcu_queue.h" #include "qapi/qapi-commands-migration.h" #include "ram.h" diff --git a/migration/multifd.c b/migration/multifd.c index 0a4803cfccb..519f8dd4393 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -14,7 +14,7 @@ #include "qemu/rcu.h" #include "exec/target_page.h" #include "sysemu/sysemu.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "ram.h" diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 2e9697bdd2e..fb8c625ffc3 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -31,7 +31,7 @@ #include "qemu/error-report.h" #include "trace.h" #include "hw/boards.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" =20 /* Arbitrary limit on size of each discard command, * keeps them around ~200 bytes diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuz= z.c index 05f9c9b06f9..613427f1a57 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -21,7 +21,7 @@ #include "fork_fuzz.h" #include "string.h" #include "exec/sysemu/memory.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" #include "hw/qdev-core.h" #include "hw/pci/pci.h" #include "hw/boards.h" diff --git a/MAINTAINERS b/MAINTAINERS index 8caf3891dba..cea4f2e438a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2402,7 +2402,7 @@ F: include/sysemu/ioport.h F: include/exec/memop.h F: include/exec/sysemu/memory.h F: include/sysemu/ram_addr.h -F: include/exec/ramblock.h +F: include/sysemu/ramblock.h F: softmmu/dma-helpers.c F: softmmu/ioport.c F: softmmu/memory.c --=20 2.26.3