From patchwork Wed Jun 28 15:53:11 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: 697255 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4424225wrm; Wed, 28 Jun 2023 08:59:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CEscgZQrOrzpdgaUA+dFWLfPoPFd1366W9G5BFXEOfA4z/SPgNRetV4bQ4EpEmpAd3H8H X-Received: by 2002:a05:622a:201:b0:403:1bcc:56a with SMTP id b1-20020a05622a020100b004031bcc056amr3321331qtx.11.1687967988931; Wed, 28 Jun 2023 08:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687967988; cv=none; d=google.com; s=arc-20160816; b=yW2v6YDK+jeMAg+jmPcYDJ6blcdSmG9XudcP4lMnNF9FKOtqEhn2boxbK9KnqcApqB PYQA6VnDs4YGxADprqh7a7D0CrKVO7eL16qeVXTFgfcmIVi9VdX9bVLkN0PPO3j41bnZ K6mA2QW9fp3heRVj146ksvVZ3FzBgyKbjCHyVbWgLCzYBFg34iUXps2mzG7T/TQlDmRh 7IpXOb5OrrD+Yu3SdWCn+fPdoDglQtTCNWu8Hwri5JN3h078ToVRdnDbTDZf0IZvWjNT WLS2xRtz0ooxWIVefCxjZJBhWshgzzNPLgT2MALjjGPfUiqoHcl+bh5SaGwbC53CTWIQ XikQ== 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=7MX8QOwqONfHUQLKS9Qunoa6fAfFNWAxptRihaW822Q=; fh=gmjpN4CFW+KMHz1hOJmxYQUJxAkm3oaOtQaI6p722F0=; b=j+r6UXI6CeN42s7SnkDxUrIJ2RTd8AUth9BEPo7JeXC+07IlDs0EbWXqT3mqFawHUc MHVT0FXFucHjMk8w+SBTjEuBh/Lhn/ag51Dg0iPEJVjwzQsUComUJGafTZ4O1EN4CpEx uYIU11PpT3QUWEh15LvlyFJNsuMebCj5eVRgMjVXF1TuMRLq7kxgv7Ks/6XfEmjkf2ja etF2zlTyO+gvFFsD25BSRIBFwGSV6lqKLmtKe/jSrTnnDwOSmHMmgZkujUnUphlQi9NW 4Oly69f3eP42B4oMKtI1x43c+NKWRmlvnocYv6ILIAxIPbhOlzIN8MXQgQh7Idfk8peq Sm4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X+RzFZp0; 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 v22-20020a05622a145600b003ef6035045asi4184961qtx.728.2023.06.28.08.59.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 08:59:48 -0700 (PDT) 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=X+RzFZp0; 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 1qEXWp-0002xV-0U; Wed, 28 Jun 2023 11:56:23 -0400 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 1qEXWX-0002sL-Is for qemu-devel@nongnu.org; Wed, 28 Jun 2023 11:56:09 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEXWU-0001sF-OI for qemu-devel@nongnu.org; Wed, 28 Jun 2023 11:56:04 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-313df030ccaso5645498f8f.1 for ; Wed, 28 Jun 2023 08:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687967760; x=1690559760; 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=7MX8QOwqONfHUQLKS9Qunoa6fAfFNWAxptRihaW822Q=; b=X+RzFZp0AySxCWChiY0PdV10rt9JwY2WfS6kLEzpNhTs1SIYbv4hPHYas9MSTOLfNa dFVwV5m8aU0liGHatKXEE/DHvEw8DmGpLhjYizW8hbtw0Avn3eG4un/8Zs82F81+jAZw 560cK9u1l0g4O2+HyRgOzy5uN5eZTKwC5gzcfksFjkIj/Lki3pTvuTo6qfj52f6+Z619 l41lYRBrm5dV/Xe+/gbGcaxrI1IoSm9h+Mg8S41AeBfTZydZvRxoPX4+FshSb9gbl7MR 8svmzBR7CFeX6Fu9TTDpQa1WY0RqqXGc/Z4T2Tvscno62DxbzzVqG1aPuhJ9Subopg5+ RktA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687967760; x=1690559760; 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=7MX8QOwqONfHUQLKS9Qunoa6fAfFNWAxptRihaW822Q=; b=cNUhu9pG3PVtREm5o2k06l2UPVvYomqA4L9bcXAdSdnBoRJIxyy9lWW5ooV2e3Gghs pHJ6NPzgdwMiGZDpx0fi0AfRwwZSwrfaSua75I7gpn/vljK/HacB7x18tvvqagBm5Y8A NLX/ncGuvg8ipYFSbRLLPKraXLXMMz7s7CkvgA1y+PDEb15pYDIL6XSuybig0B+5s0Fm 5ZN5DQyw5C+YQ3bXcthAvqP6ejb3nE4loLUKaIJIYpYpV4HV68zy+deikdg1D22P5TC9 +KLo/ISE+iB+9iEk9IefgZGvkwz+BcKJWa1dPck5DnTKAGjDSijOp/dWIJoLcG64ggcz 7X9w== X-Gm-Message-State: AC+VfDzAWbpdUPAVhq0jAlLLyjJRShf502+lfJiS1Qi2MtzkvQopFLwK hsMZjjhjsfT7Kd/dTIaPwUAfkKcKlWZausahZ/g= X-Received: by 2002:a05:6000:1d0:b0:313:f399:6cea with SMTP id t16-20020a05600001d000b00313f3996ceamr7563573wrx.4.1687967760443; Wed, 28 Jun 2023 08:56:00 -0700 (PDT) Received: from m1x-phil.lan ([176.187.207.229]) by smtp.gmail.com with ESMTPSA id d1-20020a5d6dc1000000b00304adbeeabbsm13625219wrz.99.2023.06.28.08.55.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 28 Jun 2023 08:56:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Isaku Yamahata , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= Subject: [PULL 28/30] exec/memory: Add symbolic value for memory listener priority for accel Date: Wed, 28 Jun 2023 17:53:11 +0200 Message-Id: <20230628155313.71594-29-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230628155313.71594-1-philmd@linaro.org> References: <20230628155313.71594-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Isaku Yamahata Add MEMORY_LISTNER_PRIORITY_ACCEL for the symbolic value for the memory listener to replace the hard-coded value 10 for accel. No functional change intended. Signed-off-by: Isaku Yamahata Reviewed-by: Philippe Mathieu-Daudé Message-Id: Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 2 ++ accel/hvf/hvf-accel-ops.c | 2 +- accel/kvm/kvm-all.c | 2 +- hw/arm/xen_arm.c | 2 +- hw/i386/xen/xen-hvm.c | 2 +- hw/xen/xen-hvm-common.c | 2 +- hw/xen/xen_pt.c | 4 ++-- target/i386/hax/hax-mem.c | 2 +- target/i386/nvmm/nvmm-all.c | 2 +- target/i386/whpx/whpx-all.c | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 47c2e0221c..6d95d59175 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -811,6 +811,8 @@ struct IOMMUMemoryRegion { #define IOMMU_NOTIFIER_FOREACH(n, mr) \ QLIST_FOREACH((n), &(mr)->iommu_notify, node) +#define MEMORY_LISTENER_PRIORITY_ACCEL 10 + /** * struct MemoryListener: callbacks structure for updates to the physical memory map * diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 7db9d3099e..a44cf1c144 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -304,7 +304,7 @@ static void hvf_region_del(MemoryListener *listener, static MemoryListener hvf_memory_listener = { .name = "hvf", - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_ACCEL, .region_add = hvf_region_add, .region_del = hvf_region_del, .log_start = hvf_log_start, diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 9aa898db14..964f61feee 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -1777,7 +1777,7 @@ void kvm_memory_listener_register(KVMState *s, KVMMemoryListener *kml, kml->listener.commit = kvm_region_commit; kml->listener.log_start = kvm_log_start; kml->listener.log_stop = kvm_log_stop; - kml->listener.priority = 10; + kml->listener.priority = MEMORY_LISTENER_PRIORITY_ACCEL; kml->listener.name = name; if (s->kvm_dirty_ring_size) { diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index 19b1cb81ad..044093fec7 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -45,7 +45,7 @@ static MemoryListener xen_memory_listener = { .log_sync = NULL, .log_global_start = NULL, .log_global_stop = NULL, - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_ACCEL, }; struct XenArmState { diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 5dc5e80535..3da5a2b23f 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -467,7 +467,7 @@ static MemoryListener xen_memory_listener = { .log_sync = xen_log_sync, .log_global_start = xen_log_global_start, .log_global_stop = xen_log_global_stop, - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_ACCEL, }; static void regs_to_cpu(vmware_regs_t *vmport_regs, ioreq_t *req) diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index 42339c96bd..886c3ee944 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -155,7 +155,7 @@ MemoryListener xen_io_listener = { .name = "xen-io", .region_add = xen_io_add, .region_del = xen_io_del, - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_ACCEL, }; DeviceListener xen_device_listener = { diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index a540149639..36e6f93c37 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -691,14 +691,14 @@ static const MemoryListener xen_pt_memory_listener = { .name = "xen-pt-mem", .region_add = xen_pt_region_add, .region_del = xen_pt_region_del, - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_ACCEL, }; static const MemoryListener xen_pt_io_listener = { .name = "xen-pt-io", .region_add = xen_pt_io_region_add, .region_del = xen_pt_io_region_del, - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_ACCEL, }; /* destroy. */ diff --git a/target/i386/hax/hax-mem.c b/target/i386/hax/hax-mem.c index 05dbe8cce3..bb5ffbc9ac 100644 --- a/target/i386/hax/hax-mem.c +++ b/target/i386/hax/hax-mem.c @@ -291,7 +291,7 @@ static MemoryListener hax_memory_listener = { .region_add = hax_region_add, .region_del = hax_region_del, .log_sync = hax_log_sync, - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_ACCEL, }; static void hax_ram_block_added(RAMBlockNotifier *n, void *host, size_t size, diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index 72a3a9e3ae..066a173d26 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -1128,7 +1128,7 @@ static MemoryListener nvmm_memory_listener = { .region_add = nvmm_region_add, .region_del = nvmm_region_del, .log_sync = nvmm_log_sync, - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_ACCEL, }; static void diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 57580ca383..3de0dc1d46 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -2412,7 +2412,7 @@ static MemoryListener whpx_memory_listener = { .region_add = whpx_region_add, .region_del = whpx_region_del, .log_sync = whpx_log_sync, - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_ACCEL, }; static void whpx_memory_init(void)