[{"id":3682588,"web_url":"http://patchwork.ozlabs.org/comment/3682588/","msgid":"<CAFEAcA9kVBCFUwAmEQG7gK0F69PXFyALUsouG5w7zJQYzsx=Zw@mail.gmail.com>","list_archive_url":null,"date":"2026-04-27T09:33:41","subject":"Re: [PATCH v10 1/7] target/arm/cpu: Introduce the infrastructure for\n cpreg migration tolerances","submitter":{"id":5111,"url":"http://patchwork.ozlabs.org/api/people/5111/","name":"Peter Maydell","email":"peter.maydell@linaro.org"},"content":"On Mon, 20 Apr 2026 at 15:06, Eric Auger <eric.auger@redhat.com> wrote:\n>\n> We introduce a datatype for a tolerance with respect to a given\n> cpreg migration issue. The tolerance applies to a given cpreg kvm index,\n> and can be of different types:\n> a) mismatch in cpreg indexes\n> - ToleranceNotOnBothEnds (cpreg index is allowed to be only present\n>   on one end)\n> - ToleranceOnlySrcTestValue (cpreg index is allowed to be only\n>   present in source if its value @mask field matches @value)\n> b) mismatch in cpreg values\n> - ToleranceDiffInMask (value differences are allowed only within a mask)\n> - ToleranceFieldLT (incoming field value must be less than a given value)\n> - ToleranceFieldGT (incoming field value must be greater than a given value)\n>\n> A QLIST of such tolerances can be populated using a new helper:\n> arm_register_cpreg_mig_tolerance() and arm_cpu_match_cpreg_mig_tolerance()\n> allows to check whether a tolerance exists for a given kvm index and its\n> criterion is matched.\n>\n> callers for those helpers will be introduced in subsequent patches.\n>\n> Only registration of migration tolerances related to cpreg index\n> mismatch is currently allowed.\n>\n> Signed-off-by: Eric Auger <eric.auger@redhat.com>\n\nThe way that ToleranceOnlySrcTestValue allows the bits outside\nthe field to be anything whereas the LT and GT types insist\non the bits outside the field being an exact match feels a\nbit non-orthogonal, but I see why we do it (otherwise the EQ\ncheck would effectively be a \"check all bits match\" check\nregardless of the field mask; as it happens the only thing\nwe use it for passes an all-bits-set mask anyway).\n\nI guess we'll see how many of these we accumulate and whether\nwe want to adjust the kinds of check we do in future.\n\nReviewed-by: Peter Maydell <peter.maydell@linaro.org>\n\n-- PMM","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=URccwXWm;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g3z0w28v2z1yJX\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 19:34:24 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wHILn-0004cS-F5; Mon, 27 Apr 2026 05:33:59 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>)\n id 1wHILl-0004ZA-1c\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 05:33:57 -0400","from mail-yx1-xb135.google.com ([2607:f8b0:4864:20::b135])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>)\n id 1wHILj-0000Tj-2n\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 05:33:56 -0400","by mail-yx1-xb135.google.com with SMTP id\n 956f58d0204a3-64e87a81639so8834629d50.0\n for <qemu-devel@nongnu.org>; Mon, 27 Apr 2026 02:33:54 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; t=1777282434; cv=none;\n d=google.com; s=arc-20240605;\n b=A3wYExQ+i5M7+MGJpNqC/a/Vmcl8HaUk8PHqx7tFK/afzg2x/bZJHPDG5Fmysp6ufO\n phZTkb40s/zz097wW3mEdDDBR38QekC3lsVoaY3oXHMotghofqJ1u3xZLjShWsecALJh\n TI+KAXWWHPwoGcJYi2FITLNKNRltdNB5GDYw8M+mP2YOxzUn6A2j1ht1o7ZfoC56bXxI\n MS5++E9ZdtghgDh80d0H5Rq7/bRGLJMLJwtr6NBufKdjuj+DHMLdF/UOMNVXvfR7YSd2\n wDDI95ZTE6v4Lcip4W1ANEFnwMAwr490G6mepn4v5BzD8hmx5SQ5AQWbjVO4722EnE2a\n asRw==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:dkim-signature;\n bh=WDMhoO4qmVr4TqrVTgUXX9ejcEjnyPw1rATst4OZikw=;\n fh=4IzuF9C3pNdo34KC4Txgez6wdqphsTMBlsFX6wjEZLg=;\n b=H2XpkuN3ofKHESwce5c3SQa3x4eFPg+sibj6VrCZzKbc6xnG5shg+1R2b7ejsZLc5r\n hs8uzXKbIDv2B9moF9ODLD1rDAuxWnZVsDl/WVRTVItEFmE4lodqMm/sPxWAn8F3gAJk\n mz+3WKzFucdreJYH6Gyc3X9Y7jvnxGD4RBschrOO26jkz0zmCPgXsVXfCRW1a0mVrFVY\n Zg9wqwqtGxJ3GlBKnFfYDMBl4wamZcmK5kk8pS7nvB5YKwOIgwNGXe/Ceu0nTk+Jt/Nc\n lvDiO3GGa1BKFfLGglsXZmyMvILxDryMmMTpQP71q5uGi2IWNQnI2G1hTsvHtLU2GoKC\n 8pHw==; darn=nongnu.org","ARC-Authentication-Results":"i=1; mx.google.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777282434; x=1777887234; darn=nongnu.org;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:from:to:cc:subject:date:message-id:reply-to;\n bh=WDMhoO4qmVr4TqrVTgUXX9ejcEjnyPw1rATst4OZikw=;\n b=URccwXWmqKqp6C1BVopoRAlzzADdmC63VL/SPbXeLQ8iFP43hdanaySML2qg5zhENb\n DOSuS1REFIhYu7VNKtyc18OA2zweFw66ETWYiA26HVqPagoH7MbhpZZmv7yU3MpGUCRx\n CdJEwrEkEmOLO9NcP3rfKVZ41FVhJLygKQPT06dJFn7KIGgd2EnAewcyyyqe+imQt05B\n gOoYHpaAV/3VOv2qLnsRyGhJIZBLpQ/zMRcVBKsPD93NvjMPngyAEqUBybM3zgoXp1Pq\n fWIDlwdSmLMCQ5C3UMC9gVz0KDvHhsk7RiF6GnQyde1sOzrw8FUwQe7KBmsaGwwD5tFl\n /dOg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777282434; x=1777887234;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=WDMhoO4qmVr4TqrVTgUXX9ejcEjnyPw1rATst4OZikw=;\n b=p5mhVxqHKQIWsTLz0RZBe/4YounYxWyXSFdjnhZUbaz4s9eFqLJbBnOta3rt8cuhJz\n nJagrFu3C7zKHS5VVyjM5r8KWTo4LlwpGAO/M20vagw2gWPSYPJbig0Xxj3WTd1iY9b8\n TcvfRkDiiGNHs1j+Jou5532ksrWK+35n3E45sTHX0DdJ5uC0c2x52ybFfd/69rsvEcA7\n wqNYIQXWBq/mrMM16e0Iw+RRf/Ba+engOJ+VBDNv+tx9GdcGBeEdNKc1osYnw5b8Z6n3\n LlMSqTSkfGRr/F5ML4R+bePpUrFZX3mbTfpVPBvAzunVsjz9VwB2LG6x39alEduRCxRd\n V+Pg==","X-Forwarded-Encrypted":"i=1;\n AFNElJ80heTdJ0SFTXYBf7FoOmECdUX/mmRcuUxQLB0z1qVCgO65InqNdRnCB7YNsmitMaidMeREijM1KZwS@nongnu.org","X-Gm-Message-State":"AOJu0Ywj21vLmxgWDOEQthTA2YzdTjLz2mhkPf//fPFtMROLF0Cvy1iv\n 638VnELfCHb0eYvPDvzC2DeBp9vZ756N8j0QgAKSCXMMUvJR2d3EjoZjOuKD1H2u77ANDWvfwi2\n Kjh+DAUSHxC2/qefj1KSlKVBDYGEGME/N2a+0GcIGUA==","X-Gm-Gg":"AeBDievCGBaUJ+WiUw5tMbsvqDzAZK0RgRw/xTgQ4wTFIPbyfa00uWGsDIU74MmwAt5\n MEMEoK7ARa53OtYQtJw+w8/BC4z9kACFnkl7JpHU2imVasEmNgy7CZhjoCTljndsRWMSfa41mTG\n FyQv9WUuFvrUMRQrWfutvg+V0qtgA8IOKkN4PCXa/i9Dr6x/1+FgBfMtq1yzNEYkQM12CSFHc8/\n geBubHp+wzKfV5pshPnswCybGgeQWcNeXvCbHg06E4a+eqQkwjUWgi1ULiZlvmOTbCqwELXFm07\n G7G8s1DVFBjeEJtYdoVGiNPsoEoSzs5RLCTauUlJF5gOrOrV6jhidXW3XBnGXSAqCtsHaI8JAc+\n JOw==","X-Received":"by 2002:a05:690e:4191:b0:651:cf43:b28f with SMTP id\n 956f58d0204a3-65310b0b5b6mr34988861d50.60.1777282433964; Mon, 27 Apr 2026\n 02:33:53 -0700 (PDT)","MIME-Version":"1.0","References":"<20260420140552.104369-1-eric.auger@redhat.com>\n <20260420140552.104369-2-eric.auger@redhat.com>","In-Reply-To":"<20260420140552.104369-2-eric.auger@redhat.com>","From":"Peter Maydell <peter.maydell@linaro.org>","Date":"Mon, 27 Apr 2026 10:33:41 +0100","X-Gm-Features":"AQROBzCEfYlKMO6BLPiKHOze75SAjM8txBCN60gETZmHcEIrSyNBM-3rvsVv1u0","Message-ID":"\n <CAFEAcA9kVBCFUwAmEQG7gK0F69PXFyALUsouG5w7zJQYzsx=Zw@mail.gmail.com>","Subject":"Re: [PATCH v10 1/7] target/arm/cpu: Introduce the infrastructure for\n cpreg migration tolerances","To":"Eric Auger <eric.auger@redhat.com>","Cc":"eric.auger.pro@gmail.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org,\n cohuck@redhat.com, sebott@redhat.com, peterx@redhat.com, philmd@linaro.org,\n alex.bennee@linaro.org","Content-Type":"text/plain; charset=\"UTF-8\"","Received-SPF":"pass client-ip=2607:f8b0:4864:20::b135;\n envelope-from=peter.maydell@linaro.org; helo=mail-yx1-xb135.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,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 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":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"}}]