From patchwork Tue Nov 14 16:31:18 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: 743792 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2267967wrw; Tue, 14 Nov 2023 08:32:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbCND7XIqUzFlTeSeYlHta41gjILEstAMcRDYXtv28CGw22e5uHdtFC6JfFp7PpY7qwWaV X-Received: by 2002:a05:6830:7192:b0:6cf:6837:e4aa with SMTP id el18-20020a056830719200b006cf6837e4aamr3332448otb.27.1699979533063; Tue, 14 Nov 2023 08:32:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699979533; cv=none; d=google.com; s=arc-20160816; b=ol7Ypc+Hx/D2UZtJvkRtjL3nhThWCBCDPgV01w6tMDRAyy87G8lrrrA710/17b2Igs eszdRHx5EeuZiXfclr6CiuTEL7/yRSOx3g1O4+Y5wrGLBMlgsW1Obr6XWDjFuooBd5WP PKGOYQQtHMZqjgo77R8OOYuZaiwanlCRKAHDWhYMD+UBAo2cbYdM6n1kbcTs5WvoYWc6 jZbv4i2y8umXt9FX28sev46lKJ3Wc5G4n85UCYPnkj9Fw+RpG7zjkC4KYkO5uwDiSP3v fs+J4LwNRtlDCKiMCDBzLXhZVthwM9WlAWFJ72WFJ8sv1bL1ctcjfa6Y63AhK/UBBwTF JJGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hRnzgqjbzRTGqJ5jrYQJxW1BmP5r27YtuyDu1IVzHFA=; fh=5lvcVWWZfEaW1el3BGyMdrws/7nl4pTH0ES2/FGtlZo=; b=q5yIdInMj+3VL3WoVHGyJdnLtnsGBNyMHSB0rdxmmpqEIXNXoUmOsgRkkcIQxF71Sb xpYwueh+r7YjTp3Q+RK6XAMmBy1y7NAdVPUR2NOak7l7XzSQjeiKT7paKFAhDK9Kamr2 /WcHYO/5zPL5+KQNgcAcQ/hLbLU09Q7GfVNZycnt0VoN/uYyFzenu14pSeLVDlABBQhG 63TVYnoyUL5LDhlW7aqD/aexCJOfpJvPrV3zAcIJSFb6bwGOxjy8JQn5Bv5bvp6k3SuR XuDVJvuBJGjW5gx5FwSDY3YmUwVcBTTYsK09tH8XT8CHpHl0thY5WkVRmbNhCqGrC56d nMlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zlbIMCcs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id er4-20020a056214190400b0064f68c194a6si6821879qvb.73.2023.11.14.08.32.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 08:32:13 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zlbIMCcs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2wKS-00034Y-GI; Tue, 14 Nov 2023 11:31:56 -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 1r2wKR-00033m-BR for qemu-devel@nongnu.org; Tue, 14 Nov 2023 11:31:55 -0500 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2wKP-0006Wn-O4 for qemu-devel@nongnu.org; Tue, 14 Nov 2023 11:31:55 -0500 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-53e08e439c7so9510582a12.0 for ; Tue, 14 Nov 2023 08:31:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699979512; x=1700584312; 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=hRnzgqjbzRTGqJ5jrYQJxW1BmP5r27YtuyDu1IVzHFA=; b=zlbIMCcsH3CK7EKk2fIxJKaNewLV20JmOwIGdJ3tS1Zm688KZ0Qwu1P7tsjLlXE9/S r8mmqpIwu5RJDC29yEdqTQspp4lA8jgcKAwXsrYECR18voio9U+Uk6QLz9b+QZT+FZe9 rpdVsSZ7CLVIcLrrjjpZ8jRSkApecJsbz71I7tnEnc96oL6qnz2XHUATRxBNb0j7W96l tPOQ/sV76vjOBA1e9uNLE/jWBdbVgatqiCCv8yx9b7cie+U70ihCm9F/3mN1Ny+KynKM RGXhk4YGbfIPwalI4kQonj6NTpAwwNd3By4ayVoiS4XsdalBMmiQJhpKM6O5jgUo9e5U fU3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699979512; x=1700584312; 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=hRnzgqjbzRTGqJ5jrYQJxW1BmP5r27YtuyDu1IVzHFA=; b=iLNf2RZh+D+TR2dy0OcH+4SYIpSMx6VFBzPpYpn29FGIYDCEirgyfpq2X2JQ5uNM0P dOqmRUlpvtdMxjywAFwJpOjH0Mj0Hhv0g3VhXLUNmoKGo7PyUou5cOAxXZ4S/CKgG7bo vmAIG6QqWYSsp/GIbIA8FkGas+S5nxYKgLy9Tv5yFcbYgQXvcIw/9lqvk4u1K+2+Hg4V bOs2d9kGQBWWtjEAcZ/W/pshyUTQH8zB4/WNWSPjFxvimRoYGNQSisId+SPO7l+hAc4U rSKamzd6Ebvr30qiKa9g5p/6RRM+yU1rA7W5JVDih7kbm3trQBdpiOKXcG27eViGfxNL TQXA== X-Gm-Message-State: AOJu0YxrA1uC5dHyVQhvrJNCTdF1zPapYU5tCi0k//DtWy9YeSGwctTv 9l0XHY4HYMXfxjH+EpwNUGDem0hbU6pw5gLbICY= X-Received: by 2002:a05:6402:3cf:b0:543:70c2:aa8d with SMTP id t15-20020a05640203cf00b0054370c2aa8dmr7379909edw.15.1699979511911; Tue, 14 Nov 2023 08:31:51 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id d17-20020aa7c1d1000000b0052febc781bfsm5327156edp.36.2023.11.14.08.31.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 08:31:51 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anthony Perard , Paul Durrant , David Woodhouse , Thomas Huth , qemu-arm@nongnu.org, Stefano Stabellini , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , xen-devel@lists.xenproject.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , "Michael S. Tsirkin" , Marcel Apfelbaum , Richard Henderson , Eduardo Habkost Subject: [PATCH-for-9.0 4/9] hw/xen/hvm: Expose xen_memory_listener declaration Date: Tue, 14 Nov 2023 17:31:18 +0100 Message-ID: <20231114163123.74888-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114163123.74888-1-philmd@linaro.org> References: <20231114163123.74888-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=philmd@linaro.org; helo=mail-ed1-x531.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org There can only be a single xen_memory_listener definition in a qemu-system binary. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis --- include/hw/xen/xen-hvm-common.h | 1 + hw/arm/xen_arm.c | 2 +- hw/i386/xen/xen-hvm.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h index 83ed16f425..0fed15ed04 100644 --- a/include/hw/xen/xen-hvm-common.h +++ b/include/hw/xen/xen-hvm-common.h @@ -18,6 +18,7 @@ extern MemoryRegion xen_memory; extern MemoryListener xen_io_listener; extern DeviceListener xen_device_listener; +extern const MemoryListener xen_memory_listener; //#define DEBUG_XEN_HVM diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index b478d74ea0..39dcd74d07 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -38,7 +38,7 @@ #define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpvh") OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM) -static const MemoryListener xen_memory_listener = { +const MemoryListener xen_memory_listener = { .region_add = xen_region_add, .region_del = xen_region_del, .log_start = NULL, diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index b64204ea94..a65a96f0de 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -469,7 +469,7 @@ static void xen_log_global_stop(MemoryListener *listener) xen_in_migration = false; } -static const MemoryListener xen_memory_listener = { +const MemoryListener xen_memory_listener = { .name = "xen-memory", .region_add = xen_region_add, .region_del = xen_region_del,