From patchwork Wed Jun 28 15:53:12 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: 697254 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4424113wrm; Wed, 28 Jun 2023 08:59:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4AsGOnpogT0HS+Igx34Ua1brnqriYx0fYJsY4mBoIt9foXUTsIsDn92AOVcd+8VMRIjlFG X-Received: by 2002:a05:6214:19e4:b0:62f:f7dc:c8ec with SMTP id q4-20020a05621419e400b0062ff7dcc8ecmr45014028qvc.32.1687967977011; Wed, 28 Jun 2023 08:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687967976; cv=none; d=google.com; s=arc-20160816; b=tiGaR6vtFg2JAFhGptUad35g3qyEajGoqT5u62ZFW6BUuQCIYtd/vey1Jxt6eQW68c Qtf5OG8d3fpxsPNhfW9S9x0QdXlPc6ALH5+m3R2v2MW8VrQwlbQ2PZe/z7g5o+3UEs+9 M1/439t6rOmVQ6RYBZe70hsPj0DsB6WdKVorpJNY7enSjatEnFr7ZRxjNDV49QwuuCH1 IbITsSTe81uV979FRTn2TO1f324AXCvxXdwI5nbIiXcFUkorWVwVTuQOU9UjHJc2ktyO KtUQ8hW7tBqGqqGMw9RNO8byBmUyQ5d7R4zzlN4PtOJ0oEF6B7+8E3PSBzcMK5JCQabl xzzQ== 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=AhB4/DcowpYYE5gsxFOT4g8oIU66RVavaCJXPih/ML0=; fh=gmjpN4CFW+KMHz1hOJmxYQUJxAkm3oaOtQaI6p722F0=; b=ZbotfqK0jh8od6XhKOq4++dccei+e+psvaFUvuD0hQ5Hyz1rWPKb+uVk1XliLdArzM 4L9BD7Mmn3TPscSKHRVoD2ld/awcKlMXkjnkeQYzzR3CWv9liadivw/g7R88MUsk9Dvb f4aq4t7wo5gdYm5Hy2jrbcMWMl/jjHMDYFnuloqyM/aWJ+VuXgP5l+cLeYVxo9heRxIf zKoQYlUpqWhl2f0KLLw1J9SeQxrxH4BlIoac2QIxqexlJifjT9whRaUonGqmBebAquV9 5/BfBg7Hm1jJkgRtid8q6X2t63n2awZiT4GZoh90GMZBqxXs6QU/oxf6+1W4CvmiUSFr m6jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M8EfAULj; 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 11-20020ad45bab000000b006165793d204si4809748qvq.584.2023.06.28.08.59.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 08:59:36 -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=M8EfAULj; 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 1qEXWz-0003KO-7B; Wed, 28 Jun 2023 11:56:33 -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 1qEXWi-0002ua-S9 for qemu-devel@nongnu.org; Wed, 28 Jun 2023 11:56:17 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEXWa-0001tS-37 for qemu-devel@nongnu.org; Wed, 28 Jun 2023 11:56:09 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-313f3a6db22so3508870f8f.3 for ; Wed, 28 Jun 2023 08:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687967766; x=1690559766; 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=AhB4/DcowpYYE5gsxFOT4g8oIU66RVavaCJXPih/ML0=; b=M8EfAULj8UTYR+lPaB+0DvnZ5RTOmhZjBhTuXrId8kCH6NzcXY20/ciL6qmSIEyVHT n48C8iuqGBdVTOAsr9RXC1EnwcilV5e4LGx4/nPofozXUsY+QBu0Ob5/fofbhpszqS6q RPn9FsEEMe6Bpuwb8OkN9lKu93uuniMMgD7eLNfDa38DxBIIiw/I4k1vj+bdOPsy63VJ rdqKYpdCfZWJ586kz98xqXvrGF9rStKrJYdbmwnds7k7DGv6jiyOi7Ypy/b74Ld/Bo/b bu4XarZq9xpG1EpX+pqvFBNFW5MVzvePGkfDyPYDbS8RCsOpJNFp3z8q6fyWEHjvvy9k zHxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687967766; x=1690559766; 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=AhB4/DcowpYYE5gsxFOT4g8oIU66RVavaCJXPih/ML0=; b=gFvb66OEg47VcbYZbpx1pNJpMp0+rN7cuKaKZjPm3xumi8pupJ4QzZlE5OIwq9C6wa xiK0bzLzeHUOq2ZmwIwmxG4hDQXmmKPMBZ3X+Juu+cZsl+vytUcgbAKAfij2z0C+3FSC 2wCN8zjqC1x2UOlcewR3CDiUt4GF/OVam5u1JwMxALSDnE3ULiMEI3oSXTqFVxJvCSel noSFe4bzEQl7zc74XS6Tv+/YDLuQ8sp2SVmOHezCR2DduDBQOj2Nyh91zTbejc+rgwCT DAT56BqxKeh9HXLuz5AYXUdVuIJe3RXNpgo5W7bmtZDwF4iURBwmEwX1BD1OB6dU2eSA 82QQ== X-Gm-Message-State: AC+VfDx/I6d4BAbuokHVRoJVXLcPXHyQwCUf/NwqgQY4cRysB9xHOmU8 N0Wjcfw0pwA9fUaEjlwnfdSd1OO4mF1+SjpXj4c= X-Received: by 2002:adf:f350:0:b0:313:e267:8dc with SMTP id e16-20020adff350000000b00313e26708dcmr11911917wrp.27.1687967765843; Wed, 28 Jun 2023 08:56:05 -0700 (PDT) Received: from m1x-phil.lan ([176.187.207.229]) by smtp.gmail.com with ESMTPSA id g6-20020a5d6986000000b003047dc162f7sm13611880wru.67.2023.06.28.08.56.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 28 Jun 2023 08:56:05 -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 29/30] exec/memory: Add symbol for memory listener priority for device backend Date: Wed, 28 Jun 2023 17:53:12 +0200 Message-Id: <20230628155313.71594-30-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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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_LISTENER_PRIORITY_DEV_BACKEND for the symbolic value for memory listener to replace the hard-coded value 10 for the device backend. No functional change intended. Signed-off-by: Isaku Yamahata Reviewed-by: Philippe Mathieu-Daudé Message-Id: <8314d91688030d7004e96958f12e2c83fb889245.1687279702.git.isaku.yamahata@intel.com> Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 1 + accel/kvm/kvm-all.c | 2 +- hw/remote/proxy-memory-listener.c | 2 +- hw/virtio/vhost.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 6d95d59175..4d789461a2 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -812,6 +812,7 @@ struct IOMMUMemoryRegion { QLIST_FOREACH((n), &(mr)->iommu_notify, node) #define MEMORY_LISTENER_PRIORITY_ACCEL 10 +#define MEMORY_LISTENER_PRIORITY_DEV_BACKEND 10 /** * struct MemoryListener: callbacks structure for updates to the physical memory map diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 964f61feee..9d0837a39c 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -1802,7 +1802,7 @@ static MemoryListener kvm_io_listener = { .name = "kvm-io", .eventfd_add = kvm_io_ioeventfd_add, .eventfd_del = kvm_io_ioeventfd_del, - .priority = 10, + .priority = MEMORY_LISTENER_PRIORITY_DEV_BACKEND, }; int kvm_set_irq(KVMState *s, int irq, int level) diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c index 18d96a1d04..a926f61ebe 100644 --- a/hw/remote/proxy-memory-listener.c +++ b/hw/remote/proxy-memory-listener.c @@ -217,7 +217,7 @@ void proxy_memory_listener_configure(ProxyMemoryListener *proxy_listener, proxy_listener->listener.commit = proxy_memory_listener_commit; proxy_listener->listener.region_add = proxy_memory_listener_region_addnop; proxy_listener->listener.region_nop = proxy_memory_listener_region_addnop; - proxy_listener->listener.priority = 10; + proxy_listener->listener.priority = MEMORY_LISTENER_PRIORITY_DEV_BACKEND; proxy_listener->listener.name = "proxy"; memory_listener_register(&proxy_listener->listener, diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index d116c2d6a1..82394331bf 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1444,7 +1444,7 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, .log_sync = vhost_log_sync, .log_global_start = vhost_log_global_start, .log_global_stop = vhost_log_global_stop, - .priority = 10 + .priority = MEMORY_LISTENER_PRIORITY_DEV_BACKEND }; hdev->iommu_listener = (MemoryListener) {