{"id":2175174,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2175174/?format=json","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.0/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20251217143150.94463-4-philmd@linaro.org>","date":"2025-12-17T14:31:39","name":"[03/14] hw/arm: Update bootloader generated with '-kernel' using stl_phys()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"313a7591b6417a14d92ad22cfec78db134bee1fe","submitter":{"id":85046,"url":"http://patchwork.ozlabs.org/api/1.0/people/85046/?format=json","name":"Philippe Mathieu-Daudé","email":"philmd@linaro.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20251217143150.94463-4-philmd@linaro.org/mbox/","series":[{"id":485701,"url":"http://patchwork.ozlabs.org/api/1.0/series/485701/?format=json","date":"2025-12-17T14:31:37","name":"system/memory: Clean ups around address_space_ldst() endian variants","version":1,"mbox":"http://patchwork.ozlabs.org/series/485701/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2175174/checks/","tags":{},"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=YsqxErFs;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists.gnu.org (lists.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 4dWbry5w9Vz1y0P\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 18 Dec 2025 01:33:54 +1100 (AEDT)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vVsaS-0001qn-Lu; Wed, 17 Dec 2025 09:33:09 -0500","from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1vVsZh-0001aQ-7i\n for qemu-devel@nongnu.org; Wed, 17 Dec 2025 09:32:24 -0500","from mail-wm1-x335.google.com ([2a00:1450:4864:20::335])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1vVsZe-000753-QZ\n for qemu-devel@nongnu.org; Wed, 17 Dec 2025 09:32:19 -0500","by mail-wm1-x335.google.com with SMTP id\n 5b1f17b1804b1-477bf34f5f5so43221725e9.0\n for <qemu-devel@nongnu.org>; Wed, 17 Dec 2025 06:32:18 -0800 (PST)","from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-47bdc1edd26sm40175975e9.13.2025.12.17.06.32.14\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Wed, 17 Dec 2025 06:32:14 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1765981936; x=1766586736; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=XUbyBOmogDSj3+4c56O0TI6S8LRQ6OyrdzdZ0KcvzLg=;\n b=YsqxErFsQ27g95sS63o1nCH5F4ShIdelRUrNx3JyyvRZx039r08rLRJzUOUqaWR4n0\n EQgxATXGWqhIwZqnGuyBIKIBOdEuQeoGcWvvSg1suRZPtxwKU1npFn7wZk7jOHntB9qx\n 3/ZyUBAnAIZsgBVgKTJNVa4PURea9Bel4szdQ6bGJD8RpKvJjFJmdqqHHxthtWWPlaC0\n ZmA8zOKCHeDdON3OV0EJOG08sLkld0r6byz0xNpLGfR6RDnBrgjTBaCRB47/v9pbiNMQ\n WU3YrNSGxkysdkLaxha2QdmE3h6QsUWSUvTgz5zBcaU2CAydUnSBpebh/8BU94NysWAh\n S6lw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1765981936; x=1766586736;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=XUbyBOmogDSj3+4c56O0TI6S8LRQ6OyrdzdZ0KcvzLg=;\n b=lcrG+2w1bXwSS90ghXvmK0dA015hjgSlsWAey+WhC2K0OCoruSm1PXjd3fGIV1vxNw\n VbMHChItn+GbvU1Fr0vUpKxCkP8xSO+RXk82amu+YhP6b5nq4e88UveEm/0RNNGf4tDJ\n 6MwsYamg68IHSTkB0G9Darot8STeCT3ucXAKaEn8KTGlTaGEWMaz3LCKGRX23U3o2LKr\n /LmBrstIXHnK7hLsI8whE/JloPfUrnHfSSoquvG+i+4PBhcMP2Gclai8ufkuwOu9H9/i\n JH7pgAjPNYISlieXpQ6qOIW/TK24cafcnsuiUrIFYIKMEuUtvWsRr5IO5cfdytO29EQI\n byJw==","X-Gm-Message-State":"AOJu0YxbUjYJhl13I2r1ZExLcAY3fUmAi99Fd2NXQTAI5IQvRqZpyE5Q\n C7njgoiB4TDCSiVwUtWQ+FJUnXUPxjRX7H1otmiOquxi8X6B6HdkN09kdoJijngZhCNlZynkhYJ\n sK6pFmoiVFg==","X-Gm-Gg":"AY/fxX62aRalG1sNWQqREfOejGYJxhjH/T6wp+vuSLTI8ZnICcdY8Ezbi/LGXp4iOQS\n NW4T1mp4ooDGBq6hc3YcoYrDzQScYWgO6Gzl00uRU1NXhZLMO3VfPM0PWHUoVsizzKerK2Wk13+\n OLHaRYOWHEKiP+EP2EUJCp6gYJ6JbfmXszeYhcI7FQX85OMCtk7j3bIPYd9Aazx0S743fSvucKQ\n 3de27A494Iz9mBIxa/WdCw7oBi0MXgBj3u39bxuoiTaHn3wmPCa3La+e9V2KMH8h60dZ+jMr+n8\n wIGH/iDQG6y0whRmNgFbsZ7oROnOn5lhD2ApuGG26TpDgy6l2QUR3YeRulcNiRyM18XRsdAIYdN\n Qq3rTmfNUVFdVEh3L9wnBvmiYOyol4HUOwafrzy3k7HBerorT3kgGGV4caWmAsQcB3K+zeH3BX3\n 5wE8kXksEFtwufoO3X7ZXTv/Rn+VuCyQTkcvq0mZxkSv52ynJ8Hfla7EuwWATY","X-Google-Smtp-Source":"\n AGHT+IG1Sq0CNmTwPcwxmZQwoHtUbY7reyVlCsgJ98GdeAMI7tHBSUVhBVE1wrLWSIs8t3uhywPwkg==","X-Received":"by 2002:a05:600c:1c1a:b0:477:5c58:3d42 with SMTP id\n 5b1f17b1804b1-47bda747ed7mr54588085e9.10.1765981935987;\n Wed, 17 Dec 2025 06:32:15 -0800 (PST)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>","To":"qemu-devel@nongnu.org","Cc":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Anton Johansson <anjo@rev.ng>, qemu-arm@nongnu.org,\n Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n Paolo Bonzini <pbonzini@redhat.com>, \"Michael S. Tsirkin\" <mst@redhat.com>,\n Artyom Tarasenko <atar4qemu@gmail.com>,\n Peter Maydell <peter.maydell@linaro.org>,\n David Hildenbrand <david@kernel.org>, Peter Xu <peterx@redhat.com>,\n Richard Henderson <richard.henderson@linaro.org>, =?utf-8?q?C=C3=A9dric_Le_?=\n\t=?utf-8?q?Goater?= <clg@kaod.org>, Steven Lee <steven_lee@aspeedtech.com>,\n Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>,\n Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>","Subject":"[PATCH 03/14] hw/arm: Update bootloader generated with '-kernel'\n using stl_phys()","Date":"Wed, 17 Dec 2025 15:31:39 +0100","Message-ID":"<20251217143150.94463-4-philmd@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20251217143150.94463-1-philmd@linaro.org>","References":"<20251217143150.94463-1-philmd@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=2a00:1450:4864:20::335;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=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":"<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"},"content":"When the MemTxAttrs value is not specified and no MemTxResult\nprovided, address_space_ld/st() is equivalent to the simpler\nld/st_phys() API variant. Use the latter.\n\nThe _notdirty() variant is supposed to /not/ mark the updated\nCODE page as dirty, to not re-translate it. However this code\nis only used with the '-kernel' CLI option after the machine\nis created and /before/ the vCPUs run, and *only* during the\nfirst (cold) reset; not during following (hot) resets. The\noptimisation is totally not justified, since we haven't\ntranslated any guest code yet. Replace by the normal stl_phys()\nhelper.\n\nSuggested-by: Richard Henderson <richard.henderson@linaro.org>\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\n---\n hw/arm/aspeed.c | 3 +--\n hw/arm/boot.c   | 6 ++----\n 2 files changed, 3 insertions(+), 6 deletions(-)","diff":"diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c\nindex 3a5071a3841..8ce82f1f622 100644\n--- a/hw/arm/aspeed.c\n+++ b/hw/arm/aspeed.c\n@@ -77,8 +77,7 @@ static void aspeed_reset_secondary(ARMCPU *cpu,\n     CPUState *cs = CPU(cpu);\n \n     /* info->smp_bootreg_addr */\n-    address_space_stl_notdirty(as, AST_SMP_MBOX_FIELD_GOSIGN, 0,\n-                               MEMTXATTRS_UNSPECIFIED, NULL);\n+    stl_phys(as, AST_SMP_MBOX_FIELD_GOSIGN, 0);\n     cpu_set_pc(cs, info->smp_loader_start);\n }\n \ndiff --git a/hw/arm/boot.c b/hw/arm/boot.c\nindex b91660208f5..5ca9c8db5cc 100644\n--- a/hw/arm/boot.c\n+++ b/hw/arm/boot.c\n@@ -266,8 +266,7 @@ static void default_reset_secondary(ARMCPU *cpu,\n     AddressSpace *as = arm_boot_address_space(cpu, info);\n     CPUState *cs = CPU(cpu);\n \n-    address_space_stl_notdirty(as, info->smp_bootreg_addr,\n-                               0, MEMTXATTRS_UNSPECIFIED, NULL);\n+    stl_phys(as, info->smp_bootreg_addr, 0);\n     cpu_set_pc(cs, info->smp_loader_start);\n }\n \n@@ -277,8 +276,7 @@ static inline bool have_dtb(const struct arm_boot_info *info)\n }\n \n #define WRITE_WORD(p, value) do { \\\n-    address_space_stl_notdirty(as, p, value, \\\n-                               MEMTXATTRS_UNSPECIFIED, NULL);  \\\n+    stl_phys(as, p, value);       \\\n     p += 4;                       \\\n } while (0)\n \n","prefixes":["03/14"]}