From patchwork Wed Jun 28 15:53:13 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: 697263 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4425732wrm; Wed, 28 Jun 2023 09:01:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Fd4Ev1q0kdbqdBmxl1mwPx7J5Qvz4XfMTAE3Fj+vn0+vyaNJwaucGhr5qey5yizVUUUjl X-Received: by 2002:a05:6808:120c:b0:39e:bcdc:4bd7 with SMTP id a12-20020a056808120c00b0039ebcdc4bd7mr31378313oil.24.1687968111421; Wed, 28 Jun 2023 09:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687968111; cv=none; d=google.com; s=arc-20160816; b=QrxCMd7ZbUe1BjQh6hPrfUD8ZfpMST9AOl5EBWj9i3Mou0v1jtq6vS+puUx+B8Hdwr vzgS25V7GaxTIkxNDAURwAMVFANlpJ7ae2fktmXrpuU9K7fGeYVdZgRJutDFosI2q4Q4 TpcaVXJkNj9o9SAAdauVnqJS0z9gT57phIieN8eGTmtK6dNrgtHGS6yFwGGBchuvT2fX Hq0nX8WaQiDqM8J4jcP9qlQJOG7KI6y+lc5l8yIRixXpL+v9Cy3mcVnnxJHIl4QewZG8 eXLUi2QKHEc5ypazvR95tQrEe9eMklma+b/DJnKskXSo68rYyWxQQODrelQYPxdJoHbZ Qf2A== 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=5LcTeii/p5RpE6oLxIZo5TfJdBeq6mI7i0HEKUop/mU=; fh=gmjpN4CFW+KMHz1hOJmxYQUJxAkm3oaOtQaI6p722F0=; b=KunctgB4x4bQ2FlS8L8q7jNTJNJ8GeUL40fZmKVrH69inLpwSTk243z55TcsMtvb8b q5uEPI26CPCr3hYbKJ7UQSCX4MVwwruA9A/Gn0HLlAjSJ+KP6knP5QsWlrKPZBZnZjEC Z9jaQDoLwH81KBlMTUDBID4GTH5NCBZeRjHek2jyOuRSFtRhFH2/evIG/8K/v1GaFvF4 D6Ouap6gfBXrFS35QOsjJ4PRGoa6y7GV8eOqWRMKPVUxXYRUx18gWumEwQ7hT+jAPI2g fK/60ygvpH68RqyS1oKfJV4B+s7zKI4eguHrrNh5iRJVzwWZVQZf7fiwHiw9braUjZwj NT/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZIk1AK7u; 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 m62-20020a1f5841000000b0047135f749c4si764456vkb.246.2023.06.28.09.01.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2023 09:01:51 -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=ZIk1AK7u; 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 1qEXX1-0003NP-CH; Wed, 28 Jun 2023 11:56:35 -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 1qEXWj-0002ux-FF for qemu-devel@nongnu.org; Wed, 28 Jun 2023 11:56:18 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEXWg-0001uY-AC for qemu-devel@nongnu.org; Wed, 28 Jun 2023 11:56:15 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3112f5ab0b1so5485064f8f.0 for ; Wed, 28 Jun 2023 08:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687967771; x=1690559771; 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=5LcTeii/p5RpE6oLxIZo5TfJdBeq6mI7i0HEKUop/mU=; b=ZIk1AK7uhstYx9XqBFtfOfH/Lx7QsEbM+LaWVq2aqEtkUmFdq/7zjwfS3AcQgF3bbs 76EFNcVNwHC9xXPaN2auMScy7B3+xAi2Nnuc6IjBLwvAa4bMeQZph+v91zFD3kZuh3rK OROAfYUNNp/8GyjPHJSZV6a5UgLKMfXpvIOpcrVeQOXYzHzoPXuotZhDTiv/8IHRZq92 C0+OrK3nyb0XLAuFpgHvETW5VoXiNy33d5nm4cdnJ4++Zrgf1H/88lQV7AaMz6pZo33P ITUNfd/RFioHbrhIPypHudvH+dq91OFicdd1Op0tXNg+83y2HUo/eX3ml2X63Xvkmwo/ ttfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687967771; x=1690559771; 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=5LcTeii/p5RpE6oLxIZo5TfJdBeq6mI7i0HEKUop/mU=; b=XRfYyvJPxK7Dox+PW7KXtCzhwjOartUm/aJ3oeYLZLvVk+XmewLUojfwxB9whDKHfd HLmct9Jlvg5wJvrKKPNNfCH6Pj+4/anNI6g1XFYpYjE6xUrURAqD0Sih3LFsXrihsD4K R+r+tE1TTdQKvaJArJPv5PsTdbZn6w0OPGRB4yik7oUCMhLgF310Pw3CmqkcvExeu2qU RY3VFCGammkLJHdXCEYyq094/enjFzsrPfbypbCq1vbkXhXVpZFkuWuaqZ8vWXq1GVsd abfU0S28ZULeEOdYiIhjjH60ckyIh01svUrpvy8+fpSK8RP61GRrBeiOdS+YZ6RXYN43 igeg== X-Gm-Message-State: AC+VfDxXfmKf4Yqx2pMZnjNL+tsH1RBqbFLFelKgJWjrETSV6YeFOaDZ Atq0l95uHTpYtVB0FYoMJLBbA8iBYvsng/R4dMA= X-Received: by 2002:adf:d4cf:0:b0:314:824:3777 with SMTP id w15-20020adfd4cf000000b0031408243777mr2317365wrk.48.1687967771208; Wed, 28 Jun 2023 08:56:11 -0700 (PDT) Received: from m1x-phil.lan ([176.187.207.229]) by smtp.gmail.com with ESMTPSA id bf11-20020a0560001ccb00b003062b2c5255sm13624852wrb.40.2023.06.28.08.56.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 28 Jun 2023 08:56:10 -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 30/30] exec/memory: Add symbol for the min value of memory listener priority Date: Wed, 28 Jun 2023 17:53:13 +0200 Message-Id: <20230628155313.71594-31-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::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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_MIN for the symbolic value for the min value of the memory listener instead of the hard-coded magic value 0. Add explicit initialization. No functional change intended. Signed-off-by: Isaku Yamahata Reviewed-by: Philippe Mathieu-Daudé Message-Id: <29f88477fe82eb774bcfcae7f65ea21995f865f2.1687279702.git.isaku.yamahata@intel.com> Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 1 + accel/kvm/kvm-all.c | 1 + target/arm/kvm.c | 1 + 3 files changed, 3 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 4d789461a2..7f5c11a0cc 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -811,6 +811,7 @@ struct IOMMUMemoryRegion { #define IOMMU_NOTIFIER_FOREACH(n, mr) \ QLIST_FOREACH((n), &(mr)->iommu_notify, node) +#define MEMORY_LISTENER_PRIORITY_MIN 0 #define MEMORY_LISTENER_PRIORITY_ACCEL 10 #define MEMORY_LISTENER_PRIORITY_DEV_BACKEND 10 diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 9d0837a39c..373d876c05 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -1105,6 +1105,7 @@ static MemoryListener kvm_coalesced_pio_listener = { .name = "kvm-coalesced-pio", .coalesced_io_add = kvm_coalesce_pio_add, .coalesced_io_del = kvm_coalesce_pio_del, + .priority = MEMORY_LISTENER_PRIORITY_MIN, }; int kvm_check_extension(KVMState *s, unsigned int extension) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 84da49332c..b4c7654f49 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -341,6 +341,7 @@ static MemoryListener devlistener = { .name = "kvm-arm", .region_add = kvm_arm_devlistener_add, .region_del = kvm_arm_devlistener_del, + .priority = MEMORY_LISTENER_PRIORITY_MIN, }; static void kvm_arm_set_device_addr(KVMDevice *kd)