From nobody Wed Nov 27 07:31:48 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 From nobody Wed Nov 27 07:31:48 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=1699888914; cv=none; d=zohomail.com; s=zohoarc; b=UbrHVztvk/rX8kCnxAbIY/1GVNJOChvvpn0TJ5ExWZbs0N6Eyaef40Yw2SNDNZxaL5o3VHzWY3TFZw+z8t3mKldUgdZE6rOYg7lhndsc86tq2yH/9x/vQ7dQNzkKWd1HY5WcFdSnaEX1ditxz20CdGCLkWDTEZSkzWiOY3RPjC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888914; 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=R3bxfGqI5yyGuHTvJ252KdxHxDRKsvIzu9uNKMF+2iI=; b=Gd4NQDZGXwbmV+nvZXSx62VobdvdVYYjAHPthXHwyFeL6zZCcx7TZ80EB08B/18zk/9l/ch8g9sW3o0nSA7/brcTE41tzzlk9+5SML7wq/ajfiAK06fSxh4ZTLMIdUMPSb/M6T8qCLoFXXVAp7oSDGw11fnAzM/kHDxkvt1i7vc= 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 1699888914109846.3836025285291; Mon, 13 Nov 2023 07:21:54 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.631692.985292 (Exim 4.92) (envelope-from ) id 1r2Ykm-0006dG-H0; Mon, 13 Nov 2023 15:21:32 +0000 Received: by outflank-mailman (output) from mailman id 631692.985292; Mon, 13 Nov 2023 15:21:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2Ykm-0006d3-E7; Mon, 13 Nov 2023 15:21:32 +0000 Received: by outflank-mailman (input) for mailman id 631692; Mon, 13 Nov 2023 15:21:31 +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 1r2Ykl-0005il-4P for xen-devel@lists.xenproject.org; Mon, 13 Nov 2023 15:21:31 +0000 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [2a00:1450:4864:20::630]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 52380b4c-8238-11ee-98da-6d05b1d4d9a1; Mon, 13 Nov 2023 16:21:30 +0100 (CET) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9e8b36e36e0so176058966b.2 for ; Mon, 13 Nov 2023 07:21:30 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id o23-20020a17090611d700b009829d2e892csm4243243eja.15.2023.11.13.07.21.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:21:29 -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: 52380b4c-8238-11ee-98da-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888890; x=1700493690; 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=R3bxfGqI5yyGuHTvJ252KdxHxDRKsvIzu9uNKMF+2iI=; b=gXRsTDOSQEDG1gnNO7n66cyH16/iNbTSvrH3oXMTeKldkNLFpU3/pxDz+o2MorWn/y l2ZvGuOPTU6ThdQxurR9cVmvl0G2+q+KnxzNxK3/bSNfvXyETx9oHrjW/s5ia7wwyAba /n0ezaoVFwL4u872GV/dM974JBO2rJBsgPD1BIyo0s9mwOb7RlUo/7+eBo7PL05jqwTT A3Tyr5bPorHuRg/yvq4Y/dGx0EprtiI+pCBnSyu6Z2QBHxW4c/X4iCrJCxv46Bwa4efl 3GKmQrzui3VeirDAkDgIJu8cRJI+e9uU1uMRizLCTSHndJF1U0+9T3r20dY9+Qm2LRQ4 2Hbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888890; x=1700493690; 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=R3bxfGqI5yyGuHTvJ252KdxHxDRKsvIzu9uNKMF+2iI=; b=ofm+I98/PiYhAX4gEVfPDoCaCWKeu5zQlrf54OQo6RvNYQk1VthQi9abGkI3hhVFcb 7ttagzWXBE8d+nim7y9ds/nlWhA6QNp5XMKOeDpAtXV+Oh3ocYZn+ZOEwqBxuinoXXB3 e76Ufjtxz4PgjjBmS+sYxPjwdIKZkSwdXxpeIBUoWLmg7UaCaTaviah4yCNzj18AH2xr Xla4qPkOZ0efjxLNmqiyoAFq4kkx8HVBHB1SujTIb00BbtcECSeB9bFSp0t6JDRZAxpU 8bDPMNQB93sUM8Or2lNcX2A2yIdggkWx01451aLzIk9uPkNWfzg/y1SXfIShhUx+UP9k hEEw== X-Gm-Message-State: AOJu0Ywr+Q1XSbFrzzIZGGtDJBeHdnmg5f8Fg9CA2P+Eo8pYDBWWCTDO lN7SlRq2e9CNoDvkGUxc0aXpIA== X-Google-Smtp-Source: AGHT+IF709HFmNxhzIc8XnNuz+a2oAKUrEHD5dHSaR8itUuUqXulXss7tknv1cuy4PMkZKxP4RsDmw== X-Received: by 2002:a17:906:3049:b0:9bd:f155:eb54 with SMTP id d9-20020a170906304900b009bdf155eb54mr4125199ejd.6.1699888890200; Mon, 13 Nov 2023 07:21:30 -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?= , Peter Maydell , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.0 02/10] hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix Date: Mon, 13 Nov 2023 16:21:05 +0100 Message-ID: <20231113152114.47916-3-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: 1699888915485100005 Use a common 'xen_arch_' prefix for architecture-specific functions. Rename xen_arch_set_memory() and xen_arch_handle_ioreq(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson --- include/hw/arm/xen_arch_hvm.h | 4 ++-- include/hw/i386/xen_arch_hvm.h | 4 ++-- hw/arm/xen_arm.c | 4 ++-- hw/i386/xen/xen-hvm.c | 6 +++--- hw/xen/xen-hvm-common.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/hw/arm/xen_arch_hvm.h b/include/hw/arm/xen_arch_hvm.h index 8fd645e723..6a974f2020 100644 --- a/include/hw/arm/xen_arch_hvm.h +++ b/include/hw/arm/xen_arch_hvm.h @@ -2,8 +2,8 @@ #define HW_XEN_ARCH_ARM_HVM_H =20 #include -void arch_handle_ioreq(XenIOState *state, ioreq_t *req); -void arch_xen_set_memory(XenIOState *state, +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); +void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, bool add); #endif diff --git a/include/hw/i386/xen_arch_hvm.h b/include/hw/i386/xen_arch_hvm.h index 1000f8f543..2822304955 100644 --- a/include/hw/i386/xen_arch_hvm.h +++ b/include/hw/i386/xen_arch_hvm.h @@ -4,8 +4,8 @@ #include #include "hw/xen/xen-hvm-common.h" =20 -void arch_handle_ioreq(XenIOState *state, ioreq_t *req); -void arch_xen_set_memory(XenIOState *state, +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); +void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, bool add); #endif diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index a5631529d0..28d790f4ce 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -129,14 +129,14 @@ static void xen_init_ram(MachineState *machine) } } =20 -void arch_handle_ioreq(XenIOState *state, ioreq_t *req) +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req) { hw_error("Invalid ioreq type 0x%x\n", req->type); =20 return; } =20 -void arch_xen_set_memory(XenIOState *state, MemoryRegionSection *section, +void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, bool add) { } diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index f42621e674..ffa95e3c3d 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -659,8 +659,8 @@ void qmp_xen_set_global_dirty_log(bool enable, Error **= errp) } } =20 -void arch_xen_set_memory(XenIOState *state, MemoryRegionSection *section, - bool add) +void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, + bool add) { hwaddr start_addr =3D section->offset_within_address_space; ram_addr_t size =3D int128_get64(section->size); @@ -700,7 +700,7 @@ void arch_xen_set_memory(XenIOState *state, MemoryRegio= nSection *section, } } =20 -void arch_handle_ioreq(XenIOState *state, ioreq_t *req) +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req) { switch (req->type) { case IOREQ_TYPE_VMWARE_PORT: diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index 565dc39c8f..1d8bd9aea7 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -65,7 +65,7 @@ static void xen_set_memory(struct MemoryListener *listene= r, } } =20 - arch_xen_set_memory(state, section, add); + xen_arch_set_memory(state, section, add); } =20 void xen_region_add(MemoryListener *listener, @@ -452,7 +452,7 @@ static void handle_ioreq(XenIOState *state, ioreq_t *re= q) cpu_ioreq_config(state, req); break; default: - arch_handle_ioreq(state, req); + xen_arch_handle_ioreq(state, req); } if (req->dir =3D=3D IOREQ_READ) { trace_handle_ioreq_read(req, req->type, req->df, req->data_is_ptr, --=20 2.41.0 From nobody Wed Nov 27 07:31:48 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=1699888924; cv=none; d=zohomail.com; s=zohoarc; b=GZQPX/UIPBOeAc+25F+iVB2Pyhq1/ffVtCqlBNKLiQHXN+BxQbMgGv1RRfiZwkMdjpGjq7z0f0eWTMh2VUfHsVNJLZoVXmV/Bse4zP4I9RpzTT1IWlb48VAF6ApUazgiuZ8mPKVDAGjZfR7a2YeVgRNemwgyw0sqU0lt2OisKtU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888924; 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=dMhWA/NoPTBRWdKt+DCwjQph3Exp2cV0GiTpIObeWaI=; b=TRH5M5q8x/Pv7fRaDJuOr+8ZGoaALr8WuJTx+FiG38GgJqjiSmEfUEl24lStvchOHz0LlWlTHCmFQbRo2z3VMpZ9ult4aJilxxl9Yu20oZgf5KvIQ3RvY6AzMhAFxX4I7GzgzQw1TsoJCX2R1J3Dp6FxvUMk9cwz3iG+SBEM1lo= 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 1699888924013393.55561598262466; Mon, 13 Nov 2023 07:22:04 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.631693.985302 (Exim 4.92) (envelope-from ) id 1r2Yks-0007IZ-P9; Mon, 13 Nov 2023 15:21:38 +0000 Received: by outflank-mailman (output) from mailman id 631693.985302; Mon, 13 Nov 2023 15:21:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2Yks-0007IP-L9; Mon, 13 Nov 2023 15:21:38 +0000 Received: by outflank-mailman (input) for mailman id 631693; Mon, 13 Nov 2023 15:21:37 +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 1r2Ykr-0005il-HQ for xen-devel@lists.xenproject.org; Mon, 13 Nov 2023 15:21:37 +0000 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [2a00:1450:4864:20::531]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5604f5d6-8238-11ee-98da-6d05b1d4d9a1; Mon, 13 Nov 2023 16:21:36 +0100 (CET) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5437269a661so11297035a12.0 for ; Mon, 13 Nov 2023 07:21:36 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id 11-20020a50874b000000b0053e2a64b5f8sm3913912edv.14.2023.11.13.07.21.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:21:36 -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: 5604f5d6-8238-11ee-98da-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888896; x=1700493696; 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=dMhWA/NoPTBRWdKt+DCwjQph3Exp2cV0GiTpIObeWaI=; b=eC+tcMr8YPUPZXRcjewL9pLwKzuQKSvdAZDUX2wQEWBgy7L/fESwHtwxO1oKjWZQvH cADqCjTlRXvVOiAbWkfYUj5w55XFdEm8PXD6ZRLTb3prGoQczPfsuND5Tc+ZxYZl7QBQ 7CGVrxlBsjaqMYaFPhP7PAc5XWXOGYiquA7LTCygoREpDCzs29QSyfrGBvXHGQzhhQ36 7V2G1oKSNzSA7MZc4FZEwK7uMRyB21g3Fat+oSTSRjxqeEuqdTTL7dfDhVzkPwxs0XqD ivwa3hYoJce2932GnaLH7PCJ3kvPvK28q0ylok5zaZXC9dusGZZpgsVDxBN+EzqyBRt/ BTHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888896; x=1700493696; 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=dMhWA/NoPTBRWdKt+DCwjQph3Exp2cV0GiTpIObeWaI=; b=reC3TmliD2fjvW8Nloq7LScLYiDtq7wawlUPj6npXmkGTHuNI1R0pQgxWMlbg/Lv02 cNrmyrLmSt/dOu9ikHN1p0mP5nCbkoiCFipX9B3HgNaspLMHz0Ifmo6wZOfU/W9/Icsm CdxZieaVDEbpgmuPxGF1WPVtlXSKE29GE2rQ5ehqykIAJdILF6dKsaptHSZnrXLq1eCf 4Ihv1F6rq1suEsG43MnwijA/KyNztxxP1SW/N649qy6LCMfnP4+bZXYKFDqTEul8O7Xv dsBSUWAG0Ve4Kj0ax2yItzgn3k58yP1D3/Cuc0S+7UrtHv5S+lEcdcK84SksRkcIaiF+ AdqA== X-Gm-Message-State: AOJu0Yzd9Fhzb0YlzjQssBWpxKKR/3APVehU7MsCovqjul5BUbaQAZx+ 6JTxnTbf4QgrLrT23piSov/UnQ== X-Google-Smtp-Source: AGHT+IGc2vVbLMMmJTrJzN8L348x5fFie1XMuffaYHScqr/mEvB+nkKPvDnad4c+cU6PUAspz7oR2w== X-Received: by 2002:a05:6402:2553:b0:533:5d3d:7efe with SMTP id l19-20020a056402255300b005335d3d7efemr9304050edb.6.1699888896473; Mon, 13 Nov 2023 07:21:36 -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?= , Peter Maydell , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH-for-9.0 03/10] hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h' Date: Mon, 13 Nov 2023 16:21:06 +0100 Message-ID: <20231113152114.47916-4-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: 1699888925539100003 We don't need a target-specific header for common target-specific prototypes. Declare xen_arch_handle_ioreq() and xen_arch_set_memory() in "hw/xen/xen-hvm-common.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson --- include/hw/arm/xen_arch_hvm.h | 9 --------- include/hw/i386/xen_arch_hvm.h | 11 ----------- include/hw/xen/arch_hvm.h | 5 ----- include/hw/xen/xen-hvm-common.h | 6 ++++++ hw/arm/xen_arm.c | 1 - hw/i386/xen/xen-hvm.c | 1 - hw/xen/xen-hvm-common.c | 1 - 7 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 include/hw/arm/xen_arch_hvm.h delete mode 100644 include/hw/i386/xen_arch_hvm.h delete mode 100644 include/hw/xen/arch_hvm.h diff --git a/include/hw/arm/xen_arch_hvm.h b/include/hw/arm/xen_arch_hvm.h deleted file mode 100644 index 6a974f2020..0000000000 --- a/include/hw/arm/xen_arch_hvm.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef HW_XEN_ARCH_ARM_HVM_H -#define HW_XEN_ARCH_ARM_HVM_H - -#include -void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); -void xen_arch_set_memory(XenIOState *state, - MemoryRegionSection *section, - bool add); -#endif diff --git a/include/hw/i386/xen_arch_hvm.h b/include/hw/i386/xen_arch_hvm.h deleted file mode 100644 index 2822304955..0000000000 --- a/include/hw/i386/xen_arch_hvm.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef HW_XEN_ARCH_I386_HVM_H -#define HW_XEN_ARCH_I386_HVM_H - -#include -#include "hw/xen/xen-hvm-common.h" - -void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); -void xen_arch_set_memory(XenIOState *state, - MemoryRegionSection *section, - bool add); -#endif diff --git a/include/hw/xen/arch_hvm.h b/include/hw/xen/arch_hvm.h deleted file mode 100644 index c7c515220d..0000000000 --- a/include/hw/xen/arch_hvm.h +++ /dev/null @@ -1,5 +0,0 @@ -#if defined(TARGET_I386) || defined(TARGET_X86_64) -#include "hw/i386/xen_arch_hvm.h" -#elif defined(TARGET_ARM) || defined(TARGET_ARM_64) -#include "hw/arm/xen_arch_hvm.h" -#endif diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-commo= n.h index 4e9904f1a6..27e938d268 100644 --- a/include/hw/xen/xen-hvm-common.h +++ b/include/hw/xen/xen-hvm-common.h @@ -96,4 +96,10 @@ void xen_register_ioreq(XenIOState *state, unsigned int = max_cpus, const MemoryListener *xen_memory_listener); =20 void cpu_ioreq_pio(ioreq_t *req); + +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); +void xen_arch_set_memory(XenIOState *state, + MemoryRegionSection *section, + bool add); + #endif /* HW_XEN_HVM_COMMON_H */ diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index 28d790f4ce..6a1d7719e9 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -33,7 +33,6 @@ #include "sysemu/sysemu.h" #include "hw/xen/xen-hvm-common.h" #include "sysemu/tpm.h" -#include "hw/xen/arch_hvm.h" =20 #define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpvh") OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index ffa95e3c3d..f8a195270a 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -21,7 +21,6 @@ #include "qemu/range.h" =20 #include "hw/xen/xen-hvm-common.h" -#include "hw/xen/arch_hvm.h" #include =20 static MemoryRegion ram_640k, ram_lo, ram_hi; diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index 1d8bd9aea7..c028c1b541 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -7,7 +7,6 @@ #include "hw/xen/xen-hvm-common.h" #include "hw/xen/xen-bus.h" #include "hw/boards.h" -#include "hw/xen/arch_hvm.h" =20 MemoryRegion ram_memory; =20 --=20 2.41.0 From nobody Wed Nov 27 07:31:48 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=1699888921; cv=none; d=zohomail.com; s=zohoarc; b=Toc3bKCsdaa8dWV+2WdLl0oghp8Qdz1G/+XnQXU/O3LU5shjFrouICZbv+JjWBMOvhRyr5lmD41WAxVPtS0OVfkCgZpjmCmQTrDe/qeIcvIvud5tqJmy8oMJIZ8qae29NtFNPlyJZFQ7DQBSRF7AvSml/w3QN+yRbEcBetvKRJI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888921; 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=YAZk+3Dse8rl86kxKUGHVuPZUfUpHgJaPljFBSi46HI=; b=XSyQ0wMRaes1Zlfr4EsXOltD+cdt2HuFd4Mun/X0EtDK9oDgARQnDUpjfnylb5VXBAxBZ8x2bdzT1gXytHjQz0IpReOMcX61n4zTi65qGFudMz/57E8M7wreBDt1/pzfvcE2LzO2ECvaRKcZbu/CcW09LPzp8U22HVLcAnr80wI= 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 1699888921585784.4393119141422; Mon, 13 Nov 2023 07:22:01 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.631697.985311 (Exim 4.92) (envelope-from ) id 1r2Yl0-0007qt-1Y; Mon, 13 Nov 2023 15:21:46 +0000 Received: by outflank-mailman (output) from mailman id 631697.985311; Mon, 13 Nov 2023 15:21:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2Ykz-0007qi-Ug; Mon, 13 Nov 2023 15:21:45 +0000 Received: by outflank-mailman (input) for mailman id 631697; Mon, 13 Nov 2023 15:21:44 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2Yky-0007fE-NM for xen-devel@lists.xenproject.org; Mon, 13 Nov 2023 15:21:44 +0000 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [2a00:1450:4864:20::62f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 59b59792-8238-11ee-9b0e-b553b5be7939; Mon, 13 Nov 2023 16:21:43 +0100 (CET) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9e2838bcb5eso672348266b.0 for ; Mon, 13 Nov 2023 07:21:43 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id d17-20020a17090648d100b009e6cedc8bf5sm4165051ejt.29.2023.11.13.07.21.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:21:42 -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: 59b59792-8238-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888902; x=1700493702; 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=YAZk+3Dse8rl86kxKUGHVuPZUfUpHgJaPljFBSi46HI=; b=Dm8Bg4/Mn5BSImYcP7u268GzoYOpZ1eZIVw/97Bznf6cFTLfTTXaRmeh8ZwQpYHhhx +G/hBe2xuvlD/bSQhEFdmG12qmj95r1uNzhDIw1cTBxmuXtZzlPPzY/TKKpaan3dZaDJ ImkcrfTyRFTFVKZCYSGnuRGj6qyDoJht2X0cWNPQIZ6dFCy949qHjIgL4O07VW0uN+aK TZtL+zKce2cCoHHybUi2KQoBpA8KHTudwpyxi7Wk/d3/+FfPv882VuVJ9Oc/ioAXTTt7 GRM8vIeew4iRaA6mpUqR2hZqCfTNHIjdOldhd1e9OM/XhXj59nfK+OKuoVoku9MGanQb bNNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888902; x=1700493702; 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=YAZk+3Dse8rl86kxKUGHVuPZUfUpHgJaPljFBSi46HI=; b=kewo1LXzFGtQ/9hOS/0nzbMyetZNLjY1XNSe1E2uCtsvnCirXvZixTS9+I1qlkSw5R hyMyW2H4xcwRxou4Z1mklVE7ADIqOYfbFQL9HjP8Ci4H5xof11eU//ZRCfyyVsJMetcl 25yKskKFAttFTtEpBEvYo730FNNxSlQHYeMoiJkfvRqI4+ik49RIRiYw2HXoVH1ISW4s UXBrvCPLY0d8jTw9xNINvAgUJlzmMJodtvcL84EsxeA0cHkaMN7xsZxk9SR1o282ji7d lZmcv1MBg+83Nsdf0YHYTJzUYKfyeBO4vJFqqPhPueTrvjPCOHxByZAWLwb/y5MCpdYI 4HkA== X-Gm-Message-State: AOJu0YwTmj2lU2OimpivH34hLp59vUUja2fCEhiEafOHHQU1RFu0gDJ9 hmQWHMjAsOE+MDWOHYf0XO9RSg== X-Google-Smtp-Source: AGHT+IGj6dXGN5MguahUCcbomoo2q2R5bpml51YnyeqNpSNRHHGNbaVXW8b4IH/nqJe1/joi6MIM1w== X-Received: by 2002:a17:906:84c:b0:9ae:6da8:1819 with SMTP id f12-20020a170906084c00b009ae6da81819mr4194118ejd.48.1699888902783; Mon, 13 Nov 2023 07:21:42 -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?= , Peter Maydell , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.0 04/10] hw/xen: Factor xen_arch_align_ioreq_data() out of handle_ioreq() Date: Mon, 13 Nov 2023 16:21:07 +0100 Message-ID: <20231113152114.47916-5-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: 1699888923498100001 Per commit f17068c1c7 ("xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common"), handle_ioreq() is expected to be target-agnostic. However it uses 'target_ulong', which is a target specific definition. In order to compile this file once for all targets, factor the target-specific code out of handle_ioreq() as a per-target handler called xen_arch_align_ioreq_data(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: David Woodhouse --- Should we have a 'unsigned qemu_target_long_bits();' helper such qemu_target_page_foo() API and target_words_bigendian()? --- include/hw/xen/xen-hvm-common.h | 1 + hw/arm/xen_arm.c | 8 ++++++++ hw/i386/xen/xen-hvm.c | 8 ++++++++ hw/xen/xen-hvm-common.c | 5 +---- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-commo= n.h index 27e938d268..734bfa3183 100644 --- a/include/hw/xen/xen-hvm-common.h +++ b/include/hw/xen/xen-hvm-common.h @@ -97,6 +97,7 @@ void xen_register_ioreq(XenIOState *state, unsigned int m= ax_cpus, =20 void cpu_ioreq_pio(ioreq_t *req); =20 +void xen_arch_align_ioreq_data(ioreq_t *req); void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index 6a1d7719e9..c646fd70d0 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -128,6 +128,14 @@ static void xen_init_ram(MachineState *machine) } } =20 +void xen_arch_align_ioreq_data(ioreq_t *req) +{ + if (!req->data_is_ptr && (req->dir =3D=3D IOREQ_WRITE) + && (req->size < sizeof(target_ulong))) { + req->data &=3D ((target_ulong) 1 << (8 * req->size)) - 1; + } +} + void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req) { hw_error("Invalid ioreq type 0x%x\n", req->type); diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index f8a195270a..aff5c5b81d 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -699,6 +699,14 @@ void xen_arch_set_memory(XenIOState *state, MemoryRegi= onSection *section, } } =20 +void xen_arch_align_ioreq_data(ioreq_t *req) +{ + if (!req->data_is_ptr && (req->dir =3D=3D IOREQ_WRITE) + && (req->size < sizeof(target_ulong))) { + req->data &=3D ((target_ulong) 1 << (8 * req->size)) - 1; + } +} + void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req) { switch (req->type) { diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index c028c1b541..03f9417e7e 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -426,10 +426,7 @@ static void handle_ioreq(XenIOState *state, ioreq_t *r= eq) trace_handle_ioreq(req, req->type, req->dir, req->df, req->data_is_ptr, req->addr, req->data, req->count, req->size); =20 - if (!req->data_is_ptr && (req->dir =3D=3D IOREQ_WRITE) && - (req->size < sizeof (target_ulong))) { - req->data &=3D ((target_ulong) 1 << (8 * req->size)) - 1; - } + xen_arch_align_ioreq_data(req); =20 if (req->dir =3D=3D IOREQ_WRITE) trace_handle_ioreq_write(req, req->type, req->df, req->data_is_ptr, --=20 2.41.0 From nobody Wed Nov 27 07:31:48 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=1699888936; cv=none; d=zohomail.com; s=zohoarc; b=XHgXPncHCGaJRlKhxD7h013UyYNKZt0XkksnatSDagqNlT2bsvS5vSpb8ZyCjHXG0VFDM5KvFCG5k/lF6L73u4rTMdyO8FKUk/l6KHNiioo42bWlw0Fk1LyTVIRPgdIuL29l3Co26ne+HHD3pP7z+1NMlI8xClDrAPYYSdNKCuo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888936; 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=hC1GyuSTm1pIOLAiq1jl6VtM1wTJGGJIerTVB/FTO70=; b=Mg/7XHif7p75qcvUcjwb4roahTqYmwzyX24p9WIPA2RO4/SDOIgiRQ5lIvFi4zG3Ek3cGELs2rzARRpNWAd6LxZpibpF902keVIHwYNcrWceHAbQzdet0TWdpPAsmkem8c2CDPoEV/UrPsBTjEgL0RfWAMs5v0nBYWguNSSJYo8= 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 1699888936562701.3438271891582; Mon, 13 Nov 2023 07:22:16 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.631700.985322 (Exim 4.92) (envelope-from ) id 1r2Yl6-00009O-EX; Mon, 13 Nov 2023 15:21:52 +0000 Received: by outflank-mailman (output) from mailman id 631700.985322; Mon, 13 Nov 2023 15:21:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2Yl6-00009H-BF; Mon, 13 Nov 2023 15:21:52 +0000 Received: by outflank-mailman (input) for mailman id 631700; Mon, 13 Nov 2023 15:21:50 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2Yl4-0007fE-Qi for xen-devel@lists.xenproject.org; Mon, 13 Nov 2023 15:21:50 +0000 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [2a00:1450:4864:20::533]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5d63363e-8238-11ee-9b0e-b553b5be7939; Mon, 13 Nov 2023 16:21:49 +0100 (CET) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-53e07db272cso7044339a12.3 for ; Mon, 13 Nov 2023 07:21:49 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id f19-20020a50a6d3000000b0054026e95beesm3942482edc.76.2023.11.13.07.21.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:21:48 -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: 5d63363e-8238-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888909; x=1700493709; 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=hC1GyuSTm1pIOLAiq1jl6VtM1wTJGGJIerTVB/FTO70=; b=RhKDSAq4tdFZFblL2vgU5GyIc25BAMTcvtLAay9NlQ86waYqpEFM97KTw95y77ljf1 bJwamz84mo9R24Wo97Sha70o22VVLAgAm3RzDP/0HyIjUgNnGTAjAQyWo1EWr2+Q3wFd GuP0fNuOjpo8dvP30c2Ee2esBtRKK48hBkJj/3BTpEpP5Pn5ALH+XBpsF3D0W1kcceuQ u+2aBHNLa0oUWOJtqfTz5WZ6Bm9ZeU3B+IYV2YO+1jy2RgJHRuHoUKEx7/vjNibOXH6J 2q5NmF5s72b/cqlnYswZnkzlRXxWM2qMk1SbvgVIfFQO9ba8QLXHY5g2o30t2pHbSyUk 14pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888909; x=1700493709; 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=hC1GyuSTm1pIOLAiq1jl6VtM1wTJGGJIerTVB/FTO70=; b=mBjVAN92tnXev/5cnZMI+M+590rZS0K8jXAHnu2aM18lZNKnVN7mL8NEmpAZTJ/u+Y qVxFoNjUbGZZaepUptuXhSfBh5EPftxej1+mFDdCg0XkNtSZuthpl1ASYyoRa+lKCBuT w5+p6cN1x+XgjlkMk+qNB15kZ2a/Q69iM0BKh7NNsw+ccFOTp+hXL3sAPRGXfOvoji+j 9GFkVykhJH+r0iVr5L0a/fJxroYiUlU80/ebXbCzTNzBLk+zUGtFCYUPDrECOBSLcSvA 9UmPgBtUn3qA/DFa9vTMgXr1hU5uh1SSWnwZ7LIHMj5+E+jtQI0aMfmv5VNS/AAiVmqu D+yw== X-Gm-Message-State: AOJu0YzQPUzQJBniCIZnAeEvGCCO1Q96VFjpJBnof/OaUoyTHJvc4iQv hPorFKexCdRXTa+wt2bMDQfQtg== X-Google-Smtp-Source: AGHT+IGbtAixMPiQVaiouSIFTb1IQKmmFA1AcOCrzXhQQ2Afk2FYf+XnPnB9Zgf0YAtZ7aK4/lySbw== X-Received: by 2002:a50:ab12:0:b0:540:2ece:79 with SMTP id s18-20020a50ab12000000b005402ece0079mr5690457edc.10.1699888908890; Mon, 13 Nov 2023 07:21:48 -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 05/10] hw/xen: Use target-agnostic qemu_target_page_bits() Date: Mon, 13 Nov 2023 16:21:08 +0100 Message-ID: <20231113152114.47916-6-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: 1699888937580100003 Instead of the target-specific TARGET_PAGE_BITS definition, use qemu_target_page_bits() which is target agnostic. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson --- hw/xen/xen-hvm-common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index 03f9417e7e..35b3b5407d 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -1,6 +1,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" +#include "exec/target_page.h" #include "trace.h" =20 #include "hw/pci/pci_host.h" @@ -13,6 +14,7 @@ MemoryRegion ram_memory; void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr, Error **errp) { + unsigned target_page_bits =3D qemu_target_page_bits(); unsigned long nr_pfn; xen_pfn_t *pfn_list; int i; @@ -31,11 +33,11 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size= , MemoryRegion *mr, =20 trace_xen_ram_alloc(ram_addr, size); =20 - nr_pfn =3D size >> TARGET_PAGE_BITS; + nr_pfn =3D size >> target_page_bits; pfn_list =3D g_new(xen_pfn_t, nr_pfn); =20 for (i =3D 0; i < nr_pfn; i++) { - pfn_list[i] =3D (ram_addr >> TARGET_PAGE_BITS) + i; + pfn_list[i] =3D (ram_addr >> target_page_bits) + i; } =20 if (xc_domain_populate_physmap_exact(xen_xc, xen_domid, nr_pfn, 0, 0, = pfn_list)) { --=20 2.41.0 From nobody Wed Nov 27 07:31:48 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=1699888933; cv=none; d=zohomail.com; s=zohoarc; b=kklnK9ClEZpVCi6ytGQS/byr+rqmSxCF+w/skMZFf9puH9guT7NbEirXziOdkuTTAX8HWB71xXqsS2iGczfh96e841n3lpZyz+fIxe9GB1F2flAaMjPzYzbe9dURYoE538rJa5reY+8xtuwBjqaZlSPA0j6nYWTFHdxM/7DjaCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888933; 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=iaPh59FgiGsmC+pCYaCOTA7yQ1Mp2MwkOCCJHlQNKqo=; b=g5ovi0A5YLwu5lpLE/yQKNEZMHnl5OvjLlpi3i+M803fj5r5/vu6JxdDqwEX+x3R/9qPYuLP13KwaUYc+EnmFbWmCFC2YgZIVjZ52InFaKuMUlTNPumXV84fOeWrfIqRSVSLQXOrTOu2mVFFJcW2ABr+r4QiP6EBFoDJ3qvpCQg= 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 1699888933799872.5509090843387; Mon, 13 Nov 2023 07:22:13 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.631701.985332 (Exim 4.92) (envelope-from ) id 1r2YlC-0000fl-Oo; Mon, 13 Nov 2023 15:21:58 +0000 Received: by outflank-mailman (output) from mailman id 631701.985332; Mon, 13 Nov 2023 15:21:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2YlC-0000fa-Lz; Mon, 13 Nov 2023 15:21:58 +0000 Received: by outflank-mailman (input) for mailman id 631701; Mon, 13 Nov 2023 15:21:57 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r2YlB-0007fE-1r for xen-devel@lists.xenproject.org; Mon, 13 Nov 2023 15:21:57 +0000 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [2a00:1450:4864:20::635]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 611d9c33-8238-11ee-9b0e-b553b5be7939; Mon, 13 Nov 2023 16:21:55 +0100 (CET) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9c2a0725825so698888066b.2 for ; Mon, 13 Nov 2023 07:21:55 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id e22-20020a1709062c1600b009de11cc12d2sm4197707ejh.55.2023.11.13.07.21.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:21:54 -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: 611d9c33-8238-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888915; x=1700493715; 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=iaPh59FgiGsmC+pCYaCOTA7yQ1Mp2MwkOCCJHlQNKqo=; b=fMk5NYIlbQ/gxBSTh9zJcjf5COuMPlM+O2pnKN9ZYTtV+/IvWkLoOQ+ERyYiN8ZqQB bMqHbyz0W9+eFiOgmLQUifCMZBxz3aMfx62deCOS/5LdKf6ydcGhy5GQCr7dLBoO+VyH rwsOJ49ZoY/Qnq3N9bZwbhpqJZq2/dBNuTMgZKXtsgo09ZHYNFes0g3EgZQ7HszHgAea gZMWZ0i7tyLCsDvWRWBPM/0pXnZQ7/pZ3cJwKfEocyWQx2Kw1qdNIaXcimZQxKUOddFw DRE2FaEAmTeBONgOaQBQ3TYzrZPJqN7o3558J5LrsrlZsTFxkpjXEpEyBR4iBZC7wzqu eOKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888915; x=1700493715; 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=iaPh59FgiGsmC+pCYaCOTA7yQ1Mp2MwkOCCJHlQNKqo=; b=KB0prYqAtCmvYIPxjyw8W/3mNh9f7xtXVtr0XDrSalzeWYpx8J6cRnjRHaae5OfFbt ceAt8vv1GKRKNaWheZapkyhGj6njQgURe6TmuANfr4ytpE/g71vXMA8YJwaVh/gszcVM 9JC+4ue3V++PjJcG2Tk1VVNz6QGEENzSz4pTPk9Eb5D14qdsoGrjoHTIQoidfgpTsNr4 0N88Orb6W+6eNVgfoVDRcGi8AGFi0d8Wx6lq7uHXAS33Y89HvCVA+HShnHO1iS796Lq2 YGAkkVyA00Kq0ewlGgwVq419JigVZSLYaMA+vS0gsIxA31Z7clDKAkzpbztws6kizSLx 176A== X-Gm-Message-State: AOJu0YxPCMpL3aS9/B4HCrQjQHPYLBCcGp2fx/+L0bVCbExVBzHqLeGr Jl5g0vRDMd1VkBpFGh6VxbHY4w== X-Google-Smtp-Source: AGHT+IH3RjReylXfRQh/wsJfTu2jHnqkMqs+PQHcbPoh+QyiOeqF9Xb3+QdjFCNga0xDu80xIHTeww== X-Received: by 2002:a17:906:fb8b:b0:9e6:59d5:8228 with SMTP id lr11-20020a170906fb8b00b009e659d58228mr4946396ejb.27.1699888915206; Mon, 13 Nov 2023 07:21:55 -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?= , Peter Maydell , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.0 06/10] hw/xen: Reduce inclusion of 'cpu.h' to target-specific sources Date: Mon, 13 Nov 2023 16:21:09 +0100 Message-ID: <20231113152114.47916-7-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: 1699888935534100001 We rarely need to include "cpu.h" in headers. Including it 'taint' headers to be target-specific. Here only the i386/arm implementations requires "cpu.h", so include it there and remove from the "hw/xen/xen-hvm-common.h" *common* header. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson --- include/hw/xen/xen-hvm-common.h | 1 - hw/arm/xen_arm.c | 1 + hw/i386/xen/xen-hvm.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-commo= n.h index 734bfa3183..ca941fd3eb 100644 --- a/include/hw/xen/xen-hvm-common.h +++ b/include/hw/xen/xen-hvm-common.h @@ -4,7 +4,6 @@ #include "qemu/osdep.h" #include "qemu/units.h" =20 -#include "cpu.h" #include "hw/pci/pci.h" #include "hw/hw.h" #include "hw/xen/xen_native.h" diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index c646fd70d0..2c97d6adc8 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -33,6 +33,7 @@ #include "sysemu/sysemu.h" #include "hw/xen/xen-hvm-common.h" #include "sysemu/tpm.h" +#include "cpu.h" =20 #define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpvh") OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index aff5c5b81d..369d738b50 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -22,6 +22,7 @@ =20 #include "hw/xen/xen-hvm-common.h" #include +#include "cpu.h" =20 static MemoryRegion ram_640k, ram_lo, ram_hi; static MemoryRegion *framebuffer; --=20 2.41.0 From nobody Wed Nov 27 07:31:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699888985; cv=none; d=zohomail.com; s=zohoarc; b=ZGw11OcJL5LEoZsUWmojpv3VUYiWRms7cTTPTIGnw9eFQTcPGwxhhVBVkXr4f1DM5xPZhyb5H/wWZg/5X7xNF08PtNcZDBiyjZbhSOeOYFxdvAGo3Jriti2ZQtzQaSsDJCLu9g2p3ax6o6W4mEw/1rBjvGaZzbp2CWplIzEaCp0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888985; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=24ML07HsEvOYl+DuxzoZlUZnhAFy4fscEFWSzx7VWys=; b=XNUg15pieaiTFsDKWPgzd6rwfC7FmjR5SMd1t5bqturx2qlkzcvHJLv1e6nL+Sni0p059FNCLWJeJ8xUcZH9LhQd3mA0+/IqFfezK6iBdM1MSmlh/txNAoBUnGll5ZzpPvLZfXGM6KMMcwaoB+thLceyXQ7cuEJu3BUSiB1jcrg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699888985350560.5458124360184; Mon, 13 Nov 2023 07:23:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2YlL-00028y-D5; Mon, 13 Nov 2023 10:22:07 -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 ) id 1r2YlJ-00026Q-41 for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:22:05 -0500 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2YlG-0003Jd-OE for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:22:04 -0500 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-9d216597f64so705796766b.3 for ; Mon, 13 Nov 2023 07:22:02 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id s10-20020a1709066c8a00b009dbe08bc793sm4269124ejr.18.2023.11.13.07.21.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:22:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888921; x=1700493721; 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=24ML07HsEvOYl+DuxzoZlUZnhAFy4fscEFWSzx7VWys=; b=nG22BWFuZcnBlblgHlRLLEe2IVUdaAhNL1DUHJ+N/Bbl+wUBwObPc15u6XyuWiUvGR gap1AfBIIOXM80dYf+PZTH7DwynaHQnl+TEN+b11wOgCT3Cur1iOwLJTqxp9BWSWIlis t+dUqKNKjcN/khRVHLnW4u2uKaoe6smakQBwqgwFmfqFCV1PJC/YL22CbMqPfBsL1hBk 896lp4OCt4TlRwyUQUJ9mDRK1YgkFmfwR7BC0C3mccNEXfAnbS79aUiJUTZExemxpM+5 rs7jvnSXa9cDTCQ2ehE/3Gbx4YAfqX2aIx5zCyTIghJs9IzdIrun8AJIH0zKB+a3OkTc WurQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888921; x=1700493721; 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=24ML07HsEvOYl+DuxzoZlUZnhAFy4fscEFWSzx7VWys=; b=XthXuXxlSjoMzW7M+a+7/ZRisuPZXKAd104qJLqhBkwpyArk3BLA1r8wiMU9dt4SFP 4U+2bPWgMlg6l6e4nrP1nhkSxHMvgASz/KMYHX7RGj0I82lFFcFIYIdjm+OxKdWlHIJX pgJSbweLkMRJoJZTnfKhsV9UOJ1s8J5J3noj79xv9Uv+Lk5TXxq6+39kNmqtCDPD80ou +hi6vs3CRN73wAJvZGgTL3LNOywEynHm1vQQfkIkA/EvvUdrw5yH3rmo9h+BMoQbuo/S xjVWyueyuj5Ddy+Hv+/Xn6fnekvVEDKoIKesxw8l87S1qhcQ4TT8uhg9E69L8fBHOTEQ qN9w== X-Gm-Message-State: AOJu0Yyg/cPyFcAclzAp+eMmcaUJuAZh+vBmh+r/VtXmAJ+LNbdun9FH jqqSqZXiFXtKCkS4UKntwwtH/A== X-Google-Smtp-Source: AGHT+IH+PnzXWjrgKP+WWXsdazo2lewjVqkzA92vUb1Slw8L1D+s00HazVDZsJw73hj51Hyp7Aw3PQ== X-Received: by 2002:a17:906:5fc6:b0:9e6:5132:43e5 with SMTP id k6-20020a1709065fc600b009e6513243e5mr4860965ejv.16.1699888921215; Mon, 13 Nov 2023 07:22:01 -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 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE Date: Mon, 13 Nov 2023 16:21:10 +0100 Message-ID: <20231113152114.47916-8-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 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699888985798100001 "sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN. Use it in order to use "sysemu/xen-mapcache.h" in target-agnostic files. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: David Woodhouse --- include/sysemu/xen-mapcache.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/sysemu/xen-mapcache.h b/include/sysemu/xen-mapcache.h index c8e7c2f6cf..10c2e3082a 100644 --- a/include/sysemu/xen-mapcache.h +++ b/include/sysemu/xen-mapcache.h @@ -10,10 +10,11 @@ #define XEN_MAPCACHE_H =20 #include "exec/cpu-common.h" +#include "sysemu/xen.h" =20 typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr phys_offset, ram_addr_t size); -#ifdef CONFIG_XEN +#ifdef CONFIG_XEN_IS_POSSIBLE =20 void xen_map_cache_init(phys_offset_to_gaddr_t f, void *opaque); --=20 2.41.0 From nobody Wed Nov 27 07:31:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699888985; cv=none; d=zohomail.com; s=zohoarc; b=apQixyjqyG7pgbfZBhzaet1gAP6MPWAhx372s5k085ntnw8HlMnkhrYXYTLe7f124FVUiClFzusY3RpYtW4rQSAdx3AeiHFwsuF26cBeCA1xd/hyRayhMAb5h3sS2HcOpz1CH+IrHgnlIcMB+PL7Vuwa1dbl3OqujWm13lidEy4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888985; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=M3IanRET4oRDB/554uZaBMmk8ZcCL79rxTcGgU2jVuI=; b=e/7UB5nXfbMkLugXYK64587b3WwQq44xVV2n+/UwYIN+qs/wZ2zHZLTrSB4CVCQttoLxVcIcPLAS+LLBDz479vF5VniQpEhQpBlXUH/C/NDczGZ1jRJFgTioU0FYCHc9XtZJt6RHuLU9E3gtjDeX0v2t1CwL1o/q0OiNzRM0eFY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699888985335258.95023285143793; Mon, 13 Nov 2023 07:23:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2Ylb-0002Rv-QG; Mon, 13 Nov 2023 10:22:23 -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 ) id 1r2YlZ-0002G9-LY for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:22:21 -0500 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2YlN-0003Kl-4n for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:22:21 -0500 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5094cb3a036so6294104e87.2 for ; Mon, 13 Nov 2023 07:22:08 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id a9-20020a17090640c900b009e5ce1acb01sm4126763ejk.103.2023.11.13.07.22.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:22:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888927; x=1700493727; 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=M3IanRET4oRDB/554uZaBMmk8ZcCL79rxTcGgU2jVuI=; b=Zmg2Z92S+ZAynF5iomHSrDgJJtlXQgUrtUCYMJ0vjXah747IeUFFrnG+m80K6MmTTB GDMmNOj3C+pY/A3RGXvVjzMnqRjdPN099Ast/TTi/arPfr5ChcBEHGOoz+LaR2U5tWPy nQoGRlBsStg0xmpz5WlMN9zzxJ1YoAhTGOiZWq7wCMs0yd3cic+ztoDBzWUXIQYZiuHy EDktE/j0TJ4veZ81zjr0bR5XbJZG6vt1+RQtQ4daf7ujYb9/jah9OZoA+/hVurT89QVT 65Vnb8axpOZ4e3GDZy2aWCl8bnvAwXHDo8ZxxaSVUMFDQhAtKOBA2YgfwqfCsqFCNruu cPOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888927; x=1700493727; 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=M3IanRET4oRDB/554uZaBMmk8ZcCL79rxTcGgU2jVuI=; b=iJNZwnf0+giQTCm0HmkpkG7nohQir6fT9TVxKzNSNPFmEd9aUwMFBjhBY+A2MBvttv jXO1mhGJzcJCml7aaOR/Pb+e5BVRYh1spqQbiQPDwsK6ZW4zDRbZc5z5KzfuGyKsp3sN BsxzipEH2nsWGxHqV2lddG7zp+AdRjaPcT7WXJesKpyX3ewdhMkJXp9hl01bbmhH2mGR lAi5PHtV3xeZrIW/hqfmgqNNyWTwLN723KMgMVbEbDAP+IF9yfuQNJz/RHtxy28yUuMq EQCBAd/dxItQ2GGHewk6fX6vY276WGh0ssu+YChy4qhkBhQI8yMjGCzylNS/LlRGi9Zu 0KqQ== X-Gm-Message-State: AOJu0YzjAOCGLfWsV9ujqCBVVOza2p2HcT3Z0YRHMPg5GIFNR41ibWw2 aBX7RPp7+PRVG03FmrEYFI1kVA== X-Google-Smtp-Source: AGHT+IGrSDy3wD9q51MX9RzmoZqMhawPjp2jB+lPSAfi/Dv8LmkQCpZSU6Ww+isXzJecNCmpib4vPw== X-Received: by 2002:ac2:5e6f:0:b0:502:a4f4:ced9 with SMTP id a15-20020ac25e6f000000b00502a4f4ced9mr4406770lfr.62.1699888927362; Mon, 13 Nov 2023 07:22:07 -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?= , Peter Xu , David Hildenbrand Subject: [PATCH-for-9.0 08/10] system/physmem: Only include 'hw/xen/xen.h' when Xen is available Date: Mon, 13 Nov 2023 16:21:11 +0100 Message-ID: <20231113152114.47916-9-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 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=philmd@linaro.org; helo=mail-lf1-x131.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699888985807100002 "hw/xen/xen.h" contains declarations for Xen hardware. There is no point including it when Xen is not available. When Xen is not available, we have enough with declarations of "sysemu/xen.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- system/physmem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/physmem.c b/system/physmem.c index fc2b0fee01..fa667437da 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -35,9 +35,9 @@ #include "hw/qdev-core.h" #include "hw/qdev-properties.h" #include "hw/boards.h" -#include "hw/xen/xen.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" +#include "sysemu/xen.h" #include "sysemu/qtest.h" #include "qemu/timer.h" #include "qemu/config-file.h" @@ -51,6 +51,9 @@ #include "sysemu/hostmem.h" #include "sysemu/hw_accel.h" #include "sysemu/xen-mapcache.h" +#ifdef CONFIG_XEN +#include "hw/xen/xen.h" +#endif #include "trace/trace-root.h" =20 #ifdef CONFIG_FALLOCATE_PUNCH_HOLE --=20 2.41.0 From nobody Wed Nov 27 07:31:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699888958; cv=none; d=zohomail.com; s=zohoarc; b=EbOtPeuY+c/8h26GR9X20kwPH6eSWxq8Qa9EJClSba8wLeCfZ4A2AeIfZbc+N4qe7FDpO9nz8t3vTccLi1s+YgqiGPfgeGzeprR/0GkN4736ngG7Lxb6g0fkKlLhsJ5HMkDZ3UcSfLE6knd5z90coRN8lanErhRPNH1OnVFXyNA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888958; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=M4sm9DG4Z80HufhtnK5i8zUn8uDgyk6yGboQ8Gp5Uh8=; b=CCPYNxJKTQxi+vZjOoyMIPIdNGX5QOamJWOnaroVNq/RiFUkH9+Sa3F5H7r9Vy3wDQzDTf1oIxqtMZduAZ/CPV8BMPneSw8wjGqBQAUOqw91vn8g3m8EZiLXuhDP+zu84XjE4vfWpW3QW+6XhWaiBxnKHvmT6clhhZMWw8oWOLQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699888958584896.6186363357292; Mon, 13 Nov 2023 07:22:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2YlX-0002Dz-1K; Mon, 13 Nov 2023 10:22:19 -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 ) id 1r2YlU-0002Bp-Q2 for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:22:17 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2YlS-0003LP-R5 for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:22:16 -0500 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9d10972e63eso671118466b.2 for ; Mon, 13 Nov 2023 07:22:14 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id lu16-20020a170906fad000b0098884f86e41sm4167855ejb.123.2023.11.13.07.22.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:22:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888933; x=1700493733; 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=M4sm9DG4Z80HufhtnK5i8zUn8uDgyk6yGboQ8Gp5Uh8=; b=a2qOrCocF+Ys/l8EWrSFo9qsiI80FxUak9Fr960d4YC+1w0jPxE6FK6BilcPlLDpZU eiBGJ9m2uOZTQur8k3MKncwzIJu42SPHV2tZi6m8WkdEFPlFptUflwCGiQVC/8DOdj2O kZME+QYINKoChleCQEr2PGgmrNGOVLc2jPUD1VHFwTABHq2357EoZZfdrCkHaLge3+I6 UDcH3AaAMezLJyGC6FIBAfQrZnWIBH1OPasEbb/TJaZTnoIVanlGRM8j1OrlR3jh4mnr Pbee64znqzd3JBjmwTRAGylABKYwKwxdORixaZgtr1FfqcINBljuiBs8LvvjgS8+sa4G wcpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888933; x=1700493733; 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=M4sm9DG4Z80HufhtnK5i8zUn8uDgyk6yGboQ8Gp5Uh8=; b=O0VG4bt/mRNlwVnKNZeA1iqTr/Vz0Cj1fG5I633p+vxZLAEeRbQuFv735OnkH37NuB l9ySjSAijOwRYJTSKUi8VfFb/gP+dnVDZ1bnWKbchuKfCdXSezYZhNTG1pfVYKa5zCDx OhrGbkwQuJFTkDJa8CyBldJvSjpWRl3jsrQgM/GnkUfsVpGQ5KPisqRqBk+LU68acRuc bU3evW3k+pIjKO+NZrusS85viCtUlgTpx49QEC0AY1q4268Qtn7F2b1jtbw1HuCKMjeV Y+u/CL9Z+OC12P2doE9RnZmZkAHNSXKn2+5436oHpW855pQCL2+U8chODJ9k6f1LZa6Y 6+lQ== X-Gm-Message-State: AOJu0YzVC67cXCrCh7Kf5VA+7PpGXcUvtybwu9NbIhkR2juXGKKraVES uhMNFubK1fIsOZW2WbtfpH1btA== X-Google-Smtp-Source: AGHT+IHGfNKy17vE6nE5Sw7Yg/bCgxdoxzzgRWsVuH1JW/c7ZnqbwtyNJGeirXmng2B4mnP0CKSxhg== X-Received: by 2002:a17:906:b092:b0:9de:2b93:cab9 with SMTP id x18-20020a170906b09200b009de2b93cab9mr5146163ejy.8.1699888933620; Mon, 13 Nov 2023 07:22:13 -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?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH-for-9.0 09/10] hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' Date: Mon, 13 Nov 2023 16:21:12 +0100 Message-ID: <20231113152114.47916-10-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 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.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, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699888959674100012 "hw/xen/xen_pt.h" requires "hw/xen/xen_native.h" which is target specific. It also declares IGD methods, which are not target specific. Target-agnostic code can use IGD methods. To allow that, extract these methos into a new "hw/xen/xen_igd.h" header. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: David Woodhouse --- What license for the new "hw/xen/xen_igd.h" header? --- hw/xen/xen_pt.h | 14 -------------- include/hw/xen/xen_igd.h | 23 +++++++++++++++++++++++ accel/xen/xen-all.c | 1 + hw/i386/pc_piix.c | 1 + hw/xen/xen_pt.c | 3 ++- hw/xen/xen_pt_config_init.c | 3 ++- hw/xen/xen_pt_graphics.c | 3 ++- hw/xen/xen_pt_stub.c | 2 +- 8 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 include/hw/xen/xen_igd.h diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h index 31bcfdf705..da5af67638 100644 --- a/hw/xen/xen_pt.h +++ b/hw/xen/xen_pt.h @@ -5,9 +5,6 @@ #include "xen-host-pci-device.h" #include "qom/object.h" =20 -bool xen_igd_gfx_pt_enabled(void); -void xen_igd_gfx_pt_set(bool value, Error **errp); - void xen_pt_log(const PCIDevice *d, const char *f, ...) G_GNUC_PRINTF(2, 3= ); =20 #define XEN_PT_ERR(d, _f, _a...) xen_pt_log(d, "%s: Error: "_f, __func__, = ##_a) @@ -52,12 +49,6 @@ typedef struct XenPTDeviceClass { XenPTQdevRealize pci_qdev_realize; } XenPTDeviceClass; =20 -uint32_t igd_read_opregion(XenPCIPassthroughState *s); -void xen_igd_reserve_slot(PCIBus *pci_bus); -void igd_write_opregion(XenPCIPassthroughState *s, uint32_t val); -void xen_igd_passthrough_isa_bridge_create(XenPCIPassthroughState *s, - XenHostPCIDevice *dev); - /* function type for config reg */ typedef int (*xen_pt_conf_reg_init) (XenPCIPassthroughState *, XenPTRegInfo *, uint32_t real_offset, @@ -343,11 +334,6 @@ static inline bool xen_pt_has_msix_mapping(XenPCIPasst= hroughState *s, int bar) void *pci_assign_dev_load_option_rom(PCIDevice *dev, int *size, unsigned int domain, unsigned int bus, unsigned int slot, unsigned int funct= ion); -static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev) -{ - return (xen_igd_gfx_pt_enabled() - && ((dev->class_code >> 0x8) =3D=3D PCI_CLASS_DISPLAY_VGA)); -} int xen_pt_register_vga_regions(XenHostPCIDevice *dev); int xen_pt_unregister_vga_regions(XenHostPCIDevice *dev); void xen_pt_setup_vga(XenPCIPassthroughState *s, XenHostPCIDevice *dev, diff --git a/include/hw/xen/xen_igd.h b/include/hw/xen/xen_igd.h new file mode 100644 index 0000000000..52f1f8244c --- /dev/null +++ b/include/hw/xen/xen_igd.h @@ -0,0 +1,23 @@ +#ifndef XEN_IGD_H +#define XEN_IGD_H + +#include "hw/xen/xen-host-pci-device.h" + +typedef struct XenPCIPassthroughState XenPCIPassthroughState; + +bool xen_igd_gfx_pt_enabled(void); +void xen_igd_gfx_pt_set(bool value, Error **errp); + +uint32_t igd_read_opregion(XenPCIPassthroughState *s); +void xen_igd_reserve_slot(PCIBus *pci_bus); +void igd_write_opregion(XenPCIPassthroughState *s, uint32_t val); +void xen_igd_passthrough_isa_bridge_create(XenPCIPassthroughState *s, + XenHostPCIDevice *dev); + +static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev) +{ + return (xen_igd_gfx_pt_enabled() + && ((dev->class_code >> 0x8) =3D=3D PCI_CLASS_DISPLAY_VGA)); +} + +#endif diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c index 5ff0cb8bd9..0bdefce537 100644 --- a/accel/xen/xen-all.c +++ b/accel/xen/xen-all.c @@ -15,6 +15,7 @@ #include "hw/xen/xen_native.h" #include "hw/xen/xen-legacy-backend.h" #include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "chardev/char.h" #include "qemu/accel.h" #include "sysemu/cpus.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index eace854335..a607dcb56c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -56,6 +56,7 @@ #ifdef CONFIG_XEN #include #include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #endif #include "hw/xen/xen-x86.h" #include "hw/xen/xen.h" diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 36e6f93c37..a8edabdabc 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -59,7 +59,8 @@ #include "hw/pci/pci.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" -#include "xen_pt.h" +#include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "hw/xen/xen.h" #include "hw/xen/xen-legacy-backend.h" #include "qemu/range.h" diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index 2b8680b112..ba4cd78238 100644 --- a/hw/xen/xen_pt_config_init.c +++ b/hw/xen/xen_pt_config_init.c @@ -15,7 +15,8 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/timer.h" -#include "xen_pt.h" +#include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "hw/xen/xen-legacy-backend.h" =20 #define XEN_PT_MERGE_VALUE(value, data, val_mask) \ diff --git a/hw/xen/xen_pt_graphics.c b/hw/xen/xen_pt_graphics.c index 0aed3bb6fd..6c2e3f4840 100644 --- a/hw/xen/xen_pt_graphics.c +++ b/hw/xen/xen_pt_graphics.c @@ -3,7 +3,8 @@ */ #include "qemu/osdep.h" #include "qapi/error.h" -#include "xen_pt.h" +#include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "xen-host-pci-device.h" =20 static unsigned long igd_guest_opregion; diff --git a/hw/xen/xen_pt_stub.c b/hw/xen/xen_pt_stub.c index 5c108446a8..72feebeb20 100644 --- a/hw/xen/xen_pt_stub.c +++ b/hw/xen/xen_pt_stub.c @@ -6,7 +6,7 @@ */ =20 #include "qemu/osdep.h" -#include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "qapi/error.h" =20 bool xen_igd_gfx_pt_enabled(void) --=20 2.41.0 From nobody Wed Nov 27 07:31:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699888958; cv=none; d=zohomail.com; s=zohoarc; b=OaxR0y1oSih+MpuyQZUzbje6luXDVmadFpIxQbEcclgen9PKxZ8K+ItBouzu2OD2FySguX0hIGJNkxdU497Pn/1WRj8KPsj4DM8RkYNz3IzxT5qVz0grj/eaYlLtaUnO42WMdAYlarmU2A3qZc03U6gazW/h05E4BPKbYUZHE/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699888958; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=z2PpOM4WQ+uf4xck1acJwuABeC89nz7da2f3K2pGLBg=; b=CmtCCnthOqTouE1+XYHyNCfk3oO+K7PUPf3WL+jEe/lPScJT41pNqJE0DN+vWMBfpGIRwENvAkEr+hDnuenbyQiP3M1rn/xdSBHoIW9eP1B/xfQIFVAMQARGH7UulaxSDgJTlC1Y3+3sFD4DL0bQQoeF+J6gOhDnuoNu5RRu+HI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699888958436610.7849174074606; Mon, 13 Nov 2023 07:22:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2Yld-0002Zl-L1; Mon, 13 Nov 2023 10:22:25 -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 ) id 1r2Ylb-0002Pc-95 for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:22:23 -0500 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2YlZ-0003M6-DC for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:22:22 -0500 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-54366784377so7100264a12.3 for ; Mon, 13 Nov 2023 07:22:20 -0800 (PST) Received: from m1x-phil.lan ([176.164.221.204]) by smtp.gmail.com with ESMTPSA id lw27-20020a170906bcdb00b009de11bcbbcasm4238875ejb.175.2023.11.13.07.22.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Nov 2023 07:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888940; x=1700493740; 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=z2PpOM4WQ+uf4xck1acJwuABeC89nz7da2f3K2pGLBg=; b=zZx560CPsEtb9gZnwa4WxxXrwQE9eZnw0afxDwhIYX7hb4Bnifd1rKltMUIfd2iIAo L+CGC+nMOUOxlszSVNoD8+V/HKBiJZrl+rUIQ8GNalDSDDCkmkuUSDPlLquKPytLwYvM kRzWLIeMquYgUIP/jByLi0p6YwAiG4Ewc5U2zw8EKOyllDGX5IlL3JvYLmG0KRX+Dmcc Yp/own6p0kHe5xSz3aH13IWvCZIcG0/xi0d5htTO8La3o+Djms9r1uKDbwoEpDQuElGz woDUgO4q1Jea0XTg80byqFFiu+1oa0nUf7vaC9JEoxCtxmLjxIHMiY6jWmBHXlReADEA Y/XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699888940; x=1700493740; 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=z2PpOM4WQ+uf4xck1acJwuABeC89nz7da2f3K2pGLBg=; b=DWWV318demEH1wZ9nz55dD2ZoL2ZSZhcnmhP6GBPnpnlKe5pwK6xQPiWTK9gk+Rn+z dLrq/yxBYYnXlmLjPbQSpqfP+M+J6v5nbLp1Na4P1h3Qsbs2r1a47IsLJWh+834n+dUM 0pKkonKJuYfABxGzjqei5Qug5zD68QlU4MJ346R6m/WGstOnwghLX8rOO1FgzIs5mBPA a1mRDTzlyXHH9tBY0xcCHxde/ogUJpkrzIOmuhN46Y9rrhrTbXkL1o4xn/wgzvjcNd5g a8yD5WhNux785+0xrKBOvboiS++EuJtPjv6Hqd83gCG62T1PegRLiehmtSfMM+kk9wd8 x5lQ== X-Gm-Message-State: AOJu0YxE1kj9LkkfExzGVHPl7VK9LZ8vjfKpJ63fsp2La8ArHJYzfkbi f3p58pjGmj4hoMSQWMz2bmTIaA== X-Google-Smtp-Source: AGHT+IFN0oQYvnRoNATsOZJ25LMlTXynSPofCu2en/Z0LYSJQyfcBbtJzfmWQwHuJeMUC7biyDShHw== X-Received: by 2002:a17:906:f2c3:b0:9bd:a738:2bfe with SMTP id gz3-20020a170906f2c300b009bda7382bfemr5045867ejb.38.1699888940071; Mon, 13 Nov 2023 07:22:20 -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?= , Stefan Hajnoczi , Kevin Wolf , Hanna Reitz Subject: [PATCH-for-9.0 10/10] hw/xen: Have most of Xen files become target-agnostic Date: Mon, 13 Nov 2023 16:21:13 +0100 Message-ID: <20231113152114.47916-11-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 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699888959669100011 Previous commits re-organized the target-specific bits from Xen files. We can now build the common files once instead of per-target. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: David Woodhouse --- accel/xen/meson.build | 2 +- hw/block/dataplane/meson.build | 2 +- hw/xen/meson.build | 13 ++++--------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/accel/xen/meson.build b/accel/xen/meson.build index 002bdb03c6..455ad5d6be 100644 --- a/accel/xen/meson.build +++ b/accel/xen/meson.build @@ -1 +1 @@ -specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c')) +system_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c')) diff --git a/hw/block/dataplane/meson.build b/hw/block/dataplane/meson.build index 025b3b061b..4d8bcb0bb9 100644 --- a/hw/block/dataplane/meson.build +++ b/hw/block/dataplane/meson.build @@ -1,2 +1,2 @@ system_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) -specific_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c')) +system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c')) diff --git a/hw/xen/meson.build b/hw/xen/meson.build index d887fa9ba4..29adfadd1c 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -9,15 +9,12 @@ system_ss.add(when: ['CONFIG_XEN_BUS'], if_true: files( =20 system_ss.add(when: ['CONFIG_XEN', xen], if_true: files( 'xen-operations.c', + 'xen-hvm-common.c', + 'xen-mapcache.c', )) =20 -xen_specific_ss =3D ss.source_set() -xen_specific_ss.add(files( - 'xen-mapcache.c', - 'xen-hvm-common.c', -)) if have_xen_pci_passthrough - xen_specific_ss.add(files( + system_ss.add(files( 'xen-host-pci-device.c', 'xen_pt.c', 'xen_pt_config_init.c', @@ -26,7 +23,5 @@ if have_xen_pci_passthrough 'xen_pt_msi.c', )) else - xen_specific_ss.add(files('xen_pt_stub.c')) + system_ss.add(files('xen_pt_stub.c')) endif - -specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss) --=20 2.41.0