From nobody Wed Nov 27 10:25:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699888912; cv=none; d=zohomail.com; s=zohoarc; b=fJ5Z6flNkcwq6EjRU3rOpOJVnKWRqIX8g5LSfz1VXxcgFMoMk97Lw5avV7EE4NXYQd1FZ6vIM78+EHb6lGCJgfu3Sa7KXdOUCa3b+Uk/KTS5GApOafc7G/hMrpoRhuq1QRRp9iqVDvs/hcq5nC8boug0Hc9Wy65E6gTveOSNydA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888912; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=R0n+efnCwqYZSgvX5xA6BN1n520F2bZNMKVl3gVhASA=; b=OKaUeFnRfONQEBuyUjB/ekVkEdisuOtC7/2jNUKIW4T8hgWg0jYKe4DITsabP8QJiaqlyylFqG/jk4io0IdoG+dmc0efDV5AdBY8NEN8tOV1xJ6NrpWclq9OZy90oGAHZCWv3sIUgf9kCGDCM1ij4yklN3ipwV8KoWLI2gH8aTw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1699888912467780.2241898819851; Mon, 13 Nov 2023 07:21:52 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.631691.985282 (Exim 4.92) (envelope-from ) id 1r2Ykg-0006Ha-9g; Mon, 13 Nov 2023 15:21:26 +0000 Received: by outflank-mailman (output) from mailman id 631691.985282; Mon, 13 Nov 2023 15:21:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2Ykg-0006HR-6b; Mon, 13 Nov 2023 15:21:26 +0000 Received: by outflank-mailman (input) for mailman id 631691; Mon, 13 Nov 2023 15:21:24 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2Yke-0005il-Ty for xen-devel@lists.xenproject.org; Mon, 13 Nov 2023 15:21:24 +0000 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [2a00:1450:4864:20::62b]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4e8d3b90-8238-11ee-98da-6d05b1d4d9a1; Mon, 13 Nov 2023 16:21:24 +0100 (CET) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9e62ab773f1so450000066b.0 for ; Mon, 13 Nov 2023 07:21:24 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id dx15-20020a170906a84f00b009adcb6c0f0esm4204593ejb.193.2023.11.13.07.21.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:21:23 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4e8d3b90-8238-11ee-98da-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888884; x=1700493684; darn=lists.xenproject.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=R0n+efnCwqYZSgvX5xA6BN1n520F2bZNMKVl3gVhASA=; b=Fj6N6HceDCT5lmsTGLuL8jOKrWVDWDB/6msLjIH/8VMWntJ3ljGFdugMW/6Dop+kBm ReiY9Cn8iKzS4fK1Tq4TWBJ40HVwZuT/fuWtYyGPJwoebZqF5GDElNJ4nmV5Cgy4g+t9 6pyjXIzRMNLgq9Hy9Zuqv3VyjDFK4ao3mA8j5RwtU5oG3iKKGG97E/i41mRjRr2Spx5A pxai4ZqCar5KXY/6cOOvS1FV1miFPUnDYN7WRrqWpZpQCO5LSGh0DcFcDKODgZ2kukmw v+hyGavTZwFSMVzEqDWhimIAYnMV02mWts0k3VWK9gnjFYL/wNtvTwLZ+Z1NCOekjlGI drhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888884; x=1700493684; 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=R0n+efnCwqYZSgvX5xA6BN1n520F2bZNMKVl3gVhASA=; b=rx+ijbGuRI7Nvu9y4T/l/rkTHb+86SFz7SRKNp6sxCuss5dutHYBHmk79weOM7Sra6 qeIEZom8x6VJt8EUaNFRduhZDjgSkGI/FUIMizqfflQ9+Z5hW+mw7MZtxuHYl4koEHeD jX9FQPcj7YWOJfivwi0PjrPwB1LlE7k9eh/JoGIdlsqpmIjw4WQ+t0Nb3uscD/2s6zvQ OqIow2ur2HkJhnCj3QjC4IMwr2YixNiYA2oxVW2dGTNKOqTHItkZ63/zHMk2RIGASBkh LUgLp9EIaVWErbD60rThUbS6PWkGcrGDCO9v4pzcdd6eGLdqQrwzWAxwoc6eVC0vB+YT a17w== X-Gm-Message-State: AOJu0YyN4HF8svXnd3f2KrjLcCdUKwQC/0R1kVil2x6Up7CtXgKARLbI YYIoNhXMF5h5MnmWfydeehZ2Gw== X-Google-Smtp-Source: AGHT+IH6xxb8oSsdvX/Qxe7SX73ROr6di4a0tnTAF45WIy9EC8KmTSkElWDjJsGSvtz6GSstCFLdyw== X-Received: by 2002:a17:906:4c84:b0:9cb:5a8a:b19d with SMTP id q4-20020a1709064c8400b009cb5a8ab19dmr4350360eju.5.1699888883852; Mon, 13 Nov 2023 07:21:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Anthony Perard , xen-devel@lists.xenproject.org, Stefano Stabellini , qemu-block@nongnu.org, Thomas Huth , Paolo Bonzini , qemu-arm@nongnu.org, Paul Durrant , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.0 01/10] sysemu/xen: Forbid using Xen headers in user emulation Date: Mon, 13 Nov 2023 16:21:04 +0100 Message-ID: <20231113152114.47916-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231113152114.47916-1-philmd@linaro.org> References: <20231113152114.47916-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699888913513100001 Xen is a system specific accelerator, it makes no sense to include its headers in user emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson --- include/sysemu/xen.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sysemu/xen.h b/include/sysemu/xen.h index bc13ad5692..a9f591f26d 100644 --- a/include/sysemu/xen.h +++ b/include/sysemu/xen.h @@ -10,6 +10,10 @@ #ifndef SYSEMU_XEN_H #define SYSEMU_XEN_H =20 +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu/xen.h from user emulation +#endif + #include "exec/cpu-common.h" =20 #ifdef NEED_CPU_H @@ -26,16 +30,13 @@ extern bool xen_allowed; =20 #define xen_enabled() (xen_allowed) =20 -#ifndef CONFIG_USER_ONLY void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length); void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, struct MemoryRegion *mr, Error **errp); -#endif =20 #else /* !CONFIG_XEN_IS_POSSIBLE */ =20 #define xen_enabled() 0 -#ifndef CONFIG_USER_ONLY static inline void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t le= ngth) { /* nothing */ @@ -45,7 +46,6 @@ static inline void xen_ram_alloc(ram_addr_t ram_addr, ram= _addr_t size, { g_assert_not_reached(); } -#endif =20 #endif /* CONFIG_XEN_IS_POSSIBLE */ =20 --=20 2.41.0