From patchwork Mon Nov 13 15:21:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1863268 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=xuQ5asXS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4STY926zn0z1yRk for ; Tue, 14 Nov 2023 02:23:18 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2Ykv-0001fr-4T; Mon, 13 Nov 2023 10:21:41 -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 1r2Ykt-0001f4-N4 for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:21:39 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2Ykr-0003Em-VK for qemu-devel@nongnu.org; Mon, 13 Nov 2023 10:21:39 -0500 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5437269a661so11297034a12.0 for ; Mon, 13 Nov 2023 07:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699888896; x=1700493696; 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=dMhWA/NoPTBRWdKt+DCwjQph3Exp2cV0GiTpIObeWaI=; b=xuQ5asXSTMmpLXgzolDbV/WuW4RCGgv41oVRhjwVX5QoQM9GC2Q1UJ+veSRsewnMkk W3Rffnbpmulas0PXBvmsfFrMJROX1hczUVFMlcwfugxi367MdDkyKlpyeJWQiiSPDvmq w4HIP6Usoz9Iss8hD9C0fOYJBcqlBt+Pqtp/Tk5NXTdv2tAmajDl0CD0g+v2XkP7Si+7 cKaqTRHBJVV8IRUCHHfeSNNLveE3+P6Vri27WRbGBITHvOGFdH5Zr3OKvAKAyqoqdgTQ 51wDlko5tVrHyr22Mx5p7dkmXJWruL/iKW4CqRbXcBw6Rq1NcgVrzWwJKfNApzCL3fjV NOhg== 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=jCpFYrfL0KDC5bmH1xt/AMHNh1fWvcNe/OMioujd8LEJQsTODMg8v3crMaOHmnMzdn SHRJz6QNqfGcOfBpH+P0UwOp0gESw1BV74erNKlSGSX/5ggb9CLu4BR3+YzHNPiRZrAC 8QqCDEGgchzXZbalG9lutpEkrQcH4LO9+23sevg8YaJG+VuwiD4lEaNBX81FHlOvQglI Z596E8iOUvEKuXE+nMNGmzFGXnerhpDD3zwH7ld07ncY69xQqq5SEjkQ3ciFYvQsCRjb gvVyXJMDIizNsie7FbwkdASKYYp2dOkLb0we/Iv8RLbZL0i9TQpqkuADUcpOHkcnSOQS iNQA== X-Gm-Message-State: AOJu0YzQu4ERzgF7XRg6HCRrfYR0cOrL/U5qArH0DWzrcntWJbKtYIig CUUe1c5Ok7okPrUNhZXHJoftgg== 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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , =?utf-8?q?Alex_Benn=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_Mathie?= =?utf-8?q?u-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 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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é 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-common.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); 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" #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" #include "hw/xen/xen-hvm-common.h" -#include "hw/xen/arch_hvm.h" #include 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" MemoryRegion ram_memory;