From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276083; cv=none; d=zohomail.com; s=zohoarc; b=Z16kTkY1LiGI6ztAoh0NNhKD1Ip2IQ+iKTKXXhY5K5c0wncXU92cjFmfhvq67gHAR8cRa8sFtv0aWABMsLAUUPcCPoT1H2VOkbfJKoTER7hQsp93rFgbZEWCegpDHnS8e5GQOBJZr1OVYzT1J3xkxuW3CiY9dbRZtqYOlRVtPss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276083; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=IEYGBSZ2FGAx0/1E6h+Sk6ak4YyUKlVgtW93H+twQDY=; b=SAMF/Rb+ba9Uyrw3tkr3ozLmq7thTCBDKhSPQmagLVgNytFvTIXQPa1WeYUurRlqNRg60NwWG5EkTD7miFf8Xbj/EFCEw+TljrVmE4aRPQEuP49X6rLR+9myT6J4as+ugRbsjUxo19JqrKxBDxwD8pSkDxJJEeRfmXNHHhkKpp8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174127608343973.26757130876445; Thu, 6 Mar 2025 07:48:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDRv-0007CV-8I; Thu, 06 Mar 2025 10:47:51 -0500 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 1tqDRs-0007Bw-Aj for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:47:48 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDRp-0006CC-Mj for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:47:48 -0500 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-39129017bbbso368597f8f.1 for ; Thu, 06 Mar 2025 07:47:45 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c103290sm2339957f8f.87.2025.03.06.07.47.42 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:47:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276063; x=1741880863; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=IEYGBSZ2FGAx0/1E6h+Sk6ak4YyUKlVgtW93H+twQDY=; b=yGiInYEkjx6o6pBzcnQPqMepRmGcpyS4i1hY8el1rEfFu3Gdpi3gKUrUwiqrVYtIXG hW6JeGq8ob7+GWB93whppkLbbdJMhAyr18vYSggmxokLXhs7Gi/OJ9u6cDO6RoRRShMT zYIMZ594tj7nj4vSGGULwke07NbTTSx9YdGF3+F1DdIAzQdqnPFHaswhliT+OLsUJkcc XEQUIS1jbbIx5c5HgblBjYn7g7LVBC3AuRUqDZB6JiOcek4M2/1swn4KVEPPzdDDKTan rGumLcbaFotdxSwkmdlrF6ErH+XFl2+32HXj49DBFwdcd0uWmxH/w8gEqN6L+8MXTIiu 8cww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276063; x=1741880863; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IEYGBSZ2FGAx0/1E6h+Sk6ak4YyUKlVgtW93H+twQDY=; b=IbM+ji0sKJ2mHIRQFjgBX0RqSMRk7qZwCY+pnyExtxE1NiBOiIXBgELMzLrSH/9YyK uV6Hf2CPxQCFSiALRwVGrEnPZqizONE8dO5mocJ2hzABwU2U77pxrvKkVlA7F0hIr2MA phxK2FAXyNpgHzsXK1b/z49Extk9jWYY47p0sg1j7tIPum2Oh/URGgW6xNSGWS+roXDG XXZ3euciuIxS0V3i9PUP89f5rQFb5CtJYOZuaBXUQxakRgLYPikeyqSDOF9iY5cOjIq5 Oy60goHHaxiv9T/uypb+824zNOmyHNZAb57CEGJAmeHHKbWfEt52lXNdFLLAFRbzwkW5 eM2Q== X-Gm-Message-State: AOJu0YwZ6PEgxY8aK0UNNJsO05F9pMq3Z8RpejUNqkpGkk0fQSEX/A7f ZGzmhSJxlzfH2WwZ8rUydd5T+HKqEenGP/uYiMfS8kjwPmAEyi5X6pkb117oeumTEsA29yVPhM4 vsEs= X-Gm-Gg: ASbGncuzmxE4OYjlatLrXVsyqMcwjCyzDkD6Sdwuvw1zfcH26WciYPlh3RzELHj2X8F 9u3V9SQaVv4nAHyKPCl55cXotmVUMrIUwLsYT5IZHGZLkM1V8f1BdQmlSi50isEo0dnY4no5zT5 dCnODfDc9v0RttBG6RAI12GDjI4sboy3Qd7oMsdLIAs+VtEmD4yo1s9WrPjjNOc7iEfsRd1y4Bz DZ7IHU7xlRHIyWPtbCjCCtCO3vQvTHXkFxTulCZKWvEu/SpvnCVOBslrT2YVmoommyaQ0R/gDGK VW8+gMQ/q7lL9Q3t2FEEqrGXJ+QMOiA/XJfoahOsfQA2YSZVwKfH7GlUW9BjIYdCiVoOIRrgULX RrDyFeCnu3vbZaEVZzv0= X-Google-Smtp-Source: AGHT+IFWFJpuRqZ7MseNg+B3NPYnSOC4GlDP3rfy4A6/EBhKLDhzSLHE8kSj0eFVzlhTUQXuBTaTiQ== X-Received: by 2002:a05:6000:1788:b0:390:f9d0:5e3 with SMTP id ffacd0b85a97d-3911f72632cmr5813862f8f.1.1741276063257; Thu, 06 Mar 2025 07:47:43 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 01/54] qemu/compiler: Absorb 'clang-tsa.h' Date: Thu, 6 Mar 2025 16:46:43 +0100 Message-ID: <20250306154737.70886-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276084252019000 We already have "qemu/compiler.h" for compiler-specific arrangements, automatically included by "qemu/osdep.h" for each source file. No need to explicitly include a header for a Clang particularity. Suggested-by: Pierrick Bouvier Reviewed-by: Pierrick Bouvier Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Kevin Wolf Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250117170201.91182-1-philmd@linaro.org> --- bsd-user/qemu.h | 1 - include/block/block_int-common.h | 1 - include/block/graph-lock.h | 2 - include/exec/page-protection.h | 2 - include/qemu/clang-tsa.h | 114 ------------------------------- include/qemu/compiler.h | 96 ++++++++++++++++++++++++++ include/qemu/thread.h | 1 - block/create.c | 1 - tests/unit/test-bdrv-drain.c | 1 - tests/unit/test-block-iothread.c | 1 - util/qemu-thread-posix.c | 1 - 11 files changed, 96 insertions(+), 125 deletions(-) delete mode 100644 include/qemu/clang-tsa.h diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 3eaa14f3f56..4e97c796318 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -40,7 +40,6 @@ extern char **environ; #include "target.h" #include "exec/gdbstub.h" #include "exec/page-protection.h" -#include "qemu/clang-tsa.h" #include "accel/tcg/vcpu-state.h" =20 #include "qemu-os.h" diff --git a/include/block/block_int-common.h b/include/block/block_int-com= mon.h index bb91a0f62fa..ebb4e56a503 100644 --- a/include/block/block_int-common.h +++ b/include/block/block_int-common.h @@ -28,7 +28,6 @@ #include "block/block-common.h" #include "block/block-global-state.h" #include "block/snapshot.h" -#include "qemu/clang-tsa.h" #include "qemu/iov.h" #include "qemu/rcu.h" #include "qemu/stats64.h" diff --git a/include/block/graph-lock.h b/include/block/graph-lock.h index dc8d9491843..2c26c721081 100644 --- a/include/block/graph-lock.h +++ b/include/block/graph-lock.h @@ -20,8 +20,6 @@ #ifndef GRAPH_LOCK_H #define GRAPH_LOCK_H =20 -#include "qemu/clang-tsa.h" - /** * Graph Lock API * This API provides a rwlock used to protect block layer diff --git a/include/exec/page-protection.h b/include/exec/page-protection.h index bae3355f62c..3e0a8a03331 100644 --- a/include/exec/page-protection.h +++ b/include/exec/page-protection.h @@ -40,8 +40,6 @@ =20 #ifdef CONFIG_USER_ONLY =20 -#include "qemu/clang-tsa.h" - void TSA_NO_TSA mmap_lock(void); void TSA_NO_TSA mmap_unlock(void); bool have_mmap_lock(void); diff --git a/include/qemu/clang-tsa.h b/include/qemu/clang-tsa.h deleted file mode 100644 index ba06fb8c924..00000000000 --- a/include/qemu/clang-tsa.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef CLANG_TSA_H -#define CLANG_TSA_H - -/* - * Copyright 2018 Jarkko Hietaniemi - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the "Softwa= re"), - * to deal in the Software without restriction, including without - * limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* http://clang.llvm.org/docs/ThreadSafetyAnalysis.html - * - * TSA is available since clang 3.6-ish. - */ -#ifdef __clang__ -# define TSA(x) __attribute__((x)) -#else -# define TSA(x) /* No TSA, make TSA attributes no-ops. */ -#endif - -/* TSA_CAPABILITY() is used to annotate typedefs: - * - * typedef pthread_mutex_t TSA_CAPABILITY("mutex") tsa_mutex; - */ -#define TSA_CAPABILITY(x) TSA(capability(x)) - -/* TSA_GUARDED_BY() is used to annotate global variables, - * the data is guarded: - * - * Foo foo TSA_GUARDED_BY(mutex); - */ -#define TSA_GUARDED_BY(x) TSA(guarded_by(x)) - -/* TSA_PT_GUARDED_BY() is used to annotate global pointers, the data - * behind the pointer is guarded. - * - * Foo* ptr TSA_PT_GUARDED_BY(mutex); - */ -#define TSA_PT_GUARDED_BY(x) TSA(pt_guarded_by(x)) - -/* The TSA_REQUIRES() is used to annotate functions: the caller of the - * function MUST hold the resource, the function will NOT release it. - * - * More than one mutex may be specified, comma-separated. - * - * void Foo(void) TSA_REQUIRES(mutex); - */ -#define TSA_REQUIRES(...) TSA(requires_capability(__VA_ARGS__)) -#define TSA_REQUIRES_SHARED(...) TSA(requires_shared_capability(__VA_ARGS_= _)) - -/* TSA_EXCLUDES() is used to annotate functions: the caller of the - * function MUST NOT hold resource, the function first acquires the - * resource, and then releases it. - * - * More than one mutex may be specified, comma-separated. - * - * void Foo(void) TSA_EXCLUDES(mutex); - */ -#define TSA_EXCLUDES(...) TSA(locks_excluded(__VA_ARGS__)) - -/* TSA_ACQUIRE() is used to annotate functions: the caller of the - * function MUST NOT hold the resource, the function will acquire the - * resource, but NOT release it. - * - * More than one mutex may be specified, comma-separated. - * - * void Foo(void) TSA_ACQUIRE(mutex); - */ -#define TSA_ACQUIRE(...) TSA(acquire_capability(__VA_ARGS__)) -#define TSA_ACQUIRE_SHARED(...) TSA(acquire_shared_capability(__VA_ARGS__)) - -/* TSA_RELEASE() is used to annotate functions: the caller of the - * function MUST hold the resource, but the function will then release it. - * - * More than one mutex may be specified, comma-separated. - * - * void Foo(void) TSA_RELEASE(mutex); - */ -#define TSA_RELEASE(...) TSA(release_capability(__VA_ARGS__)) -#define TSA_RELEASE_SHARED(...) TSA(release_shared_capability(__VA_ARGS__)) - -/* TSA_NO_TSA is used to annotate functions. Use only when you need to. - * - * void Foo(void) TSA_NO_TSA; - */ -#define TSA_NO_TSA TSA(no_thread_safety_analysis) - -/* - * TSA_ASSERT() is used to annotate functions: This function will assert t= hat - * the lock is held. When it returns, the caller of the function is assume= d to - * already hold the resource. - * - * More than one mutex may be specified, comma-separated. - */ -#define TSA_ASSERT(...) TSA(assert_capability(__VA_ARGS__)) -#define TSA_ASSERT_SHARED(...) TSA(assert_shared_capability(__VA_ARGS__)) - -#endif /* #ifndef CLANG_TSA_H */ diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index d904408e5ed..496dac5ac11 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -207,6 +207,102 @@ # define QEMU_USED #endif =20 +/* + * http://clang.llvm.org/docs/ThreadSafetyAnalysis.html + * + * TSA is available since clang 3.6-ish. + */ +#ifdef __clang__ +# define TSA(x) __attribute__((x)) +#else +# define TSA(x) /* No TSA, make TSA attributes no-ops. */ +#endif + +/* + * TSA_CAPABILITY() is used to annotate typedefs: + * + * typedef pthread_mutex_t TSA_CAPABILITY("mutex") tsa_mutex; + */ +#define TSA_CAPABILITY(x) TSA(capability(x)) + +/* + * TSA_GUARDED_BY() is used to annotate global variables, + * the data is guarded: + * + * Foo foo TSA_GUARDED_BY(mutex); + */ +#define TSA_GUARDED_BY(x) TSA(guarded_by(x)) + +/* + * TSA_PT_GUARDED_BY() is used to annotate global pointers, the data + * behind the pointer is guarded. + * + * Foo* ptr TSA_PT_GUARDED_BY(mutex); + */ +#define TSA_PT_GUARDED_BY(x) TSA(pt_guarded_by(x)) + +/* + * The TSA_REQUIRES() is used to annotate functions: the caller of the + * function MUST hold the resource, the function will NOT release it. + * + * More than one mutex may be specified, comma-separated. + * + * void Foo(void) TSA_REQUIRES(mutex); + */ +#define TSA_REQUIRES(...) TSA(requires_capability(__VA_ARGS__)) +#define TSA_REQUIRES_SHARED(...) TSA(requires_shared_capability(__VA_ARGS_= _)) + +/* + * TSA_EXCLUDES() is used to annotate functions: the caller of the + * function MUST NOT hold resource, the function first acquires the + * resource, and then releases it. + * + * More than one mutex may be specified, comma-separated. + * + * void Foo(void) TSA_EXCLUDES(mutex); + */ +#define TSA_EXCLUDES(...) TSA(locks_excluded(__VA_ARGS__)) + +/* + * TSA_ACQUIRE() is used to annotate functions: the caller of the + * function MUST NOT hold the resource, the function will acquire the + * resource, but NOT release it. + * + * More than one mutex may be specified, comma-separated. + * + * void Foo(void) TSA_ACQUIRE(mutex); + */ +#define TSA_ACQUIRE(...) TSA(acquire_capability(__VA_ARGS__)) +#define TSA_ACQUIRE_SHARED(...) TSA(acquire_shared_capability(__VA_ARGS__)) + +/* + * TSA_RELEASE() is used to annotate functions: the caller of the + * function MUST hold the resource, but the function will then release it. + * + * More than one mutex may be specified, comma-separated. + * + * void Foo(void) TSA_RELEASE(mutex); + */ +#define TSA_RELEASE(...) TSA(release_capability(__VA_ARGS__)) +#define TSA_RELEASE_SHARED(...) TSA(release_shared_capability(__VA_ARGS__)) + +/* + * TSA_NO_TSA is used to annotate functions. Use only when you need to. + * + * void Foo(void) TSA_NO_TSA; + */ +#define TSA_NO_TSA TSA(no_thread_safety_analysis) + +/* + * TSA_ASSERT() is used to annotate functions: This function will assert t= hat + * the lock is held. When it returns, the caller of the function is assume= d to + * already hold the resource. + * + * More than one mutex may be specified, comma-separated. + */ +#define TSA_ASSERT(...) TSA(assert_capability(__VA_ARGS__)) +#define TSA_ASSERT_SHARED(...) TSA(assert_shared_capability(__VA_ARGS__)) + /* * Ugly CPP trick that is like "defined FOO", but also works in C * code. Useful to replace #ifdef with "if" statements; assumes diff --git a/include/qemu/thread.h b/include/qemu/thread.h index 7eba27a7049..6f800aad31a 100644 --- a/include/qemu/thread.h +++ b/include/qemu/thread.h @@ -3,7 +3,6 @@ =20 #include "qemu/processor.h" #include "qemu/atomic.h" -#include "qemu/clang-tsa.h" =20 typedef struct QemuCond QemuCond; typedef struct QemuSemaphore QemuSemaphore; diff --git a/block/create.c b/block/create.c index 72abafb4c12..6b23a216753 100644 --- a/block/create.c +++ b/block/create.c @@ -24,7 +24,6 @@ =20 #include "qemu/osdep.h" #include "block/block_int.h" -#include "qemu/clang-tsa.h" #include "qemu/job.h" #include "qemu/main-loop.h" #include "qapi/qapi-commands-block-core.h" diff --git a/tests/unit/test-bdrv-drain.c b/tests/unit/test-bdrv-drain.c index 98ad89b390c..7410e6f3528 100644 --- a/tests/unit/test-bdrv-drain.c +++ b/tests/unit/test-bdrv-drain.c @@ -28,7 +28,6 @@ #include "system/block-backend.h" #include "qapi/error.h" #include "qemu/main-loop.h" -#include "qemu/clang-tsa.h" #include "iothread.h" =20 static QemuEvent done_event; diff --git a/tests/unit/test-block-iothread.c b/tests/unit/test-block-iothr= ead.c index 7324ea4a68d..2b358eaaa82 100644 --- a/tests/unit/test-block-iothread.c +++ b/tests/unit/test-block-iothread.c @@ -29,7 +29,6 @@ #include "system/block-backend.h" #include "qapi/error.h" #include "qobject/qdict.h" -#include "qemu/clang-tsa.h" #include "qemu/main-loop.h" #include "iothread.h" =20 diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index 6fff4162ac6..b2e26e21205 100644 --- a/util/qemu-thread-posix.c +++ b/util/qemu-thread-posix.c @@ -17,7 +17,6 @@ #include "qemu-thread-common.h" #include "qemu/tsan.h" #include "qemu/bitmap.h" -#include "qemu/clang-tsa.h" =20 #ifdef CONFIG_PTHREAD_SET_NAME_NP #include --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276112; cv=none; d=zohomail.com; s=zohoarc; b=b4ki77vUyv5+2f2/wX7pLgaxOENklS577WLhSKcVC+01p71UtArq3yN9cDp0bwEGaCmYs5pPGab0DKu5rueHVSdvJg7NCBpprUa/svZ7AyfiR6HDDvQ1yk//OEk663zEFQ0unrjRNmYg0BIghj2U6GGsL6OYmILdHjROMyhOT34= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276112; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ps7cd0cxm4BakNCXqH/ls7rCDQIclvSwSBPha/6qx+g=; b=hj8RloJmnJM5xRQl21VJzksxtoHiE3J2cOeY7Fr2xKN937zaYQsY0lrznwNFgBrozE7igmM2woh9a9MQiQ6uAP8NkgYkHCxpa5+bg4TO7iibcc1auUHWDjCAcuRrhbDy/1fJps/KrSc2h8FhxgvwRLgsUkTiFQaFBv+HLbZBReA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276112153579.5851810810187; Thu, 6 Mar 2025 07:48:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDRx-0007E4-QV; Thu, 06 Mar 2025 10:47:54 -0500 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 1tqDRw-0007Cz-48 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:47:52 -0500 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 1tqDRt-0006D0-Vk for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:47:51 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-390d98ae34dso663145f8f.3 for ; Thu, 06 Mar 2025 07:47:49 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd42c55e6sm53006655e9.23.2025.03.06.07.47.47 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:47:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276068; x=1741880868; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ps7cd0cxm4BakNCXqH/ls7rCDQIclvSwSBPha/6qx+g=; b=MJR5X6KWHHqFSltW1MnEN6Xd7wOJb1xtwEv3yrZkY+4iSU3atvK1O7uY5wrplQ2bl3 gAjKHQlp06ZQhcek02Asn4Bjspi8Ac5CsOZqGQEuCxo10+kIq5Dzz/2QVS/9JP9CsbRp jRAH42BxkeT3LDKwvM/vicSYjgYCoVzSYHKJmLOqxl6hlfhGg/6oCGvbp34+csRrKTSq WBZ3S6B6nAyCE/hgMJdDSgO+LJOevbw6tiuT+1sI1vgmaVTyMfoXnKasqV4vY38cRI5G 60oB6cnKMMOCs7bwBe1EZ5qMh9vVTw82kH7NDUBMtKRp32UsbLhSW7tXZ8Yh3ve6kVhQ Ls3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276068; x=1741880868; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ps7cd0cxm4BakNCXqH/ls7rCDQIclvSwSBPha/6qx+g=; b=FKITAkjV3TXw7oNAjMZvyB/SPntdgiAtUjucalCIVCjHof44djfAsMGesN1+04PVih hH3lrsFw8KyqUqVZJaGobafK2xo8pn8NEfcHvSyGhsSAXqxftgnEtxF8ndJIup2FbdpK 1PPnJU1LsfBsD67P9znZXGtcem/wyYJOJs68j0bPTITAbf1BIWbj0z9uXpmAEraiwDF1 zCX115jyD5lcPvbtJ6I/cbbJSiJ1vF+MDsfKY3+ggluGY305ZG4iWwoiBWkktq4hrRdP ayWM798s3K1ELqYOCnQWinrizPaFdkww5l+zl3DFDencpaUw2XL9uloxdV0DMXxU0WT+ tpDA== X-Gm-Message-State: AOJu0Yza0ulm8arnjGxP1x545coJ9Rj8C/hvF7Jnwil35VnyeokFhd0m jaG6kFoV4RWYI9n/PsCYgYYRvxfHxZm2/KhiDUDhabUWyXwvxzQ2XPbl88Hj3DNLJFcvyVy1/p8 HtCE= X-Gm-Gg: ASbGncvZ+rg7B80tPrJpmOO80D4TK4LHSiyeDDC9mWSXthTiSki08lodn1tBVmqS+KE wG/TzckAkfLmsAKxnjw3wVE6dfVqfRvnCK+JPE3bB2RNeJ4ixc4+TA/5MP2JQQjr+Wzoy2j3sJ5 c90EDLHtjCja7TNnG8Si3j5hq/kI/mMJr5NJhnHrUYVNyPxJ9jph3DpPRm96oxTaVNYeaXnyJMG sprOFzxPwkgNuGc1CWr7BIMXjWDGgxdGfNBkFoxJoJEQ9W78Xh9bTna9xVoRcPBH+ECEsjhi3Ga oPoOTNDNYOGwTAQmkOs6NQZZpXQ8xWgz5ZvXldSWmT6531C6yL+beXTOXS41OMo6B0yDbMNDFdo AbCKiNpgZ6TYWJ7rq6fU= X-Google-Smtp-Source: AGHT+IEbtpagiNqwY2dxBTpQiSYGjQmA8ttIT1BJ9tpsIb64z7hkClevq/hj9tW/wURNNY69MesUxA== X-Received: by 2002:a05:6000:4185:b0:390:e8ef:5e74 with SMTP id ffacd0b85a97d-3911f74139emr5094381f8f.15.1741276068066; Thu, 06 Mar 2025 07:47:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 02/54] gdbstub: Clarify no more than @gdb_num_core_regs can be accessed Date: Thu, 6 Mar 2025 16:46:44 +0100 Message-ID: <20250306154737.70886-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276114317019000 Both CPUClass::gdb_read_register() and CPUClass::gdb_write_register() handlers are called from common gdbstub code, and won't be called with register index over CPUClass::gdb_num_core_regs: int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg) { CPUClass *cc =3D CPU_GET_CLASS(cpu); if (reg < cc->gdb_num_core_regs) { return cc->gdb_read_register(cpu, buf, reg); } ... } static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg) { CPUClass *cc =3D CPU_GET_CLASS(cpu); if (reg < cc->gdb_num_core_regs) { return cc->gdb_write_register(cpu, mem_buf, reg); } ... } Clarify that in CPUClass docstring, and remove unreachable code on the microblaze and openrisc implementations. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Message-Id: <20250122093028.52416-3-philmd@linaro.org> --- include/hw/core/cpu.h | 2 ++ target/microblaze/gdbstub.c | 5 ----- target/openrisc/gdbstub.c | 5 ----- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index fb397cdfc53..7b6b22c431b 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -124,7 +124,9 @@ struct SysemuCPUOps; * @get_pc: Callback for getting the Program Counter register. * As above, with the semantics of the target architecture. * @gdb_read_register: Callback for letting GDB read a register. + * No more than @gdb_num_core_regs registers can be re= ad. * @gdb_write_register: Callback for letting GDB write a register. + * No more than @gdb_num_core_regs registers can be wr= itten. * @gdb_adjust_breakpoint: Callback for adjusting the address of a * breakpoint. Used by AVR to handle a gdb mis-feature with * its Harvard architecture split code and data. diff --git a/target/microblaze/gdbstub.c b/target/microblaze/gdbstub.c index 09d74e164d0..d493681d38d 100644 --- a/target/microblaze/gdbstub.c +++ b/target/microblaze/gdbstub.c @@ -110,14 +110,9 @@ int mb_cpu_gdb_read_stack_protect(CPUState *cs, GByteA= rray *mem_buf, int n) =20 int mb_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { - CPUClass *cc =3D CPU_GET_CLASS(cs); CPUMBState *env =3D cpu_env(cs); uint32_t tmp; =20 - if (n > cc->gdb_num_core_regs) { - return 0; - } - tmp =3D ldl_p(mem_buf); =20 switch (n) { diff --git a/target/openrisc/gdbstub.c b/target/openrisc/gdbstub.c index c2a77d5d4d5..45bba80d878 100644 --- a/target/openrisc/gdbstub.c +++ b/target/openrisc/gdbstub.c @@ -47,14 +47,9 @@ int openrisc_cpu_gdb_read_register(CPUState *cs, GByteAr= ray *mem_buf, int n) =20 int openrisc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { - CPUClass *cc =3D CPU_GET_CLASS(cs); CPUOpenRISCState *env =3D cpu_env(cs); uint32_t tmp; =20 - if (n > cc->gdb_num_core_regs) { - return 0; - } - tmp =3D ldl_p(mem_buf); =20 if (n < 32) { --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276092; cv=none; d=zohomail.com; s=zohoarc; b=UxFFOWgJn4Z7XrwR4DiXpwvU65K4Mn1/j7K8sqc2yJ6MoeYntaMaC0dtC4CyWMTcSCLWJHsXhiR5PbS2yQ30wih2RsFgU4oy8schbknRP7vdYiEWCwnGpnP6zk0h/2Imxpj6Y9OFvE/6qV89vXC58KJrKe6AC872HZIT1AykK0s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276092; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=keumHK/xGB74dShNqulk/5Z/c6mVK2UvLucS0OMjfzY=; b=PH1l6n5VELZ3q/MWo5AG9mOaw3xJwhRBh161u7cgWz4zBGqQSlTJUX8dJZC8+Jr8t8b3EkNNr8C5HmEm24W5Y19bbIKBIpl+MISUn8QSNvx1BMa6M8HuINdVPHwtcJqsXHEVvvQOS97/Jeg22gbIwg+Y+qw/55O2xa8QIzaBiFs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276092687922.1802094519256; Thu, 6 Mar 2025 07:48:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDS1-0007FO-8n; Thu, 06 Mar 2025 10:47:57 -0500 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 1tqDRz-0007Ey-SO for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:47:55 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDRy-0006DM-Al for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:47:55 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-39127512371so627363f8f.0 for ; Thu, 06 Mar 2025 07:47:53 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfba66esm2442214f8f.18.2025.03.06.07.47.51 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:47:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276072; x=1741880872; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=keumHK/xGB74dShNqulk/5Z/c6mVK2UvLucS0OMjfzY=; b=mfOo+0B7IsEnV/LTFZcIjpsGj4Wqjv5JOZq+Wly0pYw22/Qsbs1N1AAoZrKCXUwWTS 62ci6XX+7WqBXgWJvRt67S9x+7FytA9ByR9cVXi9vkwSOT3a25lHVIHjCKdSyfQNFfgy laotQEt/PORnArEl//TCWD3QsXKZ18xy67ecTIzlFtogXZ4VZSDkSVP/y+vKUbvZxnnA 4khjtq6L2glER2+YzC6Z5o6Nu8VL0XYDF93CkcUNItcSASM8EGUKQ5RIiylsVFwT2QUZ dckQJin+rSQ74H6IEgpld2GMknSNnvn4c/1DeaSarG+2PP9diCWfsW4UfWNlAw5LzbBF a5/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276072; x=1741880872; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=keumHK/xGB74dShNqulk/5Z/c6mVK2UvLucS0OMjfzY=; b=egORtYPpY9/VtdTN89g7mons0oSbYfLyCQfTZbznEfDdOU3CmvRPbAsjK4xTeCjLee AI5lsw3pK3cLHwiKNlYC4O1V5LaW9j5U7XC4d4wzvOT0AWbmAwnPezI/wYt9uuj6tB22 UrIYirJmQmQqM7NUJd3VcjLRrlAbgZ2STS032nVWNHXy/TICYXIqv35+Tg/83w1lV2mj ULcN9VzCyYpoSdk1Kn2axYmv69pszZeCxfDVhuOfuKLcsEd+BN8pFqDRH+KcXTFlHWjK 4Sw1BqYhW80tTq85FYJY0D4xuDA+iTSjDW6Ys+oxGHL3h1SX3XvFGhQhRB9eo0XYMpzF r0Vg== X-Gm-Message-State: AOJu0YwL/TnjQMHckunH++n1Ndzl7eJB9e575bF9jGGO7/UE7pCtBYxx d1/DcCzm4bdZ6UiJHxOcZHpho0zF7WayNzHLGmwpBTZjXBD15OzayzbTBaIdvWKLyUDALiejjGg MiOw= X-Gm-Gg: ASbGncuJegh/KTKrSORV6O2zwpMyJUar3h4gw7tdnJHWtAGZC7MOtl+OYnO+JtgGCSv KjW+9qSUlqcLQjoKpF0F6MkVIq9fMkoWv11yx1Me8pH1s9+uulcVqyOnPsHYeP2dn7SZ+3gptmV 6upVQp+kuowrtwQ/obxqE6dA+EYSV7W5XymM/HWwryO5UXlA9muYEiny2FM68oGKILVjZH6MUOi A5OpbblQfLG+xabBB4cs6CD311Wm+l1aupeGO3/VDxQbKbAcco95FGv5oH6ysu1dzba139wvc4C dki4PBTZ1aBYG4U0500/Ztt+19owF7mqDKSUjBqEkwmNksIkA/DrDYHbeSO4Lc14KX9YAqbpwHg JWNrw1Mpb1P54+dAxneQ= X-Google-Smtp-Source: AGHT+IHIPwAgUmDOJbT8oesttxWDkLwRMDZI6dbZvHgFzA9Fs1H9+ME+8UsLVwBKo6h0CBxYMDRbwQ== X-Received: by 2002:a05:6000:1864:b0:391:22a9:4408 with SMTP id ffacd0b85a97d-39122a9453cmr7996914f8f.16.1741276072503; Thu, 06 Mar 2025 07:47:52 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 03/54] gdbstub: Check for TCG before calling tb_flush() Date: Thu, 6 Mar 2025 16:46:45 +0100 Message-ID: <20250306154737.70886-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276094156019000 Use the tcg_enabled() check so the compiler can elide the call when TCG isn't available, allowing to remove the tb_flush() stub. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-4-philmd@linaro.org> --- accel/stubs/tcg-stub.c | 4 ---- gdbstub/system.c | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index 7f4208fddf2..b2b9881bdfb 100644 --- a/accel/stubs/tcg-stub.c +++ b/accel/stubs/tcg-stub.c @@ -14,10 +14,6 @@ #include "exec/tb-flush.h" #include "exec/exec-all.h" =20 -void tb_flush(CPUState *cpu) -{ -} - G_NORETURN void cpu_loop_exit(CPUState *cpu) { g_assert_not_reached(); diff --git a/gdbstub/system.c b/gdbstub/system.c index 8ce79fa88cf..7f047a285c8 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -22,6 +22,7 @@ #include "system/cpus.h" #include "system/runstate.h" #include "system/replay.h" +#include "system/tcg.h" #include "hw/core/cpu.h" #include "hw/cpu/cluster.h" #include "hw/boards.h" @@ -171,7 +172,9 @@ static void gdb_vm_state_change(void *opaque, bool runn= ing, RunState state) } else { trace_gdbstub_hit_break(); } - tb_flush(cpu); + if (tcg_enabled()) { + tb_flush(cpu); + } ret =3D GDB_SIGNAL_TRAP; break; case RUN_STATE_PAUSED: --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276137; cv=none; d=zohomail.com; s=zohoarc; b=KP2sQeGSJ2slyQdC8u68LJreGJt76ZmairX4RuA+paj/qiCh8EYaDM9CfW1ZJtZ0WTRp+L13OKlX6DUs4xaO9+VsDgi8AYtALp9yfMPXjnjbTuPLiUFa1ZHwqXiH+Hx4FFvK+H0/LBDwnkyMN4evMmpZQmmUxpPejWFh0gQ9UXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276137; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ibKdWczve1piqobnZ/7eakxu3MNnTBDuUSaIAp0/9Gg=; b=mfCVWMXT/ByH4RumUu9rZZ8TiAMzE5Zo7vrZpwQZTZeGHoz2cy1ZhdfaxWmF4Q83B8h4eP52kcBS1ifMG4bvwh3pHuHmBpJFj8DxrMvfajV4QbKzgAbtzEzmr8+owvnzjzH9UnpoWqTUCJSmT1zCo18fbuIQcgUxBCib6XmIaBo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276137545727.7567728341169; Thu, 6 Mar 2025 07:48:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDS6-0007GQ-5s; Thu, 06 Mar 2025 10:48:02 -0500 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 1tqDS4-0007G2-Fl for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:00 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDS3-0006Dh-1W for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:00 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43bc63876f1so7438835e9.3 for ; Thu, 06 Mar 2025 07:47:58 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd4291cb9sm53396655e9.13.2025.03.06.07.47.56 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276077; x=1741880877; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ibKdWczve1piqobnZ/7eakxu3MNnTBDuUSaIAp0/9Gg=; b=M34fM6l8WWVLS4+V+Nx0CfYrLXOxgcNvGp99Rbhw/OREoxuRp0JjKSUcjbRE4J50eT WdZ4iDlpypn/OdJkd0p+xKRxXj+tHalT7c2Yv0wMdqYEnSQ1nYSdRTTc59/Ohu938F3+ ceEmxQxBGOfd+27RpNdLpcFeZ5C6lEwDfde3vu0bHbuX8GuRZqL9VDZW6uJA82I8TUi+ X2YBYAYuA6yXpUdeSbHhokeFwU+2Rj/cPkoqKPZrpxPB55TOTLdnpwr2naQBWe8Oqs+y lDP0QVinZ+jrTqAgdBB4seNsWDio4ZNc+szYJH1mT+GHN1wae+QmWydAHZosMN+uRKYo 6xdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276077; x=1741880877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ibKdWczve1piqobnZ/7eakxu3MNnTBDuUSaIAp0/9Gg=; b=ZbGuZ/4PXOd4xqkw4AHC/f1mwgsTlV8/TrJ1B8ID9rq7lV4Cj2ZmymUkdNm0ABYZHN sNAduwmekiB52Np7ZtbiwX/6n0Qtg4Zz6nXniDL7esjboFAZILynqwXoh4VP484yTgiT gerkY39jEMTOmsBAVLZGs05Bz9eUPtpA0EVgAKrgUJZnRebsrZs3BpPbDJHJ0I6AWbkq FhNlRcuHQ20ptMr5kM7lQ6T/mAoET3JWiQfGzrPoUZKdohTRhun8Fo/5Q0ILWKu6SUxP MFXewA4uNC3dFBWaPQYl90WLv5mwdHexTd3h0DpV1ezdCrnw+bNfjYcYroryVi56vhhe ediw== X-Gm-Message-State: AOJu0Yxv1K1tA0bjxKPkRAQ2tKvhqZsNAumDhMS3FYzPQOcMzeJAHPAJ Xag8bIipXaO9+FLCXXI4bjzD5sXRs4ggZ8Xbty3FlhTOCIhoPXiqpQMK6c8SHKiz+TK/13gdyF/ +SPg= X-Gm-Gg: ASbGncsdpOvRaQkLsvHiwJ3qFVOaEIT0nX2L+M7kKLQceiJWE7mKiTjBYtpYfrrf99A DbcE8qfkTh2u0mTaZ8jGVicZj9rO0sBk9K/X5i5mYoHJLPkkQS5p1vd6R+vOxmfBMr6eO9jHK9c 3u6I563y7G0FCopP/01hztFBRu2qqc2GHiXVLEF28QEu+R1RgdSW1P1RizajLG/q2v2j2MFwewN jb1BbLZj03P4zTfnsOmW/FWnHVpBmmo2C5kjhkX5gFlYBayIWRSYBrsYrDnkBzZNA9X+5Q/6CA9 NML4UZ9s/aaqaRkN198qOvWgfSoeQOlPuEVwv1pAagkM6mXhulkYe4HacGo4k/126/ve4l3pPxi o1sCqJBe+yGs6pGY0pBs= X-Google-Smtp-Source: AGHT+IG153zJml+tWit6jd08Ss8mxkrue3nnpfcCV9mVPUxEoTPGu6m02eVvi9xQIn/MvjHKxlOArQ== X-Received: by 2002:a05:600c:310f:b0:439:985b:17d6 with SMTP id 5b1f17b1804b1-43bd2adb414mr61160735e9.27.1741276076849; Thu, 06 Mar 2025 07:47:56 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 04/54] cpus: Cache CPUClass early in instance_init() handler Date: Thu, 6 Mar 2025 16:46:46 +0100 Message-ID: <20250306154737.70886-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276140223019100 Cache CPUClass as early as possible, when the instance is initialized. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-5-philmd@linaro.org> --- cpu-target.c | 3 --- hw/core/cpu-common.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 667688332c9..89874496a41 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -134,9 +134,6 @@ const VMStateDescription vmstate_cpu_common =3D { =20 bool cpu_exec_realizefn(CPUState *cpu, Error **errp) { - /* cache the cpu class for the hotpath */ - cpu->cc =3D CPU_GET_CLASS(cpu); - if (!accel_cpu_common_realize(cpu, errp)) { return false; } diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index cb79566cc51..ff605059c15 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -238,6 +238,9 @@ static void cpu_common_initfn(Object *obj) { CPUState *cpu =3D CPU(obj); =20 + /* cache the cpu class for the hotpath */ + cpu->cc =3D CPU_GET_CLASS(cpu); + gdb_init_cpu(cpu); cpu->cpu_index =3D UNASSIGNED_CPU_INDEX; cpu->cluster_index =3D UNASSIGNED_CLUSTER_INDEX; --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276116; cv=none; d=zohomail.com; s=zohoarc; b=Rfsb1WopLjHT+qSP8OQvVAJB03/2HB6zsrGx+KU+xjjufC8Jsh7x/qPnyZF0PbksMazwLLfT0QRJMYkpZObnTU751AIeuVERWcr03PWGUufjuwAD5ZCL2sh5B4WyuQeD97gaDAbFvVz6x4gW3vISQjaURXO95gruKKsJnXib7W4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276116; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=xl77zu7UFkgjzNSNZL8yu/Xtui1L+RH1bzoJQrDO/y0=; b=Ohqvth9cdQWDf738rIpEsWrCQ6WK42zPO/Thv+F1SSQypA2QB91aJHcJhLG2SHvsPJn18vNz8yPWP9gnQbveyNAS0y2Bq9B67RtoY7IwNYfMjt3O9062aCi12D72mtK7gFlucdRMPK5KDcNZETTcJPdhOnG1zPcjxUZ9ApxVc2s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276116441159.04900858632936; Thu, 6 Mar 2025 07:48:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDSB-0007Vz-36; Thu, 06 Mar 2025 10:48:07 -0500 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 1tqDS8-0007R1-LN for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:04 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDS7-0006E5-3E for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:04 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-390e702d481so459968f8f.1 for ; Thu, 06 Mar 2025 07:48:02 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfba87csm2457133f8f.17.2025.03.06.07.48.00 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276081; x=1741880881; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xl77zu7UFkgjzNSNZL8yu/Xtui1L+RH1bzoJQrDO/y0=; b=UtpyE2533mn/PfGYekwnwwQGmecxETh8Crsryjh6dC4MX6JIh02bdHKqP2y9BYUYbU F04cmFXpcDF5MuQwV+AWWV8HGsoQsUjkpX17IPZAdF7uUDvu92v82BbukGKWlAZEWiog PIYID9IW94DeGQC3Gt/zWH3UUbKYSC855r0u4jgliqYS/4KDFcI8+UH54RkQIT56Qn0d 4XHRhTxMO9pHReZ1ScfUtMJqKzfCQAf9KNoMg8QM67l2PATVWswxYLWfQyuywTWSIWzK hX/lzevaYexMm/B8J1O2MH3xisSyx4omfeNKTfnpYSNorm4PGoasteKCD4K1hZHscPoA XV2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276081; x=1741880881; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xl77zu7UFkgjzNSNZL8yu/Xtui1L+RH1bzoJQrDO/y0=; b=BshPQai7/A4sfEAIGU70+z4Zuk026v3T5pyXdSQTNVA/GfdULMKAgel5u01M+0vG2X xGaHaLGSIghRyZdHzw9+ml+Sjd2mLwETz0FQdZkUsWHWnUBS7Mi7F8m7OEmhaFvvVgZF 9NPg4xYy1sbNjtMZnUrQKlQf+ZI2J+tTQn/b2smYCQ4kFYlSdbksYVzT3kRqDokgTY48 YwVcwIrcOJ8syhywHH+9aHHW+kVFL/IPGi7YpECwvIJvJSNllysyn6yfseXKlscdEg9u xKMkOQqNFaqzCDGv2uC8NSAAC8MewEE78n93idDcdHvmfXeMAqtvaiOf3LBNlhgDJZSV BlUw== X-Gm-Message-State: AOJu0YzFoiZ5ZVTB1+z4aOCY6jQl1DZCk/O4g4sUebS5opgfAFwPWqmX JwMnEu1K9G6+lZGqka06G20w3dm8wJA00C0F7VmbW/fJB2zy8eRi8viTGx3LCzqRAKyruvihkA8 sVXk= X-Gm-Gg: ASbGnctN50t3WxZncuvWpnwrDfevk/Oj2OHCgWSb0JoBCuNLprUyUrOBkV3bSGS9R3I sd/IoodTEJfBYQ7fgFihGwc+K10DBTqH3olS28/ZvBcAYqZkVdMaVSvhdJ5/Avzmgxw7ebnVRiT vkuPBnGfNLb0UTU3MerzQ0QCruz9CMfrEWNN7s+zxbzLQfEzmqyWFJSP4hbRF5sEjn3qwxWJaW0 kilC8rBXWUOiDIuH1s4u5BQexG5tWdtt6qgcvU+2+o8+Z/aktHi4VbvrxmhdoCpt7cUFnCaFnkr 0fVluncmjoYCDnpzPwd1Z/DBjUN5bnMWea0cfCJ6mK4dYk55M2qNN5+05ItQIWNrSm06VHIg0No 1jaj8VW6IdhMvQrydK7c= X-Google-Smtp-Source: AGHT+IFZdhFGEEfpxgU6yfQe65HH/1OZzribGyvZ0bV8cFsA+jLA+vTa7yh4v9409Nrwt4SAsBu0Kg== X-Received: by 2002:a05:6000:1544:b0:390:e655:f998 with SMTP id ffacd0b85a97d-3911f756971mr6168915f8f.26.1741276081202; Thu, 06 Mar 2025 07:48:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 05/54] cpus: Keep default fields initialization in cpu_common_initfn() Date: Thu, 6 Mar 2025 16:46:47 +0100 Message-ID: <20250306154737.70886-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276118184019000 cpu_common_initfn() is our target agnostic initializer, while cpu_exec_initfn() is the target specific one. The %as and %num_ases fields are not target specific, so initialize them in the common helper. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-6-philmd@linaro.org> --- cpu-target.c | 3 --- hw/core/cpu-common.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 89874496a41..75501a909df 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -234,9 +234,6 @@ void cpu_class_init_props(DeviceClass *dc) =20 void cpu_exec_initfn(CPUState *cpu) { - cpu->as =3D NULL; - cpu->num_ases =3D 0; - #ifndef CONFIG_USER_ONLY cpu->memory =3D get_system_memory(); object_ref(OBJECT(cpu->memory)); diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index ff605059c15..71425cb7422 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -244,6 +244,8 @@ static void cpu_common_initfn(Object *obj) gdb_init_cpu(cpu); cpu->cpu_index =3D UNASSIGNED_CPU_INDEX; cpu->cluster_index =3D UNASSIGNED_CLUSTER_INDEX; + cpu->as =3D NULL; + cpu->num_ases =3D 0; /* user-mode doesn't have configurable SMP topology */ /* the default value is changed by qemu_init_vcpu() for system-mode */ cpu->nr_threads =3D 1; --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276188; cv=none; d=zohomail.com; s=zohoarc; b=Vb3PXpV/YpRCc8cdZ3nVz+iefBCdCKrlSLWrxIzoIeYUmMBoDJeyTUIOSQ1q6xSg0dHBHZ2b7fphQSwqy9jXPXiDGPfuiu3yzdX3KWdfBfI4slQ4ncantkIIBCxr6L1XC7AwuKWWQKHlE9vUDYBgRcUk5P+pYPeV2Azdq0Vrn1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276188; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=jYtwJvU4r0akXgP5T1pK8wv7rwtoSTLrcOo1FyW8tGY=; b=HyZ7KfWr6IkgwaJxKnbtsjohbPYsWwXjevexy5Bi1Oq1hGCniw/WMi7A17DPC5oDaTzQT3fgae1gM1QKTntJvaGHcFl+1fQpnJoIYi70D9AYxNYX7c9G+yEoHZnSPSCYsKyoarcCgEoK4UyO7ZnxYMDBg3nY9M+WnALqBsq+3Ic= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276188080164.53045753236233; Thu, 6 Mar 2025 07:49:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDSE-0007YO-V4; Thu, 06 Mar 2025 10:48:10 -0500 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 1tqDSD-0007Xi-5U for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:09 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSB-0006Ea-GC for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:08 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-438a39e659cso4915895e9.2 for ; Thu, 06 Mar 2025 07:48:07 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd4352fa3sm53125305e9.30.2025.03.06.07.48.04 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276085; x=1741880885; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jYtwJvU4r0akXgP5T1pK8wv7rwtoSTLrcOo1FyW8tGY=; b=AjKpw0Qb35Els9tF9TPq8qskjEiIdtBrJKEQPjFzdWYRPCVQHt8IfWLLwnfB1cIHm3 ukdskb41TdpKL/bCQoQwTnfVemRLLDJYfCB0SQihg6SgmxU/AZCI4GPRs7hx7OcpjcKC 8T0gUB5T+qjDY7x1mZ56nll7SKndMerZlnr+yqTRtZOIDcUEX/Aw1Zdiao8je/WM/FCI 4lzKuEimOiWKGgY3m+WA6lB2+y3UNCdqPzKvbw9DTklaN5LjCMeZR/zGQQmU2YKnciKz pAInINe54IYetDGNEnc2osSbklLkzD2idFuUA/Eq6zOMtekHUyANGAs2oc28rV2ROYr7 X74Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276085; x=1741880885; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jYtwJvU4r0akXgP5T1pK8wv7rwtoSTLrcOo1FyW8tGY=; b=XRR98az6h73bD576mP9YGOjLWSpRP2WBXhA8vKM/rMkcxB0dCfgZEKjiPxKwtlkmBx +lEf+q67Npl0W8sVqJItDZ3D4JxK3ZmtjIzzDrTtkiPR139201oW8/v5Gip6QB+RhS4p AL1kTvPdTi0swgGbZsRqPnmlcQ2RjR//MzvCG3oIFscMjMsB1SEvDxtYAzWe0ndNwrGz ujXLIObDUc2DCppIdpFn3/FhMPh0uDIJGO142PcNQnicXItMzJfc/eHZ6XpVmFBrjWxl kjNsz8DUlUoLYc8jeLpEkZsJ+ojPseV3Yd3CbvPVKIKgJrC0GQ6x0YyIfO3Q72VeQF// Tojw== X-Gm-Message-State: AOJu0YyU2VzqaJl6ohviN20trhIstHDe1OTtVv2Vz1Vnbrc+OIiUD1km F08Feh+v9HT7ItAEzQOi96HyD6K6LSLtPOYpeKEiTdq24cAKa6sz9hksicfmiNJY6opHgclyPKc R4ys= X-Gm-Gg: ASbGncsnnsdrTw7PGERw0dZE8BN8hygClL+FmcZOQKRDIslarhe9qBIuGyEQ87A/W4A BCgBsDNYgRpPVLy6JmZBwBNWNoCHDjN8UCQ/8ffX/VQeXOMJsKq9o/wqljP5WJPNqhZB8YAdl2h OF18YRvJObUw3kzFTeXhguY+z9KR07gby2UBMTfUioPmOGT8izGpu3kDrwiGP0m86Rz/cE3nnkf LDxfbW3q4NmRoKro1bKos9RiNlDzxp2W+uWnFnZScvwZJv8rl67S/0Nk0bv1flDD2MXIROajJze sAQ/xs3OUOwgOHZtIxLMkft749BMFqnyjeh9e3DBsLfL6Op4UCmt1qM8IrJVmtjO5IxaG6Si2jy Rzgn6MKtqH9zb7Pi2whY= X-Google-Smtp-Source: AGHT+IEPfyxEDDZ6xKqz3aqxPSDwzkRuS+U+CuBxfsJpIpXa/vXfnfZO/KTHloQQxsScX+WegP5Czw== X-Received: by 2002:a05:600c:548a:b0:439:8e95:795b with SMTP id 5b1f17b1804b1-43bd29d8dbemr64346385e9.31.1741276085541; Thu, 06 Mar 2025 07:48:05 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 06/54] accel/accel: Make TYPE_ACCEL abstract Date: Thu, 6 Mar 2025 16:46:48 +0100 Message-ID: <20250306154737.70886-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276190974019100 From: Philippe Mathieu-Daud=C3=A9 There is no generic acceleration, we have to use specific implementations. Make the base class abstract. Fixes: b14a0b7469fa ("accel: Use QOM classes for accel types") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cornelia Huck Message-Id: <20200129212345.20547-3-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- accel/accel-target.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/accel-target.c b/accel/accel-target.c index 08626c00c2d..3236d6335b1 100644 --- a/accel/accel-target.c +++ b/accel/accel-target.c @@ -38,6 +38,7 @@ static const TypeInfo accel_type =3D { .parent =3D TYPE_OBJECT, .class_size =3D sizeof(AccelClass), .instance_size =3D sizeof(AccelState), + .abstract =3D true, }; =20 /* Lookup AccelClass from opt_name. Returns NULL if not found */ --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276241; cv=none; d=zohomail.com; s=zohoarc; b=RRvhCJoq5d2D2nPPBuHHPn3OZF46G6Yr93QUdhOdyQBcJE2Hx9CUBOxiqwfKe4NSfzeb4rbYqiKBL4RXnUzDrrVtt1OkvEVgeQ7LCvI0ht9iePreKdBV0uVdg+ej04807W7nebU/gTnnXVFHDOQpZ4LX/tH2lxzOPx00NCOFdWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276241; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=nZgvu424mm38yBUBld8avtZKLtMG0rtQm4gPKkeUkoo=; b=Aq3le36aNkXBuQauImAeMFgw9r3pzcAfeOMqYZygGTAwXyeVgpM97hCUGrQFb6k4//C8he7hQmh0cYVDgzIifbzLYWviwDyCyo3cjkTXvh3zvrhkIgErOGsTktDfZ7cZm6XjIYUeaY8F14S5ZKm8ykHXh0V/9niZAu5S3LPXi2U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276241549980.1029412278314; Thu, 6 Mar 2025 07:50:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDSJ-0007cm-CN; Thu, 06 Mar 2025 10:48:15 -0500 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 1tqDSH-0007ap-22 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:13 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSF-0006FL-JS for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:12 -0500 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-390e88caa4dso500673f8f.1 for ; Thu, 06 Mar 2025 07:48:11 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfba66esm2442919f8f.18.2025.03.06.07.48.09 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276090; x=1741880890; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=nZgvu424mm38yBUBld8avtZKLtMG0rtQm4gPKkeUkoo=; b=GyyIQ6zhFxC8AkFnNYeBbskaCMSdrQZ9shnuI8Zwd09rsvloGX/6+Mu30y/tHJnOwl eRb6dwdmW5qhsykX76bLsy+szlzGdljDPgnSzDtFn5QKEAvvM3Hp56KcxLoGSkNY4Hnd tRy3egHeTNyWYAZcmkPAR15HQ5yQWeK436F6hwNf3/HLalXCOyfp73IP8tkRQ1p7dN3Z 3pzS3tcYAs+9FEfZXXr+l+4ssyT0puF9inzh7LmEfF5z+kxCBIG64Yucu7AeTZQSmpYS N6sv7mbl8XM4tp2JrhVwQzuY/jJwqH/RDPVq+sqYd0bRsLrjdhtis+ReEdFphaCJakFU 3k2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276090; x=1741880890; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nZgvu424mm38yBUBld8avtZKLtMG0rtQm4gPKkeUkoo=; b=OmJq8IVjgSs24bpC+ggfI62qxt54Q/5V83ytIaRl4FYgi/HJNjQ29bdbvwe5CnM8Xm IBE2St5eElBE0PGHLw1BMtLB8g8CPuyjoZlVezUSxJ4/hlywScA5NUETUeXQfHiBaAwk hrdOq7V25NUnBc1wY7bFwNbMoq1f9E2Q2PcLAATlLqTGB7urUAMa/MjDRWSaUg2ZTo5/ W3NJB7s60lJEJvjfy1KUYuBop1qrwarZ8Ue+69+HeqtuywtZ6IEIOKlEU04/0DjrDSGz rs/Orcd3oCe9u70SztfHFQC5VVCfAokr0gX6pLbY459MxpTVAV/VxjY2fyTc9ookR66x fCvw== X-Gm-Message-State: AOJu0Yw012Ft0vKak0DRFbT6z+1/qXy98wTMM1tM2dFc16uv77gquuWw 83DKM5u2iCPFPshZMY8UVVFy0quJzTyhPWYPMLQsbth2RwpEjeABc8254+mXUESm+QqEPce7rwa jHIQ= X-Gm-Gg: ASbGncs+SdHZ7j4BesW7+qrKJpAo5yz/efRT/9WMH+3oUlx926NsrIgoeeh3Jyjs8Zc s1r75x6SeCU7sXPmGlaHG1/hK9m4FvSBYiidaLtZYI9CCcJl47X6qNxATP7OooAC9EhiaDOHZkZ z3biuXm/89zVg///9dp2Owfn5ElAo+/ApnFbFDzTgbNODU2z+KPMgEMAFMQhZkk1WneYA9yc9iV t7tXTI02Xpwt1LB6HUirLxFt1pBOlGPdxaa6ZAo2c8a3linnLh6oeJI50SMM02cX3brwbNI+mzN sdGK35lWII5JwJbpoONHeoTeukLXQTz3556jr6VE+yuL1pG1ogUAQMad4qEPOqOO2agO1H7b3Xt i82/6GxqIe8VHC6a1pxY= X-Google-Smtp-Source: AGHT+IGCFrD1Hyn++CnlZauzLkf8AL9dXp3VP5oMErW2YvOsaOJ8g5pBGngFmX5XxH++nYtMxqnCaQ== X-Received: by 2002:a5d:6489:0:b0:38d:d701:419c with SMTP id ffacd0b85a97d-3911f7b8adbmr6397848f8f.41.1741276089942; Thu, 06 Mar 2025 07:48:09 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 07/54] accel/tcg: Remove pointless initialization of cflags_next_tb Date: Thu, 6 Mar 2025 16:46:49 +0100 Message-ID: <20250306154737.70886-8-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276242611019100 cflags_next_tb is always re-initialized in the CPU Reset() handler in cpu_common_reset_hold(), no need to initialize it in cpu_common_initfn(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20240427155714.53669-13-philmd@linaro.org> --- hw/core/cpu-common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 71425cb7422..d5cd227fe6d 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -249,7 +249,6 @@ static void cpu_common_initfn(Object *obj) /* user-mode doesn't have configurable SMP topology */ /* the default value is changed by qemu_init_vcpu() for system-mode */ cpu->nr_threads =3D 1; - cpu->cflags_next_tb =3D -1; =20 /* allocate storage for thread info, initialise condition variables */ cpu->thread =3D g_new0(QemuThread, 1); --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276177; cv=none; d=zohomail.com; s=zohoarc; b=eeyaGxW93ISgMWUnGIVXEBJLffkWFKIlLdTrpz4hTFFOF3Tve4dvnZ13V3sKWGMfIEltKsLmAzDlRWm967+VkZEO3OhanrHKKYiGEcfduTMYC49qzlW2/3rEGB55BrQhnxk58n2MOwEdxot6yndTr2HQ4cyZ+E/eXbw6fSLkHLg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276177; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=M9A95hGDz5OZUoNsympsnyo0yFXJkzG7hpn3X+K4ObM=; b=ScnrPgKwrAWhQvjv7emle5YSGzlp5dbamspsh9HKem4Vnw1YTW6+TyX6j+HUA6fGt1rSK5lvodrRCao6LgijOqgZjDESMojeCK7/egvNt3ga1Ol7382jz9aKO2a6BkYm86P7Mm7a5UxSnbSYuJxZH3k4wUFv74cKTxvS52QU6OA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276177159507.0312662661577; Thu, 6 Mar 2025 07:49:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDSX-0007lV-6S; Thu, 06 Mar 2025 10:48:29 -0500 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 1tqDSO-0007jq-2Z for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:20 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSK-0006Fk-56 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:18 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-43bdc607c16so6556855e9.1 for ; Thu, 06 Mar 2025 07:48:15 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd42c5b33sm55877805e9.22.2025.03.06.07.48.13 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276094; x=1741880894; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=M9A95hGDz5OZUoNsympsnyo0yFXJkzG7hpn3X+K4ObM=; b=dAbFVFq7kq8b49w8+fUpHWcCb9U8aFnyNRJUH2vKa5Fc5TXF0DWTioMOm9YZkQiZg8 2Nqsuul9x1DJ4myHjgvt+HPv86wjXAVYcx43hg4eX+1aVEL3JN96gwtKogqAZNOkpJJW tY/x9vwRETkV98V1PhghPkLjR0t8YEsiMoZAh4H80u5iRXvFC8nyQgEI8NWQzVekWCbi 6QvT7OTQfHMZrpTXGVIIqiYRS2Q3ofSD7o3Gh+CI+GnezuyTtcp9jEeh56hnun3VxWJc jyxU3bO9JeRuaKlit+ZLB8OdTpNNqWSFUZD9LabMhJ7fHS3OjqvyuGFASCdYmrdTXaJu OKAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276094; x=1741880894; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M9A95hGDz5OZUoNsympsnyo0yFXJkzG7hpn3X+K4ObM=; b=gzABuwbg3zhnb1NQ8YoM+SQNTyIy/5znFVR+VxCeKjMNDUMx9NxzP9zZHLCjRIInSn 0UFLBUVe73umomVPBWy98bZ5w/yl7ve6AhKH3cJHiej593Y/8ztT7efmffcx7ZfvQ4LK LuJyQ3O7ij3hDpLJawZCf40I1ZcOV8Zz1Q+t0PkrGcw5lFbgpF/YkUE1DS4Fy9F1lfOj fgN7S23AFjqnaqXGxxjENnZ19PPM474blKAaQIgUoZdzZIx9leBYPnmBngLa/3P8h07a Xzv3HTjb0GViQNORbv8mZfMDPXorq4aFDt66i0ug8mkH8GfWJH7xf43nvlUUHwSwMHhN oTdQ== X-Gm-Message-State: AOJu0YyeJ4GkO9rrj2aPgPSssZjXBBFf2MsC4mkkwMkK8LLyDFhm/NbL YNIpbvgoorsGYJPrhiEbe75QICxNXCGxBFioxnx+PWJmDNOI3a2dHUNv1g1/Y53fVBeNUZtLSCj Nir0= X-Gm-Gg: ASbGnctpySGg1KsURS0HHgetDaqHjMhZ7KjU5T7tvNscqypq90Z4piUPOIwXwiGtyvR Tt/nhWlMezzammYsPPnQFLFY4Hb/d3xMuluOaS5KRd/FpKDomodb4JYjOybMmaizpbPyy8YYfAx we20au6gphvTCsc3mp0j+0YdREXxr5RnBUi8N+sWYAEKEHJP2mR00YczrAiAh+G+pEUzZTnvW72 /qa/Zr8tqDD65H+XRFRE8U4rbjrlLXwMlI830z3yhUMoHBHSnRrzw5SEUJ9eGiCuGLEN31nVSNH Xk+bFsiXZEXvvJQSnyvPxdZrrde1QbagCpgk12GLSfVvNKNY/Iz4erwteBrL9Cj+j+PVXOmzjxa QhOS6owPC4lx9wjZf2Gw= X-Google-Smtp-Source: AGHT+IFz6mzpqHceLw8FKO7IXH1mBQK5UFN4W3Xbql906zu/kOUOh+xpQKO4rgdDnNnGIKjdQrRgdA== X-Received: by 2002:a05:600c:354a:b0:439:6ab6:5d45 with SMTP id 5b1f17b1804b1-43bd2ae5e59mr54759715e9.28.1741276094257; Thu, 06 Mar 2025 07:48:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 08/54] accel/tcg: Build tcg_flags helpers as common code Date: Thu, 6 Mar 2025 16:46:50 +0100 Message-ID: <20250306154737.70886-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276180353019100 While cpu-exec.c is build for each target,tcg_flags helpers aren't target specific. Move them to cpu-exec-common.c to build them once. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-8-philmd@linaro.org> --- accel/tcg/cpu-exec-common.c | 33 +++++++++++++++++++++++++++++++++ accel/tcg/cpu-exec.c | 32 -------------------------------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index 6ecfc4e7c21..100746d555a 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "exec/log.h" #include "system/cpus.h" #include "system/tcg.h" #include "qemu/plugin.h" @@ -25,6 +26,38 @@ =20 bool tcg_allowed; =20 +bool tcg_cflags_has(CPUState *cpu, uint32_t flags) +{ + return cpu->tcg_cflags & flags; +} + +void tcg_cflags_set(CPUState *cpu, uint32_t flags) +{ + cpu->tcg_cflags |=3D flags; +} + +uint32_t curr_cflags(CPUState *cpu) +{ + uint32_t cflags =3D cpu->tcg_cflags; + + /* + * Record gdb single-step. We should be exiting the TB by raising + * EXCP_DEBUG, but to simplify other tests, disable chaining too. + * + * For singlestep and -d nochain, suppress goto_tb so that + * we can log -d cpu,exec after every TB. + */ + if (unlikely(cpu->singlestep_enabled)) { + cflags |=3D CF_NO_GOTO_TB | CF_NO_GOTO_PTR | CF_SINGLE_STEP | 1; + } else if (qatomic_read(&one_insn_per_tb)) { + cflags |=3D CF_NO_GOTO_TB | 1; + } else if (qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) { + cflags |=3D CF_NO_GOTO_TB; + } + + return cflags; +} + /* exit the current TB, but without causing any exception to be raised */ void cpu_loop_exit_noexc(CPUState *cpu) { diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 8b773d88478..be2ba199d3d 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -148,38 +148,6 @@ static void init_delay_params(SyncClocks *sc, const CP= UState *cpu) } #endif /* CONFIG USER ONLY */ =20 -bool tcg_cflags_has(CPUState *cpu, uint32_t flags) -{ - return cpu->tcg_cflags & flags; -} - -void tcg_cflags_set(CPUState *cpu, uint32_t flags) -{ - cpu->tcg_cflags |=3D flags; -} - -uint32_t curr_cflags(CPUState *cpu) -{ - uint32_t cflags =3D cpu->tcg_cflags; - - /* - * Record gdb single-step. We should be exiting the TB by raising - * EXCP_DEBUG, but to simplify other tests, disable chaining too. - * - * For singlestep and -d nochain, suppress goto_tb so that - * we can log -d cpu,exec after every TB. - */ - if (unlikely(cpu->singlestep_enabled)) { - cflags |=3D CF_NO_GOTO_TB | CF_NO_GOTO_PTR | CF_SINGLE_STEP | 1; - } else if (qatomic_read(&one_insn_per_tb)) { - cflags |=3D CF_NO_GOTO_TB | 1; - } else if (qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) { - cflags |=3D CF_NO_GOTO_TB; - } - - return cflags; -} - struct tb_desc { vaddr pc; uint64_t cs_base; --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276184; cv=none; d=zohomail.com; s=zohoarc; b=gSliVreZzWmEbhSISA5qr8xkyaLz+dyn2Nq1Z4kN2fHik3CR0LKAbuMpbbCwpsNVzmixiOwfi/H2bSUYcw0SsgiJTFQbiImJA351xKVhH5bo0NeflnoRL5fUZhRS4RRHBrcT58jnlrVusAnItOUZfJnzGIT9A6vJuyHOtASWLXY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276184; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=wVOS1vvZMQwjXlRVCMeomIHaHZpl7bu5hN5ReN6ps3U=; b=jjslPoXW0meNOvEG34Sy7OMHLeGiHmcNRjBt2mYNR/SeMFKSCJGtNOlLs/dnwhl3Tqv5zK9EENvQELHAlidPh7B6dicjpupYUuBSqhKHQyED/TE+NmVhsCeT3n+cdm1MAm6CKVYUxPiiPmTgQW7R1vS1KOWtJyoe9Kx4qu/zfw8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276184364111.73469358514296; Thu, 6 Mar 2025 07:49:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDSk-0008Fw-9v; Thu, 06 Mar 2025 10:48:50 -0500 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 1tqDSZ-0007uk-GY for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:37 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSQ-0006GL-Di for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:25 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43bcc85ba13so6602535e9.0 for ; Thu, 06 Mar 2025 07:48:21 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfdff57sm2466547f8f.37.2025.03.06.07.48.17 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276100; x=1741880900; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=wVOS1vvZMQwjXlRVCMeomIHaHZpl7bu5hN5ReN6ps3U=; b=NXWrxB1/fgrPqvykbxzYEr/NfyMBg9QuDa5CI0Ly36GVd6XaP1lQXdiBxSKqsUhzux GodJ7/6G30TllCP/tyQUdQuKw1J4AJUzLQTq4/xtVg+9dtfkjzBUmbvm/YfnDuoLO4l7 TMfkbanNifNz1aZWSzLGecXO+ZWs50C0qe3lQ+9AlrMYKg81ebKRcYsjRjd1iTq9GuT3 D3pEnwzi+hupVapds/xpOmOwIlxv0tyyhytPzC3myR4+Y4zA3kN1KtVzF9LsR7t530F/ J+UNh1GheqdIm+4WWQz4X7rjXniR6OvDWvI4cxT4QCO5c2NMe6rdLDwvFsNijeLKrTaN sG8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276100; x=1741880900; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wVOS1vvZMQwjXlRVCMeomIHaHZpl7bu5hN5ReN6ps3U=; b=ixjokxbyiNzh6N4fO2FSj5anlrPS+3owPdCc6ZrHFIxMuLhXq75OqiqGus6oecM9N8 iDKd2DEvt8lt8kz9hfqUedLuXPikL3cTj2iYQzsp8g24fXiROLW77AZhzTLCuj/c5G9q voohj3TtiCuA0fj9xvDZMdJSfUkZJv7gu1+Q927Y+o8+PnRpdIriw0JF9DqYO2/0CKLp zm4VO3bG9nEC8KxvMxjWw67wha3JUCdV/XdcSezEbNFU4g8ir2NXBWCyPPVfGyGcuEAt wiJxUTImQxxyHywAhYedEne3pGmMj6ggjD8Ef1QKjCef8emb+ddiuvLnpKBTN6UZMqjP Q6uQ== X-Gm-Message-State: AOJu0Yx9kkEO1jQtJrk+4AIhaF+eo4rN9xeDr333tdaP7xNh9ozEIZM6 ZBY7lgVkcXvNz3DXFi9ki/UEcauoDo5hd2QXwmxZCHqSHyjd+CfadRUvOOpDx3s5k1lZHv9MSMn EhQo= X-Gm-Gg: ASbGncs82ZkHTr3RFpyPEkx4XL11rt7kqxXi86HdAlIhPaJZIGBSKu9T54XFRhI4St/ fJJCgdfEwuEfRElst5vJCvJJU1e64CdAFSaATDnkSrPUyv8pdI8dv6p040xYsJc4bpB6ppS2AeQ 8aQYykumQSMNQQIV8U0IP7Xr3TCYB8ocWsnBXJer2b0jI6L2vjsmQn2yM1z8sp74Sj9FZydmuc8 up4OyQyIn24eJLZ2cCEvnbZWLgL5D/WTX4IWROxSMoJxDiQyJkVcXLbaL/7hv+lNS4IzDzvOsuG GR96PoHJ1pYNyg/2GDN5lC+/Xfyq1OiUaQA0Uy0lmK/x9xLGSD/DTyBZ55uS+UbmfP1LeMjkseG Y25CC7RFJOA5KY28kEHo= X-Google-Smtp-Source: AGHT+IHnszkjeUhiD+WBxY2VNTH4X5+/VGYzdMH1ZZw96nHA9rPJGeBvz8ZuNsPeJ1U79fUMNGZUaQ== X-Received: by 2002:a05:6000:4189:b0:391:c61:1de8 with SMTP id ffacd0b85a97d-3911f741f40mr5936718f8f.16.1741276098642; Thu, 06 Mar 2025 07:48:18 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 09/54] accel/tcg: Restrict tlb_init() / destroy() to TCG Date: Thu, 6 Mar 2025 16:46:51 +0100 Message-ID: <20250306154737.70886-10-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276186837019000 Move CPU TLB related methods to accel/tcg/ scope, in "internal-common.h". Suggested-by: Richard Henderson Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-9-philmd@linaro.org> --- accel/tcg/internal-common.h | 11 +++++++++++ include/exec/exec-all.h | 16 ---------------- accel/tcg/user-exec-stub.c | 11 +++++++++++ 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index c8d714256cb..d3186721839 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -53,6 +53,17 @@ TranslationBlock *tb_link_page(TranslationBlock *tb); void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, uintptr_t host_pc); =20 +/** + * tlb_init - initialize a CPU's TLB + * @cpu: CPU whose TLB should be initialized + */ +void tlb_init(CPUState *cpu); +/** + * tlb_destroy - destroy a CPU's TLB + * @cpu: CPU whose TLB should be destroyed + */ +void tlb_destroy(CPUState *cpu); + bool tcg_exec_realizefn(CPUState *cpu, Error **errp); void tcg_exec_unrealizefn(CPUState *cpu); =20 diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index d9045c9ac4c..8eb0df48f94 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -29,16 +29,6 @@ =20 #if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG) /* cputlb.c */ -/** - * tlb_init - initialize a CPU's TLB - * @cpu: CPU whose TLB should be initialized - */ -void tlb_init(CPUState *cpu); -/** - * tlb_destroy - destroy a CPU's TLB - * @cpu: CPU whose TLB should be destroyed - */ -void tlb_destroy(CPUState *cpu); /** * tlb_flush_page: * @cpu: CPU whose TLB should be flushed @@ -223,12 +213,6 @@ void tlb_set_page(CPUState *cpu, vaddr addr, hwaddr paddr, int prot, int mmu_idx, vaddr size); #else -static inline void tlb_init(CPUState *cpu) -{ -} -static inline void tlb_destroy(CPUState *cpu) -{ -} static inline void tlb_flush_page(CPUState *cpu, vaddr addr) { } diff --git a/accel/tcg/user-exec-stub.c b/accel/tcg/user-exec-stub.c index 4fbe2dbdc88..1d52f48226a 100644 --- a/accel/tcg/user-exec-stub.c +++ b/accel/tcg/user-exec-stub.c @@ -1,6 +1,7 @@ #include "qemu/osdep.h" #include "hw/core/cpu.h" #include "exec/replay-core.h" +#include "internal-common.h" =20 void cpu_resume(CPUState *cpu) { @@ -18,6 +19,16 @@ void cpu_exec_reset_hold(CPUState *cpu) { } =20 +/* User mode emulation does not support softmmu yet. */ + +void tlb_init(CPUState *cpu) +{ +} + +void tlb_destroy(CPUState *cpu) +{ +} + /* User mode emulation does not support record/replay yet. */ =20 bool replay_exception(void) --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276497; cv=none; d=zohomail.com; s=zohoarc; b=NRmLHTSw+ZyrKhaA4UKQ9KzlsMAYjKpKuSSQR37wqlco6eeJ7ucXM8q6W/Osp8kvEjfihT7BQVoHr4o690rQF7WjbVA0t9spaEUAPEvVRuX3yN3Ka6soDt/s6h9dUYKL8oL0OI7qji5zQxLRqSv3Z5kr5iP8zkqKQfrpiK/7wo8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276497; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=0uHoLbJKeoI2RLyZ0VsturTTj7TY2KrFP8jv6ZyXsKo=; b=EQGYK7RY3uCPji/qqXMHfT6EKstzh7M+N7tPfYQ+WpNAen1229ZhUYMUEPgL1nP7q0jU/fTI8MEqRHZotqOLvbOa/1wShSs/w/PqTZ+3Z6JhStP5hDNSv3T5W95CWEwfEqVsRugOR94kmY1xfmWFDQ1r/VEXVHpONLtdfIAApmk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276497208861.4265281541718; Thu, 6 Mar 2025 07:54:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTg-0000ZX-DR; Thu, 06 Mar 2025 10:49:40 -0500 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 1tqDSd-00085i-JI for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:38 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSW-0006Gj-5F for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:32 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4394036c0efso5087065e9.2 for ; Thu, 06 Mar 2025 07:48:25 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd831719sm25094075e9.0.2025.03.06.07.48.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276104; x=1741880904; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0uHoLbJKeoI2RLyZ0VsturTTj7TY2KrFP8jv6ZyXsKo=; b=Uv/IIi1L8UKegMrXxmlDmZSM/gZ7NR15KkyjWc95g9VpO/l+LVxeoJ6oEmMLIF14hl Im2Wiu4kOePyIneK0kaJ8+OctZSn6qFN9GQ6qxZpCEMg76VnppNoI4AmETocupbcIRvF OhrmIbibExFquRkHUHWyKu7MpBa2A2nH3S7TJv3mHBzU6pxKF6o7ErPdgXW3yc7Kt+yI lHjRmwyp/K8CCfBTe6JCw27mi2vd5rFZovuin2DqUYDHm+zU3HgAxSw8HfA+HGadOCmJ 3tSvMU+zIkFwA7aYTQ4s/evpJri4IVITXaeCzuDhmJGXW5inTDhuWQo9KN2w7N2g1J0z RNBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276104; x=1741880904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0uHoLbJKeoI2RLyZ0VsturTTj7TY2KrFP8jv6ZyXsKo=; b=Q76nZevEsN1p+8dPhnzFXt4WbexPyqHpI9GnjiyYokG6lqtfzfrIrIOXJwSbKIg4E9 kMzU/adYZqQHEMiWgPWrVVQmP5HUKi249ln0I5BLGcdJfnDhLtw+wM62gMyqtOmDEY/J aM6io3Wu2TtJf945/ARw4zWlZ0ZsM1BiF6dj965WywHXBW2sWtiqEBoqn/Ec4GkUU2lD I/AhdPCenMOv2i5qTUdIJqD47cLNIAQp3AcO/lXsVJqLvWkVGzqAThDgdOZA8C10ne8b SiKV5dLyZyExPyV8Ci61fg+MIfU0xd/8YJs9+ziGWTwaKGYcitWFB7/3qgJ6vK0H8mKG BbvQ== X-Gm-Message-State: AOJu0YxInMKSC9PKIcGnHzeDi2I/QzjdJn7MbS8a3O5FxhSrnwugH5G7 YKpOxkrY7EtELRTfZZLnbPXDWYkqJ/jUnz/imOKaY99ArhjqZqGhhfZYQOSSkiFk139P85PiYFw MEfE= X-Gm-Gg: ASbGncsX6HtvwR6kisX5Fq26DvMDMITJRLsfiToRFMq/28zl48OpEAbO/jzc5mt+/Wf sPNHLeslq4zh5ivuTzD5Za1wRMn18qkPl9EWKft7vFzvYQYypPSzoOYBmJC6qunxveNtibreM32 zk8qvTWD3QuLpO/cMhdqsN1QP26qkAIzwP2yQjViKP9vSrZsJHfAga7FpgDnkUjBzkkQNYQip65 YALPGoSZEvIxW0LGCTC18LR8noqpOqer+xBN02g1HLiSlYlvat/LAwpDXflaIVKyz5cZtFpUV1s 3NcJC9iZPn+kFhQj/qtPOM3jln8U2f0mBO05foZcbuhcUlf9dpvDkAZBOGlifucg9JIPGnoCzQ5 dMFnR4bhc1Q7jYDvJuNQ= X-Google-Smtp-Source: AGHT+IE62mBFs6VDo7VzM9Bt49/BJrCSPbAMZg9GQeXMwQgyH897kJlKcDCEqM8ZTt88MwsGS5ZWFA== X-Received: by 2002:a05:600c:4f87:b0:439:685e:d4c8 with SMTP id 5b1f17b1804b1-43bd29931b4mr66975095e9.15.1741276103731; Thu, 06 Mar 2025 07:48:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 10/54] accel/tcg: Restrict 'icount_align_option' global to TCG Date: Thu, 6 Mar 2025 16:46:52 +0100 Message-ID: <20250306154737.70886-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276497945019000 Since commit 740b1759734 ("cpu-timers, icount: new modules") we don't need to expose icount_align_option to all the system code, we can restrict it to TCG. Since it is used as a boolean, declare it as 'bool' type. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-10-philmd@linaro.org> --- accel/tcg/internal-common.h | 2 ++ include/system/cpus.h | 2 -- accel/tcg/icount-common.c | 2 ++ system/globals.c | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index d3186721839..7ef620d9631 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -17,6 +17,8 @@ extern int64_t max_advance; =20 extern bool one_insn_per_tb; =20 +extern bool icount_align_option; + /* * Return true if CS is not running in parallel with other cpus, either * because there are no other cpus or we are within an exclusive context. diff --git a/include/system/cpus.h b/include/system/cpus.h index 3d8fd368f32..1cffeaaf5c4 100644 --- a/include/system/cpus.h +++ b/include/system/cpus.h @@ -38,8 +38,6 @@ void resume_all_vcpus(void); void pause_all_vcpus(void); void cpu_stop_current(void); =20 -extern int icount_align_option; - /* Unblock cpu */ void qemu_cpu_kick_self(void); =20 diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c index b178dccec45..402d3e3f4e8 100644 --- a/accel/tcg/icount-common.c +++ b/accel/tcg/icount-common.c @@ -48,6 +48,8 @@ static bool icount_sleep =3D true; /* Arbitrarily pick 1MIPS as the minimum allowable speed. */ #define MAX_ICOUNT_SHIFT 10 =20 +bool icount_align_option; + /* Do not count executed instructions */ ICountMode use_icount =3D ICOUNT_DISABLED; =20 diff --git a/system/globals.c b/system/globals.c index 316623bd20a..9640c9511e9 100644 --- a/system/globals.c +++ b/system/globals.c @@ -58,7 +58,6 @@ unsigned int nb_prom_envs; const char *prom_envs[MAX_PROM_ENVS]; uint8_t *boot_splash_filedata; int only_migratable; /* turn it off unless user states otherwise */ -int icount_align_option; =20 /* The bytes in qemu_uuid are in the order specified by RFC4122, _not_ in = the * little-endian "wire format" described in the SMBIOS 2.6 specification. --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276397; cv=none; d=zohomail.com; s=zohoarc; b=RonWX8ggPrx8vKwwv7epU+vc6FY2k0H0FuaPyqCyM3YnS8gdaFkJ+SMh5oKAYMbGpB5ORkSnXey8CSGsD3R5NifkxFsoV6/aFjOGkQqNzi1dl5F6Gi5QstPBM3xPwZHV600XBZzuCRlJgYDeErBKKAri+PnRzXarCXKbDRQ+1n8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276397; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=G34caD8GZIkzvT1uGzaFBY/MHPpNPk1210VTkPWJrCE=; b=dadP0cxqT53jIWd/5Fv6N1Svcr1uxgHctWktP0xtipP21HtEPIv+zfEnHKmsUcHycYeyQCTyqJeL8qaFwWAv7N1FCB2cgnla00uNxTNY9Jq8aL7W8qlwdknK1y1vvEKi9/32aendzo1t1i0Loj0vO+3LNnGigGWveXRNBxbfPC0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276397194968.3112203635171; Thu, 6 Mar 2025 07:53:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTo-0001ET-6q; Thu, 06 Mar 2025 10:49:48 -0500 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 1tqDSj-0008GZ-U9 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:42 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSd-0006Hj-9J for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:40 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-390e3b3d3bcso965213f8f.3 for ; Thu, 06 Mar 2025 07:48:29 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c015a29sm2358327f8f.42.2025.03.06.07.48.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276108; x=1741880908; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=G34caD8GZIkzvT1uGzaFBY/MHPpNPk1210VTkPWJrCE=; b=k+T9VqJUjnZ6vzKajkPWdS6PCnQaAsCBXQz+KMyVh6Ob4lR2ylF4wisbGIhBBMjyf3 7gAmzwcTkGuoRoyVh3OIU+2M0QEY7mxIxUdrQGqg/29hk1ip/pYC71At+Ywr2rpI4/ZF w84PffmSOJGyMUK1Pwkq0MAXIrq8xZWFRfQRE85ru+kuaUYqeHZ01Sc2PwdMEr46tMKu yLmbnNK4Va8XuuMtrT+Hx/2TISLv/hPoJkV6Yu9+2kyObizVag/4QYfP45jnidwgH/fO JZOV18kc5mc21PXnYX73z/Nh2hfSDvqFXoLux7vRHVur6e6NyBrZuiHdkulRCo/CC71y 5K6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276108; x=1741880908; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G34caD8GZIkzvT1uGzaFBY/MHPpNPk1210VTkPWJrCE=; b=TwLdXZiDk+VeDeakIsyZEQBMrBPGDc4oKVfdYrlbD19C+JbumUKUH0+d7M/4crrpHu Xt8eKwsNXsi00YhEDve3BNwP0sfUA+mzOnQjPHrjFQdMFx9VMaxE8SBaybgy4L53+13x Xsn0dmtuzwvNc0Ge8pSmUP3zrStWiWKx1d2pBJ5/vfTds+AsATCepsnej+1XKEFHsEHc vf46UH5248n3t9ZJDI6kbII4I1sUNea37DvOklo72EY5B/wuxcOGjQIm25VJeeiBw4dh bbc6n8NcFVpnOnF5CnzP+hLEK85Jdx+SjhdesI2Z4e+hoCPp+2pzH+QSBp3QkWPG3SvQ bMGg== X-Gm-Message-State: AOJu0YzzDM9uwUBl/qzaSfMoZMS+fpo+TqLeziwFa8kpOQg3P+8eOlbj r1/CpphcVmor4GE0xiDNn7gpcDbYJoye+cYXS1ApdktGhc47jyVPxf4X/2wG/1pe0i+Wj0Jw20t ofjI= X-Gm-Gg: ASbGnctw/8ve6Q95wTmpg1Pf5ND0hUg9LgQBNFy1KxCJC2cxwD7UW+r9Zk56fz2lQkj gktC8hlwzVi8XMx/8RnfNAkXYk2SULIVj+VHe+l+qT+BiXwvSNOOgPtyMC7oepbykYtG9HPUEBO YpQ6/sh4ec/8yM3ukJmU8xc5e4pDPe74Rtx7JaL9kp6fDT1wYtWp4uL+8HQ4Z0L2fbHjzi+12+b SO701B4m8xwrfc3zbNQn036WtPken70SxbuZGH7e72bmicLdfnvmyb5sjJu503JEYU20M5io/Lo HN4K6uAdRtt8mQYan1kzLa5iGu0OIpUG883xz3KCftYS0qNWXwjsQd+VlYp0IpS2H+/qHYHX+Cj XHgS3JeIeR1aChziM3wU= X-Google-Smtp-Source: AGHT+IEXuyF76wZrv1323Pl0cP1XZ3YHsvUi3xRGKoY8hmbH6l4ntXgLI/7X5N5YFBp1XEP1DVL+Bg== X-Received: by 2002:a5d:5f8f:0:b0:391:3124:f287 with SMTP id ffacd0b85a97d-3913124fb16mr814752f8f.16.1741276108154; Thu, 06 Mar 2025 07:48:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 11/54] accel/tcg: Rename 'hw/core/tcg-cpu-ops.h' -> 'accel/tcg/cpu-ops.h' Date: Thu, 6 Mar 2025 16:46:53 +0100 Message-ID: <20250306154737.70886-12-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276399357019100 TCGCPUOps structure makes more sense in the accelerator context rather than hardware emulation. Move it under the accel/tcg/ scope. Mechanical change doing: $ sed -i -e 's,hw/core/tcg-cpu-ops.h,accel/tcg/cpu-ops.h,g' \ $(git grep -l hw/core/tcg-cpu-ops.h) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-11-philmd@linaro.org> --- MAINTAINERS | 2 +- include/{hw/core/tcg-cpu-ops.h =3D> accel/tcg/cpu-ops.h} | 0 accel/tcg/cpu-exec.c | 2 +- accel/tcg/cputlb.c | 2 +- accel/tcg/translate-all.c | 2 +- accel/tcg/user-exec.c | 2 +- accel/tcg/watchpoint.c | 2 +- bsd-user/signal.c | 2 +- hw/mips/jazz.c | 2 +- linux-user/signal.c | 2 +- system/physmem.c | 2 +- target/alpha/cpu.c | 2 +- target/arm/cpu.c | 2 +- target/arm/tcg/cpu-v7m.c | 2 +- target/arm/tcg/cpu32.c | 2 +- target/arm/tcg/mte_helper.c | 2 +- target/arm/tcg/sve_helper.c | 2 +- target/avr/cpu.c | 2 +- target/avr/helper.c | 2 +- target/hexagon/cpu.c | 2 +- target/hppa/cpu.c | 2 +- target/i386/tcg/tcg-cpu.c | 2 +- target/loongarch/cpu.c | 2 +- target/m68k/cpu.c | 2 +- target/microblaze/cpu.c | 2 +- target/mips/cpu.c | 2 +- target/openrisc/cpu.c | 2 +- target/ppc/cpu_init.c | 2 +- target/riscv/cpu_helper.c | 2 +- target/riscv/tcg/tcg-cpu.c | 2 +- target/rx/cpu.c | 2 +- target/s390x/cpu.c | 2 +- target/s390x/tcg/mem_helper.c | 2 +- target/sh4/cpu.c | 2 +- target/sparc/cpu.c | 2 +- target/tricore/cpu.c | 2 +- target/xtensa/cpu.c | 2 +- 37 files changed, 36 insertions(+), 36 deletions(-) rename include/{hw/core/tcg-cpu-ops.h =3D> accel/tcg/cpu-ops.h} (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 692628cd780..2d9ba810851 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -175,7 +175,7 @@ F: include/exec/helper-info.c.inc F: include/exec/page-protection.h F: include/system/cpus.h F: include/system/tcg.h -F: include/hw/core/tcg-cpu-ops.h +F: include/accel/tcg/cpu-ops.h F: host/include/*/host/cpuinfo.h F: util/cpuinfo-*.c F: include/tcg/ diff --git a/include/hw/core/tcg-cpu-ops.h b/include/accel/tcg/cpu-ops.h similarity index 100% rename from include/hw/core/tcg-cpu-ops.h rename to include/accel/tcg/cpu-ops.h diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index be2ba199d3d..3a3c45f52ed 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -22,7 +22,7 @@ #include "qapi/error.h" #include "qapi/type-helpers.h" #include "hw/core/cpu.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "trace.h" #include "disas/disas.h" #include "exec/cpu-common.h" diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index ad158050a13..c8761683a0a 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -19,7 +19,7 @@ =20 #include "qemu/osdep.h" #include "qemu/main-loop.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "exec/exec-all.h" #include "exec/page-protection.h" #include "exec/memory.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index d4189c73860..786e2f6f1a7 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -58,7 +58,7 @@ #include "system/cpu-timers.h" #include "system/tcg.h" #include "qapi/error.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "tb-jmp-cache.h" #include "tb-hash.h" #include "tb-context.h" diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 0561c4f6dc7..c4454100ad7 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -17,7 +17,7 @@ * License along with this library; if not, see . */ #include "qemu/osdep.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "disas/disas.h" #include "exec/exec-all.h" #include "tcg/tcg.h" diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c index af57d182d5b..40112b2b2e7 100644 --- a/accel/tcg/watchpoint.c +++ b/accel/tcg/watchpoint.c @@ -26,7 +26,7 @@ #include "tb-internal.h" #include "system/tcg.h" #include "system/replay.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "hw/core/cpu.h" #include "internal-common.h" =20 diff --git a/bsd-user/signal.c b/bsd-user/signal.c index ff2ccbbf605..ab1d9ddd50f 100644 --- a/bsd-user/signal.c +++ b/bsd-user/signal.c @@ -29,7 +29,7 @@ #include "gdbstub/user.h" #include "signal-common.h" #include "trace.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "host-signal.h" =20 /* target_siginfo_t must fit in gdbstub's siginfo save area. */ diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index c89610639a9..1700c3765de 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -50,7 +50,7 @@ #include "qemu/error-report.h" #include "qemu/help_option.h" #ifdef CONFIG_TCG -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #endif /* CONFIG_TCG */ #include "cpu.h" =20 diff --git a/linux-user/signal.c b/linux-user/signal.c index 81a98c6d02f..4799b79dede 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -21,7 +21,7 @@ #include "qemu/cutils.h" #include "gdbstub/user.h" #include "exec/page-protection.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 #include #include diff --git a/system/physmem.c b/system/physmem.c index eff8b55c2dd..8c1736f84ee 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -28,7 +28,7 @@ #include "qemu/lockable.h" =20 #ifdef CONFIG_TCG -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #endif /* CONFIG_TCG */ =20 #include "exec/exec-all.h" diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index f5dd7449876..57e41fcd784 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -227,7 +227,7 @@ static const struct SysemuCPUOps alpha_sysemu_ops =3D { }; #endif =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps alpha_tcg_ops =3D { .initialize =3D alpha_translate_init, diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 656070afb59..ac1ceec2110 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -29,7 +29,7 @@ #include "cpu.h" #ifdef CONFIG_TCG #include "exec/translation-block.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #endif /* CONFIG_TCG */ #include "internals.h" #include "cpu-features.h" diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c index 03acdf83e00..29a41fde694 100644 --- a/target/arm/tcg/cpu-v7m.c +++ b/target/arm/tcg/cpu-v7m.c @@ -10,7 +10,7 @@ =20 #include "qemu/osdep.h" #include "cpu.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "internals.h" =20 #if !defined(CONFIG_USER_ONLY) diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c index 0f1c5bc87e8..2c45b7eddda 100644 --- a/target/arm/tcg/cpu32.c +++ b/target/arm/tcg/cpu32.c @@ -10,7 +10,7 @@ =20 #include "qemu/osdep.h" #include "cpu.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "internals.h" #include "target/arm/idau.h" #if !defined(CONFIG_USER_ONLY) diff --git a/target/arm/tcg/mte_helper.c b/target/arm/tcg/mte_helper.c index f72ce2ae0d4..5d6d8a17ae8 100644 --- a/target/arm/tcg/mte_helper.c +++ b/target/arm/tcg/mte_helper.c @@ -31,7 +31,7 @@ #endif #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "qapi/error.h" #include "qemu/guest-random.h" #include "mte_helper.h" diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c index c206ca65ceb..d786b4b1118 100644 --- a/target/arm/tcg/sve_helper.c +++ b/target/arm/tcg/sve_helper.c @@ -28,7 +28,7 @@ #include "tcg/tcg.h" #include "vec_internal.h" #include "sve_ldst_internal.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #ifdef CONFIG_USER_ONLY #include "user/page-protection.h" #endif diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 8a126ff3222..5a0e21465e5 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -203,7 +203,7 @@ static const struct SysemuCPUOps avr_sysemu_ops =3D { .get_phys_page_debug =3D avr_cpu_get_phys_page_debug, }; =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps avr_tcg_ops =3D { .initialize =3D avr_cpu_tcg_init, diff --git a/target/avr/helper.c b/target/avr/helper.c index 345708a1b39..9ea6870e44d 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -22,7 +22,7 @@ #include "qemu/log.h" #include "qemu/error-report.h" #include "cpu.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "exec/exec-all.h" #include "exec/page-protection.h" #include "exec/cpu_ldst.h" diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 0b7fc98f6ce..238e63bcea4 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -321,7 +321,7 @@ static void hexagon_cpu_init(Object *obj) { } =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps hexagon_tcg_ops =3D { .initialize =3D hexagon_translate_init, diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 5655677431c..4bb5cff624e 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -245,7 +245,7 @@ static const struct SysemuCPUOps hppa_sysemu_ops =3D { }; #endif =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps hppa_tcg_ops =3D { .initialize =3D hppa_translate_init, diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 14ee038079a..f09ee813ac9 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -105,7 +105,7 @@ static bool x86_debug_check_breakpoint(CPUState *cs) } #endif =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps x86_tcg_ops =3D { .initialize =3D tcg_x86_init, diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index ac514a15fba..b4b82425b18 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -857,7 +857,7 @@ static void loongarch_cpu_dump_state(CPUState *cs, FILE= *f, int flags) } =20 #ifdef CONFIG_TCG -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps loongarch_tcg_ops =3D { .initialize =3D loongarch_translate_init, diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 2617d8f6ede..eedda07c2ab 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -582,7 +582,7 @@ static const struct SysemuCPUOps m68k_sysemu_ops =3D { }; #endif /* !CONFIG_USER_ONLY */ =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps m68k_tcg_ops =3D { .initialize =3D m68k_tcg_init, diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index f114789abd8..13d194cef88 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -419,7 +419,7 @@ static const struct SysemuCPUOps mb_sysemu_ops =3D { }; #endif =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps mb_tcg_ops =3D { .initialize =3D mb_tcg_init, diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 47cd7cfdcef..0b267d2e507 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -544,7 +544,7 @@ static const Property mips_cpu_properties[] =3D { }; =20 #ifdef CONFIG_TCG -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" static const TCGCPUOps mips_tcg_ops =3D { .initialize =3D mips_tcg_init, .translate_code =3D mips_translate_code, diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index b7bab0d7abf..0669ba2fd10 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -232,7 +232,7 @@ static const struct SysemuCPUOps openrisc_sysemu_ops = =3D { }; #endif =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps openrisc_tcg_ops =3D { .initialize =3D openrisc_translate_init, diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 062a6e85fba..425049ab093 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7430,7 +7430,7 @@ static const struct SysemuCPUOps ppc_sysemu_ops =3D { #endif =20 #ifdef CONFIG_TCG -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps ppc_tcg_ops =3D { .initialize =3D ppc_translate_init, diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 3f5fd861a80..34092f372df 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -27,7 +27,7 @@ #include "exec/page-protection.h" #include "instmap.h" #include "tcg/tcg-op.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "trace.h" #include "semihosting/common-semi.h" #include "system/cpu-timers.h" diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index f1d971eec1f..70f4c7984aa 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -31,7 +31,7 @@ #include "qemu/error-report.h" #include "qemu/log.h" #include "hw/core/accel-cpu.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "tcg/tcg.h" #ifndef CONFIG_USER_ONLY #include "hw/boards.h" diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 37a6fdd569b..7d5fcbf76ac 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -200,7 +200,7 @@ static const struct SysemuCPUOps rx_sysemu_ops =3D { }; #endif =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps rx_tcg_ops =3D { .initialize =3D rx_translate_init, diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 97d41c23de7..3bea014f9ee 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -322,7 +322,7 @@ static const Property s390x_cpu_properties[] =3D { #endif =20 #ifdef CONFIG_TCG -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc, uint64_t *cs_base, uint32_t *pflags) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index c6ab2901e5a..ea9fa64d6b4 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -28,7 +28,7 @@ #include "exec/exec-all.h" #include "exec/page-protection.h" #include "exec/cpu_ldst.h" -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" #include "qemu/int128.h" #include "qemu/atomic128.h" =20 diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index ccfe222bdf3..22cdf9b4e12 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -256,7 +256,7 @@ static const struct SysemuCPUOps sh4_sysemu_ops =3D { }; #endif =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps superh_tcg_ops =3D { .initialize =3D sh4_translate_init, diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index fbd38ec334a..e3b46137178 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -992,7 +992,7 @@ static const struct SysemuCPUOps sparc_sysemu_ops =3D { #endif =20 #ifdef CONFIG_TCG -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps sparc_tcg_ops =3D { .initialize =3D sparc_tcg_init, diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index 95202fadbfd..eb794674c8d 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -168,7 +168,7 @@ static const struct SysemuCPUOps tricore_sysemu_ops =3D= { .get_phys_page_debug =3D tricore_cpu_get_phys_page_debug, }; =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps tricore_tcg_ops =3D { .initialize =3D tricore_tcg_init, diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 4eb699d1f45..efbfe73fcfb 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -228,7 +228,7 @@ static const struct SysemuCPUOps xtensa_sysemu_ops =3D { }; #endif =20 -#include "hw/core/tcg-cpu-ops.h" +#include "accel/tcg/cpu-ops.h" =20 static const TCGCPUOps xtensa_tcg_ops =3D { .initialize =3D xtensa_translate_init, --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741278750; cv=none; d=zohomail.com; s=zohoarc; b=BdMii/YDmHGkZjYs3w039S91HL4qkAeL2Dzu8HHhVetgHgG/6D8WaQe4hsuMejGruJkj62C6nbSKtNSix3tIHGUJGMN2Xy3aWIw/5J0jKM1+fCvaRlJywHFEQvy1W8JVHAjsqxAlVGsakb84Qkc2NoIPg5Si1YKl5kTHRQvRHko= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741278750; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=6V3f5QHEPkzjza/e5OPie9IBCs6hpy/raWDVhSFQ+F0=; b=BKmSR8VFFNE9fDPTT0VTfcOmFiATgMSCiQ3dsTapR01r4qCNt+Da5UWjKKtnQUfgNEUHrk0auL0gh5+HjhHIlPIzL/0+gOE1z2mojgsjp1H8BXK0RU+y8lxiyMkbrbgfoaYlG4HC0OHUW8iJMJqlkwMk2zjs6wlnU5/tOfppDko= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741278750845617.2784317082757; Thu, 6 Mar 2025 08:32:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTn-00019H-CI; Thu, 06 Mar 2025 10:49:47 -0500 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 1tqDSh-00089Y-7Z for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:39 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSd-0006IC-9f for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:38 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43bc0b8520cso5452355e9.1 for ; Thu, 06 Mar 2025 07:48:34 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfe0004sm2358411f8f.40.2025.03.06.07.48.31 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276113; x=1741880913; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6V3f5QHEPkzjza/e5OPie9IBCs6hpy/raWDVhSFQ+F0=; b=aOry+8HQvSu0w8WByH0HPQV4CAkNl6ksZ3eu1f7tPxmlLGCI60dGsjZZAfv5LiMYot ePJ8zMrJgfQBiM/QEJiBt/CPibCifVyVBKl1g7CPcd3+bgNIIIb4m9en9tTVlmFXFGlP HGpaDEwAWPX0/NUJ6+n1FAlsPmM3zWj2dr2GlEPDiPBFwPLHpQxu286B/ewl+3ObyDM+ fIiJUbR5IVE/p12uhxaULGYJq1C9K4TcD7IvDevyES9kZGLWEHy9ex1JY6Ng5VBwL9sk xGn4cEeI1zIpmwQb0dhCwz5H63ZT0Kux37XIouE96+QEtb9PLWJfSHhmYhrAkIFRNysU b8PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276113; x=1741880913; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6V3f5QHEPkzjza/e5OPie9IBCs6hpy/raWDVhSFQ+F0=; b=dPPnn21QnVUNggC50VtA3zZlKxNd254cKpBWzkcEOYkfB21jncp15kIVcNTVs0vFdi QAdVXfXaWKGEuZJUmyjTqn4TRk6Dd9NVXhT1zj9BcwqedL1u0oe6gs44K2jnX+jImvAL oIqySO3VK8Ari9NBDgCCauXSIoZ/+JhTV8pW2A8XlgtqcHkVYenBYYH/KDtT0DpYuD+T nsv4z2YtvU0kJyO+6pv8wwG7W8JXVzmtRrMg4RrNDoN2CocD6FWP4/qg/y70qaUNsnN8 XlTM3JWIq+YcYSDdYDkHguPs/CBrgyH+q4VUv7UWhI/NcxMYFI2oaZF+sXN5Iv+bEODc 3t8g== X-Gm-Message-State: AOJu0Yxw0fg2Y2bbBkUQBpyWExjjBgsmesdOw6rdd5+A4KmO1R3wos3y G4+srAWeVSnWyyzKuaBgIf30pyalCg+xteHHjSiY0h0rVHocRRkMDR5/+6PoPq9rAakhkC0qmOR fvic= X-Gm-Gg: ASbGncuRlFsiY/kBCBDB+hZzW91u1oJGr6sf+MX1heA4bbkpPNjKNcFK6GuMEi3yxyX KIeEM2rYS6QFHy8ZP+nXPRmhAjJuspYV6mRfI0FyiL1kCqCojOh12z9OAKUZuHRrA/idhZAhV3n ty8a4kXjgsx3LoXIqaXFzmY3nSotJbj/tbyWw9nQcdH6ekPcFKHuvpUgvr80A6MGQBH/9oNK483 ZCYTMMoS5rA0xKL9gboIU2LjHfFMUHSSXeb3IszGrYMlnoFR2Dey5bnAyWjwxdcl1AFYdQCJDfr qs1vHttGL/vx8Icu7U39gGfj5yzlClUFnwWaVcU0EBFuXtRt6CjaCEzxi+pjjWQ4BhY7tuS6O99 0n/+TdNU76WLlQ24Qcdc= X-Google-Smtp-Source: AGHT+IEdDhOsbggPmUoAGRfUucEMvniJs/o90eYCYagtw6g6e3O6lUKdc4nP/+ICtzQKyEz6wtFUSA== X-Received: by 2002:a05:6000:1fa8:b0:390:fb37:1ca with SMTP id ffacd0b85a97d-3911f7d33b4mr5738986f8f.53.1741276112550; Thu, 06 Mar 2025 07:48:32 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 12/54] accel: Rename 'hw/core/accel-cpu.h' -> 'accel/accel-cpu-target.h' Date: Thu, 6 Mar 2025 16:46:54 +0100 Message-ID: <20250306154737.70886-13-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741278753947019100 AccelCPUClass is for accelerator to initialize target specific features of a vCPU. Not really related to hardware emulation, rename "hw/core/accel-cpu.h" as "accel/accel-cpu-target.h" (using the explicit -target suffix). More importantly, target specific header often access the target specific definitions which are in each target/FOO/cpu.h header, usually included generically as "cpu.h" relative to target/FOO/. However, there is already a "cpu.h" in hw/core/ which takes precedence. This change allows "accel-cpu-target.h" to include a target "cpu.h". Mechanical change doing: $ git mv include/hw/core/accel-cpu.h \ include/accel/accel-cpu-target.h $ sed -i -e 's,hw/core/accel-cpu.h,accel/accel-cpu-target.h,' \ $(git grep -l hw/core/accel-cpu.h) and renaming header guard 'ACCEL_CPU_TARGET_H'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-12-philmd@linaro.org> --- MAINTAINERS | 2 +- include/{hw/core/accel-cpu.h =3D> accel/accel-cpu-target.h} | 4 ++-- accel/accel-target.c | 2 +- cpu-target.c | 2 +- target/i386/hvf/hvf-cpu.c | 2 +- target/i386/kvm/kvm-cpu.c | 2 +- target/i386/tcg/tcg-cpu.c | 2 +- target/ppc/kvm.c | 2 +- target/riscv/kvm/kvm-cpu.c | 2 +- target/riscv/tcg/tcg-cpu.c | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) rename include/{hw/core/accel-cpu.h =3D> accel/accel-cpu-target.h} (95%) diff --git a/MAINTAINERS b/MAINTAINERS index 2d9ba810851..a0e462d03ca 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -499,7 +499,7 @@ R: Paolo Bonzini S: Maintained F: include/qemu/accel.h F: include/system/accel-*.h -F: include/hw/core/accel-cpu.h +F: include/accel/accel-cpu-target.h F: accel/accel-*.c F: accel/Makefile.objs F: accel/stubs/Makefile.objs diff --git a/include/hw/core/accel-cpu.h b/include/accel/accel-cpu-target.h similarity index 95% rename from include/hw/core/accel-cpu.h rename to include/accel/accel-cpu-target.h index 24dad45ab9e..0a8e518600d 100644 --- a/include/hw/core/accel-cpu.h +++ b/include/accel/accel-cpu-target.h @@ -8,8 +8,8 @@ * See the COPYING file in the top-level directory. */ =20 -#ifndef ACCEL_CPU_H -#define ACCEL_CPU_H +#ifndef ACCEL_CPU_TARGET_H +#define ACCEL_CPU_TARGET_H =20 /* * This header is used to define new accelerator-specific target-specific diff --git a/accel/accel-target.c b/accel/accel-target.c index 3236d6335b1..83587274626 100644 --- a/accel/accel-target.c +++ b/accel/accel-target.c @@ -27,7 +27,7 @@ #include "qemu/accel.h" =20 #include "cpu.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" =20 #ifndef CONFIG_USER_ONLY #include "accel-system.h" diff --git a/cpu-target.c b/cpu-target.c index 75501a909df..f97f3a14751 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -44,7 +44,7 @@ #include "exec/tb-flush.h" #include "exec/translation-block.h" #include "exec/log.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "trace/trace-root.h" #include "qemu/accel.h" =20 diff --git a/target/i386/hvf/hvf-cpu.c b/target/i386/hvf/hvf-cpu.c index 560b5a05940..b5f4c80028f 100644 --- a/target/i386/hvf/hvf-cpu.c +++ b/target/i386/hvf/hvf-cpu.c @@ -14,7 +14,7 @@ #include "system/system.h" #include "hw/boards.h" #include "system/hvf.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "hvf-i386.h" =20 static void hvf_cpu_max_instance_init(X86CPU *cpu) diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 1bda403f88b..6269fa80452 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -15,7 +15,7 @@ #include "hw/boards.h" =20 #include "kvm_i386.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" =20 static void kvm_set_guest_phys_bits(CPUState *cs) { diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index f09ee813ac9..b8aff825eec 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "helper-tcg.h" #include "qemu/accel.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "exec/translation-block.h" =20 #include "tcg-cpu.h" diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 966c2c65723..216638dee40 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -49,7 +49,7 @@ #include "elf.h" #include "system/kvm_int.h" #include "system/kvm.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" =20 #include CONFIG_DEVICES =20 diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 7f3b59cb72c..4ffeeaa1c95 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -32,7 +32,7 @@ #include "system/kvm_int.h" #include "cpu.h" #include "trace.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" #include "exec/address-spaces.h" diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 70f4c7984aa..5aef9eef366 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -30,7 +30,7 @@ #include "qemu/accel.h" #include "qemu/error-report.h" #include "qemu/log.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "accel/tcg/cpu-ops.h" #include "tcg/tcg.h" #ifndef CONFIG_USER_ONLY --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276800; cv=none; d=zohomail.com; s=zohoarc; b=OJlB3obMlIk56hCzSRuu9SlV/yO4fK6cN95hSqFJjIQMdSH/up4uetaUkQO30Iptx+gZTC/UpZqtcDAaQkaWfEesE2ZU4reb4jJ6T1B/Ens+nJzAKTepM7v20Ex/czuDD8qryVD4LB4mobFtlcFe7eYWBlq66tWNoEgK3QteQnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276800; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=JBB3Tbxqc4/M0bxYWwDzYqPlVpodl+6MXJuHVeJUQgs=; b=ad3MQHLebqhOoGknM+Bm8fBx4OSFdqyLvDiviIbHsb+lTnLeh3h7KNzoajN5v/BalBjj9sAqbhFFc8kYOXNbi0wRTtHLAdQHHUQdcdZlyQFWUVZfXnxytMVabEc3b5xOZcHAinW7ldjEbebr4bla91oYyXCm2v/v+zLtOWH/OpE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276800422450.62173578998147; Thu, 6 Mar 2025 08:00:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTr-0001cs-VO; Thu, 06 Mar 2025 10:49:52 -0500 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 1tqDSj-0008Ga-UW for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:42 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSh-0006JP-9h for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:41 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43bbc8b7c65so9799555e9.0 for ; Thu, 06 Mar 2025 07:48:38 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd4352ed7sm53288995e9.26.2025.03.06.07.48.36 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276117; x=1741880917; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JBB3Tbxqc4/M0bxYWwDzYqPlVpodl+6MXJuHVeJUQgs=; b=G+XA9HdrPUUxWNjjWtG4mVsTJnQqWuYIB7g+bCw5tyFgduz6cKYu/rqRjKYuvhw4Wf 3xav7ipEKQoCQZzjPQxIbPWL/uj5KpIgsNVJrh0NM4lAJ0VEZN7n/JSDj2miBeDw2k7q hc5NC5QuSRj8SDXe5ApJ7q2BLT7AppnTJBNX45XbSpUf9nVz8k6QaWKEIPItB6/miejA WDPAzocWVtM4YuWMH595+Tmxtxh+0WD+hOF3SOEHiNCL019utmyZRc4S1xW95CWttxm3 Ps83CBe68/7GO5/duTD5Sd9a4IF/5VU+zkLwB7iLimOEnnZHD3zMR9PNbmSx2CJdfNth ZEEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276117; x=1741880917; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JBB3Tbxqc4/M0bxYWwDzYqPlVpodl+6MXJuHVeJUQgs=; b=vq9BdZe9Iz1QRwWMq4QgBlIj7eG2wAbeHWIMOOUm3dZZC5gV4KN4ncj6FB4qtvgZx9 PM0prd+xE5jCmGMmacyOr7ztUFIYT5eb69+Z5VRc0wHuM9iSa+tGUIddYfOMEzfTTI11 QpXyba7ukoB9bH2ZYtw+YOi2e1w8Av2SM2wjUihZXzLnEfu4LZnH6XyldRUC/ZBXRk8s SCNX26TUcz5zbTOBnsIm+nKYDO6VEZGVGLe/8JtaSvFQHi+NV9Ie7CRWaacrQLm8RxG4 st8/fPr+FFJAEBbb78HnqDyHmsVt5BhVVsZ77Jn35aEDE86dxoLHOEiJp34Pg8fy12KM bSMg== X-Gm-Message-State: AOJu0YwvQvw52Z/Pq2/ZUtnMjV2f1AYP5vhfmE1frLIr8IHXsd3xXI7L +P3RchzHSPdSriO+qx+LvOgIedrphCAoea3fDeLVzy8tYAWJykq/+lujHo2qlmN5eldnp1rgNXp JTXU= X-Gm-Gg: ASbGnct/nrrk67RZllFyB2cgmiD65Ls+mifxN/yeP7oVIkt65ScCBULhu+8IItYD0N+ w48oY1b/5iSw++Dw3Fi4758Jm0GGpDVdG55zJ5KMqjYHaqhisZSnYsQvKf4azg6oeBeAvuaSy1F uoC3M2xHjUn1cut5FdyvQooSoYEdYNC+76NttD4lihd1rptoiY1KIxeccUT2ONQQ3GFN6n5JLGJ K0XiaRf1k67zPbGX3o5xSkb5p2Qm+IXeEi39m3c4vCE+hqA/HZ7zLgvMwGDsZmNeMB4jbWCNzZV ffDym2aJJTqksS23wUFl1IHCpnNqxQXWPjHMK0Zu6P4V3gP7Ezwzpb2Kr0+//xAFZiIo/8e2X8m 1ksjqcxPCreiYEJHQwmI= X-Google-Smtp-Source: AGHT+IEl8zcFRJYIy+1D9NS+wFsHmHCP4CCEQmYKoBJ03zW78SeS5RM29Oss2sU8BgQeghG9vb2Mjw== X-Received: by 2002:a05:600c:1988:b0:439:9e13:2df4 with SMTP id 5b1f17b1804b1-43bd29bcc56mr62552685e9.21.1741276116977; Thu, 06 Mar 2025 07:48:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 13/54] accel: Forward-declare AccelOpsClass in 'qemu/typedefs.h' Date: Thu, 6 Mar 2025 16:46:55 +0100 Message-ID: <20250306154737.70886-14-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276801645019100 The heavily imported "system/cpus.h" header includes "accel-ops.h" to get AccelOpsClass type declaration. Reduce headers pressure by forward declaring it in "qemu/typedefs.h", where we already declare the AccelCPUState type. Reduce "system/cpus.h" inclusions by only including "system/accel-ops.h" when necessary. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-14-philmd@linaro.org> --- include/qemu/typedefs.h | 1 + include/system/accel-ops.h | 1 - include/system/cpus.h | 2 -- accel/accel-system.c | 1 + accel/hvf/hvf-accel-ops.c | 1 + accel/kvm/kvm-accel-ops.c | 1 + accel/qtest/qtest.c | 1 + accel/tcg/cpu-exec-common.c | 1 - accel/tcg/cpu-exec.c | 1 - accel/tcg/monitor.c | 1 - accel/tcg/tcg-accel-ops.c | 1 + accel/tcg/translate-all.c | 1 - accel/xen/xen-all.c | 1 + cpu-common.c | 1 - cpu-target.c | 1 + gdbstub/system.c | 1 + system/cpus.c | 1 + target/i386/nvmm/nvmm-accel-ops.c | 1 + target/i386/whpx/whpx-accel-ops.c | 1 + 19 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 3d84efcac47..465cc501773 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -22,6 +22,7 @@ * Please keep this list in case-insensitive alphabetical order. */ typedef struct AccelCPUState AccelCPUState; +typedef struct AccelOpsClass AccelOpsClass; typedef struct AccelState AccelState; typedef struct AddressSpace AddressSpace; typedef struct AioContext AioContext; diff --git a/include/system/accel-ops.h b/include/system/accel-ops.h index 137fb96d444..4c99d25aeff 100644 --- a/include/system/accel-ops.h +++ b/include/system/accel-ops.h @@ -17,7 +17,6 @@ #define TYPE_ACCEL_OPS "accel" ACCEL_OPS_SUFFIX #define ACCEL_OPS_NAME(name) (name "-" TYPE_ACCEL_OPS) =20 -typedef struct AccelOpsClass AccelOpsClass; DECLARE_CLASS_CHECKERS(AccelOpsClass, ACCEL_OPS, TYPE_ACCEL_OPS) =20 /** diff --git a/include/system/cpus.h b/include/system/cpus.h index 1cffeaaf5c4..3226c765d01 100644 --- a/include/system/cpus.h +++ b/include/system/cpus.h @@ -1,8 +1,6 @@ #ifndef QEMU_CPUS_H #define QEMU_CPUS_H =20 -#include "system/accel-ops.h" - /* register accel-specific operations */ void cpus_register_accel(const AccelOpsClass *i); =20 diff --git a/accel/accel-system.c b/accel/accel-system.c index a7596aef59d..5df49fbe831 100644 --- a/accel/accel-system.c +++ b/accel/accel-system.c @@ -26,6 +26,7 @@ #include "qemu/osdep.h" #include "qemu/accel.h" #include "hw/boards.h" +#include "system/accel-ops.h" #include "system/cpus.h" #include "qemu/error-report.h" #include "accel-system.h" diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 945ba720513..12fc30c2761 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -54,6 +54,7 @@ #include "exec/exec-all.h" #include "gdbstub/enums.h" #include "hw/boards.h" +#include "system/accel-ops.h" #include "system/cpus.h" #include "system/hvf.h" #include "system/hvf_int.h" diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index a81e8f3b03b..54ea60909e2 100644 --- a/accel/kvm/kvm-accel-ops.c +++ b/accel/kvm/kvm-accel-ops.c @@ -16,6 +16,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" +#include "system/accel-ops.h" #include "system/kvm.h" #include "system/kvm_int.h" #include "system/runstate.h" diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c index ad7e3441a5a..7fae80f6a1b 100644 --- a/accel/qtest/qtest.c +++ b/accel/qtest/qtest.c @@ -18,6 +18,7 @@ #include "qemu/option.h" #include "qemu/config-file.h" #include "qemu/accel.h" +#include "system/accel-ops.h" #include "system/qtest.h" #include "system/cpus.h" #include "qemu/guest-random.h" diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index 100746d555a..c5c513f1e4a 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -19,7 +19,6 @@ =20 #include "qemu/osdep.h" #include "exec/log.h" -#include "system/cpus.h" #include "system/tcg.h" #include "qemu/plugin.h" #include "internal-common.h" diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 3a3c45f52ed..ef3d967e3af 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -33,7 +33,6 @@ #include "qemu/rcu.h" #include "exec/log.h" #include "qemu/main-loop.h" -#include "system/cpus.h" #include "exec/cpu-all.h" #include "system/cpu-timers.h" #include "exec/replay-core.h" diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c index ae1dbeb79f8..eeb38a4d9ce 100644 --- a/accel/tcg/monitor.c +++ b/accel/tcg/monitor.c @@ -13,7 +13,6 @@ #include "qapi/type-helpers.h" #include "qapi/qapi-commands-machine.h" #include "monitor/monitor.h" -#include "system/cpus.h" #include "system/cpu-timers.h" #include "system/tcg.h" #include "tcg/tcg.h" diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 6e3f1fa92b2..132c5d14613 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -26,6 +26,7 @@ */ =20 #include "qemu/osdep.h" +#include "system/accel-ops.h" #include "system/tcg.h" #include "system/replay.h" #include "system/cpu-timers.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 786e2f6f1a7..0914d6e98b2 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -54,7 +54,6 @@ #include "qemu/cacheinfo.h" #include "qemu/timer.h" #include "exec/log.h" -#include "system/cpus.h" #include "system/cpu-timers.h" #include "system/tcg.h" #include "qapi/error.h" diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c index 852e9fbe5fe..7aa28b9ab93 100644 --- a/accel/xen/xen-all.c +++ b/accel/xen/xen-all.c @@ -18,6 +18,7 @@ #include "hw/xen/xen_igd.h" #include "chardev/char.h" #include "qemu/accel.h" +#include "system/accel-ops.h" #include "system/cpus.h" #include "system/xen.h" #include "system/runstate.h" diff --git a/cpu-common.c b/cpu-common.c index 4248b2d727e..f5dcc2d136b 100644 --- a/cpu-common.c +++ b/cpu-common.c @@ -21,7 +21,6 @@ #include "qemu/main-loop.h" #include "exec/cpu-common.h" #include "hw/core/cpu.h" -#include "system/cpus.h" #include "qemu/lockable.h" #include "trace/trace-root.h" =20 diff --git a/cpu-target.c b/cpu-target.c index f97f3a14751..20933bde7d4 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -35,6 +35,7 @@ #include "exec/address-spaces.h" #include "exec/memory.h" #endif +#include "system/accel-ops.h" #include "system/cpus.h" #include "system/tcg.h" #include "exec/tswap.h" diff --git a/gdbstub/system.c b/gdbstub/system.c index 7f047a285c8..416c1dbe1e9 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -19,6 +19,7 @@ #include "gdbstub/commands.h" #include "exec/hwaddr.h" #include "exec/tb-flush.h" +#include "system/accel-ops.h" #include "system/cpus.h" #include "system/runstate.h" #include "system/replay.h" diff --git a/system/cpus.c b/system/cpus.c index 37e5892c240..2cc5f887ab5 100644 --- a/system/cpus.c +++ b/system/cpus.c @@ -31,6 +31,7 @@ #include "qapi/qapi-events-run-state.h" #include "qapi/qmp/qerror.h" #include "exec/gdbstub.h" +#include "system/accel-ops.h" #include "system/hw_accel.h" #include "exec/cpu-common.h" #include "qemu/thread.h" diff --git a/target/i386/nvmm/nvmm-accel-ops.c b/target/i386/nvmm/nvmm-acce= l-ops.c index e7b56662fee..4e4e63de78e 100644 --- a/target/i386/nvmm/nvmm-accel-ops.c +++ b/target/i386/nvmm/nvmm-accel-ops.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "system/kvm_int.h" #include "qemu/main-loop.h" +#include "system/accel-ops.h" #include "system/cpus.h" #include "qemu/guest-random.h" =20 diff --git a/target/i386/whpx/whpx-accel-ops.c b/target/i386/whpx/whpx-acce= l-ops.c index ab2e014c9ea..81fdd06e487 100644 --- a/target/i386/whpx/whpx-accel-ops.c +++ b/target/i386/whpx/whpx-accel-ops.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "system/kvm_int.h" #include "qemu/main-loop.h" +#include "system/accel-ops.h" #include "system/cpus.h" #include "qemu/guest-random.h" =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276196; cv=none; d=zohomail.com; s=zohoarc; b=aupLM/q/XBq2vcCeS7Gd8uE8c2vdGp2/YkrC0+woSWYrQrLo1fYk7ASx95PM1W8lAhi0lwR4hgthiuOzG7atdMq4i6wGz5V+/ehomo4G/fq3OWT6z/2JeF8hs1QO+0l+7nYK6svomfTpfB2XGDf0x+e1ku4v45xFqTBpozL6vMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276196; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=7QzO70em+SWmM19nvv4jHPXxR+fFgMfgrFERsTk++Jo=; b=bALALesYobSHVRajiZTvcOfzuxJhVJ5RHnCTaof5linsOKPWxsyhq6kW8QZsFKDcYPf+0zXmHlEMl1R7SLyg6DyfKmRpcxf6ZrjPM/CXk4QADgYKOl/iow9fIKPWdX53ks670u+gjN0Rjo2XkL00mZej0VZ7N/P9HSFkOQKxzTA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276196935169.41704812994976; Thu, 6 Mar 2025 07:49:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTu-0001my-N8; Thu, 06 Mar 2025 10:49:54 -0500 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 1tqDSq-0008Ml-AS for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:56 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSn-0006K7-F6 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:46 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43bcbdf79cdso5443335e9.2 for ; Thu, 06 Mar 2025 07:48:43 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd4353003sm56112775e9.28.2025.03.06.07.48.40 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276122; x=1741880922; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=7QzO70em+SWmM19nvv4jHPXxR+fFgMfgrFERsTk++Jo=; b=yqrL/7Z9snFzaCSXokImEDrhgDirVkNjSFVFQckkiJ/IK0ZBU99wEjo7z+hCThumQ2 gxPCRAOjYH39uvztIxFcp7Z/GgfQ0tWdIIdUyAmHWrZakPE4uf3n7SBybXYJpqmOWaRP 8mYB3D38F073221M5ONJV4pen1UE2W4m4clOVfiiiO6HG3YXe51X0+KgGW4axDU5tes+ thi5bgXIWgxrJWhqBbolYJixZXza4O3isJgaAhI6pTsJQdrmds8Nh0M4a+ZzKr3jMjIq 8pW+ULHKnKsUgu99TuInwnMxk3yuF8oz3Aa1i9IM2uWDrinhWamd8vI71KOLXmJW0/lF nnWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276122; x=1741880922; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7QzO70em+SWmM19nvv4jHPXxR+fFgMfgrFERsTk++Jo=; b=tp2o3BjW2RlPfdjpOoU1OTBSRYAqvF47tTDdCpM98xjUxlzmgpa9U8o9b/Ibej8+Gm Zbfq/cav+m/efQ/IQhjxDIqIAk+7NcDnM717o4W4723AEFDT4MWjTZPHGm9ZdlBv/d4h 10HTGs3qp2KXlNhCFJqNKaFfe1fVe26Yh0oteqWu242rOm1XKuyJtICvEdbk/dUINHFv UOTViDYtawhqh2jXEKsFVxTaO7z2d3B7WFrZ9ACzAwdb0OLeHSqFIS44XQFmzh09i5Qs 2MCGpMDxvlsO1/P6h7xiqHxefRFo7fJaCEpxrzU1IrYwGdbIiQXXyvEISOK8tr58ql/V 9aQg== X-Gm-Message-State: AOJu0YxAXnDn02W4gYcG2EPm7Yi5IP+XlKsQJlKIKQ60cBAttWP8j21S 84UlsK30ZL69nhC/O/wh8euh3Z9cL5ccRLB0kuUidexK9l7Cvj7vAR3jcNuFrM5D+JdF2uni0Yh Mw+s= X-Gm-Gg: ASbGncuA/Hh6a3vkvv0zjop5Lcb33HbCrDfv0ATzMTq0tDL7+jbZesNY1Azh2iFexrX hJ+qetCl3XNwcw5S6gjD9g5wQCDyr77CxkNoeHWlhXnfOSww6mTHOnjOV1y8Ui54S/CWnfcC1Ks 4fdluyAxgwIMlH5uOFPkF43i1ul0kz7GEem1Gd9cLSWIbpOn581h9Z7l7uxmZrzm3ml1I3qgSiA aHpSy6Il1vFR8ONyW8d6dauQqHxURve241X1yYY/hAIxM9Yy/2o56FOReGZYp305/EpjcyGvm41 EXCdxUce16Gj39D1xgNBCA0kBMO+chXc7/3YHkEBkCXz0tHvq381Mit5luLxDPnT7V2LPjp9t8k ob1T2HJDPw1lUtRrUyFU= X-Google-Smtp-Source: AGHT+IHZ2nZlSE4bY+DeORQ5OW6UXqIttaYmBhHVuYgUVLXZg01srZq6yjNacWpp4viSD0SrKlEUDg== X-Received: by 2002:a5d:5983:0:b0:391:10c5:d1a8 with SMTP id ffacd0b85a97d-3911f726338mr6635902f8f.6.1741276122183; Thu, 06 Mar 2025 07:48:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 14/54] accel/accel-cpu-target.h: Include missing 'cpu.h' header Date: Thu, 6 Mar 2025 16:46:56 +0100 Message-ID: <20250306154737.70886-15-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276198399019100 CPU_RESOLVING_TYPE is declared per target in "cpu.h". Include it (along with "qom/object.h") to avoid when moving code around: include/accel/accel-cpu-target.h:26:50: error: expected ')' 26 | DECLARE_CLASS_CHECKERS(AccelCPUClass, ACCEL_CPU, TYPE_ACCEL_CPU) | ^ include/accel/accel-cpu-target.h:23:33: note: expanded from macro 'TYPE_A= CCEL_CPU' 23 | #define TYPE_ACCEL_CPU "accel-" CPU_RESOLVING_TYPE | ^ include/accel/accel-cpu-target.h:26:1: note: to match this '(' 26 | DECLARE_CLASS_CHECKERS(AccelCPUClass, ACCEL_CPU, TYPE_ACCEL_CPU) | ^ include/qom/object.h:196:14: note: expanded from macro 'DECLARE_CLASS_CHE= CKERS' 196 | { return OBJECT_GET_CLASS(ClassType, obj, TYPENAME); } \ | ^ include/qom/object.h:558:5: note: expanded from macro 'OBJECT_GET_CLASS' 558 | OBJECT_CLASS_CHECK(class, object_get_class(OBJECT(obj)), name) | ^ include/qom/object.h:544:74: note: expanded from macro 'OBJECT_CLASS_CHEC= K' 544 | ((class_type *)object_class_dynamic_cast_assert(OBJECT_CLASS(= class), (name), \ | = ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Richard Henderson Message-Id: <20250123234415.59850-13-philmd@linaro.org> --- include/accel/accel-cpu-target.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/accel/accel-cpu-target.h b/include/accel/accel-cpu-tar= get.h index 0a8e518600d..37dde7fae3e 100644 --- a/include/accel/accel-cpu-target.h +++ b/include/accel/accel-cpu-target.h @@ -20,6 +20,9 @@ * subclasses in target/, or the accel implementation itself in accel/ */ =20 +#include "qom/object.h" +#include "cpu.h" + #define TYPE_ACCEL_CPU "accel-" CPU_RESOLVING_TYPE #define ACCEL_CPU_NAME(name) (name "-" TYPE_ACCEL_CPU) typedef struct AccelCPUClass AccelCPUClass; --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276689; cv=none; d=zohomail.com; s=zohoarc; b=RJ2Yj6sxdPqJnqckZ0+eCKMa+NLKhC2JYTSEb9FMxqE8Z3QEhxdRBHN5Mf4832L/oO/aBNkvup4u0kKtV/nJMBfHPeVsKvMv8SqlNSS8y14M7hjxnsqCnDQZT42Cirlk7TOK1H1MQdpjw/1I1tVr20LPZvfItNtPl6kiYHkUGVo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276689; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=tpYVdS1VQrRLJn+AtzliasS5gEtN/QTYnA/EkOtkTRg=; b=GclEHAxFUxfIEu/znXl7WuW2RK9PI9QM9NJo6HOfwxLnF2+6aoDIC5YkyJ//VQfsT2rlGJys/w1zSguxQMobbJyC8uHqe/gmb7tY1Fk7p3Cn5ImtiGBopelN4zAzpMO1MfEWn+AaIs26y7UJnUxJj7ALLdCNrWSnKxuSFaYR/lc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276689813423.6781215170229; Thu, 6 Mar 2025 07:58:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDU9-000391-IW; Thu, 06 Mar 2025 10:50:10 -0500 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 1tqDSy-0008Or-B3 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:00 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSr-0006KE-71 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:50 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-43bd5644de8so9712635e9.3 for ; Thu, 06 Mar 2025 07:48:48 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd8b0461sm25054045e9.4.2025.03.06.07.48.45 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276127; x=1741880927; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tpYVdS1VQrRLJn+AtzliasS5gEtN/QTYnA/EkOtkTRg=; b=cupCHcmMB0qqy4dGe0tVVkt7WbJOAGy5AkiUCstKkGyZrm+UfcbIazj4zZsB2DAKb4 1ukNwR912P4qAKpxFVXp0zsY2q9lc7Z3O7gG4Pnnuqyu98ychq2sijJL7TyIQbq+zFEN E8JWKtU1+saC3Fj8kEr8IfE/+Ow9xr0Hvrn6ihveSkcjr6gGTuWMkNJkoZPNNAxMIc3K 90ULV5bfGggKrAZiHIgEt0BvvyzNJz2jKjcvOalplzwJ3CQ7wtfwjCWZmPeDq4ooCvrW RCr48+oAy7cRdYwtLE+gLPjIAht/KNKVfoj1JaOV96GTqlCxluADJHlFbo63WVG6y8yE 3iug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276127; x=1741880927; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tpYVdS1VQrRLJn+AtzliasS5gEtN/QTYnA/EkOtkTRg=; b=Cv76mQBmvPYtlVZuHzbL7CkWZxg5HL/NV2WPg2YfPJ4StaAw+cwH2pDNFY6tqHWWVX +ApSNjCYZkT3iT2AYaj+7LiDrndFjmIgkN+J33IGsf9IoU6kiGj6SgPqU0XbCEnKRhga 2e83C//1NkWvVl+Ipa67ndVby6l/wPrDbxSbS0ytZqer7hEnH24Z40C24iREZoiMf4iT LXHjo9HkWWYE8xDgT2PjuJOu/vpwoq9ScAb7qCwI9122rXEXAdECP/h0zdOYfa9+Bw/F qyy9SywCynYb9/Dlkojoo8KAzoU9qQPMB8B8jKDtzGnaSSM02uN9A0dQ5XdetqwUf3mK Fx/w== X-Gm-Message-State: AOJu0YzsK1QA3+ShL7WNDxwaLY/TcgwIhLrxwG1ieh2eLU32pnd7y1tg QPDSIBTWhVMM527jXrCXFN5rCCDd+m/Dq8v+g3axqSfGHmKBGbseOVrdssBqViz2wEfYvGz+/Kl OdFs= X-Gm-Gg: ASbGncvxl6StkeQrcFPEhDVSESGXzpDQyLcOP79ux7oRh7JNHQS5pNwF8K7MikYzGrA eCVIrilI0i0tZMdn+8t4H6U/IzFpguivJQXvHdGuyUmuAbRuQlx+qeRs4TTqSjaKk3fGeP4efFD rLtXpLp9gZy3o1zJBx8PDQzY66Dbkq4br0iWegJDRyty+Um6UFVwQQtVY3TVs/YKxjIiH5hUqRM Z2r8m7ZmndqZI9IsWz8SCBeexuJ3jLTkzLkQYlt1c0+nOCSEBAufrr/03XSw1pquYkq/zDM/VbR t/qclgR8Nmyz9td/mZdP9UPkUSkNUO/zIUGEIpdXKzamvQj4zPSqSVLZN0ArLvBFvURglZzBcHG aKyYhbA03aaJFDRof9lE= X-Google-Smtp-Source: AGHT+IE2OyHNjoDTb/KUwR7g+DhA2Fxolpt+sj5X3/foG1y6ZCRFpm89SLi3URB6mm9wtdj+XgJPEA== X-Received: by 2002:a05:600c:4f15:b0:43b:ce36:756e with SMTP id 5b1f17b1804b1-43bd29487a8mr76591035e9.12.1741276126567; Thu, 06 Mar 2025 07:48:46 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 15/54] accel/tcg: Include missing bswap headers in user-exec.c Date: Thu, 6 Mar 2025 16:46:57 +0100 Message-ID: <20250306154737.70886-16-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276690751019000 Commit 35c653c4029 ("tcg: Add 128-bit guest memory primitives") introduced the use of bswap128() which is declared in "qemu/int128.h", commit de95016dfbf ("accel/tcg: Implement helper_{ld,st}*_mmu for user-only") introduced the other bswap*() uses, which are declared in "qemu/bswap.h". Include the missing headers. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250217130610.18313-3-philmd@linaro.org> --- accel/tcg/user-exec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index c4454100ad7..9d53c9440ea 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -30,6 +30,8 @@ #include "exec/page-protection.h" #include "exec/helper-proto.h" #include "qemu/atomic128.h" +#include "qemu/bswap.h" +#include "qemu/int128.h" #include "trace.h" #include "tcg/tcg-ldst.h" #include "internal-common.h" --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276188; cv=none; d=zohomail.com; s=zohoarc; b=RHPSvxXoi8b8gkOK1IP955YvXsSKe4UB3XpIjIa0dwoe9nSpTXiREmEm3+eLVHe242nwDZ22hdMcVZvIhD2QLH8Ie4aGNF3hOfxhhryJqItIpCV4DRjt0sCtOc+BmDINzzeC7z9tdAyiPkCKx7b7Agl4p0LlcV9ea/rsfouEfAs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276188; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=vBqWCN5asMJDU7YX+TXWWAjMjDHkesNYFUgdbjXa4FQ=; b=f0wix5gc5g4AH+vle9tL4Rm7VA9we+zJl24IfiT3f3KIBWhJH4oaXJNcFvgpP6JeinpbuHuakCTz0iP2MP82Nou/XW8RWZ2rrPhquBu7hQt/F39playLgkgQSxJRY3FvdlT2yKlQ6Y0hDKjRZVwLOHtu0gBrfZgf1y/68Bo/TWo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276188753335.02049650289075; Thu, 6 Mar 2025 07:49:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTc-0000Pg-G4; Thu, 06 Mar 2025 10:49:40 -0500 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 1tqDSx-0008VC-V8 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:00 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSv-0006KZ-3D for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:55 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43bb6b0b898so7158935e9.1 for ; Thu, 06 Mar 2025 07:48:52 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd4292b06sm53431265e9.14.2025.03.06.07.48.50 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276131; x=1741880931; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=vBqWCN5asMJDU7YX+TXWWAjMjDHkesNYFUgdbjXa4FQ=; b=sHTDxQxQPjXc9yb4PAYZY3TcCQK9Z56h0FO/Ke8l2jZt1fNyOQNngnH3NJak4hSiez B8rLFC6ZrVTXQzKotTVihmle/3H6Ekj+lRv6fk7hFj/xXux+/seGWnhY4y/LmJUTiACC DXBXXyNL1rg5UYttFHonoSzKbk40QRNLDeQav5vNEpBUVOCDQwD+Tc+uA+tcduGfSf/b vlI8lsfpjWTYWzvPqz2XQoPtpDDSvFyACz6oWAoh//e7XPsZoZaYC/8G/CzTdNzY0c+R aO+nMpQ48iRHuLAL2xIUsNtsdKCJMf8LwvExl61VaBYAtCmJ51HAcDqvlU1U5KDZ/dDU wwTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276131; x=1741880931; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vBqWCN5asMJDU7YX+TXWWAjMjDHkesNYFUgdbjXa4FQ=; b=H0Jl+6VtmyuY6yL0c/2zp9PrPvx7HRZW8ULzvK3/H53pq8neAvnGYk/EwmqQU17Eoh l/sU3+38YUr9v9tmy8H8ECDyc08P7f8RxI9XXzOU0fjsrGi6lry1TSEEBqMGtYW74WI2 HF6s+Abu4vyrhyijnN+mjqVFnnyjkPH/HCHK6EVUzyJLAmN99A41THB2VBOEDLt5C7Bw ceoJEt3PkYkyP91nMLDcrNYrpZCuhLB+zNlHNXvBx1nKAjLCA67CBxKljcXQG1oR72Qg fwTP5MLH/oa7iwXblKYjkyY2qMMqjaInCEkD5g30X2AbzmaUuQM17QPcNO1yK4RzjMQT XiXQ== X-Gm-Message-State: AOJu0YzTGGCoBDuLnumKeM5+LaCz1taKhNa8of4r/dbks/3baFvJbYAm L4oiSmG+ucvSBsMyuarpaHp9ihzEzVAHbWzAcB7NY5Z33owlGypUdjlsMxTzm0g1gvx/6x/BfIs +Tvc= X-Gm-Gg: ASbGnctn0kRLaKuseiEEawv0NHsVS15a2g+ENipqYfhQcUKNcx4DH8V/iRbQch8IxYq BgmjPrQAF3ADtLMtCB+kFCTGKCgQnvSnTchkJMcWAedNotlLaDcqmXqoRTlh28PoAFH7lisE+Bo vOjdqi1PHtSK9CMzHg2G1hFNlran3aOZuQtiogw5wxL9VONB0E5Sp4MF+4H0AIbAZMKG9Hvhrr5 LV+SrRxOfi9SlO8qY1FYUXDoi2pyCvJNXiujiSbizO1x4A8OL12J+IOjo6DwMhDTvHNhnxwaeVP BAQe5+SrwX+IQQ5Bwx0NtuU3srOEl97rEzDM6lzfxh9VNgdTwevw6R6LAnojyQn6urWl66H+Ch7 EjDfHKvCGI262sDxivp0= X-Google-Smtp-Source: AGHT+IHNHylW2x1xoSvNcv4hKXXLsqXgqg3y/D+97YDyrBBz54Zifs1tDtU1oYVH4Y1dMklTcJyglA== X-Received: by 2002:a05:600c:474b:b0:439:9e13:2dd7 with SMTP id 5b1f17b1804b1-43bd2948911mr61887925e9.2.1741276130936; Thu, 06 Mar 2025 07:48:50 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 16/54] accel/tcg: Take mmap lock in the whole cpu_memory_rw_debug() function Date: Thu, 6 Mar 2025 16:46:58 +0100 Message-ID: <20250306154737.70886-17-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276190583019000 Simplify user implementation of cpu_memory_rw_debug() by taking the mmap lock globally. See commit 87ab2704296 ("linux-user: Allow gdbstub to ignore page protection") for why this lock is necessary. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250217130610.18313-4-philmd@linaro.org> --- cpu-target.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 20933bde7d4..b5230ce1837 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -380,6 +380,8 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, int ret =3D -1; int fd =3D -1; =20 + mmap_lock(); + while (len > 0) { page =3D addr & TARGET_PAGE_MASK; l =3D (page + TARGET_PAGE_SIZE) - addr; @@ -414,11 +416,9 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, * be under mmap_lock() in order to prevent the creation of * another TranslationBlock in between. */ - mmap_lock(); tb_invalidate_phys_range(addr, addr + l - 1); written =3D pwrite(fd, buf, l, (off_t)(uintptr_t)g2h_untagged(addr)); - mmap_unlock(); if (written !=3D l) { goto out_close; } @@ -454,6 +454,8 @@ out_close: close(fd); } out: + mmap_unlock(); + return ret; } #endif --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741277026; cv=none; d=zohomail.com; s=zohoarc; b=KKPGol8+X3OjeSBMBT/pbFDenjDl6wk7TwarOjSeGKdo7OGuhEnxEgDeOkhT4LkOZRNQR4cC/YygHTqv3NgW/9t5o+V3g/pHr7OH6AjfmazO7Xzv73mY3rV4xgZD//SZfYbapMO7+K8csGgEGZl1wVgVuL0vKRaxPT8vFaBYH+4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741277026; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=tTLBFu22G8ChNwnUUuiiV0/VSwHr+qaXgLj/hapvjNA=; b=ED/7czMvpyS9FSsQxXDI9SOg2eW5YSoR+AiQqyTkvcSNodqscbPS87soYspGnZSqRdzc+lqWo7u54LIU3OKdp0n6hJTrW4IUgNcMojSevbXRO1j3fbn4Kq/TCFfgJiBJIOmtJH3KYs7u3U2TpHHzxlnunmGPaP8nPWmfFbfA0N4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741277026506896.3897668016955; Thu, 6 Mar 2025 08:03:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTm-00018w-Vm; Thu, 06 Mar 2025 10:49:47 -0500 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 1tqDT1-00005o-10 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:01 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDSz-0006Kp-7U for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:48:58 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-43bb6b0b898so7159715e9.1 for ; Thu, 06 Mar 2025 07:48:56 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd426c01bsm54378555e9.2.2025.03.06.07.48.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276135; x=1741880935; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tTLBFu22G8ChNwnUUuiiV0/VSwHr+qaXgLj/hapvjNA=; b=U1vgWMQxX69TlhsF4blk4qZwYqKIMTK6ekfzKEVov30ebnZF7s1VYz97Wl24wrgbTp az6wo0jkSTdeoJiLcGQfnSIA7/rDPZ4M9DXs/5qI6vGrTACtKcwixonkI0ncF5PMusPy KT7hr+IhYLp1fFSOCdVXNCN7jdq/suVBE/3GvwXtqI0hJFUVXEY8mzpv5qa6CuZmSAl8 fMzTSrKc4zhRx4BmPUDjDJK95dqw/5H8EFj8vWu365+bf/Xc8llgiw7jI+BdnQ21Ze/j 56yte3IG88UbDKOmDj1dIZBGwu6OrfdlKoAXT3h6vw/6iRf01NYEYWwVAcBoyRKsanUv 5wCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276135; x=1741880935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tTLBFu22G8ChNwnUUuiiV0/VSwHr+qaXgLj/hapvjNA=; b=Q0MZXOtTi1g7c2iKzHQLfiDe8Pp9/Vx4XOklsuSVN/4Ai/zPpRwAxN3Z+0uLWoLCM2 RB03qizs4Bfh0b0CmbOSqIg34lexdlmcvQDkRQJqp20HRvYO49LWEhyzBvVZKKLh5C5i vNWJ58Wqq4N8w4lERfyppljJ5TFrLtjbToq6Bt3x6TQJlD7UFLU0ACPtrc7iN7tkpEkG av7o9/rnJvEjZw+lVvLYU+5jG/oKIePBVxb4Dy0YJzcCcNjotDY6wWb8RQ4jIL9mBaiQ XRb3C3jmIAygfFx7KuYLsTGCnbHpuJiPqHunsB9ddlTVZec4WxwWW7m1YQeVdCIxBo4Z Wahg== X-Gm-Message-State: AOJu0YyJlWH/cJHEsf1Qb/yqJI9IwKyyEf+TGRnD1k4IhvtD7psQstXx mHRI5/5n/YOsT0JC1iDpktvnOyMwB59YmKsiie4Xmb7PXTHbcuLZgyJpENfyaZ7xJ5V/TnS7kAf lYg8= X-Gm-Gg: ASbGncuNAda6gcswniKTczeQyn5xvccgeI9gzqmnusbLAvP2cMQi4Fb2pqQWvM4en1L /6w/EyU04t3E25vWNnqW4aXc9D6BT31AG3Un8W4OtDefGE/gR92f0Y1RO+hqRJtyA0VAyDc+cbH vzalGRCTIZNp1EpRIdlVh2LXckSjd4lGHNEbdg5b5J1jJTvjIuZi75Ow+LuiRZdlIMWBDYAPW10 ypgWDmUcemsfB0P00Y1AScP7AtHBABFE/eVnYRvr+iTIaXh3ewJP/qG+O56CD9EvM5ijR0BEWr5 FHlCNLl1Pp4Hu4RnuAy5xNRbNWPAuOcCKJf8ir55yIw2pCz5zLa8vCWEEt97CJCwE+mRdhahzL0 0VfY2T19npLODkBUarZU= X-Google-Smtp-Source: AGHT+IFJr2jgtqTnLgcuDpOtP8ONwP4dgqyH2Y2WNPtLCuhBb2RVfdFnuVSOGidQ3T4uzOvqGKKVxQ== X-Received: by 2002:a05:600c:4687:b0:439:8346:506b with SMTP id 5b1f17b1804b1-43bd2ae56f5mr59372335e9.19.1741276135333; Thu, 06 Mar 2025 07:48:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 17/54] accel/tcg: Avoid using lock_user() in cpu_memory_rw_debug() Date: Thu, 6 Mar 2025 16:46:59 +0100 Message-ID: <20250306154737.70886-18-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741277029088019100 We checked the page flags with page_get_flags(), so locking the page is superfluous. Remove the lock_user() calls and directly use g2h() in place. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250217130610.18313-5-philmd@linaro.org> --- cpu-target.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index b5230ce1837..3892ce12229 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -374,7 +374,6 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, { int flags; vaddr l, page; - void * p; uint8_t *buf =3D ptr; ssize_t written; int ret =3D -1; @@ -393,13 +392,7 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, } if (is_write) { if (flags & PAGE_WRITE) { - /* XXX: this code should not depend on lock_user */ - p =3D lock_user(VERIFY_WRITE, addr, l, 0); - if (!p) { - goto out_close; - } - memcpy(p, buf, l); - unlock_user(p, addr, l); + memcpy(g2h(cpu, addr), buf, l); } else { /* Bypass the host page protection using ptrace. */ if (fd =3D=3D -1) { @@ -424,13 +417,7 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, } } } else if (flags & PAGE_READ) { - /* XXX: this code should not depend on lock_user */ - p =3D lock_user(VERIFY_READ, addr, l, 1); - if (!p) { - goto out_close; - } - memcpy(buf, p, l); - unlock_user(p, addr, 0); + memcpy(buf, g2h(cpu, addr), l); } else { /* Bypass the host page protection using ptrace. */ if (fd =3D=3D -1) { --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276576; cv=none; d=zohomail.com; s=zohoarc; b=J/jCY2s59yzYN9AE36i2Osut/foWf/yZE6aMvmlQUeD9/tRnDPpvp3vkMjr6L8fT++h0wOXdSYViUkYZguLRqzLW0HrTsBCLPuxmHYr5aHRoKmFcbJELx+N1g3zq0qoa0+5dwiH93XYzeGeI6nNcA4IVE26SpUAOvcEMMmefkCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276576; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=XYt4cBWZWrjpH5G+9fvDDbmKK0hy/czETSnD+S9rJr4=; b=VIp/cSiZsMUhht4QnvMauSXPdISImSGzS50hqhp37zz856VgXPWUcwjmZt4dvhk1fljkUtwyaXR+f2BPUVBMrppp1D567XTPynIBKjnSTb1I+IZDaGu+WNp4LtPZXv/Iqvdy7rH+duMJt0209PegXBsa15a1CZRSGShkc72LQ4Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276576078563.1560961707374; Thu, 6 Mar 2025 07:56:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTw-00028i-U1; Thu, 06 Mar 2025 10:49:56 -0500 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 1tqDT8-0000Aq-8X for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:07 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDT4-0006LF-80 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:04 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43bc30adad5so5466915e9.1 for ; Thu, 06 Mar 2025 07:49:01 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd93c9d6sm23236255e9.26.2025.03.06.07.48.59 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:48:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276140; x=1741880940; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XYt4cBWZWrjpH5G+9fvDDbmKK0hy/czETSnD+S9rJr4=; b=Ca0M/kKkeLzrls6vp2wLqW4n3b+8FQeLRdqclujhKthUREtwXJPht2888QYSQJFGi2 uFKJ3BkvVyB/55h8OjXqdRvVuI0U3ycMaqGQJt2i6aZGu/ejt734zF4OPbsPAgWtEbtL XIGPhciqNqD2zw60AfvaTqFl/+yTNE+DlhwN08dlP1cW/0o2yB6yDjgw5MnkY1opjCur GDGaSBKKKWAfYkjl0dsYhvG1HMFBoV6k9oKls5TxGxq99b8i3zcWgacZoAEG9jwa1BA8 s81II3I9rl69HxGpaKAP1wrRNoHEZeNnE93Pf4lGgN7n+rpJzNm2G4SVS1Hz1EiXix/t +qPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276140; x=1741880940; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XYt4cBWZWrjpH5G+9fvDDbmKK0hy/czETSnD+S9rJr4=; b=IdVk/6Rztk3DTzX6hMNhPwV1amJGnr4TzIMqfaq/X/4ZaMmMyNoKF362eWgxO69U0e Evy+ZCKW4Hjn1g8YJOoLEzHFcfmL+FMNIFx5Tvdr16OQLL9MscinJ7Mrvg2G1JM6cl5M rh2BawowN+py2njDxPS5Hld5DW3npFtxlfBOSYT2HVlLY/2j0KKbo0i307cwrlhk9mtv l/5ElWnXL0QTHQKEe9SOPmKdbGL5pxLJRZbxXlH9FFc6F8HP+Mq0tMja+7pAIqSGio90 9hIFSQhwDonAGAKhZHpX52ybVJ9gYzzut8oTi8I2pxYcgNGfg2/n2STaTceG19kpIGGT AxeQ== X-Gm-Message-State: AOJu0YzgC38Y1F/tRFGMivjZBx/bwWcGTeDXFSXa72Z1YBB+18Kk75zL NIkoDfUxO9gZuvrbL23unAQ2fwM0ylwUzCA07/mgx6xW4+6KOI7F9/Xi6+jsA4NAVWZMpXYAC/5 tRSI= X-Gm-Gg: ASbGncuZwYSym9pNV0NlUkwRrzfFwAlGH64qGcPJo6tJhpLWuGK7aypihalbG+6npfK FjGt6ar7k//OMxk/3/WCaGubrMyFG1IaM7bUlYPU9KVALDW92n4ymobUogsyQlLN5TTnH82gpes 2tI09ESLOjewIg6+LBvMLwC2VLpEPI0DPLom+El9FCQv14ZElxHQxxicXD9XsoA1x22rSI+FgYt Und+NuJRsj8GdWyFHXkki3ncQArBsnKxXF4mMnvaTeV+49jzfhgr8NWNIq1ga3yFYMAKOmQ7jFd zpAosicnQxnHA4RgdOAUxt8YDfKCBLj+EgC1oO/cW3eujy6AE/vpjvaoW9F4bz+uksvJnBCi6Pd tvJUzvtrMJMUxa6GBOio= X-Google-Smtp-Source: AGHT+IHt0w7Tk84c88eITifZQAU1g5sin1l85vPtlZBuJKpt/6P1xNtmJ9XZohoxLhLz7zFlMTUQWQ== X-Received: by 2002:a5d:6d82:0:b0:390:e889:d1d7 with SMTP id ffacd0b85a97d-3911f73fd02mr6315894f8f.13.1741276139730; Thu, 06 Mar 2025 07:48:59 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 18/54] accel/tcg: Move cpu_memory_rw_debug() user implementation to user-exec.c Date: Thu, 6 Mar 2025 16:47:00 +0100 Message-ID: <20250306154737.70886-19-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276577808019100 cpu_memory_rw_debug() system implementation is defined in system/physmem.c. Move the user one to accel/tcg/user-exec.c to simplify cpu-target.c maintenance. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250217130610.18313-6-philmd@linaro.org> --- accel/tcg/user-exec.c | 80 ++++++++++++++++++++++++++++++++++++++ cpu-target.c | 90 +------------------------------------------ 2 files changed, 82 insertions(+), 88 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 9d53c9440ea..2322181b151 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "accel/tcg/cpu-ops.h" #include "disas/disas.h" +#include "exec/vaddr.h" #include "exec/exec-all.h" #include "tcg/tcg.h" #include "qemu/bitops.h" @@ -971,6 +972,85 @@ static void *cpu_mmu_lookup(CPUState *cpu, vaddr addr, return ret; } =20 +/* physical memory access (slow version, mainly for debug) */ +int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, + void *ptr, size_t len, bool is_write) +{ + int flags; + vaddr l, page; + uint8_t *buf =3D ptr; + ssize_t written; + int ret =3D -1; + int fd =3D -1; + + mmap_lock(); + + while (len > 0) { + page =3D addr & TARGET_PAGE_MASK; + l =3D (page + TARGET_PAGE_SIZE) - addr; + if (l > len) { + l =3D len; + } + flags =3D page_get_flags(page); + if (!(flags & PAGE_VALID)) { + goto out_close; + } + if (is_write) { + if (flags & PAGE_WRITE) { + memcpy(g2h(cpu, addr), buf, l); + } else { + /* Bypass the host page protection using ptrace. */ + if (fd =3D=3D -1) { + fd =3D open("/proc/self/mem", O_WRONLY); + if (fd =3D=3D -1) { + goto out; + } + } + /* + * If there is a TranslationBlock and we weren't bypassing= the + * host page protection, the memcpy() above would SEGV, + * ultimately leading to page_unprotect(). So invalidate t= he + * translations manually. Both invalidation and pwrite() m= ust + * be under mmap_lock() in order to prevent the creation of + * another TranslationBlock in between. + */ + tb_invalidate_phys_range(addr, addr + l - 1); + written =3D pwrite(fd, buf, l, + (off_t)(uintptr_t)g2h_untagged(addr)); + if (written !=3D l) { + goto out_close; + } + } + } else if (flags & PAGE_READ) { + memcpy(buf, g2h(cpu, addr), l); + } else { + /* Bypass the host page protection using ptrace. */ + if (fd =3D=3D -1) { + fd =3D open("/proc/self/mem", O_RDONLY); + if (fd =3D=3D -1) { + goto out; + } + } + if (pread(fd, buf, l, + (off_t)(uintptr_t)g2h_untagged(addr)) !=3D l) { + goto out_close; + } + } + len -=3D l; + buf +=3D l; + addr +=3D l; + } + ret =3D 0; +out_close: + if (fd !=3D -1) { + close(fd); + } +out: + mmap_unlock(); + + return ret; +} + #include "ldst_atomicity.c.inc" =20 static uint8_t do_ld1_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi, diff --git a/cpu-target.c b/cpu-target.c index 3892ce12229..83688f1d508 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -19,18 +19,12 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" - -#include "exec/target_page.h" -#include "exec/page-protection.h" #include "hw/qdev-core.h" #include "hw/qdev-properties.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" #include "migration/vmstate.h" -#ifdef CONFIG_USER_ONLY -#include "qemu.h" -#include "user/page-protection.h" -#else +#ifndef CONFIG_USER_ONLY #include "hw/core/sysemu-cpu-ops.h" #include "exec/address-spaces.h" #include "exec/memory.h" @@ -43,11 +37,11 @@ #include "exec/cpu-common.h" #include "exec/exec-all.h" #include "exec/tb-flush.h" -#include "exec/translation-block.h" #include "exec/log.h" #include "accel/accel-cpu-target.h" #include "trace/trace-root.h" #include "qemu/accel.h" +#include "hw/core/cpu.h" =20 #ifndef CONFIG_USER_ONLY static int cpu_common_post_load(void *opaque, int version_id) @@ -367,86 +361,6 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...) abort(); } =20 -/* physical memory access (slow version, mainly for debug) */ -#if defined(CONFIG_USER_ONLY) -int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, - void *ptr, size_t len, bool is_write) -{ - int flags; - vaddr l, page; - uint8_t *buf =3D ptr; - ssize_t written; - int ret =3D -1; - int fd =3D -1; - - mmap_lock(); - - while (len > 0) { - page =3D addr & TARGET_PAGE_MASK; - l =3D (page + TARGET_PAGE_SIZE) - addr; - if (l > len) - l =3D len; - flags =3D page_get_flags(page); - if (!(flags & PAGE_VALID)) { - goto out_close; - } - if (is_write) { - if (flags & PAGE_WRITE) { - memcpy(g2h(cpu, addr), buf, l); - } else { - /* Bypass the host page protection using ptrace. */ - if (fd =3D=3D -1) { - fd =3D open("/proc/self/mem", O_WRONLY); - if (fd =3D=3D -1) { - goto out; - } - } - /* - * If there is a TranslationBlock and we weren't bypassing= the - * host page protection, the memcpy() above would SEGV, - * ultimately leading to page_unprotect(). So invalidate t= he - * translations manually. Both invalidation and pwrite() m= ust - * be under mmap_lock() in order to prevent the creation of - * another TranslationBlock in between. - */ - tb_invalidate_phys_range(addr, addr + l - 1); - written =3D pwrite(fd, buf, l, - (off_t)(uintptr_t)g2h_untagged(addr)); - if (written !=3D l) { - goto out_close; - } - } - } else if (flags & PAGE_READ) { - memcpy(buf, g2h(cpu, addr), l); - } else { - /* Bypass the host page protection using ptrace. */ - if (fd =3D=3D -1) { - fd =3D open("/proc/self/mem", O_RDONLY); - if (fd =3D=3D -1) { - goto out; - } - } - if (pread(fd, buf, l, - (off_t)(uintptr_t)g2h_untagged(addr)) !=3D l) { - goto out_close; - } - } - len -=3D l; - buf +=3D l; - addr +=3D l; - } - ret =3D 0; -out_close: - if (fd !=3D -1) { - close(fd); - } -out: - mmap_unlock(); - - return ret; -} -#endif - bool target_words_bigendian(void) { return TARGET_BIG_ENDIAN; --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276650; cv=none; d=zohomail.com; s=zohoarc; b=PLwvnCqiBE8+EMGDjFjt+cjRQ+luUXLjXAV5WIo3v95Bc0fkWYWW9u2qLqYBjSTHWDT5QbrZlUGsE2Cl3PczdpEJz4OOLCS6GWs7s8hazeJ86dUruPk+dBvL8febaqlk2wHcbKCSEu7R0qjOyMCXVNat1aE54I1XUQT8Wj+myDY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276650; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=MUTTZ9ZjMGE0zesMow2iRN4HqaCDCLVgPrmD8dOYeq0=; b=IVeNzxVxJwjS1k5TYBQYwGg4KKCOfIZaQJoPcHD2H1Pc5vcou4lpGEeFKMfR+tHYOEPlIx5EtwYrx1aL0swOBP1CSp9CEY8rspGhOOPJkRAtrrHpk9l9R46ghwATvTwSs2FyPL+pzrhJghzRn31xPG5gZPeZs0ks5JM3DZ22Dic= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276650909980.0842296849896; Thu, 6 Mar 2025 07:57:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDUT-0003m6-QY; Thu, 06 Mar 2025 10:50:30 -0500 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 1tqDT9-0000Bo-Tp for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:11 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDT8-0006M2-3D for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:07 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43bb6b0b898so7161125e9.1 for ; Thu, 06 Mar 2025 07:49:05 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bcbcc0c39sm66381085e9.0.2025.03.06.07.49.03 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276144; x=1741880944; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MUTTZ9ZjMGE0zesMow2iRN4HqaCDCLVgPrmD8dOYeq0=; b=LbJ29HbZtBY0+K7BiFXUS7Ejz8cMwaiyaF2/CQenRgj59IIvtnhGF6NNCrWm9acrRQ gHrBa3oumXcl0/6xKUlp+WcLYOPsniAOcwQYyS/qdNsBwn3N/4LZOk71f5gA41dsLxY5 15U/1i7euowX+UEOIDn58qvQ/tM1RbukwjdRDphjr2j7T7Ee31IVTTCG0IruDM3X99Gv 1s6UFrBet6Q9BTZ9KxnwngquttFmEXRKU9NO0sPGLCff1H0LEXNQqZPlc4o4JaavTtrB Hxyt8BVz5GNJiXLVb+dj+51cP3ZpnF4LnsUgfYvvvaeCJylv0xUtehbejRxNOx08u7zE yWkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276144; x=1741880944; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MUTTZ9ZjMGE0zesMow2iRN4HqaCDCLVgPrmD8dOYeq0=; b=hZQMGYGYJS0KQwlwnmrztoYpMRMoqroDiF37c2wflSW7EPBup3ODkvILY8AEaD4NGq U72P/A+pkeUe7ARtnNqbvBvGomIG62OXBC/470Sq0uYe6yrTOPoMVkpg/l+lkCJe9FON ahVKPrMoMKxXGz4xFaTC6xyQN5O9w6cyH5jQV+X7s6sClnsh5fgLFZLv1Tzh75JwLhGl 2yhF00oDetqU/BpkeO4xJ5petUh/e919Pps8VKcodSiHOc6um5ObNNm1eE/iMwpEqRRP bczTr51ABY/E7Vk4/y4bqhBU9oasfImAqW0nc72W/dZtHYxuLteNdXDC0Jdy8YTS2DCs hWeA== X-Gm-Message-State: AOJu0YxwZ9ZQ68A+0nS3+DsivOcIDm5c/plTUvXZ7leLbYKrE6CoQJeY ETzthBwDtgH//yJE4Aa0WveJNkgMv1uLhoOWzPOJZLFdylCUkWtXADVBbtEvbo4vDat6eoL2ani ypas= X-Gm-Gg: ASbGncv7l1Bxv9/JgCZuN71uLtuhxiyFekyGeV7IUcKt/whSDtTu8WEkceYPQoUgXQU 5kr2bhwVuVuQtyE9oIDjhuqx9UlWjmCJzzm2DAeP5+LC+2F6CtD62VQmYTkYNz/HVYb1IcCz4KB ErgotSoi2u6Dp4V3pLTBnY/gBLrYvQR96oGSy0/wgsD0XH01W5YA1irCVbQ0pmTYWZRV7nvMMDC EGjqooBjp5dvVsh2I0jdy5dpXnNJWF2qrZ3JdE2M3Rht5k0/3BojOPH0EnwJUd3bSA4ZgPoaYwy fGd7MSPTXj6L91DhDNfmast19deJtjTtofuQp/fA/VC38mJJXdVi/df4g4W0TaAbOIRYYX1wVxc 8VdEVd7+W1V3J5/tUlL4= X-Google-Smtp-Source: AGHT+IFhVkJPPbUk+3vwT8Cf6Bcc8u9Z7SO6TTn+Atl0a/aWr10ra37GP6yBFhioMER9JPv676+hwg== X-Received: by 2002:a05:600c:511c:b0:43b:c0fa:f9cd with SMTP id 5b1f17b1804b1-43bd2972e1dmr67090175e9.7.1741276144130; Thu, 06 Mar 2025 07:49:04 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 19/54] accel/kvm: Remove unused 'system/cpus.h' header in kvm-cpus.h Date: Thu, 6 Mar 2025 16:47:01 +0100 Message-ID: <20250306154737.70886-20-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276651880019100 Missed in commit b86f59c7155 ("accel: replace struct CpusAccel with AccelOpsClass") which removed the single CpusAccel use. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-7-philmd@linaro.org> --- accel/kvm/kvm-cpus.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/accel/kvm/kvm-cpus.h b/accel/kvm/kvm-cpus.h index b5435286e42..688511151c8 100644 --- a/accel/kvm/kvm-cpus.h +++ b/accel/kvm/kvm-cpus.h @@ -10,8 +10,6 @@ #ifndef KVM_CPUS_H #define KVM_CPUS_H =20 -#include "system/cpus.h" - int kvm_init_vcpu(CPUState *cpu, Error **errp); int kvm_cpu_exec(CPUState *cpu); void kvm_destroy_vcpu(CPUState *cpu); --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741277027; cv=none; d=zohomail.com; s=zohoarc; b=OxIfgGvTWeGWMW/utXq6NJ89lF0QW3hPWtgxC/5B3Uqsg3Q8g5BBwREDuMN2s2rpTeUtm3fbRdotCnPIj+DgxNmhj41VXJIw4QphT2cyT1FGaN99scn6R7dvpcLkGZUVuEHeTpqHmryBc+NqYDXJNHrv2bWqcZtDdoheBrxVC0c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741277027; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=d6J+LsLjSWQlqsq7ooik8ElyF+HqmtBS26XCNLHBy/I=; b=CHAb0Bntu1/XuUa6WEB4HZ7myiA0rdXowPoGK2rAMdeqBcsr7TD7u9Kzr/5v4xZ+N+9ms8hVCi68JDcBZRYMG3DA4rFdLkJmnL/W2NwZdbkDgHemwVm4h141FYA9CMWFrJE4HOB4RmGNjV8F2qR2ACeggn7NKGCJBgaWVQ2PwAk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741277027429375.3678516887961; Thu, 6 Mar 2025 08:03:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTx-0002D0-6o; Thu, 06 Mar 2025 10:49:57 -0500 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 1tqDTD-0000FI-QC for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:15 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTC-0006Mb-8X for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:11 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43bcad638efso5186625e9.2 for ; Thu, 06 Mar 2025 07:49:09 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd41c7cc7sm56999535e9.0.2025.03.06.07.49.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276148; x=1741880948; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=d6J+LsLjSWQlqsq7ooik8ElyF+HqmtBS26XCNLHBy/I=; b=UisdJWTc45CYTx52tq33X5ZMEvuDDFISV2ZNy8F6sJQ+GbkhX5Cy9cLJXOcCo4jokU pIIasSG7ViKHEXHQ2g70PtoxhXBBEY+3EXhfsFIhM6V2FlOzLDmqtkTSo+QpjoDHKOZw 8LLgY7ds04U3aPqJf2BUc+KfyIVWheVt2IS67YlFN1xz+Lo4BPsvxpfbohJj5t9uIEzZ I17K5yoFpsBd6JM9Zprrr6Hv5FOSqWeOZwSMdO7ePq9tJtGmz5dZ47J149286EJZa3J7 km4tB5PNrcYPFicEl94/KDj+6aaAZONA9UIzI8cm3QV/ubxfkUdbk94PdksuWd4Pv/h+ fJhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276148; x=1741880948; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d6J+LsLjSWQlqsq7ooik8ElyF+HqmtBS26XCNLHBy/I=; b=pqPKCKQwuqAyXYR4Qgsh2nOSuf/qCtV0U3JqrLBFlREg+KYX3mNVK+lx35lR976rl7 ezraFHpBo4RJsY3kcVzF4CDUlMw0mjaADBRnNqB5HAHF05Ogsn1BsSOH0IQKJegk6qpm VRXQeFIvH5FuIWc6XYD5UkBZuBvDH64vqhVT8GHPl4q+lW154gqkBIyDmttlpewVapmU u/j0LRDZdACMHpkWci0w7ZGp5JfPMTnOIhBlWmGXzlWoNa/dgJiHVWHPAy/01ulFd6GJ aXI/oaJDbQsvmxM7zeHVpTDn7tvMw6Zz/TO+nyZCRepA1zjVYVsBKVVMJY1CcxKfq92r IwmA== X-Gm-Message-State: AOJu0YzAqtNMD+aGPygnhqud+xbP+QUqwIbW1G9jUjEd2suYE11Jui0m 8WpkEj9fcOtNaoq2N6Ui/pI0Lyr+h4DU75sIDofB0B/XtMiZkQ6w+GoiDddaEWmqTFhzM+R7Z+a O/RE= X-Gm-Gg: ASbGnctMn2bqhkmzuXdMGblBRP0uL1U/+UvJLSxKIHuYo/EsrSiida1xaI2m/7v2pUn 3NNTWhiu1axnqvdDsOY7Nwt/UylHx3FmTSEAQygWHTFXzklWikj0NfxHGMZP6edu2hxiuninOHc 9RDzVO253LhHyNY6ZRZye9J2AnQEt9M4o49VFgX3+jFe5aaGLfF3ScSlg+0f7TlvCkZqtPWw6JU h9muGksU1PO0HPVm3OxpzaDz4DcacsWK63fazyCnlXw2BbecCruAgTzsIJgZVQjslFvhDKtUhgm jUoZk1bKxBo1cOYBC/eFc4XhfnwBu7oZWGAhZC2PvF2YrBW2XIQ6LDyfFty+UOAmQXLHE6r8cXL 2c00kSQ7wx5y2xKNYJDw= X-Google-Smtp-Source: AGHT+IHfVhKDA2lTidrgMbFCl5h9q6UnpHASeVb0hhW1+/aJpfm0jJEVWE+O1wSXS+4U6uyAbJmNPw== X-Received: by 2002:a05:600c:45c6:b0:439:98ef:5d6 with SMTP id 5b1f17b1804b1-43bd2aed717mr51793495e9.22.1741276148454; Thu, 06 Mar 2025 07:49:08 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 20/54] cpus: Fix style in cpu-target.c Date: Thu, 6 Mar 2025 16:47:02 +0100 Message-ID: <20250306154737.70886-21-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741277028928019100 Fix style on code we are going to modify. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-16-philmd@linaro.org> --- cpu-target.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 83688f1d508..b925b9391e8 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -48,12 +48,15 @@ static int cpu_common_post_load(void *opaque, int versi= on_id) { CPUState *cpu =3D opaque; =20 - /* 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the - version_id is increased. */ + /* + * 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the + * version_id is increased. + */ cpu->interrupt_request &=3D ~0x01; tlb_flush(cpu); =20 - /* loadvm has just updated the content of RAM, bypassing the + /* + * loadvm has just updated the content of RAM, bypassing the * usual mechanisms that ensure we flush TBs for writes to * memory we've translated code from. So we must flush all TBs, * which will now be stale. --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276497; cv=none; d=zohomail.com; s=zohoarc; b=Rq3UiUuCMTko9NZlNe0bqbEFAbdIXGVf/2zyUMCQ7eXaUdWB0wbNVqmfUpQNvNaBoO/vCgjdtj5uF1ZMpQMQAXTHGBA9ZExbcgcXOcEJx7sLn62z6cfH74uvg+zXQyPGXvIJknBkbyAB/BSEVScHPpVBNIdwwsNIMpdOHCMVKKQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276497; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=k+YMncU/lkdHhuSVLGblvNz32VlH9gXNcYRrUvN73h0=; b=B6spxadI2hQytVWzTYXkPgpXdix8y0C4mzZjcw2u/MD0CA/V9u98VgWBFht4+cbvX6A6MUGHg9TAf+vD+iOdD62b1mMgPHDKKaYPHnn08No/SqtxNpb2sjezLmhZPDStm10s3nbEfZWor2wSMsQJEbtHsOIi1bZ4gFvic1hzv7U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276497812760.0000420086517; Thu, 6 Mar 2025 07:54:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDUf-0004LV-ID; Thu, 06 Mar 2025 10:50:42 -0500 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 1tqDTI-0000KC-B5 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:21 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTG-0006Mn-Py for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:16 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-390cf7458f5so822025f8f.2 for ; Thu, 06 Mar 2025 07:49:14 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0e2b8bsm2418916f8f.64.2025.03.06.07.49.12 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276153; x=1741880953; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=k+YMncU/lkdHhuSVLGblvNz32VlH9gXNcYRrUvN73h0=; b=roTQ5uo//Q20XozGTal8vkrIS2AAAuZK6MPExZ80y12Npy3TmeTQmvlJ92TeY6BhOW cHQOGsmkN2beAmvmYtsxKlmEyricazTEkZfKLfhPdUWp4mySwuoUuIqPar1180uAU3Fy t4FdAWZLHzcOHfpvqsDFmW74zaCg//YZxL90p5cqy61Fd4JhxyepkbdPfy5vUPPzScga sTiObBkhe2w50luX43zxTdxAkEwdRGcvhFRKAA7HJhbd2BSrtC+TPMbl3juKN6TE8rO8 ySAdB2LLIMc/wXT4cRgg7wGaDexLP2fAihoPDIMNcBlGeMhHVG+/bCwKSj/tyiDgGPuy 25kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276153; x=1741880953; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k+YMncU/lkdHhuSVLGblvNz32VlH9gXNcYRrUvN73h0=; b=k5vOsVT/x4hkFKxFUfdEimKJ+LNjGXQSykeZ3vZ6MoYbWV8UnLnemCvXusoVoztdkB hvfluDl+blXzznOEm191+PE3DQjJLqc3pbdXRh7kYqW8tJuq38GrPWU/EK8i1mnxDOXU roXlCfdg1ehojJY2mvLrEuZlOQvm1ZVt+vGDT62eJsBTPWg3f1jZ/J71I4Hl0CaPz9lW XN0pEl21mfb7TNJmOC9ZLSP+A/eGRRMNz7pK1Rm6fzbaGukMnUxcrGoBikeyBZU0Loin dTApvYZZJE0fcDUJaWI47YZ9yR9cBiEUX+4IMP711wpDTVEDn/6gnsIntWa4Jp44Av03 FwWA== X-Gm-Message-State: AOJu0YyqFmttZ+HjpTZyWTOMpH//8r/lfC+b4UUu8pB4ASPSVqxg+94n Z3RMXtjxHiQOTKZ3u0/d7IX+M93yY+XMv1PDeYJfIk/xV1umQtyd+A6SmIcGPqZrNGJssBGMWfo gW/o= X-Gm-Gg: ASbGncuGYWMGPv0CFA86EnHY+ZgRUqhib3KhBKxhWfprF6eIjEDIj5b19e7V/mY6qEz k8O2Xu/EYpodA7FGdqZiQeke7rtwdDSnKpw4/7o5FkuXe0YYr7SInpzpn5GsaH/DA35RFqnVu6C 3yYlLrccwIOzCJj44GUZhnF2tfe3RIoc9maFafjsng0UWQFr78bhyD9bzfjNNGWwmW+uMaVCayu IFBpySDzacYsJXAdQ1n6AO9quPPqbg9QdqVbudDG32c34hfnRrDzXeWAWh2QURG7usg95agqLcJ dHwe4X+MG3EIYjQ7bV7rHzI2uEi5VEIQnw5sIagx2xKovHT4MXbfphmPfr9fW1LQ57a0NZkp95u 3ksPbFq8WZ2XoAWgvgyc= X-Google-Smtp-Source: AGHT+IGgjKQoc9J01eK6/A2n55H76jd7eWhXL6ngn6MtGAgeD3ajN1Ute5QxvCsz5b9PkMRwkMh/bQ== X-Received: by 2002:a5d:64a2:0:b0:390:e7c1:59c4 with SMTP id ffacd0b85a97d-3911f740a0bmr8290839f8f.13.1741276152879; Thu, 06 Mar 2025 07:49:12 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 21/54] cpus: Restrict cpu_common_post_load() code to TCG Date: Thu, 6 Mar 2025 16:47:03 +0100 Message-ID: <20250306154737.70886-22-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276499331019100 CPU_INTERRUPT_EXIT was removed in commit 3098dba01c7 ("Use a dedicated function to request exit from execution loop"), tlb_flush() and tb_flush() are related to TCG accelerator. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-17-philmd@linaro.org> --- cpu-target.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index b925b9391e8..48446c90212 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -46,22 +46,25 @@ #ifndef CONFIG_USER_ONLY static int cpu_common_post_load(void *opaque, int version_id) { - CPUState *cpu =3D opaque; + if (tcg_enabled()) { + CPUState *cpu =3D opaque; =20 - /* - * 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the - * version_id is increased. - */ - cpu->interrupt_request &=3D ~0x01; - tlb_flush(cpu); + /* + * 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the + * version_id is increased. + */ + cpu->interrupt_request &=3D ~0x01; =20 - /* - * loadvm has just updated the content of RAM, bypassing the - * usual mechanisms that ensure we flush TBs for writes to - * memory we've translated code from. So we must flush all TBs, - * which will now be stale. - */ - tb_flush(cpu); + tlb_flush(cpu); + + /* + * loadvm has just updated the content of RAM, bypassing the + * usual mechanisms that ensure we flush TBs for writes to + * memory we've translated code from. So we must flush all TBs, + * which will now be stale. + */ + tb_flush(cpu); + } =20 return 0; } --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276794; cv=none; d=zohomail.com; s=zohoarc; b=bdBAbPzz/5N9NHfuqXv9JWbh22cra59mOUdDyjFdTvDO9itV6Vwt9fJbsGNip1+DGRcd+/rizQCdB6gvBIPGUBJc9Eft7EKv09wHEAhgVI+HsT8Yybu4DX8HWdbZ3dGR/HTK4oDzQMXba2BG/TXHKHPFJ9zZxReliC2Xh20HJk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276794; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=X8Saq/dqG9xCUSyrkXOExGdZvozj3jjUcX+27h5Z2go=; b=eMAo2ar/EEeJe+Um5rqH44GdRl87ti7tULSQV/10VSTEn24H2VkqbJv9ThuqsAJIBbxrgOn+k+2+z3Bf9eMIUGRgQnOzxo78+LGqdTgPnK+4JdcIFbhCn+TqKQho075I2zTjqDc2aQV46fR7T0VDNimvxXH5JDk0m0CBdkXsaNY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276794140518.9636546309426; Thu, 6 Mar 2025 07:59:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTi-0000sx-O4; Thu, 06 Mar 2025 10:49:42 -0500 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 1tqDTN-0000OE-J4 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:28 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTL-0006N8-6K for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:21 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-43bbb440520so9728715e9.2 for ; Thu, 06 Mar 2025 07:49:18 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0e2f39sm2374704f8f.80.2025.03.06.07.49.16 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276157; x=1741880957; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=X8Saq/dqG9xCUSyrkXOExGdZvozj3jjUcX+27h5Z2go=; b=bP07UptFVuMFyGaSNuiW6PlW/YCahiaEZYQQZkqa+O0zOrVYTXcIOuAgCjwEpC1Xm9 WD9fs14yJr9bZg7Sv5cI+wmAQ8Me7MDuVxibFqaACPWIbEA4Bxig1ERBiIWZR20BTXwN lV5VTSuRFKMawHd0BCTHQNiRex9ihjy5xCg94SwOxsxR4Aifhj86Z1U2/qjXtZZkYPUU o4SSjyrZ0tJwLIWSxoJ3UYDpb/LMXdrRjeA1GihHbIpzqNtwdM2EJPmTQOy/GjJChh6c +stYeCNZ8VcR5MJbxz4jGaXHhclwqahyDc3CaPyCOZEB5uLRRxZw3UF4w8glQVE83XPJ pgag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276157; x=1741880957; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X8Saq/dqG9xCUSyrkXOExGdZvozj3jjUcX+27h5Z2go=; b=dkVmuxXIQPFaN9XWsMMIZeWwz1q+cjg/WmgDHucYyvtCQAF+hQzyVguaVQGsycMkv3 yYJI9bOIfjOtzLChgCOYCHsbdFfULwKKOs9rOipUbRCZy9Y1ycITO/h3qAOmLBjiMZWL pH6YFYkMP22VU88tawNxluLgUIZDx4CKfLvuIhYLCvx2D7vlbz9yBeVH2vQ7/jNUcHq0 i5+K3ukmT+zoUXuojP7t22r+Q7sDsjJEl8nRm7dPvV2vu+kj1/C+hJjvXfp8lBUART1M vZDlNDfqWTe6qucnxcypgAq9dFbsnsyQFWSgq8VtNyt0YrUFroJqQndcqvCkDhbGiyl6 AwOg== X-Gm-Message-State: AOJu0YyOBywk6VarU1Sy2xHWbl4ax3acmE7I0PDiINwvQO0g7q1b+14z S6Kxkerjx/uAV41emZjAVcgMZCvd6g5AjMKvoDjGnn2hDfDCtWIVb44Mcpj4g+ZK6CK2nGG/GVU jpyg= X-Gm-Gg: ASbGncuXpyj4+oKtm44N7/GGtyRsxYlPhmCRobRLmYQEZ7RIdx3jUZLpQFZzKovKXld cr/vAmuNht9p0kWiPqpwTJJxKadzpR5yFVf3SSctPcIBZWW+VKI6DU4HxlVNfoTuPnMcl+w+oMN 9xfC46mJzJ/XDotDYu0Fk+5hQ43cLjBHzv67xnMXQvHPXsZxom9np9G+lW8QvxIDbZDcGUIh0SY QI1RHH7pxTa8+Y00x85JPxtlcMnLLt0BI0UDTL/v9I3bdnmcD+6g+Np+w9DHtUnTjKClb+68p76 rGGVqCd5E+Qq4uRqQlxk5hoyv4lEtMpl2XVkAiFZ7BLIpQpMFhuXe6tId5fRdwDcvkzGcT9Xr3b y6SqLwkg9seXJh0zM9rQ= X-Google-Smtp-Source: AGHT+IH9wdlnQxq7wbRbJX92lGMVU192CqrT8ag1QqbhsaemZW0TIgoFgjujrUxua/iPI+Ra+Q4miA== X-Received: by 2002:a05:6000:4109:b0:391:2c67:7999 with SMTP id ffacd0b85a97d-3912c677bdfmr3208820f8f.48.1741276157402; Thu, 06 Mar 2025 07:49:17 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 22/54] cpus: Have cpu_class_init_props() per user / system emulation Date: Thu, 6 Mar 2025 16:47:04 +0100 Message-ID: <20250306154737.70886-23-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276798035019100 Rather than maintaining a mix of system / user code for CPU class properties, move system properties to cpu-system.c and user ones to the new cpu-user.c unit. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-18-philmd@linaro.org> --- MAINTAINERS | 1 + cpu-target.c | 58 -------------------------------------------- hw/core/cpu-system.c | 40 ++++++++++++++++++++++++++++++ hw/core/cpu-user.c | 27 +++++++++++++++++++++ hw/core/meson.build | 5 +++- 5 files changed, 72 insertions(+), 59 deletions(-) create mode 100644 hw/core/cpu-user.c diff --git a/MAINTAINERS b/MAINTAINERS index a0e462d03ca..1d1fadc3bc9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3791,6 +3791,7 @@ Overall usermode emulation M: Riku Voipio S: Maintained F: accel/tcg/user-exec*.c +F: hw/core/cpu-user.c F: include/user/ F: common-user/ =20 diff --git a/cpu-target.c b/cpu-target.c index 48446c90212..f4c834fd26a 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -19,15 +19,12 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" -#include "hw/qdev-core.h" -#include "hw/qdev-properties.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" #include "migration/vmstate.h" #ifndef CONFIG_USER_ONLY #include "hw/core/sysemu-cpu-ops.h" #include "exec/address-spaces.h" -#include "exec/memory.h" #endif #include "system/accel-ops.h" #include "system/cpus.h" @@ -178,61 +175,6 @@ void cpu_exec_unrealizefn(CPUState *cpu) accel_cpu_common_unrealize(cpu); } =20 -/* - * This can't go in hw/core/cpu.c because that file is compiled only - * once for both user-mode and system builds. - */ -static const Property cpu_common_props[] =3D { -#ifdef CONFIG_USER_ONLY - /* - * Create a property for the user-only object, so users can - * adjust prctl(PR_SET_UNALIGN) from the command-line. - * Has no effect if the target does not support the feature. - */ - DEFINE_PROP_BOOL("prctl-unalign-sigbus", CPUState, - prctl_unalign_sigbus, false), -#else - /* - * Create a memory property for system CPU object, so users can - * wire up its memory. The default if no link is set up is to use - * the system address space. - */ - DEFINE_PROP_LINK("memory", CPUState, memory, TYPE_MEMORY_REGION, - MemoryRegion *), -#endif -}; - -#ifndef CONFIG_USER_ONLY -static bool cpu_get_start_powered_off(Object *obj, Error **errp) -{ - CPUState *cpu =3D CPU(obj); - return cpu->start_powered_off; -} - -static void cpu_set_start_powered_off(Object *obj, bool value, Error **err= p) -{ - CPUState *cpu =3D CPU(obj); - cpu->start_powered_off =3D value; -} -#endif - -void cpu_class_init_props(DeviceClass *dc) -{ -#ifndef CONFIG_USER_ONLY - ObjectClass *oc =3D OBJECT_CLASS(dc); - - /* - * We can't use DEFINE_PROP_BOOL in the Property array for this - * property, because we want this to be settable after realize. - */ - object_class_property_add_bool(oc, "start-powered-off", - cpu_get_start_powered_off, - cpu_set_start_powered_off); -#endif - - device_class_set_props(dc, cpu_common_props); -} - void cpu_exec_initfn(CPUState *cpu) { #ifndef CONFIG_USER_ONLY diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 6e307c89597..1310b4203fd 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -20,7 +20,10 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" +#include "exec/memory.h" #include "exec/tswap.h" +#include "hw/qdev-core.h" +#include "hw/qdev-properties.h" #include "hw/core/sysemu-cpu-ops.h" =20 bool cpu_paging_enabled(const CPUState *cpu) @@ -147,3 +150,40 @@ GuestPanicInformation *cpu_get_crash_info(CPUState *cp= u) } return res; } + +static const Property cpu_system_props[] =3D { + /* + * Create a memory property for system CPU object, so users can + * wire up its memory. The default if no link is set up is to use + * the system address space. + */ + DEFINE_PROP_LINK("memory", CPUState, memory, TYPE_MEMORY_REGION, + MemoryRegion *), +}; + +static bool cpu_get_start_powered_off(Object *obj, Error **errp) +{ + CPUState *cpu =3D CPU(obj); + return cpu->start_powered_off; +} + +static void cpu_set_start_powered_off(Object *obj, bool value, Error **err= p) +{ + CPUState *cpu =3D CPU(obj); + cpu->start_powered_off =3D value; +} + +void cpu_class_init_props(DeviceClass *dc) +{ + ObjectClass *oc =3D OBJECT_CLASS(dc); + + /* + * We can't use DEFINE_PROP_BOOL in the Property array for this + * property, because we want this to be settable after realize. + */ + object_class_property_add_bool(oc, "start-powered-off", + cpu_get_start_powered_off, + cpu_set_start_powered_off); + + device_class_set_props(dc, cpu_system_props); +} diff --git a/hw/core/cpu-user.c b/hw/core/cpu-user.c new file mode 100644 index 00000000000..e5ccf6bf13a --- /dev/null +++ b/hw/core/cpu-user.c @@ -0,0 +1,27 @@ +/* + * QEMU CPU model (user specific) + * + * Copyright (c) Linaro, Ltd. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/qdev-core.h" +#include "hw/qdev-properties.h" +#include "hw/core/cpu.h" + +static const Property cpu_user_props[] =3D { + /* + * Create a property for the user-only object, so users can + * adjust prctl(PR_SET_UNALIGN) from the command-line. + * Has no effect if the target does not support the feature. + */ + DEFINE_PROP_BOOL("prctl-unalign-sigbus", CPUState, + prctl_unalign_sigbus, false), +}; + +void cpu_class_init_props(DeviceClass *dc) +{ + device_class_set_props(dc, cpu_user_props); +} diff --git a/hw/core/meson.build b/hw/core/meson.build index 65a1698ed1f..b5a545a0edd 100644 --- a/hw/core/meson.build +++ b/hw/core/meson.build @@ -46,4 +46,7 @@ system_ss.add(files( 'vm-change-state-handler.c', 'clock-vmstate.c', )) -user_ss.add(files('qdev-user.c')) +user_ss.add(files( + 'cpu-user.c', + 'qdev-user.c', +)) --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741278810; cv=none; d=zohomail.com; s=zohoarc; b=DDDgkmpgbzNvIm2KB7VPpaXjPQqXeYfgQFKnuPogETcC6DsmtgLSod4yAI57htEaVqDep6NBfpIiSkj3qa7alJSCHo0R6lLkZpCW2YgNdjz9AsEWsQb6G61D5SUbcP2XS/fZDIRBOB5rG9vPCaQ2QwiMcaRIC65K8SGIm2faj/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741278810; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=7gQL+fUXOizsPvaDiR2QJscVtgRbEO+e68iNhkxG0Ak=; b=dH961BYJ07+c1MooRKQv1Oy+yUlOd3ZbLI8dSS9ReI5c038se6OPn9QgO+fU9+y3DVNMef3w9lyu1tMgm9zV/0BH3mXSx9z0CsUKkl3PA+oADLpfr2xihSz0GeBSlvZTnrTWHb33ankr2GR+9rMahf6SJyh47rUJS5S9RxEQllI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741278810268653.6277781044695; Thu, 6 Mar 2025 08:33:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTs-0001fl-OG; Thu, 06 Mar 2025 10:49:53 -0500 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 1tqDTR-0000Ox-62 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:30 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTP-0006NS-IF for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:24 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43bbb440520so9729865e9.2 for ; Thu, 06 Mar 2025 07:49:23 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c103f57sm2411276f8f.91.2025.03.06.07.49.21 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276162; x=1741880962; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=7gQL+fUXOizsPvaDiR2QJscVtgRbEO+e68iNhkxG0Ak=; b=klKKoksQTPsQ5yCZ5+lP/2GKoMC+co/ZDnNm0C22Y+DX02pD9pNajQc7SGooSnI0bJ G5eIKNxGtMNGfwpF0oFirB3BeaVjooHyDw54qxPp75wCEUvsXWEDtKgqV9Z3UhYW7SE1 ANVFtF/oWVeLrXygSzY1Gj22FReVSf9KFcVgdU0HkUeWiLUq8UV+M5uZ1/dpeSoiWnGX QNwPYLcFjOmWrQYYMlnxyk1wg1tl2bmUBBfJ4l/6xiYOdeWPJJ/wAUg40MIVigcKpuRw uVTdkPP+QkAw8uAzL16w5iStSFvlYbPz2/HcbFPbL6hNtFyMqLNM1DOkFWq+Bt+hLbMw 0fdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276162; x=1741880962; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7gQL+fUXOizsPvaDiR2QJscVtgRbEO+e68iNhkxG0Ak=; b=S0iWBHzyl+uRSwZ11E2uAmOzKKtkUjKYaGRDH692SMH+J7VhkFy4GkCMwyA5SVEVE3 qLaAkZDQ84lrvc4N0gmv1SXnIFkrVnFlqim6VA1madcX89rH0c5ysGa6LKKpVnl239tY gWwd+EtkSgCUjkAaoJbtKuLyKujIdKgKz/4vd8d7dyVhQRl2VTRcXOrQeaZS6Dq2QdWP 5/VaS41t91qYMTN1nmSpubRGVfUPeTMW3I6h1iIfa6DWddfte+3/zUvzMZd7KAeEFzKC ghIJ7fKdRbmg5jyAyTj3winQMZoyGa80J+IHrx6G8bsjWyvL7ME6SRP0BesOCtLJO4lP CV4Q== X-Gm-Message-State: AOJu0Yz/hQJVyA1DaFmFyL5MpctviNgiRmlZ0pMu5mMSfys7x417bTNd QPJBGO3z+7ZHVv4HB5ZzMEr0hpascs8fSHOHFqWLjRnZZ0nSTIYd6G08FCnCkjiRfjxMVMR33eL Azms= X-Gm-Gg: ASbGncuJLsR/lPmmwYpNzIraBIFOhV76mx1rOdB0BrSkkQGb+S8x9izcjzlpVsyBP2b 0/FQUXWpDw2ltefYr32NwqMqUr8ngoMafUlqEjlNsfcLhcsqGA49D4SLQEz+gkht+KGzi5fbcQt WRsj2jKHiRSHIkUIaPXhV1WRpeoqUlEGF7A6a0qROE2EAxCB3/SekAQNxtcj95rv5SNAb5DTVvA z6QPaNRvPFVpljuoaynu48beUkT4yDXVHZerM0seDnUXvkkJsDUjvddZx74QsPp0C798baPv/Rm YuSfz17kiGSaneUeWmqj1IiI7V2c0c5ywPcO6vXhs5/S4v2RB6RBoWjlUgxugx47xWKAS5qBkpB CegN+SDXom5MZ/HnpTsc= X-Google-Smtp-Source: AGHT+IHI5bm8Q2OvpeafvKTe7+ygU6pEWjyJsA32DtcgZQzug5v9fTlo3D1R1UG0HoGPhfqRAw1kDw== X-Received: by 2002:a05:6000:1f82:b0:390:f75e:f815 with SMTP id ffacd0b85a97d-3911f7543a6mr8563839f8f.23.1741276161875; Thu, 06 Mar 2025 07:49:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 23/54] cpus: Have cpu_exec_initfn() per user / system emulation Date: Thu, 6 Mar 2025 16:47:05 +0100 Message-ID: <20250306154737.70886-24-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741278811689019100 Slighly simplify cpu-target.c again by extracting cpu_exec_initfn() to cpu-{system,user}.c, adding an empty stub for user emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-19-philmd@linaro.org> --- cpu-target.c | 9 --------- hw/core/cpu-system.c | 7 +++++++ hw/core/cpu-user.c | 5 +++++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index f4c834fd26a..5aa6c4b0c63 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -24,7 +24,6 @@ #include "migration/vmstate.h" #ifndef CONFIG_USER_ONLY #include "hw/core/sysemu-cpu-ops.h" -#include "exec/address-spaces.h" #endif #include "system/accel-ops.h" #include "system/cpus.h" @@ -175,14 +174,6 @@ void cpu_exec_unrealizefn(CPUState *cpu) accel_cpu_common_unrealize(cpu); } =20 -void cpu_exec_initfn(CPUState *cpu) -{ -#ifndef CONFIG_USER_ONLY - cpu->memory =3D get_system_memory(); - object_ref(OBJECT(cpu->memory)); -#endif -} - char *cpu_model_from_type(const char *typename) { const char *suffix =3D "-" CPU_RESOLVING_TYPE; diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 1310b4203fd..e511507e13b 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -20,6 +20,7 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" +#include "exec/address-spaces.h" #include "exec/memory.h" #include "exec/tswap.h" #include "hw/qdev-core.h" @@ -187,3 +188,9 @@ void cpu_class_init_props(DeviceClass *dc) =20 device_class_set_props(dc, cpu_system_props); } + +void cpu_exec_initfn(CPUState *cpu) +{ + cpu->memory =3D get_system_memory(); + object_ref(OBJECT(cpu->memory)); +} diff --git a/hw/core/cpu-user.c b/hw/core/cpu-user.c index e5ccf6bf13a..cdd8de2fefa 100644 --- a/hw/core/cpu-user.c +++ b/hw/core/cpu-user.c @@ -25,3 +25,8 @@ void cpu_class_init_props(DeviceClass *dc) { device_class_set_props(dc, cpu_user_props); } + +void cpu_exec_initfn(CPUState *cpu) +{ + /* nothing to do */ +} --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276208; cv=none; d=zohomail.com; s=zohoarc; b=KEoAz+ckEyvQmFyQTK6uHisn+6t76PXagQzhhp6OIpojRnW0XjJL3cIGmbFkYG54/CI3msBuRf7NR47kr/T5v+jw4AMYi/jRw3wA40MOuhzN9bJkIr/RrSkSBdmMH+8mgQHuMuZUezUD2IXYpp5q901rfu/oonCSEPtfpTGDH78= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276208; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=4sVC2TkF7qXS2mJBLOLW8I7WhvYkgMOlFC0u4MR1LHM=; b=YF/pCQpztQ2n9zUUOmRgQvfPeOVDlu1eKJmnsZ3/eSvLdnj+fgD9IX0ni3uMCGTduPFEdnFQzdqxYnaLreW8znvA/Qyy6pMBec8x6dj+3749LIYV0SWTG75OE094ci3ZqvaQ4YExRl1lwGaEMRgtcL4+BkZSdqh0gCxaUH4uVUk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276208456232.45367607186063; Thu, 6 Mar 2025 07:50:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDU2-0002fs-6W; Thu, 06 Mar 2025 10:50:02 -0500 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 1tqDTW-0000PV-3R for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:30 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTU-0006Nk-CA for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:29 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-43948f77f1aso5247255e9.0 for ; Thu, 06 Mar 2025 07:49:27 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0e2b8bsm2419446f8f.64.2025.03.06.07.49.25 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276166; x=1741880966; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4sVC2TkF7qXS2mJBLOLW8I7WhvYkgMOlFC0u4MR1LHM=; b=K242bB1oIISjIz9+JXTlU0cXLajRNBiCin4OCs03OcpuWRQEt2r2SDt0oGYFqq/sTz DlXG1Dw4Fry8BuxSs20aQ0aHq9arM9ETflT9HddZ7/G84BtxAyIxV5gC3mDWBsmwN1oi 6Ad+PGwcsxzH5YuQnL44rHEbN1Zl2KXccXNEjyW9HEs3uSeAydGhkCkTivhsS7RAHAa/ 13ESwZguvIvSJdUaYUxfKAFfDGTBY4DjZrAEiteROecPbD0fTrcgL4uTjoNk2Uead8bO F+CHjmnDCQASI8JZSa1ONOoNKpVDQ4m4UBIM7Js7Q7/pfRHMBvUZoh8rvZtOLWNJCLF2 ZV7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276166; x=1741880966; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4sVC2TkF7qXS2mJBLOLW8I7WhvYkgMOlFC0u4MR1LHM=; b=fMw1CuFnREL3fpEA36VZx153fRlqmd3fbmn/6Cu26eoT/yoL5jO2dBo/94E9zBunef rDEU57gIxafwYfRiOlBMe2xARozfPXZ3m2FnvF7SdasafaZ6qL0k60ZnZ/eJkBA0APHN X++EJTBEdWWKujWgtQ556dtFnCeexl1GwwmW9rYcT8I5eaIfxLEZutnq3SJUAWRnnEs2 qgka0KWGBIqbKPsres5T5WXse+EhG3uSKfkSW+EgO+EV1Z2dtVIR+3tGJEBk071Hb8Hj sejQ9TTeoMbpEVapB2Kg69t+2IZ68oLOtvpqM4u0VoR7DN48amvTjdPN9NuAHtQ+kf+W xUcw== X-Gm-Message-State: AOJu0YxygTAMF6lFStjfY5qRjoZZSiH4ZuMUL0KxPciIjWI2nshXBbNX Moz8UMVMGEyw3vQ8q3mNH9w+HDUSMFbJ8HqtSJlBsag+MWGNyHOd02Ls+TcmEUSGCBVoNs/a3CB zwVQ= X-Gm-Gg: ASbGnctZEzXmQFDUNEp8nhPZ9vvLr4hpkhmQyxxMer8t/1ucCWUm3YSRjIuF+lCqCbl CE1pOCzqPlSs9yMZToV4B3u9rISs71X4rMQnKkx97oAoG0TAepfDpWBvyR7qFFtdD3owoLy3oo4 jfxwro3ARpFg1JRKRbT7VJTTqAGV7sm7IK1TXGtAVlhV9GWvy7B2X00HeMIpRJbMFpvxd2INlKC IXRHsDsubQnhJsZzuax7w9acgYWm5sgavIKrUPIhimTSrdtEwFJOC8PC/heUEG1aFKRhtNhjBQO hSP2z46Ip+DIeCekxhdWdXUGF7LVmeHRRJUL05oHB8zuVMvm2QF/mN38xWKV4Q/XB3osRAQfyro p49/jdz4TDbnyBQhSlqQ= X-Google-Smtp-Source: AGHT+IFzOckwGf6F3uW5qNouQU2YB+VifASO7BcLY4YafZLNGmm8Gx9HEdiHqsnzTaRloCPrKHsFSQ== X-Received: by 2002:a5d:6d87:0:b0:385:ee40:2d88 with SMTP id ffacd0b85a97d-3911f7260c5mr7376064f8f.3.1741276166357; Thu, 06 Mar 2025 07:49:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 24/54] cpus: Restrict cpu_get_memory_mapping() to system emulation Date: Thu, 6 Mar 2025 16:47:06 +0100 Message-ID: <20250306154737.70886-25-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276210414019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250121142341.17001-5-philmd@linaro.org> --- include/hw/core/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 7b6b22c431b..9dd6ac7c763 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -616,6 +616,8 @@ extern bool mttcg_enabled; */ bool cpu_paging_enabled(const CPUState *cpu); =20 +#if !defined(CONFIG_USER_ONLY) + /** * cpu_get_memory_mapping: * @cpu: The CPU whose memory mappings are to be obtained. @@ -627,8 +629,6 @@ bool cpu_paging_enabled(const CPUState *cpu); bool cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list, Error **errp); =20 -#if !defined(CONFIG_USER_ONLY) - /** * cpu_write_elf64_note: * @f: pointer to a function that writes memory to a file --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276846; cv=none; d=zohomail.com; s=zohoarc; b=Lb9W3OgZwUtiiWKmCFrYrkLni4G2VTkuQWoozWFcTH1d/fEy0wnX40AnpaOmMcKR3I2GaoF74b6gCXg4BJ/ry8G+RKJwGmnfp6JKykb2DlQT7Cy1KVQw2zradQ+PFhh8qQMqTGdxMQdZFOqWP4e4ZZuH3RUV0Zpefo1gEku+oAA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276846; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=T9ZPZ0rakYtLgiZY4tLzbdV2MvyXhoEkkzhYQQC1PVU=; b=NFG5DfKy875vZASWoi1YcsayGIsfw+vhM6u/DnASS37kejgjAFb8SpsZvwkDjqojwY8sEtqwjvA2IcOeIjBMOVbKcHbEz/CXGLRR/+bPX0Ese8wcKJjM336r1qtLj+gQ8Tbv6VlAxUHt1sieK9R/jvWpk/ZaB3qxhak8n5atzBI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276845723889.7674500699917; Thu, 6 Mar 2025 08:00:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTq-0001W8-M1; Thu, 06 Mar 2025 10:49:50 -0500 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 1tqDTa-0000ZL-80 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:36 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTY-0006O9-JD for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:34 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4394036c0efso5094825e9.2 for ; Thu, 06 Mar 2025 07:49:32 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd91338cesm41488605e9.7.2025.03.06.07.49.30 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276171; x=1741880971; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=T9ZPZ0rakYtLgiZY4tLzbdV2MvyXhoEkkzhYQQC1PVU=; b=dizTG2Hw5hOdlo0VKskexGG1KZnz5SUV9KdddhvOY02ShohnqGtfHDKPjSypEqXQ66 OmhRWP5+sk0u33LAPPIS5fVVAhI+lmmzC0fZBuTU4gUwx4FnFBSnpVoLJtzbeJNo1X48 61ryBsD9iF59VXDZ4WTwgQYXfUId5fM0itIXbpJaPXT9K+xZG3eILC8IwcbjDFztbcSK nrRhaqg0IekpeXD5zsb1ycNK+lT63GvIZ7CQtpzz8zi0oXd2hfBaVApyXhPPJHoW+Gm2 Amx3W7QN3sbXc26V2HeOvY+t+Zzs60AZerINnw8UhmY2SOp47biMS9p/S6MxHY3gDpjY 1sVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276171; x=1741880971; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T9ZPZ0rakYtLgiZY4tLzbdV2MvyXhoEkkzhYQQC1PVU=; b=obhx2vdwLcc+SJMmcToAu3kJR3K16mOxcmqWJkOa+rfgjpb172Rg6Dsz1rvL7kwqhx ZXtIpPoCiR/JmKtCXFrXm8f/VSixMmjJ69b/WfDMprMxE/m0Z627fARWMmSOLtpoOuFF e0dwRhmCzKuL2k0iGmOZ3oJbmlSO10HcMPTUcnjrvHh71Ids16PdsupkJwEKBU2tfiti I9xJ57RDdGG97W3iEvwDWR5sgefTC0ZzpIV7Nm1/WhL4mmOTeuBj/N7FxDLdMriinHFY bmxWTJss/lLb/kDCrgGKV8gPzLaK6z+PtMRjeYOViZ5dvNC+6ROQW4QMjxymZvBHZ5aq +7+A== X-Gm-Message-State: AOJu0Yx7soqqK7+dfDHh9RG2614K4MoJ9Vs4f2WIGG6mHkQWeeN7Y2vo fHn3kfUhU5m3ahNJG3GgeH3q3mY67w+TeQAgXxUAD2Lm75WsSzmFuvvjnVCTxGql6EbTKx4dz3/ pouM= X-Gm-Gg: ASbGncsYyvX3ODE9+45ElvrL9nM1mrWQz9drQBRE92j+44o2nMbUFs0VVaeXC+porp0 BxEeP0IQ73yldv3nV4ktzLCJLMdnFkbAy9m5q1C7ns0J+FV+OY4h9tFPvU8SOzy/ePoEFQrrMjY 314X/9oL/dkzL1TsHnwo/PTnvxBppVXefQhXHH0LELeMEmKieMkX34Pd64Q7t5NNwpIWh2SH5mk 0Us1HnemNxljJrgS0F9H1aXrBfqK9r+84r8/MDlrlQ//TFQHiTJuZDP6ceIV0ZVAUHVx+FpbZQV QD8glAlGiZ1Z1IkJBh+sjMbLx0e1fwsyTCIcK9xCeSFaG144pZJstB0fd/S2itYipdJkcPPgQgH TMAvSYOcJEcReVieLVgQ= X-Google-Smtp-Source: AGHT+IFcD8DdxOAZn6AlSsTmuprTRVG4W42cw4E0uk0tVfkokEngaK5WldIA9pRUCwmxJeXNdlW/BA== X-Received: by 2002:a05:600c:314c:b0:43b:bf6f:6eef with SMTP id 5b1f17b1804b1-43bd29c9b7emr55241845e9.26.1741276170827; Thu, 06 Mar 2025 07:49:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 25/54] hw/core/generic-loader: Do not open-code cpu_set_pc() Date: Thu, 6 Mar 2025 16:47:07 +0100 Message-ID: <20250306154737.70886-26-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276849293019000 Directly call cpu_set_pc() instead of open-coding it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250122093028.52416-2-philmd@linaro.org> --- hw/core/generic-loader.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c index d9f5c2e8325..d3a426a1a26 100644 --- a/hw/core/generic-loader.c +++ b/hw/core/generic-loader.c @@ -47,11 +47,8 @@ static void generic_loader_reset(void *opaque) GenericLoaderState *s =3D GENERIC_LOADER(opaque); =20 if (s->set_pc) { - CPUClass *cc =3D CPU_GET_CLASS(s->cpu); cpu_reset(s->cpu); - if (cc) { - cc->set_pc(s->cpu, s->addr); - } + cpu_set_pc(s->cpu, s->addr); } =20 if (s->data_len) { --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276782; cv=none; d=zohomail.com; s=zohoarc; b=Z1nbzaVFGGykDnsRiSKr9iecEjwugxtiXm06oWJRepvEcUhMWdT9JvlYp7HOaoWavUPFhhnjBUOwZypPAEYtYaMoshDZhtptc1GckM+OFu66gAnK6cw6VitY5Geb7F96U6on1ydU2D063sVs272REkfQGg1C3G5kPu8RQ3lJeCw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276782; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=c1VlvOtxLHbEwfuyvRPb+ktDAXmv1s+XhzIa2Um25I8=; b=LGFoABkNSzUC5n3+7lgxUcVBEeTT9DmbBn3LEhiLGBDnCjNGfjv+TjzN5890zPIzzGBraL0msKyY9ZWXzN03I4r1sfR5q8Q5W5rDIjfCzkcBmNwZAcbIJi1zLfHLkcnquq61idkRoNfDDR22lrTRAWnuqNviEv95cbM6bo6fV+o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276781991705.0309258477834; Thu, 6 Mar 2025 07:59:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDU0-0002Yu-Hg; Thu, 06 Mar 2025 10:50:01 -0500 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 1tqDTe-0000kn-VU for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:40 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTd-0006Oe-4U for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:38 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3912c09bea5so643727f8f.1 for ; Thu, 06 Mar 2025 07:49:36 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfdfe61sm2440970f8f.38.2025.03.06.07.49.34 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276175; x=1741880975; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=c1VlvOtxLHbEwfuyvRPb+ktDAXmv1s+XhzIa2Um25I8=; b=UmD5xqViltVPiOVNYS5sqGi7eZ3XrLY+3Ut07Vmc/syZvPvLKdTBJ4QEmWkKFwMEzm sbo539BQ64vmDS94wESeTg82zVsFdRh9YUlUeRSSJesh/4nTI/+5cO/PTwYhVrJP6JiF k352JlV16pmr/+b9ssm4dgo5RITqSm+heHh99hCtRaTJulNbcBWIUAKPOKmHXPzS08Q+ 3bY0Dy7Q86mq9knkOtdfUqEaed4QmJ9mU/Ag5YzyWYHO8svqb+lr1ilymtPMx4XpBQVW pOpm5/3AFzQmpC2cWHXoe6hciEuPpbqv0OfBrfZPqSJ2bDDnGUfJ6BpiKm5IYZnCQ6Cz 9RYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276175; x=1741880975; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c1VlvOtxLHbEwfuyvRPb+ktDAXmv1s+XhzIa2Um25I8=; b=D56bmfnTzBKPeOblg3uPVqxKSIann4gcxisUR4DgkvOOy/j/ymeY44F/cg+NmRw4v7 p6TI+cvLp+6DkFEbE9dROErlJHydcCQzQLkNOl2EECQL9l7Z8F7I/9S8wWY3BpFa89fT uAPf68Hf5wKjIhxs9i4Qae7JhdH1H+xGo2mXAxsTXMfz2AoHvwd1f7LA98UlT1nJge7v 8gUjOcekIqBCZbOn9nGBE1o3GlVyruaHthkvh2QyEr+Z8MY7JbjLS+4ux/tVySy5cZYS nnX2mAREJoYaF5M8r/VsannctJqKIsSIslZZmXoFXjTME7ljwVrPsUB294fWMOeqZr4l OIrQ== X-Gm-Message-State: AOJu0YwZ9UvOC8ppmM8MST24b4St+G2You80z5cbTWONv5i8Ipaeypob v3DnzBdk42yUcV00qAkiic9LF6kP5Zo2S+/SRpVudyNse5VPvBOjR/Ss9Dahol9gW8ALVavf4D6 5DBc= X-Gm-Gg: ASbGncuFwEm6lc9Gk83lFqEfix9x/SGcehtX+dAwkoY2gkUk+1HvOQXuH34vfUm62uv 0H4TXOu2hMprI4hI9fqj4Yccc28QZYVrKgbC2CnQrqQL1yoHwvf/rCw5KKUDhVtb0YqgICelaFV eM7/8Pqj6svdFBQe7X3puSOeFmdyXkzYwzzCgBgVdfS6sITKD2Y+tV6ingw/lfzp69Zdt7nuo0a lbflW9ElCwSfv8ECGHAzeIGn7/lIF28PCnYDii77zMNoO1oaCAfYQ7f4PibhGKDaET5I8Y5wrbe /5pnY2ijYpPM6p3egiEzS/mPPTKJIDbHHGq2Z1kcZ7Knf//bYd2DviGKPu9ee/TiNyNGZlYNQpk JuHedCAoXy4lODCycE6g= X-Google-Smtp-Source: AGHT+IGKZREUEl1Da/nQffqtYKpB/BQRXlIbk3sq+bvyeW9HgB/9hnE3bcBfwxaxCnHUKMWR2oMeDg== X-Received: by 2002:a5d:6d83:0:b0:391:2a9a:478c with SMTP id ffacd0b85a97d-3912a9a491dmr3042976f8f.23.1741276175205; Thu, 06 Mar 2025 07:49:35 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 26/54] target/microblaze: Explode MO_TExx -> MO_TE | MO_xx Date: Thu, 6 Mar 2025 16:47:08 +0100 Message-ID: <20250306154737.70886-27-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276782522019000 Extract the implicit MO_TE definition in order to replace it by runtime variable in the next commit. Mechanical change using: $ for n in UW UL UQ UO SW SL SQ; do \ sed -i -e "s/MO_TE$n/MO_TE | MO_$n/" \ $(git grep -l MO_TE$n target/microblaze); \ done Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Message-Id: <20241105130431.22564-14-philmd@linaro.org> --- target/microblaze/translate.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 24005f05b21..86efabb83b5 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -780,13 +780,13 @@ static bool trans_lbui(DisasContext *dc, arg_typeb *a= rg) static bool trans_lhu(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUW, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false); } =20 static bool trans_lhur(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUW, dc->mem_index, true); + return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, true); } =20 static bool trans_lhuea(DisasContext *dc, arg_typea *arg) @@ -798,26 +798,26 @@ static bool trans_lhuea(DisasContext *dc, arg_typea *= arg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUW, MMU_NOMMU_IDX, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UW, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_lhui(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_load(dc, arg->rd, addr, MO_TEUW, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false); } =20 static bool trans_lw(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUL, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false); } =20 static bool trans_lwr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUL, dc->mem_index, true); + return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, true); } =20 static bool trans_lwea(DisasContext *dc, arg_typea *arg) @@ -829,14 +829,14 @@ static bool trans_lwea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TEUL, MMU_NOMMU_IDX, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UL, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_lwi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_load(dc, arg->rd, addr, MO_TEUL, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false); } =20 static bool trans_lwx(DisasContext *dc, arg_typea *arg) @@ -846,7 +846,7 @@ static bool trans_lwx(DisasContext *dc, arg_typea *arg) /* lwx does not throw unaligned access errors, so force alignment */ tcg_gen_andi_tl(addr, addr, ~3); =20 - tcg_gen_qemu_ld_i32(cpu_res_val, addr, dc->mem_index, MO_TEUL); + tcg_gen_qemu_ld_i32(cpu_res_val, addr, dc->mem_index, MO_TE | MO_UL); tcg_gen_mov_tl(cpu_res_addr, addr); =20 if (arg->rd) { @@ -930,13 +930,13 @@ static bool trans_sbi(DisasContext *dc, arg_typeb *ar= g) static bool trans_sh(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUW, dc->mem_index, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false= ); } =20 static bool trans_shr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUW, dc->mem_index, true); + return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, true); } =20 static bool trans_shea(DisasContext *dc, arg_typea *arg) @@ -948,26 +948,26 @@ static bool trans_shea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUW, MMU_NOMMU_IDX, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UW, MMU_NOMMU_IDX, false= ); #endif } =20 static bool trans_shi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_store(dc, arg->rd, addr, MO_TEUW, dc->mem_index, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false= ); } =20 static bool trans_sw(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUL, dc->mem_index, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false= ); } =20 static bool trans_swr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUL, dc->mem_index, true); + return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, true); } =20 static bool trans_swea(DisasContext *dc, arg_typea *arg) @@ -979,14 +979,14 @@ static bool trans_swea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TEUL, MMU_NOMMU_IDX, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UL, MMU_NOMMU_IDX, false= ); #endif } =20 static bool trans_swi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_store(dc, arg->rd, addr, MO_TEUL, dc->mem_index, false); + return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false= ); } =20 static bool trans_swx(DisasContext *dc, arg_typea *arg) @@ -1015,7 +1015,7 @@ static bool trans_swx(DisasContext *dc, arg_typea *ar= g) =20 tcg_gen_atomic_cmpxchg_i32(tval, cpu_res_addr, cpu_res_val, reg_for_write(dc, arg->rd), - dc->mem_index, MO_TEUL); + dc->mem_index, MO_TE | MO_UL); =20 tcg_gen_brcond_i32(TCG_COND_NE, cpu_res_val, tval, swx_fail); =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276683; cv=none; d=zohomail.com; s=zohoarc; b=Ew3AOaLbFQPDKI9r0lq1My/LyuvhmqKmebNa2harRA+/SKtQ7sfYwPEtUwuJPFDVkrm7byKvO4cijEW8IkWBXHbWa2PJZWCLhJ0sKtPJ3JqPY9c9DiFJyxSFJkxaWjH+ZolI2Q/k10EkJPZ9hAzmjZF0aAZZOcnT6Nb03cm+Cg4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276683; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=3v7sV3Rv+GZlVORj+lJFsWCkG/pWND9zQ3HJk/a0vDY=; b=LT6r/A5ql+Bp+c8P6WgtBgdCKD4gSkzbaHDujD9Xklxgmq6+Ahz3nRD8Ra6uVoUn3/YPkTDQQ13xDwjwCCxRp1jf1nCj+X69i3do9HmK5H2k2jpbIDMp/z42bq0zPdmXOiZazxC4k7nFfqHlXplN62V4PaW9boO2tTYGx54mncM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276683347967.1784349684638; Thu, 6 Mar 2025 07:58:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVQ-0004U3-Fh; Thu, 06 Mar 2025 10:51:28 -0500 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 1tqDTj-00011c-Uf for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:44 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTh-0006Ox-Mm for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:43 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-39127512371so628944f8f.0 for ; Thu, 06 Mar 2025 07:49:41 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfdfca1sm2348714f8f.22.2025.03.06.07.49.38 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276180; x=1741880980; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3v7sV3Rv+GZlVORj+lJFsWCkG/pWND9zQ3HJk/a0vDY=; b=AJCeXq7IRicwgZA2pY7svPnPNjZBQrrxggQ/jW9iNFn1dK2uwBZtouVJ+PjxtsLGJv wEdobm1g8vfGqVy4L1Zx+H1FEUuKoCII2txmXlJIw0MmLCTbgKIinT2JWcBL+ZdOn8RO 1s/bTuUEHEqtDxWLE2UMOx8DzYnO6Qrx+QJdIH3dm5RrWoNtdv8slwDYlzromzBnM2Kv DH0lXSGOFvkgVsqZR3n+Ux0TKrdzyDRm96X1v4u+ZOHacWqIHIZy9jvgXUlVxv8HTKQy jur/fJUK/Wjncpv6ku10me/yp1V1cWKm2E99YCqvq+2WMbHYHlPDhlyWbMh1YAeWAIhe CfpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276180; x=1741880980; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3v7sV3Rv+GZlVORj+lJFsWCkG/pWND9zQ3HJk/a0vDY=; b=Dvuf9k62lyzoeJksMpO3iq7JEhx6X3st7Bsf78As7+BLFz0JLkINrnO0IFx2yt7Euq qgLOEK2ZJFNuJhxan/Vev8BjeCI959QRi+dCsxZ9+cuMCay+75oqtTTBCIKtgvsGHPhW obRBDvC7wYPmMrvbajq7bIbQNV6SYMvVmpMDVXY9SfBDuDIgo8K85FLPaYJAQzYGcdfZ 24iMGhxcBc53tbUa+1qxC7ikZpeHfxdndycnM/3iqoIG/DVeTScDzm/rtcxJPjRsdmSr Shnt3P5Mp4alWKodYDg9jpGzs3Y6p1tIOieOjioRIXNGm7vurmpYFfXOQllhcAgZwm+C CpVA== X-Gm-Message-State: AOJu0YwxDOp/l3QDYxgDYoH7cXt455gW170LkNAg5vEplgSrJ2yuKGP/ k69MhyHldJI2IGNmUhqKNAk7t/k5jpbar3VJItW7aWEIQjxHSzpvKySMlPhY6MwX/5+LH2nLWe+ SBsE= X-Gm-Gg: ASbGncso3uDmXRlRfvi8tsxOBylyTR8Jn1YlFVVHD/mfaC6jHu9Lfpv1udoHgtd3o2S nUz8wgDZmnaweeLcSKla0latmLITkYjYsj/jgwDNisNXlnU7duLgj6sTAozYxrpu0x37EjRcmNw 6PKAMxyCu3i6JU7LNNFWMM+AjB9hh/8AHVWnMXe/DEAs8DMkOfZ4o1Lgj+SGEjH1BkeYzRwix9b H2pn/QfaVOesiY9yBKxbnJOzb2qnEAmS+AAl2M+A/HXfi3rOdPe6V8iYSEYRWawzHCx5ekV7J1t ksxEStDDKndNaGv01uJFKk5LQ9klL3NRPWM56EW9UOLufDYhd/gZLpB99q7M1ElQRxAaICAorbe fFrkd0PbwUxPfH6HMd/4= X-Google-Smtp-Source: AGHT+IFrg6l6RoyvuYPk5Rjz8o0hwvY0MFk6DOsnxGzKcjEWMK284C+B1YDHsdjeAlySVe3wnJqkNw== X-Received: by 2002:a5d:5886:0:b0:391:6fd:bb65 with SMTP id ffacd0b85a97d-3911f7260acmr6424740f8f.9.1741276179624; Thu, 06 Mar 2025 07:49:39 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 27/54] target/microblaze: Set MO_TE once in do_load() / do_store() Date: Thu, 6 Mar 2025 16:47:09 +0100 Message-ID: <20250306154737.70886-28-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276685362019000 All callers of do_load() / do_store() set MO_TE flag. Set it once in the callees. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20241105130431.22564-15-philmd@linaro.org> --- target/microblaze/translate.c | 36 +++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 86efabb83b5..0d51b2c468c 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -713,6 +713,8 @@ static bool do_load(DisasContext *dc, int rd, TCGv addr= , MemOp mop, { MemOp size =3D mop & MO_SIZE; =20 + mop |=3D MO_TE; + /* * When doing reverse accesses we need to do two things. * @@ -780,13 +782,13 @@ static bool trans_lbui(DisasContext *dc, arg_typeb *a= rg) static bool trans_lhu(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_UW, dc->mem_index, false); } =20 static bool trans_lhur(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, true); + return do_load(dc, arg->rd, addr, MO_UW, dc->mem_index, true); } =20 static bool trans_lhuea(DisasContext *dc, arg_typea *arg) @@ -798,26 +800,26 @@ static bool trans_lhuea(DisasContext *dc, arg_typea *= arg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UW, MMU_NOMMU_IDX, false); + return do_load(dc, arg->rd, addr, MO_UW, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_lhui(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_load(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_UW, dc->mem_index, false); } =20 static bool trans_lw(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_UL, dc->mem_index, false); } =20 static bool trans_lwr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, true); + return do_load(dc, arg->rd, addr, MO_UL, dc->mem_index, true); } =20 static bool trans_lwea(DisasContext *dc, arg_typea *arg) @@ -829,14 +831,14 @@ static bool trans_lwea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_load(dc, arg->rd, addr, MO_TE | MO_UL, MMU_NOMMU_IDX, false); + return do_load(dc, arg->rd, addr, MO_UL, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_lwi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_load(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false); + return do_load(dc, arg->rd, addr, MO_UL, dc->mem_index, false); } =20 static bool trans_lwx(DisasContext *dc, arg_typea *arg) @@ -863,6 +865,8 @@ static bool do_store(DisasContext *dc, int rd, TCGv add= r, MemOp mop, { MemOp size =3D mop & MO_SIZE; =20 + mop |=3D MO_TE; + /* * When doing reverse accesses we need to do two things. * @@ -930,13 +934,13 @@ static bool trans_sbi(DisasContext *dc, arg_typeb *ar= g) static bool trans_sh(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false= ); + return do_store(dc, arg->rd, addr, MO_UW, dc->mem_index, false); } =20 static bool trans_shr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, true); + return do_store(dc, arg->rd, addr, MO_UW, dc->mem_index, true); } =20 static bool trans_shea(DisasContext *dc, arg_typea *arg) @@ -948,26 +952,26 @@ static bool trans_shea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UW, MMU_NOMMU_IDX, false= ); + return do_store(dc, arg->rd, addr, MO_UW, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_shi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_store(dc, arg->rd, addr, MO_TE | MO_UW, dc->mem_index, false= ); + return do_store(dc, arg->rd, addr, MO_UW, dc->mem_index, false); } =20 static bool trans_sw(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false= ); + return do_store(dc, arg->rd, addr, MO_UL, dc->mem_index, false); } =20 static bool trans_swr(DisasContext *dc, arg_typea *arg) { TCGv addr =3D compute_ldst_addr_typea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, true); + return do_store(dc, arg->rd, addr, MO_UL, dc->mem_index, true); } =20 static bool trans_swea(DisasContext *dc, arg_typea *arg) @@ -979,14 +983,14 @@ static bool trans_swea(DisasContext *dc, arg_typea *a= rg) return true; #else TCGv addr =3D compute_ldst_addr_ea(dc, arg->ra, arg->rb); - return do_store(dc, arg->rd, addr, MO_TE | MO_UL, MMU_NOMMU_IDX, false= ); + return do_store(dc, arg->rd, addr, MO_UL, MMU_NOMMU_IDX, false); #endif } =20 static bool trans_swi(DisasContext *dc, arg_typeb *arg) { TCGv addr =3D compute_ldst_addr_typeb(dc, arg->ra, arg->imm); - return do_store(dc, arg->rd, addr, MO_TE | MO_UL, dc->mem_index, false= ); + return do_store(dc, arg->rd, addr, MO_UL, dc->mem_index, false); } =20 static bool trans_swx(DisasContext *dc, arg_typea *arg) --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276207; cv=none; d=zohomail.com; s=zohoarc; b=U+z9ugEdByEmivHbM4JLWyX7rizzkqr43k0FjwDIRcA4dHT1eQ2UMYuo68sFzQkgB0JGXy6E3DIIWuA9hR8xx9ktBUyvFaulolgRUqXhFEaUN2oo7GN9eubjKmD4DkcZaPjzmlgtEflUJq+VMK5Rlv+7WBkzqpUmDoFSQU+dpwE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276207; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=JHufb90aAQPXYkdAYjcoLZv75tv+O6S6Pg9iD8hfp6A=; b=V9gxN/ITW5xyfEFM+/ghDgrBaikZFgmGSCW0alG0YGlYQ9nhmH7u5uFAL6j8ctRBQLuNgRbr1+KJamtdR3oWxre3Nj7YRGYgTqFeHDXU1Vmkw7dGhg85AkTbU/GR+z5ArBvFcpDIlwJ8r1klABssBgKhx61+CC8TPSDwB1Ud4pU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276207755709.504249115903; Thu, 6 Mar 2025 07:50:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDTw-00028t-V6; Thu, 06 Mar 2025 10:49:57 -0500 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 1tqDTn-0001H1-Pm for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:48 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTm-0006PQ-1H for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:47 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43bdc607c16so6571565e9.1 for ; Thu, 06 Mar 2025 07:49:45 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfdfcdasm2369930f8f.23.2025.03.06.07.49.43 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276184; x=1741880984; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JHufb90aAQPXYkdAYjcoLZv75tv+O6S6Pg9iD8hfp6A=; b=urwIXbP0lYZfd466Jdif/67wLh83swg0ISfDfoNQPYYMulmpwTWLTess7mgDw78Pio ruO50isBxfrr1HOohvgRzneWWHoTw5zZlFHg9ma0bhaGsdiXjFjF/2cSkf0z3rht+kAc NDWKwLgkSaJlGDINyuOouSdvzxH8VlsEEfmSp2tPCx1YQ1hxMz9boeYhuMJKj66b0BtU zuFENGC+ifBWzhaSxl70hoG7VmIrc1uwE4E8Sk5GJCDtH9UR/yw8I73EEaMwg14mRHU+ RPjau5g/xDQLK2EHkqyUSNtp0q+z9ofYPms5xszCCBQnUpR43qt8POCrHRqMtpUUZR4t y1jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276184; x=1741880984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JHufb90aAQPXYkdAYjcoLZv75tv+O6S6Pg9iD8hfp6A=; b=GgjH5b/p44Xzegz/A0GDuG4UdctHIBCxoKtLXQRq7HI/lL0qe9fBTypkbshEknpdug YbMMvqdl5MBPZZxI/GUj0oUC7ccY1tdFF0moDJbZcEpVN881B9Ip4QsaSYr6STbbmx9n 5AnTIELGuW9SSsWqKOeFYVbObDmEyECHsPbYoWiVnWwI0jYWO8RQGZqb3tVl7W0w1SL4 oiYlnDJO0sK0qhFgk/CGdNQ2TsET/hL8XyV5Mdx5OSLb0LkMbVuTj0rzhzbD8p49QJYR xSJQIwt/IXWrDoePKj0MxL+Y27V7z5iJehLuTPMP7Y7eN8g10vBr/pNr2fhvxN16/Bh5 tFTg== X-Gm-Message-State: AOJu0YyTUia1nvGhMhmb2KYTqzx+lx9Dqu+C2aTfp/dk5ccYh8pTEW+3 WsSVPg4keHqokKf43zm1oAprbve80ie5Yrnh0jm4ksDg//jABGvoyvooB2VTg+R6cUJxq2KCqMu h0io= X-Gm-Gg: ASbGncsIvTGrbFnOzp7XCR+dbdHqy9VzdtvkcTTyMPxaIBQEIuY1A6yEOuKa8XIDspJ nMJHEUYr+ER79mIxm9AKXzQAXl4rSB9cCcyX7FNShFRWB2jXBksk/O8OrM93o1SlXL1GZKu/Y1E cL/uIROJjCDnieKCKNBg++MMPrkpPlNOgV4PFYIsv0NbECYaj8Pl2Yi5u+ZXZB9TBkvTj40Bt6S zA84ZK0AdONM/j8mFp3ikdmO54fhJG32q31cyWhhgJjOeQbmuGrPlmB40TG5TCDXctMLKnSlluX NkLfiAv5GIuRqonS/auTiS0fc5AXo8XDGrZ41PQ1KIIcBdPtQ49EDY9wTZafFsTTAucQ3sie/OZ E50zK5A7+l7o/QZFA0Mk= X-Google-Smtp-Source: AGHT+IHgYMVNwtGHitcuLKdLv2Grt4G6fLRo8HL/qGhQ7dVm9pUhvBWyJOd40ms18Fj9YS5g3svAkg== X-Received: by 2002:a5d:59ae:0:b0:391:2995:5ef2 with SMTP id ffacd0b85a97d-3912995602cmr3037855f8f.37.1741276184087; Thu, 06 Mar 2025 07:49:44 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 28/54] target/microblaze: Introduce mo_endian() helper Date: Thu, 6 Mar 2025 16:47:10 +0100 Message-ID: <20250306154737.70886-29-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276208682019000 mo_endian() returns the target endianness, currently static. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20241105130431.22564-16-philmd@linaro.org> --- target/microblaze/translate.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 0d51b2c468c..b5389d65b2e 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -708,12 +708,17 @@ static void record_unaligned_ess(DisasContext *dc, in= t rd, } #endif =20 +static inline MemOp mo_endian(DisasContext *dc) +{ + return MO_TE; +} + static bool do_load(DisasContext *dc, int rd, TCGv addr, MemOp mop, int mem_index, bool rev) { MemOp size =3D mop & MO_SIZE; =20 - mop |=3D MO_TE; + mop |=3D mo_endian(dc); =20 /* * When doing reverse accesses we need to do two things. @@ -848,7 +853,8 @@ static bool trans_lwx(DisasContext *dc, arg_typea *arg) /* lwx does not throw unaligned access errors, so force alignment */ tcg_gen_andi_tl(addr, addr, ~3); =20 - tcg_gen_qemu_ld_i32(cpu_res_val, addr, dc->mem_index, MO_TE | MO_UL); + tcg_gen_qemu_ld_i32(cpu_res_val, addr, dc->mem_index, + mo_endian(dc) | MO_UL); tcg_gen_mov_tl(cpu_res_addr, addr); =20 if (arg->rd) { @@ -865,7 +871,7 @@ static bool do_store(DisasContext *dc, int rd, TCGv add= r, MemOp mop, { MemOp size =3D mop & MO_SIZE; =20 - mop |=3D MO_TE; + mop |=3D mo_endian(dc); =20 /* * When doing reverse accesses we need to do two things. @@ -1019,7 +1025,7 @@ static bool trans_swx(DisasContext *dc, arg_typea *ar= g) =20 tcg_gen_atomic_cmpxchg_i32(tval, cpu_res_addr, cpu_res_val, reg_for_write(dc, arg->rd), - dc->mem_index, MO_TE | MO_UL); + dc->mem_index, mo_endian(dc) | MO_UL); =20 tcg_gen_brcond_i32(TCG_COND_NE, cpu_res_val, tval, swx_fail); =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276690; cv=none; d=zohomail.com; s=zohoarc; b=Gvax/txfoVRdqMe5lXDROtm6eDD2bZT8Cf00mMmoxivi0zvZrAuwBDzdPL+8u73F1xfFnUSOXKsv9npn40jhkfOhfeCmZ6zDB8FNsy5/U128fPJuKH31myaN8Pn0BkAlzMkCLgE99piL8P8C5nbX/y2U6vmD9S3yvXFKEvKeWns= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276690; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=tN8MUCR59yT1PPc6yhlXwubOk3u9382+22fqIhPwV6Q=; b=UFrkmg94+pY4b14AyVAPn5xXPeVzU/wHOZtPsNU+KfDt90ztH/iF7KJyOfG2UN0yN0eUOTU7Tbge4HasBWXVepWzX9xRPFMLQHfaM2ub59fmOZ7/LyVcTKiweJYw1k8mObOTnfIJ7Tu9aPDrTV9hhfcwZKsBCYwZZfzoRUcDLK4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276689970382.8327474778333; Thu, 6 Mar 2025 07:58:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDUT-0003iY-8T; Thu, 06 Mar 2025 10:50:29 -0500 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 1tqDTs-0001ff-0r for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:52 -0500 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 1tqDTq-0006Pv-AO for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:51 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-390f5f48eafso533535f8f.0 for ; Thu, 06 Mar 2025 07:49:49 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c103035sm2380215f8f.88.2025.03.06.07.49.47 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276188; x=1741880988; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tN8MUCR59yT1PPc6yhlXwubOk3u9382+22fqIhPwV6Q=; b=F1+dCZfx9smevkYfX546qkYJuRQPls9DVG8+aPO+1MWnzHeNtdQZZT1uLKyfOF9joL to89XuqEcsPRanXi4FH3x/GFgm1tkj+ElYkSt1J5dHvJKNSyS9doWZvrWB8QJqnre1MT 1jCl4T6p+74C6aF4MS3lwPBfwewMKs4/qn7qpGqy3wbnUq+KknhNX24RR254yceb/QCm ogZBGHDeJA1TeKptwAe+MtSbb2HGfP47EgDx3LUBQPs/CvZukb7owEZQnIwQSx5ARDq+ W4C4DhyDIvSzgGi4j5TfAy1fCDug3RA12FGfQrljRdPK/m9MlAGKeyLiwjQjAKQYC+zx 0SnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276188; x=1741880988; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tN8MUCR59yT1PPc6yhlXwubOk3u9382+22fqIhPwV6Q=; b=sMH55rRV9jHX83kk/Z1cuEkF4y1kYLxuB1d1HDRMHuz88iFw19D89Zkmj81cZcOnL9 xUYHPNujG1kHL/MEX+VE9CAsfqVmAMe+dD9Qhi93HcwRc8Ev5oWe4pMsLGOOPyu78If3 ulA9VkiSpshH91dgNfqowIkaIuq6L6N/6w9F9me8alNhv41qElo2ziWhVw9WtmtdKqs8 O1dE+aiSC6ZeH9DXjP7hyAuBUIBwOn/TxgnBJaXFYUsW5kqCjGYcfY0sYZwN/qAl7kCE 5YgE5Y2z7/txxIooKT1xDmiB7A3pGg77T3/yotQhqk2G/sXQHPvGyxYqnj2NKAacDnLg nljw== X-Gm-Message-State: AOJu0Yxy+AgcZxqD3xRt9R6E7lT0QgPOXOs0dkGCG/XcV/lACFJIt/vJ 8wjaWyUSfztDkxPxzTr3MwOgn/KKI9yYBkxMFg5OQjdkgRDeAZIMunE3i5/o6b+UWLIndMcKUjc Iqgk= X-Gm-Gg: ASbGncu92On7+ug1EyNwknhtLxjiCa5nANN9jPxKww0DyopFRx49JSEPQq+esmWUy9y UA7k/aQOYvmQFW7Lwpva61nG4GJeKS/HbJDF/ou9KppKSWHCjhDqjonrG3g2oYjIL3yrO5+2Kf2 EFJiSgd7uzzTSeO1Ti8mEtVu/LaUlgGmzIjtRBLWCDyLjY4QHG/dhwmRRwaIgTJ5WgCmkbIKyIJ jfBFX9tKqmSLDKf5EbGieC5GpZ3O/NiKj3sNStPYmrjWmBCkmfsRHp0TgeXk/WHZy5yf2b2mQCs Po2pHoHiQ2fv7ZoHz6mVkpxwcGGhWSaqk1S/h9dfbNS4nxJQKWM0Ay/n/1/62xgzKmzF905ggCX zxcHoLSoKbSmTPzm/WRM= X-Google-Smtp-Source: AGHT+IHxRlfu4FBJ94iJFB9sf/brhCb/i8kpYjVchB/zZlv7pql9rvIAphOvf+hmqJHy0WQAw8xVHw== X-Received: by 2002:a5d:6da2:0:b0:38f:451b:653c with SMTP id ffacd0b85a97d-3911f72fe43mr5891315f8f.7.1741276188481; Thu, 06 Mar 2025 07:49:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 29/54] target/microblaze: Consider endianness while translating code Date: Thu, 6 Mar 2025 16:47:11 +0100 Message-ID: <20250306154737.70886-30-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276691820019100 Consider the CPU ENDI bit, swap instructions when the CPU endianness doesn't match the binary one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20241105130431.22564-17-philmd@linaro.org> --- target/microblaze/cpu.h | 7 +++++++ target/microblaze/translate.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index f6879eee352..e44ddd53078 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -414,6 +414,13 @@ void mb_translate_code(CPUState *cs, TranslationBlock = *tb, /* Ensure there is no overlap between the two masks. */ QEMU_BUILD_BUG_ON(MSR_TB_MASK & IFLAGS_TB_MASK); =20 +static inline bool mb_cpu_is_big_endian(CPUState *cs) +{ + MicroBlazeCPU *cpu =3D MICROBLAZE_CPU(cs); + + return !cpu->cfg.endi; +} + static inline void cpu_get_tb_cpu_state(CPUMBState *env, vaddr *pc, uint64_t *cs_base, uint32_t *flags) { diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index b5389d65b2e..b54e5ac4b2f 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -710,7 +710,7 @@ static void record_unaligned_ess(DisasContext *dc, int = rd, =20 static inline MemOp mo_endian(DisasContext *dc) { - return MO_TE; + return dc->cfg->endi ? MO_LE : MO_BE; } =20 static bool do_load(DisasContext *dc, int rd, TCGv addr, MemOp mop, @@ -1647,7 +1647,8 @@ static void mb_tr_translate_insn(DisasContextBase *dc= b, CPUState *cs) =20 dc->tb_flags_to_set =3D 0; =20 - ir =3D translator_ldl(cpu_env(cs), &dc->base, dc->base.pc_next); + ir =3D translator_ldl_swap(cpu_env(cs), &dc->base, dc->base.pc_next, + mb_cpu_is_big_endian(cs) !=3D TARGET_BIG_ENDI= AN); if (!decode(dc, ir)) { trap_illegal(dc, true); } --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741278474; cv=none; d=zohomail.com; s=zohoarc; b=K7ht7w+MO0sDYNPdlfwiXuA2sGnLEGeCeHesXUKVkHUj/jIw3tzn800A4Ef2EHqfs1MeXmIGQIz94u1LPC6p8OrmoBTuH9t0wuXqUJy0VAKAa20RiWMTVeOWEZnyTpaWXoPxdESCrx+jds6fiYUXvl0N0hS3FjVGJP8AjUHuhCA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741278474; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=LYWY2vE23XQ8tYGl52Ly1mLv0cHxN8U1e33vECpnZa0=; b=YfiFDh98WnRxPGaZcex2AN2tH2TOdQgxTnYmYFoxADPOlYtpeNBhXgtWAfg6BpakYbJykOqGSNR7tDYKkku6tw5jUHnYn5pHRydNFT2b+aAUPh+RbnE+z/UWeQ+OCZmbnAXEnKC0VRMy57sq4s4Pec+rnf5Sd6So7gE08BW/2io= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741278474878511.7761723172591; Thu, 6 Mar 2025 08:27:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDUd-0004BZ-NS; Thu, 06 Mar 2025 10:50:40 -0500 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 1tqDTw-00027M-Ee for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:56 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDTu-0006QT-O1 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:56 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-390d98ae34dso665001f8f.3 for ; Thu, 06 Mar 2025 07:49:54 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfba679sm2381963f8f.8.2025.03.06.07.49.52 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276193; x=1741880993; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LYWY2vE23XQ8tYGl52Ly1mLv0cHxN8U1e33vECpnZa0=; b=WoDq2h8W0O4WYxsptfhW71hWaxJbwQ78WtNYH3ROslQLftZFEtekbpJ33EGjETmAbr OgtYVO6EhxUMU/VoHD0fCmD8zSf8t2lu+BfqQP/Y2bee7fgKTJ76dN2SguneuofDHhah HsSW0vpb27trqjdaTvUOJcIn9hBSqIFHpdwvDgU5O6oGiGHPps5cf5ESgC4TRT8rw3Cx O6MQHBSkD7pQjXHQqk6qCymeTGnWm0jM/52murO28wXd7wNzdCJT84qKus7EQtTHiIUl b3Vlq/6+27dC21ZXHyha8XCM+EWY16UVnNr3DZa52XRKjiNUuA2+ZGG3rXbm0qbmElfG eQbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276193; x=1741880993; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LYWY2vE23XQ8tYGl52Ly1mLv0cHxN8U1e33vECpnZa0=; b=AE89iD8Pq+tnY1gtYMdK1LL4xAEph3L9UVsvhX6hwHjVdgL0TC/YgZSPGgKVOGkbLe soXxhKaHwadZpDuLwWSnJ3yuzrWJYfC6pduAUGOlX30KpvfPZgWUvKt2as9Hx1W6PbSa 7S4L5pomUXKJjqdA+rrrNw2NhidavEe+aRDSedK6fLqzh7to21DAF94BuZqhAlKpZEWq UgddktBjlkOC5sHURqRKssw1pfaPwDt2wgKDI3z/opQiaDhTpLmZHUSlNsUS0uLWasnU pKGOrJOoS+MiMlYsY3a4tLoib29tE24C5gLQkBNrHPppDw0rW9OWYy2Cu9PQoHldS5q4 hKLQ== X-Gm-Message-State: AOJu0YyU19egfYQ+Rd+1HO+zX53YrqQWuFYlrYDEhhpRky+0O39p0QSd 7bAhM3v55k2H2MzB5NrsPicgysYPPt0Pj/AjGFHX+y4uq3X9ukokr76rjUvGtW1QWTaF/yl2JY4 b6XI= X-Gm-Gg: ASbGnctudpwduG2xAN00SWVDoUTdqL0MhCO7/uD1LNREpoksOQnLZ21zHs6zD/UExxY R1FIdO+iMigHs9bXvwQBTB/H9+tGp1/3n1qfQFKYqvuaKnqcPMsS0QBulvOxJZji9nT2nUslibf /ZUci9SAWnA/x30OoWJHvr7Nh/KqMK8VGOm9Q78KVLjvq8+ylPNNm5o/3VEyDGjQKU8CWrI81t6 JPnaw5zTg+Heebmv/96SCz5Eek+fvMV2F+3J0u/CXpF0Knhpzo1hHdEWyJAjkK59GrXN65uNiGh Rd9xo3M2MYuuLQYG/FHgf4WlWXuBbzYXrZixeOiQoSY/Lgh7qrOwgkn4KTDy29mxccG3IglvwZJ 6jSr3sEbqrMvvBPSdqaA= X-Google-Smtp-Source: AGHT+IFbIfPYgKgILQiPx7IWkP1wTH6q62+CrK/jaMvNAXceqgLxVz1/pcKyG1d57YRFykHTcOSdNQ== X-Received: by 2002:a05:6000:154c:b0:390:e7c1:59c0 with SMTP id ffacd0b85a97d-3911f75a94dmr6410177f8f.26.1741276192900; Thu, 06 Mar 2025 07:49:52 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 30/54] target/i386/hvf: Variable type fixup in decoder Date: Thu, 6 Mar 2025 16:47:12 +0100 Message-ID: <20250306154737.70886-31-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741278476486019100 From: Phil Dennis-Jordan decode_bytes reads 1, 2, 4, or 8 bytes at a time. The destination variable should therefore be a uint64_t, not a target_ulong. Signed-off-by: Phil Dennis-Jordan Fixes: ff2de1668c9 ("i386: hvf: remove addr_t") Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20241209203629.74436-9-phil@philjordan.eu> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/hvf/x86_decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c index d6d5894e54b..5fea2dd3cc0 100644 --- a/target/i386/hvf/x86_decode.c +++ b/target/i386/hvf/x86_decode.c @@ -61,8 +61,8 @@ uint64_t sign(uint64_t val, int size) static inline uint64_t decode_bytes(CPUX86State *env, struct x86_decode *d= ecode, int size) { - target_ulong val =3D 0; - =20 + uint64_t val =3D 0; + switch (size) { case 1: case 2: --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276707; cv=none; d=zohomail.com; s=zohoarc; b=ZBd3J/AxAreG+CctmKRdSo47EGa8WKOeEXVa+f3W53oAItSEZPsX+oqA874teAaF+v/Y2X3W9Rqxy6oxjo608+M9qgik+6U+OjjWohe22FqWn0l4xpqYmd6pfbKFmhRarAXaSC7SGJZty0Dp3RwjgFLtYTN3umoP8eLoJx+MdNs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276707; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=0UFUf/+4qSNn3mLvNY6YFKF7Ib0WjHNATMofJQT7dhg=; b=LR+Q/J6WTBnjoT47/80E34Q6HFInhQgwLb0pWAsArswpnz0aUVJKevH8C0ESHkJwtlsRuLCRCZUVsrHNU3QgYsumcynFfILc+PZR3nxZyTi0R3TGBUjuBjDy+h4jCj1jK5wifNCWGD3IGW1qqogHl/yx3MZa6kDIbfbOs+9PdNU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276707092811.0121830680898; Thu, 6 Mar 2025 07:58:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVQ-0004Tt-4E; Thu, 06 Mar 2025 10:51:28 -0500 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 1tqDU1-0002l3-S9 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:02 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDU0-0006R3-6M for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:01 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-43bcfa6c57fso5151285e9.0 for ; Thu, 06 Mar 2025 07:49:59 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfdfc96sm2444270f8f.31.2025.03.06.07.49.56 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276197; x=1741880997; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0UFUf/+4qSNn3mLvNY6YFKF7Ib0WjHNATMofJQT7dhg=; b=QGcalyBpaU6o30J68Ud3hFKeaSuUxu5HTJYcbF2PJVSLiD8+EvnYbz9/149pwRiAXH T2mBXoQfvZrM36Uql/w4tCIyEbSQ4VZPheQ9nBG9oogCoVePCp3rqWk7XLcgRRFRq7Ac ikRx6R8/iyJH9fWy9hXRwWWrx5yT0gOd+2upBYBja/CfistMbs5pQb3fnkJ2kvAnNwGG u+sL+4+/4hohglyhl+Jq4BCYKEv2b9Xzje+nvXxxSEvPMwAZh7DsTwHbDWgrdYUUm/s9 LH5bFVM0oJviIKlC5InbuziKNlOxl/EvseSRztNIyrxegxP78i9bMHaX/7JQK+l/5X8w 0NPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276197; x=1741880997; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0UFUf/+4qSNn3mLvNY6YFKF7Ib0WjHNATMofJQT7dhg=; b=TR4pcAcfMz87rqOi9Ctb/O2wwYJZOJF2E+E7SyzAD/K7oHmCPey0oRyrGRLoKPSYTx ZR7B+KDQ6QVoeqKaKkHELLTSyEt1tR5cv362XM4GR1ZrFSn0qi0JZrcVE2VkqlzrrIRd 3UIqblk0t6Q9J8e4YMkSvIsaboGIaeDTaWRzarJMVHmpovBrQqxvBJVmSJiFZfBGa8Vj sfQeOXutbVA+FJwSYTJDODEydT6En5waJJKvb04VFeJCzVV+yBPbtWLteRjgyGVegQh/ 6rk92+CH6nlJmddGPeCjJfC/Q89/d8pIp56WU3qzIaymWZsOa1/eMxNPXYkOzA2LpwQ9 KU/w== X-Gm-Message-State: AOJu0YyYD9YL4BLmWhfJcuhOqmUIIcjhdi9HKBgq+Se8sFwHLqJm908j vTqJX7klX5DrsN9hMqYr50Ua1W6kOM8NT9xtBLhp4YabRULC4nuy+oIdAbaAIxzvcVpOSOUvPq9 J7ag= X-Gm-Gg: ASbGnctKvzGAYklN7e5tXnvqkdw6+G6J8Ei1Qwbds233XZWCaQsLP8YAqjbOJ2/6VT5 HrIdpQnqsQ6N6DcWXTbuhudf5nfd8wQeZxQUahYBb5nlAkZnOx1eiOsYN9VWlF8EdqpO6hC6ZLX OPbN1QFmrk/c3dy1mhOu/rlDNAbhjZFexJtt8/1orS/geLCbLbz5ScFtFrJQKKKwRBsg98AlUQj prMcFbD3qYEI4jVdTO1NR3iwybhinI6ioOt8A/9xQNGdyplMHeJDPDLJGHGc9TlEaIcFxfJPVhn 3rzIc+TScbh/5SD0MtrNzzq45S22XgSd1Rru4A2QosfdIDERHPefb0oeZPr+EfaVn7Xn5woFNIV YMpM//h7O2p1wfWhuGuA= X-Google-Smtp-Source: AGHT+IHCO4D1La4oULtfgVO3iebov362SJt1qEPr1SunPSbW7jIrz3dUNlGW3OhP585oFJd+gpW/zg== X-Received: by 2002:a05:600c:1988:b0:43b:c590:173c with SMTP id 5b1f17b1804b1-43bd29c7904mr59604325e9.24.1741276197322; Thu, 06 Mar 2025 07:49:57 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 31/54] target/openrisc: Call cpu_openrisc_clock_init() in cpu_realize() Date: Thu, 6 Mar 2025 16:47:13 +0100 Message-ID: <20250306154737.70886-32-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276707905019100 OpenRISC timer is architecturally tied to the CPU. It doesn't belong to the machine init() code to instanciate it: move its creation when a vCPU is realized (after being created). Reported-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Richard Henderson Message-Id: <20250114231304.77150-1-philmd@linaro.org> --- hw/openrisc/openrisc_sim.c | 2 -- hw/openrisc/virt.c | 2 -- target/openrisc/cpu.c | 4 ++++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index d9e0744922a..83d7c2a8afc 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -306,8 +306,6 @@ static void openrisc_sim_init(MachineState *machine) exit(1); } =20 - cpu_openrisc_clock_init(cpus[n]); - qemu_register_reset(main_cpu_reset, cpus[n]); } =20 diff --git a/hw/openrisc/virt.c b/hw/openrisc/virt.c index 9afe407b00a..3055306783e 100644 --- a/hw/openrisc/virt.c +++ b/hw/openrisc/virt.c @@ -487,8 +487,6 @@ static void openrisc_virt_init(MachineState *machine) exit(1); } =20 - cpu_openrisc_clock_init(cpus[n]); - qemu_register_reset(main_cpu_reset, cpus[n]); } =20 diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index 0669ba2fd10..785b065b513 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -165,6 +165,10 @@ static void openrisc_cpu_realizefn(DeviceState *dev, E= rror **errp) qemu_init_vcpu(cs); cpu_reset(cs); =20 +#ifndef CONFIG_USER_ONLY + cpu_openrisc_clock_init(OPENRISC_CPU(dev)); +#endif + occ->parent_realize(dev, errp); } =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276607; cv=none; d=zohomail.com; s=zohoarc; b=OKkwNp4945cVHBfTK+L8YOotqxUukIDHTyK5e/aMyxy9g6xol3Fih6tmaHTxUXQHtbV3CtO1F+5Z2mnfR5rTF+V6U4rf61mmVBFgp6X5F0/tUCD6b+P3tWE1CZ/hMgqWYMF2EWs/Xr1kYhka4ln5yHWnGtI92XlCJE96BlG/IOg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276607; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=yLBo67sH6HjRZEuxvMy622hl56JAycvhfKaomqodUXg=; b=TRbJjrlpdcZ+XaK2HnQCEuRmwXssehV06DjI9SVkzB5hUiCMld78o51YI6uwO/AjRQjnUKRarF7hXsqpTepur1u6ZLfdRaQTfkH516Ai0KsLS8H8rr+dZEnouML5aigDlP/AUrbHaPh3RPTS9OFc55d+6n/4JhBI4t/Jjzjk4RA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276607658127.56792216049882; Thu, 6 Mar 2025 07:56:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVf-0004Yp-G8; Thu, 06 Mar 2025 10:51:43 -0500 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 1tqDU7-0003JS-PI for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:09 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDU4-0006RW-2T for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:06 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43bd45e4d91so5730195e9.1 for ; Thu, 06 Mar 2025 07:50:03 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd94913fsm22808915e9.37.2025.03.06.07.50.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276202; x=1741881002; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yLBo67sH6HjRZEuxvMy622hl56JAycvhfKaomqodUXg=; b=epkeGtII6ZbkOqj9L/67LmY5C9LDM7H5wfy8KPAo+6eP0nrndb8dj+9O9/ZRmKOEjL sjrQeikLYTtWuJkEb7EQ6g+uFPQMemU7gIbqn7DR/0O+6qiEbh0UxPIydjrkuIO47o/e YwGDBBvYI6qLnagQXHA0braoACOFra3Y2hMyHimROmvNuffLzpgKcIjSeKQ0kgz9KpUg Y/g4nd9aPrwHHNgxOYJeg1t2A7vh+y0v3V1cT1ViqkodeahwoxltOjUbycHc8iagDP2h D4vGZFDzot2M0CIt3RVEhORcMwTpOyqcUWX1wQZyojMzT8VFgjxtkuyNXtIUzgLdLwPj QVGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276202; x=1741881002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yLBo67sH6HjRZEuxvMy622hl56JAycvhfKaomqodUXg=; b=bEgQtRM9VLEBYHw45/0g1tQHXgRbZ447//v+yEfznOHFLcTGy3oChlQZETqHq1mkA8 +mUZroSnPAwbFPCUyj1bRswjLY4zt0rgmVSQOJYW6u7D10OjxMpC1rRjUYx09555luc6 xs240fe4ILChpFDqhVXYSoMa3T+z2Q6oMx+hYkeHyY4PuGznjR1WSdZX7KpSpdxKBlCo G6QZBegMWwiffVP5kTvAjA1Ghu63ihp0TqeEVoT25Klg1ABlzLyTTUG2JzbZROlu42r9 1da9wZww4rEZ5rpJRUHrhvzEteNdGgH9bDDOMx4E0ZPPAr64EH5eYZEfb9ut+cTG8bU+ RwKg== X-Gm-Message-State: AOJu0YykAWqloeqO6q5gsqJLKi4LnUyNuDuwXlgia19YSJoSB85ymrgL 91BoVuMpMjhX31KBCWbQ9/Y5IPIG+tTWmy+VECz3pz+u0O4r6gPI/3MOisZzhqSLaG2/kEX9RCN pVGY= X-Gm-Gg: ASbGnctslv9EvEDLXvofZLBJa1syrjot0+LgR8fmc1Vkaw3f6xM4ldY229S66lozG5w ++MFosVwzBJ3bww/h+HMWNbSN1nlrWfCV9d6w3q9eTfeRHzD30sGkdl8unqs+Ks68V33YGFaoSl /C79xHHm0ve+XyGYPjiLnKEvgwQTTL2Owlu7drapmA1P+iesWD7hghisMhYkUVbrJRrP0j4dHRi aUvLo2MjCqhr/4XiGowxSgaiM28H//XEkipJiFqy/nmVPCXehJn/Ioe7HQaxx+3kzFPFJkkZwgw aIgK05ehC0DSw3NzShz63UDiEXkgnh9DB+PhoUg9cbA1KwX0ZofplCwPRq7atLx779l34uIxTrF 6zqH8T3pp1rV8Xxm46nI= X-Google-Smtp-Source: AGHT+IENSHPDy2P/nUJjd7zVgl6eCnXsq7IXgk9VJjJrMXpMzEzH+vyaJvdTY9B8dL5xjDwNvVJsNA== X-Received: by 2002:a05:600c:4997:b0:43b:c824:97fa with SMTP id 5b1f17b1804b1-43bdb3e12f3mr31583295e9.14.1741276201775; Thu, 06 Mar 2025 07:50:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 32/54] target/hexagon: Ensure not being build on system emulation Date: Thu, 6 Mar 2025 16:47:14 +0100 Message-ID: <20250306154737.70886-33-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276610950019100 Currently only user emulation is supported. Assert no target code is built for system emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Brian Cain Message-Id: <20250121142341.17001-2-philmd@linaro.org> --- target/hexagon/cpu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index 79e60d4bfa1..f78c8f9c2a0 100644 --- a/target/hexagon/cpu.h +++ b/target/hexagon/cpu.h @@ -26,6 +26,10 @@ #include "mmvec/mmvec.h" #include "hw/registerfields.h" =20 +#ifndef CONFIG_USER_ONLY +#error "Hexagon does not support system emulation" +#endif + #define NUM_PREGS 4 #define TOTAL_PER_THREAD_REGS 64 =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276834; cv=none; d=zohomail.com; s=zohoarc; b=GKUFS3BBbKIkYImgfhJmyqVcnLNFt/MyfELGHuaYgMP3m1Fno9XmZVdVJC3R7pGXtW/LCiytexdA4FaroJTpVa4tbVUmGvzXU3X9At6SrJ4RMHh4rx7BZrLZOc4XaJVfwtA8TXFIicziBuRTcW4y059M5lYlmqFohBlhGHT/K6w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276834; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=6AGaZhzI7b9cA8ZVzToMlsrK1z7aXcYWITqf5Z8tBA0=; b=nlEsNJQ7Pm4z9Og7D+gZYnhfnIitWenV3/2vFN0spOhOkdJOfw5BUxFKQERKrKMR637HgTRXtihX5HL5RvD2QQMOTICBGVb2LYPQD7jtQs59dhb/mP/0EXcb+AnF8WLwDDsv0KPE1ROpzoxppOJEDEFuo8LZXoqfgMckeNpTA04= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276817339697.7518559188154; Thu, 6 Mar 2025 08:00:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVY-0004Ue-Su; Thu, 06 Mar 2025 10:51:36 -0500 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 1tqDUD-0003ZE-AY for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:16 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDU9-0006d9-8H for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:10 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43bbc8b7c65so9825045e9.0 for ; Thu, 06 Mar 2025 07:50:08 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd93c9b6sm23352175e9.29.2025.03.06.07.50.05 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276207; x=1741881007; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6AGaZhzI7b9cA8ZVzToMlsrK1z7aXcYWITqf5Z8tBA0=; b=ymQ0FTDlayj4NQ1xIKJ9WkgoEcCjcJH7HIyhbW6a3FpBgNpVNtXJQ3xNVK+2UU50+i tzh1zb7AQs8Rp0jXepbw8QRdAXqyQWYogS50GnHLxV9msYQg5GBOiaUA7sKCu8/oImAM 7xag1hQzJbOmVtoYKMqdAKa/cw5WAqMbvHvDSZnICrkgIFjvF2fXQtCV0sffN84ksIAu 9rnJsMv21+bUQImU4untliXFv6z0HdZdfvI17UEaEqqEv/Cig2D2d7ctKGrf1ANUvlbU Imds72er+zFTeRPhImCutJla+2AIYRzmU8II3H512Z8CZnohdyyk391PHbXFI0jBPfGT mmrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276207; x=1741881007; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6AGaZhzI7b9cA8ZVzToMlsrK1z7aXcYWITqf5Z8tBA0=; b=V4pb94FtwGyigPr+N17/fPeHEQHFXBdTix95w3spA+arLFl/YfPlrfkaGvWnyhQEc7 lUPH8DUoeaigoCiISbaDXehX+dpm2YbyWaxq1AlIBKKrbc9h+6BqYizURo/kZKFDd6CO 13z3BltEf22x0UPW/876cNS86iV8N9GuT5WQFGA9If+lVUUcjv3tvCTvZyCnmjPqb4Hj x1/loKU4zxwaalVs66QokRD2YsbZv+/QkBeGeIPAVuoK9ijVBbpzu9GvfHn1EpfEE3Lf ZoZXvL4SnAVz+ge289+mx0OfKchK6OLJxRVeZffRNjA4I7wSlVI9wommMxyIJZ+kNcUR y9QQ== X-Gm-Message-State: AOJu0YxX91QdFRd4QaJe/9DmoLg4nbAcBdcCRhSsuN6ZJrUpmLVKwYfO mm1PUPypluNjkcIxHlJ1YR+rOIdy6EZhtcbppi5YjGXzTtftcuPv/FwSJvqNs0QJaR52VXXr+Ar 10T4= X-Gm-Gg: ASbGncvRyoOVpJWReOw2gnnx/3A5mF5/tI2G2KDQIKpnJTOmnC0mrX2/9M4P71uAhah MO4Ny+3xrd95ptTHP/xfmVaPF/vL+TQdMZEOEWoTbrmyWOKJiglDJ0a2WtuIt+oUcooGS008uk2 0oab8amFr/D+acUfgM8wu9WwHPSUK//FBS70OcB94XpfNsFtkmDjf6Z2uxY8979EXbqbdtyDFVH hv5/Rg3pjPQ0ej5ZXMnDr/kUaKeR8AijP97WiN82ZxM3n2Fd6ufvy8rQtt3OPkDZUWzJV0fMzb7 AfCwQi3WH68a7x79bTwz10hqCCDhEDcFPzC0QweYTx1ItbVry4LE9BK3O/td/whUFmGDXXzel6B SsoGOmSNx2rWoDgb2YGA= X-Google-Smtp-Source: AGHT+IFETVjixvsV6BkR9fmitYdlYy3jpCoUYKhTblQjk5iW6quz3YdzEOkPAll7xQnu3ZrYGsLlaQ== X-Received: by 2002:a05:600c:1c90:b0:43b:bfb7:e099 with SMTP id 5b1f17b1804b1-43bd29d2a35mr71711185e9.29.1741276207042; Thu, 06 Mar 2025 07:50:07 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 33/54] target/rx: Ensure not being build on user emulation Date: Thu, 6 Mar 2025 16:47:15 +0100 Message-ID: <20250306154737.70886-34-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276837048019000 Currently only system emulation is supported. Assert no target code is built for user emulation. Remove #ifdef'ry since more work is required before being able to emulate a user process. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250121142341.17001-3-philmd@linaro.org> --- target/rx/cpu.h | 6 ++++-- target/rx/cpu.c | 6 ------ target/rx/helper.c | 4 ---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 5ba1874bd76..349d61c4e40 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -26,6 +26,10 @@ #include "exec/cpu-defs.h" #include "qemu/cpu-float.h" =20 +#ifdef CONFIG_USER_ONLY +#error "RX does not support user mode emulation" +#endif + /* PSW define */ REG32(PSW, 0) FIELD(PSW, C, 0, 1) @@ -129,11 +133,9 @@ struct RXCPUClass { #define CPU_RESOLVING_TYPE TYPE_RX_CPU =20 const char *rx_crname(uint8_t cr); -#ifndef CONFIG_USER_ONLY void rx_cpu_do_interrupt(CPUState *cpu); bool rx_cpu_exec_interrupt(CPUState *cpu, int int_req); hwaddr rx_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); -#endif /* !CONFIG_USER_ONLY */ void rx_cpu_dump_state(CPUState *cpu, FILE *f, int flags); int rx_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int rx_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 7d5fcbf76ac..17ede51cd11 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -192,13 +192,11 @@ static void rx_cpu_init(Object *obj) qdev_init_gpio_in(DEVICE(cpu), rx_cpu_set_irq, 2); } =20 -#ifndef CONFIG_USER_ONLY #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps rx_sysemu_ops =3D { .get_phys_page_debug =3D rx_cpu_get_phys_page_debug, }; -#endif =20 #include "accel/tcg/cpu-ops.h" =20 @@ -209,11 +207,9 @@ static const TCGCPUOps rx_tcg_ops =3D { .restore_state_to_opc =3D rx_restore_state_to_opc, .tlb_fill =3D rx_cpu_tlb_fill, =20 -#ifndef CONFIG_USER_ONLY .cpu_exec_interrupt =3D rx_cpu_exec_interrupt, .cpu_exec_halt =3D rx_cpu_has_work, .do_interrupt =3D rx_cpu_do_interrupt, -#endif /* !CONFIG_USER_ONLY */ }; =20 static void rx_cpu_class_init(ObjectClass *klass, void *data) @@ -235,9 +231,7 @@ static void rx_cpu_class_init(ObjectClass *klass, void = *data) cc->set_pc =3D rx_cpu_set_pc; cc->get_pc =3D rx_cpu_get_pc; =20 -#ifndef CONFIG_USER_ONLY cc->sysemu_ops =3D &rx_sysemu_ops; -#endif cc->gdb_read_register =3D rx_cpu_gdb_read_register; cc->gdb_write_register =3D rx_cpu_gdb_write_register; cc->disas_set_info =3D rx_cpu_disas_set_info; diff --git a/target/rx/helper.c b/target/rx/helper.c index 80912e8dcb4..7f28e729891 100644 --- a/target/rx/helper.c +++ b/target/rx/helper.c @@ -40,8 +40,6 @@ void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int= rte) env->psw_c =3D FIELD_EX32(psw, PSW, C); } =20 -#ifndef CONFIG_USER_ONLY - #define INT_FLAGS (CPU_INTERRUPT_HARD | CPU_INTERRUPT_FIR) void rx_cpu_do_interrupt(CPUState *cs) { @@ -146,5 +144,3 @@ hwaddr rx_cpu_get_phys_page_debug(CPUState *cs, vaddr a= ddr) { return addr; } - -#endif /* !CONFIG_USER_ONLY */ --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276504; cv=none; d=zohomail.com; s=zohoarc; b=j8sa4646pYER00pavw4RpavC5f2Bd17u95mFGipQfG6dXhx/buC/58l9sTDGStmQAp9/4GPb+YQcIh64T9PiGTUVvHzZ1z3JqAJs2SRYedWt0VQs+NSHw+X5jn9AQ5CVKhiCyoBtBHSTCJ5fzcKMjx4kv6dyj+ScSV3cQUiHCvI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276504; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=12zNcZ/J8iu/OABHwpRBgZT92nQcl4kBcq8dKGM93S4=; b=gBC4Jo8Rp4Aa379sUYGGnCfNPiMVnOF2pMRocdNgtSeJm+jpABq9D2NMdXNgOMyu+oHN/bqocTrMdLwMXQEAhlOsYJo4FlHZ9LtN+U+J/uqwdFk7CEaKk3ryPxUx0qCN6ifxSzToMlA3hhtjHS7tr/ZGQrCQfqG1PB7a6sPPkK4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276504243846.117027233592; Thu, 6 Mar 2025 07:55:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVc-0004X2-Vn; Thu, 06 Mar 2025 10:51:41 -0500 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 1tqDUF-0003am-28 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:17 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDUD-0006f3-Gf for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:14 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-390f69f8083so790352f8f.0 for ; Thu, 06 Mar 2025 07:50:12 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd8c324csm23300605e9.12.2025.03.06.07.50.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276211; x=1741881011; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=12zNcZ/J8iu/OABHwpRBgZT92nQcl4kBcq8dKGM93S4=; b=P8nNi2xpGOWeokJ3ruzS40fhyhLESsClhyq8nxh2aeBdNSS6AZnPsBrea1I8h615oG TiJ3mptB10mgTYfetStrGFmEFNm2NLP4A2D22BKxAhBSsoSM2bj2/lJCaIeOPYplmrSs UdunP7NGPA7qy/hUWBnBKLcC7yqZB9GTTxeZ08HiiXjls4JUEdWszwOdAH7E65+1dU6Y 4IIhFKHRnTGMCBFnMXYhtuIk+OnoNEWunpLSoVK9uVJtaCjcUHyBLIzSQS6XboJZTsLE gRlRC4tbFTpBShBpmX+lVcWqXpcKs7XyoqLsyC7zdSOFEeHvpVw9JJ/tlkAFfQ0A2hH2 RP0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276211; x=1741881011; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=12zNcZ/J8iu/OABHwpRBgZT92nQcl4kBcq8dKGM93S4=; b=jbJCTutfei9Weca1dmIDMMs2MX62IfQRswtirJSWHD4p7gHsdV7JZuPYPy1TmGM5di hlRsXFO3MYlfPq76CNDHbczRNHzl4yXyPF9snGTYzCf1kRiADzsIaux2Ybc4BwQSao0E WtZ+2BvIah5vVc7YS/yyl8AujY94b3Eb4S+p6eOVW0l77Ykx/A0wLwVdqUwSZFwIVKWa xZMjVqY4As8eTkW6JihIfru3dtZc2EXGkgiEyIfTzaB2FT9NfTAbX0x5SvSAF0Psf4uw 8eFT2s5ABBAbgDJYv7jydGZQn5gVgKfNmUCsw2qbxnWQ51XceFPEdwc7uok6kX7ohRDP Z1jg== X-Gm-Message-State: AOJu0YwCbOfXR7PQyVzP7r28cu0iCuB4ABanYEF3yaq0k0uzDaZkLgi4 OGkrMO85okFNwIC98p9hD/YF5tsY4QrPQy1LEpwLCs1UGRvL8VjNG2ii4cX4JDoTDAT/7tRE0/o nrUg= X-Gm-Gg: ASbGncv3BXK41Xc8MaksRB8WXEuXAAvdryxgqEOQmjRuHeSOue7kyLiAzaf0jk+fuOb j4Qg3WYmDZmD1ifcJMncBGo4Ud009X00HHvxMyP0vuzV1lw99IAudgep4Xl/C13MjV26FkmNBBC oNsaj3j7bVN5qHaXFaP8Xtv+TcnYF3JssMORLOxyq0Rk+gvcyCuBnyH2db08kxNdPCovM9GgFtC YSjul2kDEx+kav8cDZ3uozoiPvMldib9FVzjI4nF2mx+yzDPE1qEy82mP3zryVWtyvOkAS9Cfrf taDxJkbvGia1bHLsWkCgR8MM4Vz8NFRyf7Bg86B/T7Xvpof4cWcOB3BAcgszqiPh0XEMK/r+NLc DzLfuAuoYef2NSX/VJ4U= X-Google-Smtp-Source: AGHT+IHHiswM5cv9QvdxjsyGCKmpVmil+EfbgZw/2sbI+WV6lOrqekBklZzIk3A/T7bVaG8ztpUW7g== X-Received: by 2002:a5d:5f8b:0:b0:385:faaa:9d1d with SMTP id ffacd0b85a97d-3911f7b76ddmr7639406f8f.35.1741276211467; Thu, 06 Mar 2025 07:50:11 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 34/54] target/tricore: Ensure not being build on user emulation Date: Thu, 6 Mar 2025 16:47:16 +0100 Message-ID: <20250306154737.70886-35-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276506021019000 Currently only system emulation is supported. Assert no target code is built for user emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250121142341.17001-4-philmd@linaro.org> --- target/tricore/cpu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index 8e431d79222..cf9dbc6df8e 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -26,6 +26,10 @@ #include "qemu/cpu-float.h" #include "tricore-defs.h" =20 +#ifdef CONFIG_USER_ONLY +#error "TriCore does not support user mode emulation" +#endif + typedef struct CPUArchState { /* GPR Register */ uint32_t gpr_a[16]; --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276615; cv=none; d=zohomail.com; s=zohoarc; b=Ia76c5iZ1FeMF3gkbQNk0xszcw+7YkgJKZtqlZJy7KItIM407cJ62vMYmZZ5ukDlZjbLM42NXSQqWT4gChSQfHimi+/nqMpf6L1FWMFksk+C1A7omW8nx2wxLndEABiLrKHpEkAMjNtFbMSEehXfR9fRP8fDFtonLel76b494e4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276615; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=SnfT7DORVv/itpA6HOJTnRR+mH0KMqcNOFRFeDG2Dgs=; b=nzn5yuD9qDd56W+9gpEhb6bMtnjr5pYnYgds9F3zTIvrEDMQqNAKA0/WUDQ8ci22WIt3tYkAnvGqtHaaEijyARvBhBLUzfCpVdWBLOj68/w8JuKHyjmAeB/1Jl5/4yUOmI+VRdHZE0uFxqr+RE3xv3yL8PRMnAjv22L+94HNlrM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276615794880.3312551275179; Thu, 6 Mar 2025 07:56:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVl-0004uU-KM; Thu, 06 Mar 2025 10:51:49 -0500 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 1tqDUJ-0003bs-FL for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:21 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDUH-0006gE-Sq for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:19 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43bd45e4d91so5732075e9.1 for ; Thu, 06 Mar 2025 07:50:17 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd8db6c7sm23249105e9.22.2025.03.06.07.50.15 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276216; x=1741881016; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=SnfT7DORVv/itpA6HOJTnRR+mH0KMqcNOFRFeDG2Dgs=; b=Yj7K6hgrmwS8yc+mDL3njIWiaOEuCfidpJUdYVFZOLSPQSDkkTRA5AuAfXVPqKbd1R 6wtKWRne6bb4PxTlKtMdFAzI2wk8lWTTmMAqgjg0YVaZiIT5k8r0H1hJKAHNBfJIkHrP xxAWPh0cj8/ZCdO5kAPasXMivgiV3cYxi/ydvsu+/BftXh9DiZSAyCqIRCAZWM3906pL +OhV/nEHTUtHqNygBBTdb35yonDKUUG+Id+MqvShiAAG/+3ryaPcW87O2EBrZmeClhhm jQ31gyipbrQaTccUdKarwS4a2l4A1OtQLN9gTSniLYuXuq5Qf2Wdy89qA+BNb2zOR/on BbQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276216; x=1741881016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SnfT7DORVv/itpA6HOJTnRR+mH0KMqcNOFRFeDG2Dgs=; b=Y8Un+bguR8Taa0lTi2MBDu4C/Gh4b7sbVT6DGIL7myXe+BHpTxRm84D6k3r3H+SmK/ L0vjCBDBiq853whTUH8Vea7dkq0WMpS4iC6ZSsZfENga5oa9RML4CycGDWkKyQGJH9PF onF2XUEu+eT5I1FwrmbrEo6ho/eTU7NZ0Q0ZR0/8hGLIexC3epXO+AD/DLn0gh+7MsSC gDJWmocg011socxrk+1AqxB3E2Ifm6kPRScS+6l4E3Nhh45E2VgTJIWV77xahqKcd9lA hZTQZzkp9u2vMpr1f0ihf7Xf60wIsHqyF1M3rMystTVPn6OlsVersD31vW66rS3SwOw9 rDEg== X-Gm-Message-State: AOJu0YzZeQoLaPjn3bMJINmV3wbF6kKWBhrJWNjtLZwWKa8J/H4ggDrH D4Nq8K86Nc5wla+SHLWPYT3DO/nlG/6MCUTICUcWXxa7W83IlJLH7Y/dO76DzhG9h4bRZDnKjAt kbrk= X-Gm-Gg: ASbGnctCMe0wnUOHODKu3DILNDfxIG7rvgXCgQfXkd8haoL0SmkqWmXXxDbOhP0PoAs 9G7SKaBTK7hUQR3KsImxBfJT9a21arcz+1bsY/LJznn/M4wUp+ALfQ9fpowNRg61u12eSHXYQHx gEoI2Hjn0l24gmj7D1CioC1EiDjE7CoL1qOLrr1zOCAkad1NxrEVoAJahEoIwodGrL6ppUPpEag BgSxn//3Byurnhq90ehlVLJVTgQdgf3z7lQ9gaGmF67UImH2a246FWffMhTEPHM7oMtJthPKkNi j3uTPgeqMwZiARwF4ZFGF0WmIo000TRvnWaC7pgyPqkztQHXA1flbiRxt0DHrAw6434oeNF4bzf z5S6qGNfZKIXo3uMILio= X-Google-Smtp-Source: AGHT+IH/mA76cIl2YsHlsMIktLuqn5LkW/+5ivwAUhK+ukO1uoiPNruTKAEfU24hN2sjoGmA0MkXZw== X-Received: by 2002:a05:600c:458f:b0:439:91c7:895a with SMTP id 5b1f17b1804b1-43bdb38dd94mr30596655e9.7.1741276215897; Thu, 06 Mar 2025 07:50:15 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 35/54] target/mips: Fix possible MSA int overflow Date: Thu, 6 Mar 2025 16:47:17 +0100 Message-ID: <20250306154737.70886-36-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276617655019100 From: Denis Rastyogin Fix possible overflow in 1 << (DF_BITS(df) - 2) when DF_BITS(df) is 64 by using a 64-bit integer for the shift operation. Found by Linux Verification Center (linuxtesting.org) with SVACE. Reported-by: Dmitriy Fedin Signed-off-by: Denis Rastyogin Reviewed-by: Peter Maydell Message-ID: <20250124122707.54264-1-gerben@altlinux.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/msa_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index ec38d9fde5e..74fb80cc256 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -5577,7 +5577,7 @@ static inline int64_t msa_mulr_q_df(uint32_t df, int6= 4_t arg1, int64_t arg2) { int64_t q_min =3D DF_MIN_INT(df); int64_t q_max =3D DF_MAX_INT(df); - int64_t r_bit =3D 1 << (DF_BITS(df) - 2); + int64_t r_bit =3D 1LL << (DF_BITS(df) - 2); =20 if (arg1 =3D=3D q_min && arg2 =3D=3D q_min) { return q_max; @@ -5685,7 +5685,7 @@ static inline int64_t msa_maddr_q_df(uint32_t df, int= 64_t dest, int64_t arg1, =20 int64_t q_max =3D DF_MAX_INT(df); int64_t q_min =3D DF_MIN_INT(df); - int64_t r_bit =3D 1 << (DF_BITS(df) - 2); + int64_t r_bit =3D 1LL << (DF_BITS(df) - 2); =20 q_prod =3D arg1 * arg2; q_ret =3D ((dest << (DF_BITS(df) - 1)) + q_prod + r_bit) >> (DF_BITS(d= f) - 1); @@ -5700,7 +5700,7 @@ static inline int64_t msa_msubr_q_df(uint32_t df, int= 64_t dest, int64_t arg1, =20 int64_t q_max =3D DF_MAX_INT(df); int64_t q_min =3D DF_MIN_INT(df); - int64_t r_bit =3D 1 << (DF_BITS(df) - 2); + int64_t r_bit =3D 1LL << (DF_BITS(df) - 2); =20 q_prod =3D arg1 * arg2; q_ret =3D ((dest << (DF_BITS(df) - 1)) - q_prod + r_bit) >> (DF_BITS(d= f) - 1); --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276636; cv=none; d=zohomail.com; s=zohoarc; b=kiOEHocmlP0h4kARfYY6d9WxpRvS7iATf6hpZEK5hM53H+3eUHy3ov3DfI2qISBF1AcPmv5UB7KKaGtGaQZEjalUlf2KAh+UclsRgk/4hCuE0Gc808SUuGAgbR/egyW26pskNiyQN6aNmWEbcCortaoYAYeCHxGYuKAAWuNCq5E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276636; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Ry6/HgwBxYCoKXfN3GlNL4j5WQBtuJxwtVuKKIpyAK8=; b=idZrUNZLUb7d1olYl99xCuHUxlIA3UkFigt8EGMAaq+YwqSBQFNIh+eo13cOficqr5yUKYgL95mLN0hgMUOrhcRk31Rkfzd7PkJKN1mUknNjkzFspo8aLshk+lv5ICwSOnP6YyLMmTT9Gkq7C56gim3Nrc55gYY6t/T5WDlHmqY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276636513555.1593411804789; Thu, 6 Mar 2025 07:57:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVk-0004sF-7j; Thu, 06 Mar 2025 10:51:48 -0500 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 1tqDUP-0003hL-8b for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:27 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDUM-0006gz-Im for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:24 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3912c09bea5so644473f8f.1 for ; Thu, 06 Mar 2025 07:50:22 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfdfad7sm2393099f8f.26.2025.03.06.07.50.19 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276220; x=1741881020; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ry6/HgwBxYCoKXfN3GlNL4j5WQBtuJxwtVuKKIpyAK8=; b=o3TpJpR+rk3kqyNABZsa41b4IYAbS4RVtAyhEVdTSfGa7CoMx7WcCObYlCsMmW6bKK Mt3kzabmEWKYe9brMV+AOSdQ+LaUEXYLOJ2fOvXjVNKQ8ouoOXTJHN6G3kXGn2oH0lwl f46/UCn3ZQrDRk/Jzah+b3PGuABA4nUSxqNJyX0C8ummdyM8NMXq3lrUlNW4SByENHYi 9IxU7BBvj+Z0bOi8pJmys3T40xwogwGCVUq+Wt1Y2HtifO8rvKMqb1ORZquW2I8Q14Jw nSkpXjm8otrPuErCFXZmpbkK7ADHZp4uwqwp93Mq6Xw7d3iS0iVNtVtVSbPXigV62ZNJ MheQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276220; x=1741881020; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ry6/HgwBxYCoKXfN3GlNL4j5WQBtuJxwtVuKKIpyAK8=; b=dPglJy6bLg3LBhLzCplPTwkzf6eScOgzGMIl2W0o8T5KeGcPs/r4mGgH6tN01XX5l+ GstUwqOcR0spHoTH6FFkiKmt/Adz2gNFn3IVisS9TI9HrQ7My2IblQHCGr1u+z/LHKv8 8sruqPn8ap8lKhR40DTPgjcpsOGhOplJ3Q30p1vkLHyOaiF53qaWBXEa8o20xBGE8gwv XgZRRnd7O5wTWF4Bf8pm/b7SL/8vTjRtRgDyMVCo35FZQQlcyBi8kf3aEeNpzCl/4s5F t7xRAJTOKqxfo5HebtMwWmUA7bKnW9h6zZiv2lMGRjU/n/+v7blgf6ZuO+DBUM8Bz3Rn PqMA== X-Gm-Message-State: AOJu0Yx47LduexftVA0SdkDlX9JrejRXk6NkyvPpHWHn7UCI73abGzdM YmvaH7d2MQxjURcXBCMKi1XrOiGlmlOTIn0gKYbJNzzfyU5fwKgjzIB9Jn5bWRd+AybwgHXki5T m5UU= X-Gm-Gg: ASbGncsjz+kNcmRTa5PLikiKJoq9CJqId76YdC7tUF2Y7FKlWw77T69F1vRVkJ5GZSc jlpic0/V6iMaaj6OYpEuLgi1D2eYCrct8BLD1S4yXfZwaHL/C4w8FNtbe1K6UYy6kIl3YNGa25D LRYOVFnwvnlX3kb3TMl9aZgigJDNgc+bcTaLqQvqapuwl5renvKcmCb2uEExDQ37zW74CRwQ3rR go0EfacQK1fZTCdJEhGIWiYUq1wWUq6Fz0hfyIn0AdVSwHkiMQUs6fdjy3eVAD40dpP9uyzedLb hxnCw++0alYUZ4w/cYze0mFRXP/6qMKgaFaHMGo+PLS7BrIKzi6t59koipaINbQNCTIlqyTBu6g R5CZW587DhqqfRin4GjE= X-Google-Smtp-Source: AGHT+IGuVmeIe36OU9zq6iMxhSWQc5X9fYBdoOfWLmlXBjkCjsttFPU3MRi0GDBse0aec0STqcmHmQ== X-Received: by 2002:a05:6000:18ad:b0:391:1388:64b7 with SMTP id ffacd0b85a97d-3911f7c39c7mr6755696f8f.46.1741276220321; Thu, 06 Mar 2025 07:50:20 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 36/54] target: Set disassemble_info::endian value for little-endian targets Date: Thu, 6 Mar 2025 16:47:18 +0100 Message-ID: <20250306154737.70886-37-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276637790019100 Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field for little-endian targets. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20250210212931.62401-2-philmd@linaro.org> --- target/alpha/cpu.c | 1 + target/avr/cpu.c | 1 + target/hexagon/cpu.c | 1 + target/i386/cpu.c | 1 + target/loongarch/cpu.c | 1 + target/rx/cpu.c | 1 + 6 files changed, 6 insertions(+) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 57e41fcd784..2eabd7724df 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -85,6 +85,7 @@ static int alpha_cpu_mmu_index(CPUState *cs, bool ifetch) =20 static void alpha_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) { + info->endian =3D BFD_ENDIAN_LITTLE; info->mach =3D bfd_mach_alpha_ev6; info->print_insn =3D print_insn_alpha; } diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 5a0e21465e5..2871d30540a 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -102,6 +102,7 @@ static void avr_cpu_reset_hold(Object *obj, ResetType t= ype) =20 static void avr_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) { + info->endian =3D BFD_ENDIAN_LITTLE; info->mach =3D bfd_arch_avr; info->print_insn =3D avr_print_insn; } diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 238e63bcea4..a9beb9a1757 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -293,6 +293,7 @@ static void hexagon_cpu_reset_hold(Object *obj, ResetTy= pe type) static void hexagon_cpu_disas_set_info(CPUState *s, disassemble_info *info) { info->print_insn =3D print_insn_hexagon; + info->endian =3D BFD_ENDIAN_LITTLE; } =20 static void hexagon_cpu_realize(DeviceState *dev, Error **errp) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 0cd9b70938d..ab328485acc 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -8691,6 +8691,7 @@ static void x86_disas_set_info(CPUState *cs, disassem= ble_info *info) X86CPU *cpu =3D X86_CPU(cs); CPUX86State *env =3D &cpu->env; =20 + info->endian =3D BFD_ENDIAN_LITTLE; info->mach =3D (env->hflags & HF_CS64_MASK ? bfd_mach_x86_64 : env->hflags & HF_CS32_MASK ? bfd_mach_i386_i386 : bfd_mach_i386_i8086); diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index b4b82425b18..d2e739a029f 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -624,6 +624,7 @@ static void loongarch_cpu_reset_hold(Object *obj, Reset= Type type) =20 static void loongarch_cpu_disas_set_info(CPUState *s, disassemble_info *in= fo) { + info->endian =3D BFD_ENDIAN_LITTLE; info->print_insn =3D print_insn_loongarch; } =20 diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 17ede51cd11..1c40c8977e7 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -168,6 +168,7 @@ static void rx_cpu_set_irq(void *opaque, int no, int re= quest) =20 static void rx_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) { + info->endian =3D BFD_ENDIAN_LITTLE; info->mach =3D bfd_mach_rx; info->print_insn =3D print_insn_rx; } --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276397; cv=none; d=zohomail.com; s=zohoarc; b=FCF1kS+CKFJeFLkNBopLBWMrb2xy1RFh4IC024cWgA74aJ9fjYV6FviyKMDpgj0fGzDtCiotCUO/FuXwYPj3hP+u39MdadsXNuVeDBiZCB2gSNfvFiuaFHTBHj+lB5Hu8mZmbM/SKrXc/md4NM8F59ms3SBO5OZ3VJpvO0a/Hgg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276397; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=BUX6zYPG6f15eLnBlXMyTHI0pnIpQboe8CXPknmBs/s=; b=nYWhNGqMvKVeAndg1VS/DvwNj/c16zyZCifeskFqh3ObyQc4/YAQFpIhrqQs6adhq1ZelkaCLNrxq89UJEIXl5f61iY44/cYWTgIzOqR05V3usiSaKlVHzBZQDgcrNBi4IDqrYphR+ux94yx9TV+BlLdlwzbccfiuytiI5/yS7o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276397366275.4439923940952; Thu, 6 Mar 2025 07:53:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVp-0004yC-DO; Thu, 06 Mar 2025 10:51:53 -0500 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 1tqDUS-0003l8-RM for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:29 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDUR-0006hM-48 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:28 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43bd45e4d91so5733365e9.1 for ; Thu, 06 Mar 2025 07:50:26 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd435c88esm52884005e9.36.2025.03.06.07.50.24 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276225; x=1741881025; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BUX6zYPG6f15eLnBlXMyTHI0pnIpQboe8CXPknmBs/s=; b=kEjyKDT0Gveyo07K/bZRAQT/bkUGGaBcr4QQf/eZUwKXxSc18Oa7mym4NEYmaXO4gC VgrsXM3ZN9Uknao0un39SL/KsAxppIi2EeH3Iafx+txyg0ohcxqxnmTcLCUr35gLwyWe ZQcHLXyHQIod3BzNfhg8eZT9Gj9bN26D9/Fa2VeO/Pmuvmn0uYl4j9uxNkhkHtzck5N8 EuQfjVzf/t4vvdWFExpD8+Ew/9irbH/cJrMdFCS8Cjw4Hd6WWL74D7wiOLDuftranNMe 48W858yeKjV00TgrDq/sdA+UjUAbqZeO5UvQKHfKuz+wMz6OD4ckkfz0adaDPMVeE2Us uG5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276225; x=1741881025; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BUX6zYPG6f15eLnBlXMyTHI0pnIpQboe8CXPknmBs/s=; b=J1XIRYRfMs5jUsZDpUGYs27doYYdbrARJOHnMNT3m7vvwNVEdQkyNyzLyssNko9ezk /AeLC/qDQ41inrTu+yr23du6xd2WpCRM1ClXmZZPXXCfXAr/YL0oQw/vIpDvdz8LmRbw Hqt8aQOtmeIZYVtvh5R/V6HNUGoDXeKOvLqnzA1YEZZ3zsqIYmCUxBPXIvGcvwusfi99 joHc0rwlVWLF0TfS32aQ0cLxviQ0jMVSb9Zwzb4muBO+6eae5asvSw8247EFIPm2lsJz SZhwBy21DNUUwEuuTfING4ymtMs/JgFYA4wXBHPrLcvQxibg8AEKu3MLqQLXcVRcYTSi HYKw== X-Gm-Message-State: AOJu0YzTnSikMWGGjTOQu5flftyZzPrbGroqKmXB8rUtF4MgwXzqFztO HH2nl0s+n4DKKR2DlTWH+obtJ1Uk7Z2v5Xrw5J75x1U5MhgUZfrhMBFTlK+yWYslgbNB7AiFhd5 11vI= X-Gm-Gg: ASbGncsX+o5kGBDI44vXLnAkEo2e102RIaTbXkx9IVmdfQQ7ZmxfbcEtbWgE5VVzzDi 6oz59+ifNtEFvkBM1lyHnWCQwNrsWfRYuVi7gApM8tUEe0G1wC8Tc3Grv3tF6kWM/ldpFhHPy8J y9BAdxQ4kLmVJJI0rXmDHfCGfVAW3u84Gwi+pRA6etaeGxb3h9Q94hvtPIxwKGQ17jRSZo+TF49 iQYP1dN0FW8LAAJkKWPF7QWADm/sSWHzbX55oSO5IJhe+hR3bE+PMbZpjZDMZcntfO5vH8MlHoh qHXAu2WXv2hM+OdHwsC8P2IMW4RSUx/smepc58pKY7FNdLqdNPmduT+vh+Yv5yjB+aDoP5QspCX n+x1mXwWKZvg2Y2QqnO4= X-Google-Smtp-Source: AGHT+IEvkLEVWVnVJ0+3wlCN6PfwpqRiojj1/29nXQzQ8XxLkgdpXjS9Od/6r4SMeYYz9exmhAUSeA== X-Received: by 2002:a05:600c:4997:b0:43b:c824:97fa with SMTP id 5b1f17b1804b1-43bdb3e12f3mr31592375e9.14.1741276224782; Thu, 06 Mar 2025 07:50:24 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 37/54] target: Set disassemble_info::endian value for big-endian targets Date: Thu, 6 Mar 2025 16:47:19 +0100 Message-ID: <20250306154737.70886-38-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276399072019100 Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field for big-endian targets. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20250210212931.62401-3-philmd@linaro.org> --- target/hppa/cpu.c | 1 + target/m68k/cpu.c | 1 + target/openrisc/cpu.c | 1 + target/s390x/cpu.c | 1 + target/sparc/cpu.c | 1 + 5 files changed, 5 insertions(+) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 4bb5cff624e..d15f8c9c217 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -150,6 +150,7 @@ static int hppa_cpu_mmu_index(CPUState *cs, bool ifetch) static void hppa_cpu_disas_set_info(CPUState *cs, disassemble_info *info) { info->mach =3D bfd_mach_hppa20; + info->endian =3D BFD_ENDIAN_BIG; info->print_insn =3D print_insn_hppa; } =20 diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index eedda07c2ab..df8b9c53fca 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -157,6 +157,7 @@ static void m68k_cpu_reset_hold(Object *obj, ResetType = type) static void m68k_cpu_disas_set_info(CPUState *s, disassemble_info *info) { info->print_insn =3D print_insn_m68k; + info->endian =3D BFD_ENDIAN_BIG; info->mach =3D 0; } =20 diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index 785b065b513..e8c357ae836 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -83,6 +83,7 @@ static int openrisc_cpu_mmu_index(CPUState *cs, bool ifet= ch) =20 static void openrisc_disas_set_info(CPUState *cpu, disassemble_info *info) { + info->endian =3D BFD_ENDIAN_BIG; info->print_insn =3D print_insn_or1k; } =20 diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 3bea014f9ee..972d265478d 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -243,6 +243,7 @@ static void s390_cpu_disas_set_info(CPUState *cpu, disa= ssemble_info *info) { info->mach =3D bfd_mach_s390_64; info->cap_arch =3D CS_ARCH_SYSZ; + info->endian =3D BFD_ENDIAN_BIG; info->cap_insn_unit =3D 2; info->cap_insn_split =3D 6; } diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index e3b46137178..9fd222e4c82 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -106,6 +106,7 @@ static bool sparc_cpu_exec_interrupt(CPUState *cs, int = interrupt_request) static void cpu_sparc_disas_set_info(CPUState *cpu, disassemble_info *info) { info->print_insn =3D print_insn_sparc; + info->endian =3D BFD_ENDIAN_BIG; #ifdef TARGET_SPARC64 info->mach =3D bfd_mach_sparc_v9b; #endif --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276995; cv=none; d=zohomail.com; s=zohoarc; b=inLKcsqWbJp9mqDKz7o12XcrGIdHy7/zCV9968TsyUszHQEVYngLfW071y0ZOBLTVgoyF1jSg9Ql+qbmpCS1DKzBZW/OKOmZxghtv+rXAde/BJUuAikI7r91nvUXbUOz7lxwsQPx5Z/BLk3yYRWIITGC7RFu5T5/hsuXatbiRTY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276995; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=1WCMtYnB/Q/FPr4quB+y9Nf8Ulz7xJ98JX+NEB2sY0o=; b=WucdGz5eRJkR8uCoj34mPGO4JhnQCfVmYMFhPtUblp86/yjGmFBD8XfwMizAYn5JuHVYEtqJ8VGIEYvrO65O3n3Fn/RSoprAC9UGa9aMFhD2OsgWjdGwKk21ZACB//OeYYl+W8K1X0V5hx78odQJ/orFpqd2c2NS1kopPorK+WY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276995906327.50624156604886; Thu, 6 Mar 2025 08:03:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVs-00051n-NF; Thu, 06 Mar 2025 10:51:56 -0500 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 1tqDUX-00043p-CH for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:35 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDUV-0006ho-0I for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:32 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43bbb440520so9749635e9.2 for ; Thu, 06 Mar 2025 07:50:30 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd4292b06sm53471455e9.14.2025.03.06.07.50.28 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276229; x=1741881029; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1WCMtYnB/Q/FPr4quB+y9Nf8Ulz7xJ98JX+NEB2sY0o=; b=XmbW7AgOzkAEZz5a1fjCsUf6f+nF4FESBHMI09NRgiFLeOB2S0c93EIMcTtXbsexPg f50qJDADyIPlMNDvLBO6xA+c59axKIR5MPreS+sRZ+Gr6qjbPa4U1k1P0Wo4oG3mM+Rx xC3uAfoVlcvVxIxJ5pv/fMMhUsPFTkeH5Kbh/45EjhAXZa+t5KPKOnHM2jWJLgJNpJz6 lL4KhBnZaPEerO8sg3IFmiYrAmEs1d/7BPyBOAuZSNHMccTRiyXG5TIwY/zxJuPaFddP 3vCA/B/8eH4rpl7by7PRBy52NxFtZH7f+cyC1PRdU9Z5NKKHRTuXHeKd/1hIA8/kaLXp Ss7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276229; x=1741881029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1WCMtYnB/Q/FPr4quB+y9Nf8Ulz7xJ98JX+NEB2sY0o=; b=UO6+jsP7dvZ5Zm282rFoM2NwCHzClCSf7fROiFxj0+oZ4qUoPmKEcOGtK/sPQyi1Ds O+S6QsDs4W7SpnuDNXIqZw6/Wvj9fb4BRnuFShBp13FlRe41pKe10yZvq5k7JO45zzjR kv4Q53yvP+f3yE48X4R6mMfKJfl8hI9+7aLABOApfaldidg7NnKx83St8QhTw8Btp64n DaLFrHDBFJ9A/caMInedKrXLF1xNgMITdWJqNcemw6mCyaTzdpOJTWWQ43Y/kTEmAxCh k5sB42riU3D9mT8to8xM20cGS0zF8RNyep8Vm28dF4gD+8JL7iT03ykQQitPZdkmCTJv tPxw== X-Gm-Message-State: AOJu0Yx8YgJib0yp0ZhzX5Q15pOXErR3zIDhcoMrM8XEBtgSyk8ZpBQC +gxpOan8DcsshTMpEbyubfmF2wtzqi3dBL5A/Ij6W6JguuK+KjecLy8dhD/Fs5Rijvx6M32rfpS zlbI= X-Gm-Gg: ASbGncsbrT/oNjXxpjrV4hVsYEjlHBSLUl5BF2Gwl3jrAJf6vEfXcEnwx5QfIlGgpOW vMlLeqww0tDJ2XzBZ+CsLzNo7u8NoMG+5Ngpms+E4Qz3lOxKTBacZxahPLv2cdx/s8qvVZWh2eu il/lCSASWPqRY94gQsG/8Np/EqGm3RyrDrlPnG/5HXdOpA4M803Gs8GSlBNYL3SuZHu3ejvkxq9 A3cb46lAp/ew5CLhfeicn5vNCasBTCGHac56XUJQDcGWE15Jo4TJY6uufGO0Na7OLQ5GkP+6GPQ 1UQJHyB2/QfNfVcqI/ZlRojdE5WZplrkoB7Xw2yvMQvl0wj6pqHS5IrxLrScnYHl8aS32PmWci8 Rf22KxPDzarzSFwmJ/P0= X-Google-Smtp-Source: AGHT+IGkDbcVHf3B9eL8q6jL42T2q+4DkUCpBOGSOBuP2C8/ANLvBmK75fbj3N4OUQ/rHXD6mT1qOw== X-Received: by 2002:a05:6000:18a6:b0:390:f0f3:138a with SMTP id ffacd0b85a97d-3911f757382mr8911760f8f.27.1741276229176; Thu, 06 Mar 2025 07:50:29 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 38/54] target/arm: Set disassemble_info::endian value in disas_set_info() Date: Thu, 6 Mar 2025 16:47:20 +0100 Message-ID: <20250306154737.70886-39-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276999063019100 Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250210212931.62401-4-philmd@linaro.org> --- target/arm/cpu.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index ac1ceec2110..948defa3f5d 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1171,7 +1171,7 @@ static void arm_disas_set_info(CPUState *cpu, disasse= mble_info *info) { ARMCPU *ac =3D ARM_CPU(cpu); CPUARMState *env =3D &ac->env; - bool sctlr_b; + bool sctlr_b =3D arm_sctlr_b(env); =20 if (is_a64(env)) { info->cap_arch =3D CS_ARCH_ARM64; @@ -1198,13 +1198,9 @@ static void arm_disas_set_info(CPUState *cpu, disass= emble_info *info) info->cap_mode =3D cap_mode; } =20 - sctlr_b =3D arm_sctlr_b(env); + info->endian =3D BFD_ENDIAN_LITTLE; if (bswap_code(sctlr_b)) { -#if TARGET_BIG_ENDIAN - info->endian =3D BFD_ENDIAN_LITTLE; -#else - info->endian =3D BFD_ENDIAN_BIG; -#endif + info->endian =3D TARGET_BIG_ENDIAN ? BFD_ENDIAN_LITTLE : BFD_ENDIA= N_BIG; } info->flags &=3D ~INSN_ARM_BE32; #ifndef CONFIG_USER_ONLY --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276686; cv=none; d=zohomail.com; s=zohoarc; b=lSoKSZ+/OtH31iW7uQjjK494WStKlcYibuYyyBSTeJKEty6ZWQs6Hma+d6+h3dryUtxZdfi+WR8aD2xoWKELlxGIw83Yyhs1TMPUdw60VwqMPNpY6OoRXQMm4acKADgxmppCIdcasTz+njH++xdnHWdkIwLl0457kj8JkwFScBg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276686; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=OQjx41PTEPR3Oc8nlUx+93jp4JXIcOc6sQ64pqHRe5Y=; b=dHVcGmTA+MXnCGfqQfSTnrRexai+H2U/J/u3x/KeSbeIFtv8W2ns3ZZCZmkXM6UGUw5dgGjLeAwMakYJQEB5GXncTbHW7j9dQIhy67lW0A4Q51t2crk+FSP6+qn4rtFSsIe3bfSaSlTwwxTq5Pm17eru7UJpASfK3s591oOqkN8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276686829336.5024059747964; Thu, 6 Mar 2025 07:58:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDWE-0005sH-Nz; Thu, 06 Mar 2025 10:52:20 -0500 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 1tqDUc-0004GQ-Nr for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:39 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDUZ-0006i2-Kl for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:37 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43bc63876f1so7468395e9.3 for ; Thu, 06 Mar 2025 07:50:35 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd435300esm53634645e9.29.2025.03.06.07.50.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276233; x=1741881033; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OQjx41PTEPR3Oc8nlUx+93jp4JXIcOc6sQ64pqHRe5Y=; b=gIm7r9vEoBs5PUkxyhlS4igje5iklfX7uVWdQ/oWdP4OdTb/cVzdGkwBwtrhoOqXf0 SvNYjuwWJMIJEKR1RsH4uRS2tC2LonwsX0f+9kPmj4fNSXX4A0NcNtWspqsLGZUgmlw6 9ruNzASyprg0fi5hvn6SmHrkoN4LA+d3knDdztH2gDmDCN4vnzZG1hupoxTA7uf984Tb 9duhXTdf/xWTKF9iXFT5pKvCLDHUNFevO/XWG+Iw+tTqS82fRWRW9DQqArBw9DVFtvhV IfkC0k72LXLojlb6f75JrqrH28ZSUjf35B1AYrisnGt+0F/DdSSDgaXJ7KJZaBwfz2wV uYpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276233; x=1741881033; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OQjx41PTEPR3Oc8nlUx+93jp4JXIcOc6sQ64pqHRe5Y=; b=oqAe9pONyp6NeoVtgtKH9a476S2m0DiOgz+wcnT7hFBwUh2nZVa62mxbinrN/MrAOO vNOXcJ1ueuI/qYiMpCQBGrkBIAK2fQrAnpUCXrV6HcqYTy2M+RlMSozg+kQa4WlhbkMy MHvpQO03cOmT4Ru2L+C2i9hMBp8eDJp/XamIQow6CBrfoLkpPHALdAAn6YXY7E5K7loD apIm0/PYHD2ljUkh66FmBa1Xu+wpi+wlsbgVWPvjbO23SYn05KtSuwkQWgsvBq96UG4H H5uXJB4y9ndOtxDEkZzy3oqokOZ81iLbgBQfzEtT1VC+rEhpmd/Pz45r8kNN0ULxiU+K llTA== X-Gm-Message-State: AOJu0YzQbzOsEe7n3zQClWcHAQA4toM9r6bS5cAeO0NGN9o6kLMPHatY mYJh3D5saUfxMCgQYxvU7hEF7U3a0tdIweCVf5FXwKLQVbARZcAQbGWePkyWAVViuv5sH2JXrUB z2Qk= X-Gm-Gg: ASbGncvwYp945WDsohfJ7CizX8u4AKBMkQEWG4o9j674/KZcomBFhpMEpyhV7LsM9j6 vj9Dh0+4xFYhpAFBuRi3dZCVQw430EbrwhUxRD2gAxY7KU7mUl5OUVXH/njNe1nurh+yBjS7pnW 04s+gBFbiTDtv7xOcNoSpiO3ZB4OSy21Fm0PG+tz+g+s8SLYYinEU/EDzPJo9AngPGsTp+sUp3X 7W3DJ+hogbFuKK4ph5RExqyqn4ie2X6MHtM7iWzkgQDy+7D8jnHoCJ2K837C1t0in2AASn/H01I zeVhKDQJvAA2soLHPd4hjyB4PGTMBW91l5l6GwLAl2P5CvN+ur6gZ8n2jkF/yOo0qaNtwE7wTPJ 2qLFIPUueQqzrBf+6kGY= X-Google-Smtp-Source: AGHT+IFqp1IauRBfCHSRogXpiJoxgIFdAjiPg7dPVSaIbLclB4uYK3v+Aq4tekzRRJ8mPURILCp4Lg== X-Received: by 2002:a05:600c:35c2:b0:439:8bc3:a698 with SMTP id 5b1f17b1804b1-43bd293f637mr64962945e9.6.1741276233543; Thu, 06 Mar 2025 07:50:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 39/54] target/microblaze: Set disassemble_info::endian value in disas_set_info Date: Thu, 6 Mar 2025 16:47:21 +0100 Message-ID: <20250306154737.70886-40-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276688727019000 Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20250210212931.62401-5-philmd@linaro.org> --- target/microblaze/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 13d194cef88..d5ee1244cad 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -224,6 +224,8 @@ static void mb_disas_set_info(CPUState *cpu, disassembl= e_info *info) { info->mach =3D bfd_arch_microblaze; info->print_insn =3D print_insn_microblaze; + info->endian =3D TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG + : BFD_ENDIAN_LITTLE; } =20 static void mb_cpu_realizefn(DeviceState *dev, Error **errp) --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276706; cv=none; d=zohomail.com; s=zohoarc; b=IeprpZfZYrGZDohpR+RNWmVKEJqb1Qg5NQ5DEXMnYnxUepFNZNn32ImCIgJErXtvKLLUr2uek51Q2zpYJwWyJ9SdYwgMFF/CHSrZ2Ihpbt10Xs2D0uPREW+Y/O6ynhgfzI/cwQxBt9kR3Angx27UoTQsLSEzaBDHn0qW/7/OSp4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276706; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=nOGFUYxB5eZJvISEgMjDmq17fgmjL5t+bLCA40GL5/4=; b=Ca2d5P1Xfbh8pCSSG/JUwoZpMTYRFcVcIB9n3mAVK75xFzi3M+v3FrXySdfw5zzNK9XXdOwNszO09sOnzrNOhLimyXwI1fVAif4sPTvFPQs7GV/qdRUZxDftRWUFojK2x0yhIqz/pNmsU+ldg0A/bmHaCYbz6Be0KL2W6qansmg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276706865274.957643244634; Thu, 6 Mar 2025 07:58:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVv-00055z-FI; Thu, 06 Mar 2025 10:51:59 -0500 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 1tqDUf-0004Nk-Ek for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:41 -0500 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 1tqDUd-0006iF-TR for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:41 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-390e702d481so461865f8f.1 for ; Thu, 06 Mar 2025 07:50:39 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfdfb16sm2406334f8f.29.2025.03.06.07.50.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276238; x=1741881038; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=nOGFUYxB5eZJvISEgMjDmq17fgmjL5t+bLCA40GL5/4=; b=sGUixhDTDP4YJvKfgKGxwlfUQD/TGN+WjBWcMFUW7bMpaVlH2yIRS66/pPNWblLRb2 N/DovEPQTN0e7rXrUIaVqQtY7hLJcWiXjy67om/MfobYN9QpSRAzNTtUFsIIwpj0fEmu +OaAwKDqe1IsEbPz6nTGSiNf9AbRZ0ik9EjvZK+eCM8/aeSfSWCJ0baA8Q8Yyn8q6kJ2 JGiKDph5YGNHx1Ij/UV606TDnlc8M+XxkMJ60b/2AhyBp5MfB761qh2td7aepci+ou9b RZcRMVtRyYu0OfEe3oVilLZTfpes9rbd/0aDVaX7FzxAVuw0RYxJe4/Ikhf3rFbkOgUD tJoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276238; x=1741881038; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nOGFUYxB5eZJvISEgMjDmq17fgmjL5t+bLCA40GL5/4=; b=W/BcTGx2JyijIiXd8dPUn+PUy//AL2YUJ6td0O6BFamjiQXnwL4rE+9uexskJCIBH+ rOi8c6N6fsJeUbK442G8+ViwFr6E4PGY7rATmjAw5L69llEumE9IAImd8nw1+QXT3qm7 4QKKIOYTtG5Y1ehle/094BSI038lsJFb1qMCwASRjqPXpKCNqjMHPhOq1C6r8E4EpAUY R4kx4fKCm/1KUgaxFUjpbaM0/KL8knrV7WgPBjXCB3TpuiQj7/u4v06VKZbO0KkKFILr zX5e4c0O50zd4CUjd2WrpTc4dDVdL8cIZATMt4JGy3Sy2WB2aHarPMpE0H+MIhpmVlZ/ 9FpQ== X-Gm-Message-State: AOJu0Yzc1XAsKgXNdA+bxJimB9memFO0jKWdMnExIaXpLiBqilglV/pH mI2Dez2VRRm59oqwP1Cr8dUU+pZxPLC+p9vyJmkKHsr4HgrX5r3ot80U1h+R28Ebiu+LFcmB4bd T8d4= X-Gm-Gg: ASbGncuszculHjDF9v6e5c+L+2xNP0+sNuSYUCOi9asOv2FkkswXiuDkMOx6eXm+9PD v1tb9aTN0OceGDjZlQ8dDgK0/MhESJTwg+48Hq+b5p3hPx6vJbDicAwslitsJ/hAFBkEKj+kbQ2 fnUd2ETixQZE4BiAN6TT3S6qXWX6p26U6HwMuBbMup14qkFE4IV5kY3YLbSYGFa69Vms2hieCBX +3jDfwzsoAL1KuN/aTT3h5LpJ8RhCsk/B+XV+lmP+kLC6LZsQGjvaaStllIag2QenRhFq238YKu VCCCmFPBpCeFZiG/OdNWJr9H2Y2qafUAq0E9a+ucsdHTQFmW++WN4X697SUg6dVDA4PRb76WFI/ mhUZOqeXLL1NSxWvXeHY= X-Google-Smtp-Source: AGHT+IGqRe7gw6ucQlUUysGIBukpbQwlDIaaEUW5EtRZjIyXt8e+xg5m4KVJOcdBSdyBoDAY+2GMhg== X-Received: by 2002:a5d:5f4d:0:b0:38f:3224:65ff with SMTP id ffacd0b85a97d-3911f725ea9mr6391563f8f.5.1741276238053; Thu, 06 Mar 2025 07:50:38 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 40/54] target/mips: Set disassemble_info::endian value in disas_set_info() Date: Thu, 6 Mar 2025 16:47:22 +0100 Message-ID: <20250306154737.70886-41-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276708739019000 Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20250210212931.62401-6-philmd@linaro.org> --- target/mips/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 0b267d2e507..e76298699ab 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -428,13 +428,13 @@ static void mips_cpu_reset_hold(Object *obj, ResetTyp= e type) static void mips_cpu_disas_set_info(CPUState *s, disassemble_info *info) { if (!(cpu_env(s)->insn_flags & ISA_NANOMIPS32)) { -#if TARGET_BIG_ENDIAN - info->print_insn =3D print_insn_big_mips; -#else - info->print_insn =3D print_insn_little_mips; -#endif + info->endian =3D TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG + : BFD_ENDIAN_LITTLE; + info->print_insn =3D TARGET_BIG_ENDIAN ? print_insn_big_mips + : print_insn_little_mips; } else { info->print_insn =3D print_insn_nanomips; + info->endian =3D BFD_ENDIAN_LITTLE; } } =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276815; cv=none; d=zohomail.com; s=zohoarc; b=M4dxoxukTHbQzBidgasr53k0i1shPRIIzIs0rWYHiQYdH7oxuAD0SofjqtfSCHzNEipV1Ug4sHokCVDGZdQ4df44/so6Qq2G7cYUc40rgymC1adKB+TPZ/ncapRYNwUG4XK+I5hTgqihVWNJQ717lJoTnYHLpDTsszYP7RRuhOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276815; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=45WEuwbwgt8FZLHCG0k1p7D7jWUaWTBOxeb41hpB4VI=; b=dOGdI/3AO1trcBT2AL8kqXIBJh5LMFCvGR7gKD0i0qndo1WjI5cJHFro2ox5AMJFcBzJUTWgF0q0dexxjNrFT+/TgijvKgTzo+eO527s79aQ5hLcUCaLmeGG0ARwVM4vskR8hKbCTTWMV+IRI6JXxoDgVaWaTvqRMQsnQs/8nu0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276815472725.0108748032247; Thu, 6 Mar 2025 08:00:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDXB-00074J-G9; Thu, 06 Mar 2025 10:53:25 -0500 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 1tqDV2-0004TZ-6B for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:23 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDUj-0006ic-Hz for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:50 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3910e101d0fso523641f8f.2 for ; Thu, 06 Mar 2025 07:50:43 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c103f41sm2369718f8f.85.2025.03.06.07.50.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276242; x=1741881042; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=45WEuwbwgt8FZLHCG0k1p7D7jWUaWTBOxeb41hpB4VI=; b=oySksB7qSCvT+M1dv+wZopHnpooulBKjFZAAvzNrEJKkpGRzkyAjZa0w/xWBlNwBWp 2Q7luN321bugJrKnPoAyglrv2JVhyvfZkuStnRA5BJLlxf1O8L4RiLE6WiKhJIUAYPEF ZQSI5xM3IDTkQwhwacCpXsWWdq/B1d4EBhcmuKH/B84SBwmHIloLDLvVDTBhleAYv6ae YiUhYJDIuVdIkchaM6jbMUl6CjjdrPrPmx2N6lkWbKh6ZQor99fPyTzOQqNehrVZzvvn r5IxYqZJsthJbeXoKYFpuuX43astKbZDz+LVGfv8/Bife2LRkC8b0H7qVYy8fAUbj8P/ /J+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276242; x=1741881042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=45WEuwbwgt8FZLHCG0k1p7D7jWUaWTBOxeb41hpB4VI=; b=pxuXSt4xyx/zwRcHUEqXH0jMt1sGU73mfd1E+V59MRPhLvF/37xrRX2p/RgfXq0Eeu N7OsB2olmbjv0bLYkRPbdUGLvylxvH51L+Hobd8vANF6F37adkgRFj/Dcd11HN0giXK/ k4ZKRbp0BWrSPbWN6DTyjWDgjleVPsGra3LavtYLOetI1bSoY1Pxe88o5P0nzfqr9QjV DqPI0ojtHMZFQbBDG4TeFrE9ecUbNlET66Whnf/6ui434VZw300RKs6P4GJcry3LqgPu DWCxc06lN367WEh8/qIRzc/J9wJej1+3PoZQpIYD7Rn+vHorsimCDam11QMQgmlZye11 KNdg== X-Gm-Message-State: AOJu0YxmTXgulP+ITlWjOH0t22fbflxujai3kfrAYP/uF6RuXKYvjkF4 bIadfHfviu/931fLI/7hkkWHUA1gNKJbNyHOQySRKFvqjAM6F0VTOPquOqpkLaLhu7qWvJL/rUs VfKE= X-Gm-Gg: ASbGncv6g3i36VSY85J7MeKZ0iF8ZGOw0ix/8jDpHshPxhulMHYl5RTN4tPDF+Wetj5 TaiV0+FtJu2PHUjK9BRZaPgrmVN+5BgrRxrBNeDkBkJVL/QTlPsG+XeaeDYSKWYfrtL7u0UD6IU q3EoAWXPbYzQHEwxQYoJoCpmXRIkVXkX3CwAJGH5tHAxD7PJlNIM+MrhZHoKUX1D65zHYRiqCv+ nP/PShy5ffsENm/lGEChmJLjuY/sSp57nBsfWJrb8akzR6W5TEAhikAu+XUFCf+nRAI9zMdJJbO dkrhjixgD50gI399MLEFcRAZWFh5A7Oyi+LFB7AvmIE4S6k0bWX4sHklpuVqbGV0c0ZIorgNZLB mMfH6qMAz+vmVKSb0bwk= X-Google-Smtp-Source: AGHT+IEc9ovYLf9+5GJyVW44VeL4Ma+Wa2f2jZnVHnj8lRgsC9Tbgmq2tZggq2bXMhlnLPrfJ0LXaQ== X-Received: by 2002:a5d:598e:0:b0:391:2f71:bbb3 with SMTP id ffacd0b85a97d-3912f71bc9cmr1365016f8f.46.1741276242522; Thu, 06 Mar 2025 07:50:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 41/54] target/ppc: Set disassemble_info::endian value in disas_set_info() Date: Thu, 6 Mar 2025 16:47:23 +0100 Message-ID: <20250306154737.70886-42-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276816681019000 Have the CPUClass::disas_set_info() callback always set\ the disassemble_info::endian field. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250210212931.62401-7-philmd@linaro.org> --- target/ppc/cpu_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 425049ab093..b9772c53ecc 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7401,6 +7401,8 @@ static void ppc_disas_set_info(CPUState *cs, disassem= ble_info *info) =20 if ((env->hflags >> MSR_LE) & 1) { info->endian =3D BFD_ENDIAN_LITTLE; + } else { + info->endian =3D BFD_ENDIAN_BIG; } info->mach =3D env->bfd_mach; if (!env->bfd_mach) { --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276398; cv=none; d=zohomail.com; s=zohoarc; b=K2pklnqbFMt5pAW7TIf69XOfVg+PGn1E0B+8MhVH7srrwVzHuKjHflV6FpTYL4k9gOlrxcbcO1yC6nBL5y1xJ3uhK7tZnzZ5lN7ZJWmtFO6H/aZF7bEOlK03AVrFDVslFnIlXGggZawO+kYoy+Y8W8dzs0jTYeLzgrAdjH9NRkA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276398; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=VfiQ2ykboMAdXTdejxhsHVQUrwF37vkEaR99lI8ZH/I=; b=GgPRiWgvkNn76VTAS42w56mnLI63sR6J6WgTFCRNZJUIu2p7updXqbwJBdwVLVWbPGw7Rf9M1soKN/303xyUS81hl2DOI9FJHK84rhcNVxIWWpU9rTtrIdHoTJ5Z37LbmZUdPP5VbGDkGnbcNVxaRtOdQajGTBMybBQCF+DzQMs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276398814373.5039677581442; Thu, 6 Mar 2025 07:53:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVj-0004qe-JG; Thu, 06 Mar 2025 10:51:47 -0500 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 1tqDVQ-0004Tu-5g for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:28 -0500 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 1tqDUp-0006j2-5n for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:55 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-390f69f8083so791119f8f.0 for ; Thu, 06 Mar 2025 07:50:48 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0195casm2438090f8f.53.2025.03.06.07.50.46 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276247; x=1741881047; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VfiQ2ykboMAdXTdejxhsHVQUrwF37vkEaR99lI8ZH/I=; b=Y1hd3RxqdIGG81NgKnaYpWhus6najBLDnE1dXE9hsRCc/Q42S9NeFv7xClUQesFSGm hj4VT6u+Pi7fw+kXPP5wSlZsAeNKTfJDmUCxrrVrMZ7rRs3OmN6HLEEqgCO87rEWIwTC hluLwR/6ZADeQRBvtXXB3RhaA66M7g74j6q9uMo5cHF4v7uDt7DkJuH5naK7Ei/DFBwX gTPaZNmm/BqmGiICi0hSFurqHMnxd/ukRL8tfYcElrQ/y4L19snnlmfHkg4fXM06umEg ChLhMcfIPViMQXKgOQ2MVFQcCy+4muJ2TvbI6nveoPXt0/ohT0k/6iux8vjBqsBzbZ0f jp2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276247; x=1741881047; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VfiQ2ykboMAdXTdejxhsHVQUrwF37vkEaR99lI8ZH/I=; b=wtl1UZ3wxDxHVgmB7W7lbUd/Dc5Kkyey86oYFCJzNBbomIU21UDSkla5Ef6LD7KYZJ x9rAlQYuKJATwlykyViW+/AgF8P02PppeNVij+c/xGYYvAmWa/4vgU41ep3YeVIYxuqY L6lGZhILpn52j3iIwWjddfkHbj1DnGowxu5jcC1b7wSvKb25q0/5Nwf7EriuMshsi8Gk WKuoFKwsTVfJTBpuqqguBEXItW8uUISYI006oCTUUlliNNBV+m3hrU706P5iH7R8Naf7 bzGeAFdhAgQha3ilRFZvPDrvmUtQ3BwrW2J56iaHzKRSqqDnVhZkc6r1+cpcg2hiodgb siVQ== X-Gm-Message-State: AOJu0Yx09MUMxqc8iRcMmxOZJYKZNzMOSwVoHjpTj549gNtwsQTCV8g9 nUNcuGYbVokibVmCG9AiBejFoZ1E5VnN5XNccT945mz9VLt4uS941fBTOX1KAYgvJ2BVe+hO6Wj wfZ0= X-Gm-Gg: ASbGncu5xAY1lk2X3oeHeXVOWrloKM2HN64MaXEfrhJMNL4HVDiSm7Teo7nL78D0WOD oYnwyoxqknJQcEujc6+rdlRWoamKUOMrPy9ec1DhG13iu2vExnNEIjqASQqJgv/RC+Ku69n0xO+ DntJnfEkpNrsGQOcu4RDvS5b0FrCe0FTyBJw4fbuBlXmkIqFVKIlRAWkPyAZbnsrw+L9rk7wBuH vuDufDov2Nj3qHquZml9zQsqTqNvR+lKxcZ11i67ot8WVf/K9dpBD83eaLcall1vKevTmDxllgK TUTSWxQqfLAj/FqAbDeKmrTo0rOwxR5yWiRMf7kVbeXAFM4EfFXy4eqqwzDo/S07X2V57qjkNhZ /VtvH5r3TvxrwLO/uoM4= X-Google-Smtp-Source: AGHT+IEgMMWVCiE0XF0Gnk9aisDRgdTVv6jkw8mvqJP6JTjyMAJMhYfK4uRi1/0VefNfsia0cABkww== X-Received: by 2002:a5d:5f8b:0:b0:385:faaa:9d1d with SMTP id ffacd0b85a97d-3911f7b76ddmr7641151f8f.35.1741276247021; Thu, 06 Mar 2025 07:50:47 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 42/54] target/riscv: Set disassemble_info::endian value in disas_set_info() Date: Thu, 6 Mar 2025 16:47:24 +0100 Message-ID: <20250306154737.70886-43-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276401019019100 Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20250210212931.62401-8-philmd@linaro.org> --- target/riscv/cpu.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 47424fd5e2a..6da391738f3 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1152,6 +1152,15 @@ static void riscv_cpu_disas_set_info(CPUState *s, di= sassemble_info *info) CPURISCVState *env =3D &cpu->env; info->target_info =3D &cpu->cfg; =20 + /* + * A couple of bits in MSTATUS set the endianness: + * - MSTATUS_UBE (User-mode), + * - MSTATUS_SBE (Supervisor-mode), + * - MSTATUS_MBE (Machine-mode) + * but we don't implement that yet. + */ + info->endian =3D BFD_ENDIAN_LITTLE; + switch (env->xl) { case MXL_RV32: info->print_insn =3D print_insn_riscv32; --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741277024; cv=none; d=zohomail.com; s=zohoarc; b=BadOLZhdNpqFQnoJhjHHPitfsEy1IpibmmqWmeHznP8MXC+Sb/WY09M57j67sefzkdRLmie3XxFvLvQwQHPFwtJCc6v8DYkOhXH2q7JcKk/0xYhfqLmcmyzvHUAnZrRbN1NL5CiTGTTScRaMq24WV0oVWIzGvelZb9u1DT34Sjo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741277024; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=5B/bpSAszS/Z+RxXmZ3jyXxyW08tQFInocZVZ8QKZ0I=; b=WNBSRp9gSvibP43LbmWgAEb3exYnWK7SmRA/WI0+BMsL7XpR0Hxuco+B5Bg+V/9GiqP/eQ8RshVHp5no66CnZZ64IxL3bXE1miKno+dXc/dff9XJcvUol6QW0ddM614c5Xu+QfbpqM5NVAuO6ZZV94of4vIEHh0jqe0I/bnNpzI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741277024108478.5202549815573; Thu, 6 Mar 2025 08:03:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVu-00053Q-6z; Thu, 06 Mar 2025 10:51:58 -0500 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 1tqDVR-0004U1-8q for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:29 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDUs-0006jM-W1 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:50:57 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43bccfa7b89so7148085e9.2 for ; Thu, 06 Mar 2025 07:50:52 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd8da473sm23319515e9.18.2025.03.06.07.50.50 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276251; x=1741881051; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=5B/bpSAszS/Z+RxXmZ3jyXxyW08tQFInocZVZ8QKZ0I=; b=HmFTfqA0nkb+dzMiJ+jzXBtoILyq9tNOrUktj3Vko1Kbd/D4LuRswRx9UEdF2MN2OO owAhjqtKEWGNqiZC1nqq5lnwPjW92bQHv67iA3FeH0xgCuvRIAkAtDckvWVO7KEpjqIO 2cEzNHSkbE2+rfMx7f2sfV8DaQSias0CeO4wUB2j7XcYsSacox1UiVks8NWz95QM8b02 TGfVzlLfmlZAh0Qrj0psUCvBQKBvIgHm1wmBKkc8MvHg8dKKMysB2N8z9BEcWhwN+AXB cQrFIHpAHKjiyHu6QG1J8NvErSf0pjQ+nBpIIqYbXGs7TuEZzbdortwNS0ZYoJ4ilr1Q 1o4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276251; x=1741881051; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5B/bpSAszS/Z+RxXmZ3jyXxyW08tQFInocZVZ8QKZ0I=; b=pLEWw02ppT6WI38Ef8pZy6sXDDIPxECF5+PFN1ZkwcqHTUb4yLe1odmLQumSApXrru n5jeqsgKahvmxfjX3BViVOfJesi7o8imlOjP8JGwtaOcwRoaDWyMkvBKehahZGHkeicn aTpy/AKVU0/OsDmsm7EU1TWgbJzo9amsnISydzep2TmG0pDjvjqcpdDsMNdJVQiYBFKM 65kweQaLEFPEWVrgG4MFUW9AAnLxRWW+xX0/0A/LrhfoWkIjoKN02J7Keh2he7yBfwWr jzVE2mu9o+33XIj23m+KvMgkhR5H6yKswiQagTukUVRheSkdsdCtM4Epb8LotGG1IWgc PW7A== X-Gm-Message-State: AOJu0YwLjXj6yjE6/fnMKDKaAuUcuBfEUe1JSpfi4gizDHtl/0/S1Mkn p7VrDROzbX/BjRHOqet59UqnlUjGi6r5aykDbVSYGjHzgpqPLl4QAG2OUOGN24uNeUMRrmXuGWf LUOM= X-Gm-Gg: ASbGncuWmKRYZBfcXxXV2373UvG0TOxyqSfIOd9o/rsbTIZoaF8Dsx1fmeki1omC9Fq vq/353f0djczMJyTLq6FahTz032vazdC2jsCF6/XiNEro22GmM0QZum/zDMKD0I8PJTd2boZIQc sFkCCqBbm91iGxY6T7Ro0Yea78rzF4xpi33wk5tTeR9vcQDfoy59P4R9ZX8ht+NWe5sEd/Mu5uK zIs1vn/Xz5Of8h78jzuigYVE/vZCRr6UkZb5fV+/iGz95DOy5FTTpqX3M6F0ZzFFykAIa9d2dBk 0UegRWtX/teQCLpVOlNLIPLz1CCVvcwGtxkwGTf2PSnAE3+HhWDP2ezmB4BtAfuSTGYMFK/XYPz cc8lad2nCR3861rhnKj8= X-Google-Smtp-Source: AGHT+IEg0uk/ZwIThl/zSvRqPKB8YctVuJLcbAB9JbYvMq4ztgAmVlRAdWMYGSqI60BAPs63y0g0Dg== X-Received: by 2002:a05:600c:3544:b0:439:a1f2:50a3 with SMTP id 5b1f17b1804b1-43bd29462e3mr61703515e9.4.1741276251519; Thu, 06 Mar 2025 07:50:51 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 43/54] target/sh4: Set disassemble_info::endian value in disas_set_info() Date: Thu, 6 Mar 2025 16:47:25 +0100 Message-ID: <20250306154737.70886-44-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741277026511019100 Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20250210212931.62401-9-philmd@linaro.org> --- target/sh4/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 22cdf9b4e12..c2aaa40a037 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -143,6 +143,8 @@ static void superh_cpu_reset_hold(Object *obj, ResetTyp= e type) =20 static void superh_cpu_disas_set_info(CPUState *cpu, disassemble_info *inf= o) { + info->endian =3D TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG + : BFD_ENDIAN_LITTLE; info->mach =3D bfd_mach_sh4; info->print_insn =3D print_insn_sh; } --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276687; cv=none; d=zohomail.com; s=zohoarc; b=B+LP2Gl2mBfRq64c8lQwkh/4dtZpIYOCgwJKFpDn2tyMecLUyMaXHFUAbrHaQEnlkn/3bTAwoOMGIVngLd02WaHd0l8nnfvfYeVAXWiLBrOapueqPIKBdu0A8yRACYx1L5giQGPscCr15h0iuvAO1JQot31acbL7eoU8sYaWbds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276687; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=lKugq75HE07Sek8o1SwKPDXjZVVfUgEZ9Ix7S0gd/w4=; b=SF0ipH4Xdk9uOyzV6q3Zq0DLNbYwq9A4dKdeY6imB2QuFxTSlsP128JbTdi9WXQ+oV7NJi0E4a5avSf1ltMwDD6iBT9CG9iVAyt5dMVJI9Vn1hvilzhglFHXgDVJ07oTnWLloayOfOvFzGBE0i5+4fQAVtNU2oM3IDLEx9COjBw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276687964594.3627494336039; Thu, 6 Mar 2025 07:58:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDW3-0005KK-Hh; Thu, 06 Mar 2025 10:52:07 -0500 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 1tqDVR-0004U9-4e for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:29 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDUx-0006jt-DP for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:02 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43bc31227ecso5128725e9.1 for ; Thu, 06 Mar 2025 07:50:58 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd8da473sm23321635e9.18.2025.03.06.07.50.55 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:50:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276257; x=1741881057; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lKugq75HE07Sek8o1SwKPDXjZVVfUgEZ9Ix7S0gd/w4=; b=WZDed1dcLET6QeyM1988PWCqQ+8rETWRX15WxIHHo5a9eu6hmqmCzv3J5K9SvFdEjc lrvQQqtpmd57ymprtP27mNMkI+qOtwV40HHmAg+kM/TEstoUDwyEpRnNeQfCDA5kwCqJ xOd/V6fFco5xemIeO6QMA7ew1Af8RKVeev0wEHai8shfTPUM4WxQqHuynANqDChVeXmp fzzZsKV3zjCnUOYt6e3oXjEL0XSsyB+vRg2UOimMR4HfsD9W5NByoV8BCF9QGF1/kBD/ cZYfUrispQlj5qPSEtotLNqicMf+i5UVAtCUSYZKZ988jYxyajVw6YX10brTsZh1/tTY k0oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276257; x=1741881057; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lKugq75HE07Sek8o1SwKPDXjZVVfUgEZ9Ix7S0gd/w4=; b=mIUeakLXmk1nIbTCVMsPkdkNtUCJ4ykvFypWPETC6KhJs35u/9niXj4dV6rmS9EKLY Wh8dHGrtJQ7oVMcep1Dw4SPdMeqmliWmptpoyURE7agfX2Mk7/2arlm0YJvYK+gHJa2g IoQ1I17tkx0JJVRU957aRFMnUpVeNKH1Gp7utjoBU1L5BfggnFxj2HAzaIIbz0chTNqn UWJr1v8BKz80p0mG2cVmoF/TLdW+19gJuvAk/GFXukVVrHYI7uGeIFxCFR1WZNijQcVW dijoWVDoby/CbpCqcstMU8hCSVt37qIiZC7LzBzFz5IABkRXfOGgdO4Ikti5BVRNn7Eb AS+g== X-Gm-Message-State: AOJu0YzG1jF4n9gejoh7yOEclx4jObjBtzJJ20ECBCqDyqS+RlXc3b3y Nsp3mGuX4hBGX+CVqfmECM6iCOj8JLBoNC0jNNqo0Z0fjL2rPfseehpboSA6bWRC79/zZRag24Z A1ao= X-Gm-Gg: ASbGncuh3qFJ1Pcf1YLPlltyiIX4DBz553y1KWwMVHqBLeCcDGNn/esjjUPyzoVS4ZU uH8o2FRSGB4oJe/0m2hmdo5n6bfB7/K5PWjkK2W61Zqw+RcMwRjU4PE8/y5Ieo/D9bL4H7Cwrnf yn8gz6M2Jgidy0XepwmnX3+65FNVFEHkfaeBkjjrfYMoaira5yAnnY95JzJB3t7POgpS7wDg9kv 5nBq9GTuV/QLoJTNamLUGygFyFoNINcRmEVhAX73oruzXYaaNqgfLtkdjcPfgrUnsUbUp5mmBi/ bDmoU/tEQMkVSwQk/q6X/6mDcL0BqZhgopEvpMcIUMq21Re4unIgQvGpKmQNTTW92mWF2sSZKhA jvqOexMBWQ/kQkv6xqxk= X-Google-Smtp-Source: AGHT+IHxyCkuHNvad8cGNmRH2x0y8vFPk03d7g5RwpEvG/lCkS3KJSWKocFtRTOXx2BF2etRgK+LbQ== X-Received: by 2002:a05:600c:4f86:b0:439:96b2:e8f with SMTP id 5b1f17b1804b1-43bd29d040dmr56969785e9.28.1741276257473; Thu, 06 Mar 2025 07:50:57 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 44/54] target/xtensa: Set disassemble_info::endian value in disas_set_info() Date: Thu, 6 Mar 2025 16:47:26 +0100 Message-ID: <20250306154737.70886-45-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276688722019000 Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20250210212931.62401-10-philmd@linaro.org> --- target/xtensa/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index efbfe73fcfb..f9e298ace45 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -159,6 +159,8 @@ static void xtensa_cpu_disas_set_info(CPUState *cs, dis= assemble_info *info) =20 info->private_data =3D cpu->env.config->isa; info->print_insn =3D print_insn_xtensa; + info->endian =3D TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG + : BFD_ENDIAN_LITTLE; } =20 static void xtensa_cpu_realizefn(DeviceState *dev, Error **errp) --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276809; cv=none; d=zohomail.com; s=zohoarc; b=lBiA+5FiTatyV/Vrr1BFTHmMfZI6jV6k0uPmMGca2wNa61LpYETCECypRrqA4a5AdAabiKK5uCRcWva8i9H6/iPXsGI6Zx8gNWaz9cPnavmji91bb2XAOZ0eMcVE/+7VaRVBImoEcqbawO0wt+I9UQiyzSYSFi1LRV43C+xHfEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276809; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Bf3FLmQWt6m/eDrfCAkJInffVWLTlLumKHQCoX3JudU=; b=ecV+MNGPbzPZPmK10jz7xlS948Ap5GI8ZLSP6mhbrAexw6+rJc0n62cfvpb1wyie+qboYa+5JfMYPcR3gqaj09qc+RGtK3YcCml79+3Rtf0GbaBmjpFEQSddUYzr9KJIVNOtCBTSNIdjGaR0t9B059CKZEmlf0iy58Sb7m/alHw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276809681857.313894768823; Thu, 6 Mar 2025 08:00:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDW0-0005DI-3l; Thu, 06 Mar 2025 10:52:04 -0500 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 1tqDVR-0004UH-Vo for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:30 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDV1-0006kN-Um for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:05 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43bd45e4d91so5740715e9.1 for ; Thu, 06 Mar 2025 07:51:03 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0e1d67sm2400812f8f.74.2025.03.06.07.51.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276262; x=1741881062; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Bf3FLmQWt6m/eDrfCAkJInffVWLTlLumKHQCoX3JudU=; b=bbcD+Q8K8r1jL5YMTCRzRV9RLh8BlIKkBFAp00y67Rr/MxUSkyaULYTEcf/rFL9U+R 0x+yczHTHvLLVoT+lJkTfU+983z6SFHbP5mrtohTFPaANh9NU3784wWr8YNu26wJU58E eu1gJy+N8jvv7MB1XFUdDM6RBAOxhJcAmuvsKPnBe5X5zAGjjtSsOPSGo3+uuBzu3w0n 6HKkWD2yHKrUS8VihWx1zsxKOtfRYnIMkNvfK20gXbk+ri8Q75vbshOsfX+IUlrtixw1 Bk10Xgou3orru10Pa1syzX5QUqweCC2FN/uJ65Ep3lanWYnjnxmhuPiOtacNHAw4zrlQ hFcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276262; x=1741881062; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bf3FLmQWt6m/eDrfCAkJInffVWLTlLumKHQCoX3JudU=; b=Fbbo6OLap9v7vEqisbbRyNV5AoWd8h3H1P5eu9sqHiWjlsPlrae+4P5vP7otTeH7h3 0bceV3q6dpV8+AZPCn+rrZL6teQmJKA8FqhxOOf7hW+yAtUPPnaQVbO64S8DKX05zoW2 0wM5zMpzMGPvIxVsUzKEoBRokoL45+2TfcziFDs19D7ozstYonZa82y8SWX95EnUmu9z ykJ67Drw5BX9xdG3SqViZQx9axPIn498kOFUD1P3gN9RLuLhEGw/kZlrvU+l2iPksaVD m7Z4esZQ4pnHHGRsNWbHF+rJgqewQi3eLeqWD/Q6MWdpem74nt5FG6v+e2jUzqT2aLy9 JHhg== X-Gm-Message-State: AOJu0YxhSDTZpdSvnXWdX76Nvo1ACpTOqggrGo0usOxn+72hMzzjW8gP kYjOFbZSH/6fC8y4UzsJhGgOsFir/YD0zWiGSF39EjThIHaEWzkgmBVhqDTaYvKlxw/QxiZ19sV C7YA= X-Gm-Gg: ASbGncsT1wkAOWub69NZ9m7krx8sZSNl8TSKtdHvcN8Nk+kmIETvA5K0Lj1Ei0BpTss rZ6V6tggqAukt2g7fxmsrlG+1aLFtH+/StBN1jeQBFOq8vRtW9F80tvmyiLkuv3YEqw2k9dEUOV KYCdzDoa9pyQ7YcGi1MvhY3WERrhVn/V99OZM/qzgfkfbVMJVa+cgkzmm0kHadFo1MWG6gIiG6u SgZkO+kGG8INy9lLDrI0FaKUMttqAshJT9fLufycL+toFZSEiHszzHKnuzSuPnRUYNHlOYc+eMa IOToUqbQKkIa0VEZ7+Ks3lsa0s9+q60yW8z/bCKi941O7rRXV2En+piXC9wfIEBWr84/dkAwI/7 C0M//O4/uDNx1yJurXMU= X-Google-Smtp-Source: AGHT+IERsjFAlz8667LvQTZUhasD3RUEObvtRqveDvOEut8I8189maJQgi2i6Ngzi0qgTeeDXn0elg== X-Received: by 2002:a05:600c:4384:b0:439:8490:d1e5 with SMTP id 5b1f17b1804b1-43bdb37b516mr31049205e9.4.1741276261968; Thu, 06 Mar 2025 07:51:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 45/54] disas: Remove target_words_bigendian() call in initialize_debug_target() Date: Thu, 6 Mar 2025 16:47:27 +0100 Message-ID: <20250306154737.70886-46-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276816011019100 All CPUClass implementating disas_set_info() must set the disassemble_info::endian value. Ensure that by setting %endian to BFD_ENDIAN_UNKNOWN before calling the CPUClass::disas_set_info() handler, then asserting %endian is not BFD_ENDIAN_UNKNOWN after the call. This allows removing the target_words_bigendian() call in disas/. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Message-Id: <20250210212931.62401-11-philmd@linaro.org> --- disas/disas-common.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/disas/disas-common.c b/disas/disas-common.c index de61f6d8a12..ae3f9e46ea1 100644 --- a/disas/disas-common.c +++ b/disas/disas-common.c @@ -7,7 +7,6 @@ #include "disas/disas.h" #include "disas/capstone.h" #include "hw/core/cpu.h" -#include "exec/tswap.h" #include "disas-internal.h" =20 =20 @@ -61,15 +60,12 @@ void disas_initialize_debug_target(CPUDebug *s, CPUStat= e *cpu) =20 s->cpu =3D cpu; s->info.print_address_func =3D print_address; - if (target_words_bigendian()) { - s->info.endian =3D BFD_ENDIAN_BIG; - } else { - s->info.endian =3D BFD_ENDIAN_LITTLE; - } + s->info.endian =3D BFD_ENDIAN_UNKNOWN; =20 CPUClass *cc =3D CPU_GET_CLASS(cpu); if (cc->disas_set_info) { cc->disas_set_info(cpu, &s->info); + g_assert(s->info.endian !=3D BFD_ENDIAN_UNKNOWN); } } =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276642; cv=none; d=zohomail.com; s=zohoarc; b=cu144hBYiGMA/uygM7NlzqXyxGByrlvAZSd3mKuqZ1zRCSURp9v+YePoH7aDL+f4beA4IEngb40rvhqHOzX5571PTxgso0VMGnCeItSuxBQQkSUaJi9R26A4XrP5GMJA87Tch24g/TKxzvVFGnJ3MFiw/v1n7NPuflYEL/TGNbY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276642; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=/DxhRNL6h72ajthgv6sxFLibq8RyJHMeyPI1bV4pMio=; b=hXJKmwEPHPgiNrHYcAzXRuN2kVp/GVmKoa1DXNSef3XVqlzb4Q3qHve1Op2NdqclmS6rrsayq0wzTGyKSGJ/TkTC64HoHy4sfIS4LJLfn511QpgyPgj0B8pKV9gHDMejEJq9eFh7PHsw1P1YkKL2eMiHBdMCqdW1MFlbZHbCrRo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276642500585.0596826052495; Thu, 6 Mar 2025 07:57:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVp-0004y2-Dl; Thu, 06 Mar 2025 10:51:53 -0500 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 1tqDVS-0004UM-NA for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:30 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDV6-0006km-Eu for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:09 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-391211ea598so631518f8f.1 for ; Thu, 06 Mar 2025 07:51:07 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfbab43sm2453993f8f.15.2025.03.06.07.51.05 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276266; x=1741881066; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/DxhRNL6h72ajthgv6sxFLibq8RyJHMeyPI1bV4pMio=; b=s2STrUh/p2U9sWuPBU46eDMbI9RPHrw1t95UykA5l0NGhGFIoi39tTW2sw87TOWgM3 R4Fs/U7ggwYzRBrbxWYPNqlGfQ06zrsopehDYkpMSD4WU6PpEmxzU+cp35Wn+oh0ZgMk 0mdXTr4GQdXFPb9XsTh2mwy2wMAFl1Ye8h7h0oIInPbWet4S+j7S8xI8nMXOkMPRS2dU b9QUql0rYoR5TvPUsKiBynd06VQ2Oiscg4PXRtj4s+aIvU/9qBTkWHNus1y8iS7CaLAF GcSFeKpLBQeKhayXXXxgx7C+9+OCb+GeteD4UEYGMgkf5HyBqJsv/MIxkvvJfaCjp4dI fvIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276266; x=1741881066; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/DxhRNL6h72ajthgv6sxFLibq8RyJHMeyPI1bV4pMio=; b=NFNOlTjteNMTCg9yABmcCgfEaTyxHxjDWKlSZrGVvXo5yxv0BKcDyyI5r6NqBndhrQ D7iQFNaUzGRXQCRaJmeQfI0bY8aLJIY0ce8S1zygHj3duzJ6TcWHkeMW3EjMGacq4s5M 4eoMW/JhiWuq0CKQ2HCl5lN+XbK+vHG6ryvG2Pd/Jsf2zY0MTwnJQQu6eDxNjDFLyao4 H/lZCheWk/Wj9+ps2TQmd0U3X/v3LSROQ8v/JZ3CRc5xMvLyqlQIp/rufkYH8Tlccaei QCiSmJgNOXEbL1Qkqfk4pue1Tl0hLvRQHrXcYQ+tvJf5vUCLDm7oalVmp++LAPKlMegw Lk3g== X-Gm-Message-State: AOJu0YxpnzgOnplkAwAXJ2l3oma98XSurUCrQsGoiaEzh1Pjj6hKMnpg 7xPR8d8p2nrnPhvy/7gPjot3pVU48rXhXS6XdST87sipCQFJBSRfbMJPz7+CbcSjs0Dpv4ft0Xr VEiQ= X-Gm-Gg: ASbGnctg2wLLOC8EQFD/YiFbO4kXw2uZTQDrp7yy3jSLo8bOPq6Y1/rsTvsqySaVEZd cuw0nIbYH2G+guqp5/0zH8sx5IXenD2WX0E8u8D+E2DF/774GetOi+GRR0kNIFGY+9FyQsWvpZY yvBgJn8nZvlMURa3QkHoePfzzNk4bmEUvKYrruZ11gRf6TjaCidQbw9WJfphypL6ygCfDSHn0CP vtOlum7OqL92KpGRK2vuLSKDYtOfCWQZagRQw5bwRRXqd4JTfNg0Mo6wIK5aPSFr3prD5h5kG8/ ExGKVUxT9yw9CZDX9csUNrIFdbFaXLekGy/jcImn0mwh0XEgtBD+Mq86zXp5ShusvyaPYx2T4MV igM/Y4wJRxZl4FZIjVFo= X-Google-Smtp-Source: AGHT+IHfrORliDrZ745y3s294xlXByFLox+pgX87rrNnEB6HGf+3bp0ACQvxZMjcSK8IxkAnvY63Ew== X-Received: by 2002:a5d:6486:0:b0:391:a74:d7dc with SMTP id ffacd0b85a97d-3911f7ce121mr6838226f8f.50.1741276266436; Thu, 06 Mar 2025 07:51:06 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 46/54] target/i386: Constify X86CPUModel uses Date: Thu, 6 Mar 2025 16:47:28 +0100 Message-ID: <20250306154737.70886-47-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276643698019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250210133134.90879-2-philmd@linaro.org> --- target/i386/cpu.h | 2 +- target/i386/cpu.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 10ce019e3f8..7882b63b9b6 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2327,7 +2327,7 @@ struct X86CPUClass { * CPU definition, automatically loaded by instance_init if not NULL. * Should be eventually replaced by subclass-specific property default= s. */ - X86CPUModel *model; + const X86CPUModel *model; =20 bool host_cpuid_required; int ordering; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index ab328485acc..b3e1c2bca49 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6563,7 +6563,7 @@ void x86_cpu_apply_props(X86CPU *cpu, PropValue *prop= s) * Only for builtin_x86_defs models initialized with x86_register_cpudef_t= ypes. */ =20 -static void x86_cpu_apply_version_props(X86CPU *cpu, X86CPUModel *model) +static void x86_cpu_apply_version_props(X86CPU *cpu, const X86CPUModel *mo= del) { const X86CPUVersionDefinition *vdef; X86CPUVersion version =3D x86_cpu_model_resolve_version(model); @@ -6592,7 +6592,7 @@ static void x86_cpu_apply_version_props(X86CPU *cpu, = X86CPUModel *model) } =20 static const CPUCaches *x86_cpu_get_versioned_cache_info(X86CPU *cpu, - X86CPUModel *mode= l) + const X86CPUModel *= model) { const X86CPUVersionDefinition *vdef; X86CPUVersion version =3D x86_cpu_model_resolve_version(model); @@ -6620,7 +6620,7 @@ static const CPUCaches *x86_cpu_get_versioned_cache_i= nfo(X86CPU *cpu, * Load data from X86CPUDefinition into a X86CPU object. * Only for builtin_x86_defs models initialized with x86_register_cpudef_t= ypes. */ -static void x86_cpu_load_model(X86CPU *cpu, X86CPUModel *model) +static void x86_cpu_load_model(X86CPU *cpu, const X86CPUModel *model) { const X86CPUDefinition *def =3D model->cpudef; CPUX86State *env =3D &cpu->env; @@ -6690,7 +6690,7 @@ static const gchar *x86_gdb_arch_name(CPUState *cs) =20 static void x86_cpu_cpudef_class_init(ObjectClass *oc, void *data) { - X86CPUModel *model =3D data; + const X86CPUModel *model =3D data; X86CPUClass *xcc =3D X86_CPU_CLASS(oc); CPUClass *cc =3D CPU_CLASS(oc); =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276804; cv=none; d=zohomail.com; s=zohoarc; b=LC5Fvyvip4JP5cxYHXJxHQayscXq7GweISp2USxMNK62t4NiYgziFIzkRStJUmMbhTIK3apZK03MiNuRfQ3gdzpg3avkZsVBTeQ6mVtP5AFIT3vOjCbkmqsDspYV+tdipjKFxsgXdpfuhhmx9X7i61c2xy+MeTXbrxdvMvYavJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276804; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=8ib0DFSQfS0N38e2Pblw6x531bMBILpkbdEfxQrB/nE=; b=cc3m05vc5iaoUOzAuubAsiWOy9t18RIn0VvcxtEakgxWwk7o57bdbzsfLhnQq375A4Nz2jGk05R2ZwTIKGBZ/KcwjhKjipxsVOtzMmhGMffQmGMYBnDPG9wcrfjKuqXoEgN1oTUxo2kx+vbm3hohtNnsbHhKY03IdmWe29FGtmQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276804789985.0394336316715; Thu, 6 Mar 2025 08:00:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVy-0005AC-1Y; Thu, 06 Mar 2025 10:52:02 -0500 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 1tqDVc-0004XP-EB for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:40 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDVB-0006lD-0D for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:14 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-39129fc51f8so773790f8f.0 for ; Thu, 06 Mar 2025 07:51:12 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bcc13b23asm53357865e9.1.2025.03.06.07.51.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276271; x=1741881071; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=8ib0DFSQfS0N38e2Pblw6x531bMBILpkbdEfxQrB/nE=; b=KYxxoqU8cJ+wGCvTaDkaLYVF1tWOptXxM0tFxdVmhheeWlAsKmh+qCyxKGvzlNUUeP +f1K4Mbua7dodUR8NBquCN2WJXtqFhWpT7aFPjWHvkCC8xxNYmvj3zKh0fVpvIYg8ndH VMzAVO5ZmVCppbNOZhbh/tBXeKQBHRd9zS8C0VuYZMmfdsfDQq+YA81XYTqSlTiXF2m/ Iu/DcCSIQeyVrHsFmIIUlurM3t0Sz0VLRk/5VWRbHVTcU8yMQdJb3HGEDzDXg33FFwkV 22uhGrxmn3m5kDyEPhMllvX0EKTVuE9aHTPb0IF2Q5CzvbC/lky6mrDtgWyMdX1hvUKP 0Ceg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276271; x=1741881071; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8ib0DFSQfS0N38e2Pblw6x531bMBILpkbdEfxQrB/nE=; b=Og648B/qy/rws04xxKYjdkRS5kGRYbxaYsGYNxxQAqM6MO0hD/27wQnUbJCoTf8SFM wfsNSo9rVG5ZDWqyxH8l/tONwZo3X1uGsaFwINUWuPkF/8gERG3lMec/FHMsxKS2Kpb4 NxIXeCKgnF6bfCfh8jwu4uY3JaModaTK9xmE8ur3IT6r7MCUp7pOrWSgAtuDfUighBtl IA0slC7b09CRIA+S1DL5tQqy194wBM3ibXDbU7SilaXIQ9YqB/AYHLid2Txu1ZZoRdao wb3l7ZEMUdabzgQTdymN/itR/+hCb4/2NKQQHe7f8+feev7P9YAHj0x7w6AG5JcKMolM T65g== X-Gm-Message-State: AOJu0YyEeLi2WG/PBV3JbhszBIXa7YfUxxFcbHzTyiOEqHWEinmIfPhO BPY/gPmv1m0ilx/udEwUR8qf6UmUN3cWDGSN5WBb1Iv0bCLWoqHRncEYXlYLNxQn2ONLhhPd4gM hGnQ= X-Gm-Gg: ASbGncsudNKjUpnLzMc8Py8lFoowAwVwIbcU3cKja794HtwUYXNT+TsR/NnWhcHUE3g 4fNhs8CDPbikPAXQmQuXLpZa8IWiHwTBEpJuO8N+z4SndNLFWunwyqKXtAjNgGov01cbZKeNy04 o7ocGPqmN6qSamOsD9jttvE8koFZAilqK6R7tM9yryeXWxBQefiss1DtYP9P077mXoRemMZzOJA P0QgaT86YRn8mJkvGHo+3xUea/HNRlyt8NoWZNhUFBt2vyqi1UJjrKxRCMthqHehbQWymb3HtRJ UTjKhBMcQMec7PjrEn+hbVOpNb1lo1d1vcCeby9k+0g0yDGjdxHH0qaIFAWeE9ij0WsUZPcgb6u 2CrShCGOxSRASOX9Kgu8= X-Google-Smtp-Source: AGHT+IFo/32PV7vNOlRdraRvwiwqv72dW9w7lSK7ceGetc0hECY4PtGt4UrWVc8mFrTVucjcN76IoA== X-Received: by 2002:a05:6000:1886:b0:390:e8bf:55a8 with SMTP id ffacd0b85a97d-3911f7412f1mr6454919f8f.18.1741276271044; Thu, 06 Mar 2025 07:51:11 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 47/54] target/sparc: Constify SPARCCPUClass::cpu_def Date: Thu, 6 Mar 2025 16:47:29 +0100 Message-ID: <20250306154737.70886-48-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276807367019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250210133134.90879-3-philmd@linaro.org> --- target/sparc/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index dda811503b5..462bcb6c0e6 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -574,7 +574,7 @@ struct SPARCCPUClass { =20 DeviceRealize parent_realize; ResettablePhases parent_phases; - sparc_def_t *cpu_def; + const sparc_def_t *cpu_def; }; =20 #ifndef CONFIG_USER_ONLY --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276981; cv=none; d=zohomail.com; s=zohoarc; b=oAvx9lwrvdacd+Swv1ExLzeqwB0WmN1dfaKK0gwkkzl/8g/d3fPtS6UekBgu9mIdXFJ9ax+u3sMaxN6jeLG7z62IjJqG4WXBmSZcrY5TFc3t8A3+K6bHAGw66zQ9eO74XzTW10lQSpOVMeT2VKDgsCdX5gE7G1R7o6ZCpbO5m3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276981; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=lZf/YeQK4lOJ/RgUPpd1hWKDiWEJL3iQUsYLZBcJWdw=; b=M73gXgmk8uHGyeHuMTjVuDjVu2Dc4N0xSDGdzjVEJ5vjGJrxPG7w7CQB8iKvJlzvTFQlCFAckss/QZbVdz2d7+3EbC5eCjMqy0uQ7j4PupUhvHlcpamzMvyGLSpm181r1bS19kF4MtklbpUV0JcvW2cbSEhEiplzij24VRqEfLs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276981581761.3412933146866; Thu, 6 Mar 2025 08:03:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDXy-0007gl-Do; Thu, 06 Mar 2025 10:54:07 -0500 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 1tqDVc-0004XX-EB for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:40 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDVF-0006lY-IM for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:19 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43bb6b0b898so7185765e9.1 for ; Thu, 06 Mar 2025 07:51:17 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd6530f26sm49579485e9.4.2025.03.06.07.51.14 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276275; x=1741881075; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lZf/YeQK4lOJ/RgUPpd1hWKDiWEJL3iQUsYLZBcJWdw=; b=wz0OYe+6S1Sl1L+lIGseAr/MPaAlFFlq188YkULfiOBAouOU1s44z2vVqatRYxHB6c xJ5LEgvfNACLfGzF5K33XdOuYG3ZfYp0pjFzEJpO/dsULNvDF5nMOEJPkLUDzvDsP3pd hiPaWcsfUV9HS2ZvRjIhigq2ZZ1jT082I2cLjlXV3JwXljVu07XJlv8eq+8NUdZigoSE I20HPD9nikBrj6oOJ+PkFCF2Wdb+HFjnaerjiLvLEuKctYgefVWeYfUgwc+UWcquz3SW J/FXTM4Ee0gRcjp+NJrb40mo3gwQv3cxyC7MtMZvaICdESWqGLG2tv7xNKt6Opa2hN6j NX/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276275; x=1741881075; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lZf/YeQK4lOJ/RgUPpd1hWKDiWEJL3iQUsYLZBcJWdw=; b=utkpCjBFbMV5Losxph3XITMVnngac+HP+qsG7NIBdmTz2/VVsR+KPcm8bgVW9yq3fK ztl4ghlViypyrxiBL1qG4SI903uGvh4jkIXcQ2fdQ6xuFVMJGd74kNOYalVPUy4BIY59 u8D82TG83/FVokzQ76xwzdAoncyFWYWscGg2rk2k3aH3w0B5WOinx1T6F+e3/4nR5+pp FQ7ne01Pb/HgLSt783v1my9YWzAcQZwXrzWa7dRgtSYnCQAK1GEVAEswuHvBW4lvsNya d8p9Tj75DohN7WA7wSdASnN5oqsxtFlCusAqvaTEc2us6f/KjJHnISijW6/TUHK6JF1B xx3A== X-Gm-Message-State: AOJu0YyPhwihIby+Mm6AURC4qFegS/CyGpErJWrfAibFMPgBBlDfc3dm 3K8Iejt8mHssTeXl4wb04AuplXPwiqeUFiwuvdDOtL5ivFa2R06aao+n8YP5oI/0ynkpvASefXl Rv2I= X-Gm-Gg: ASbGncv0t6pUooTm3BacrpstgXUvV6JNDGhC0qVoAtzpIXDAU+/pW6BhJnPh9IZt3Ws EDCOQbHiJyCOxqA3llj/FjD4EbVx+ZgHsYPqHkEViSB7lXwRpacALvfTALzmzBUhov+6SbEsQ/2 p2tWZc47rD69smg+BfhfHp3+2aNB/r5Re5Nm5NfyhOlTpTOXNyhozcnm3TBdGmwrgNR6VBVY81I 4CgkWquWB2/wQuA275C6Hlyx1IJCdcBU+wzWABhvwLSOLWsOlHiEiwC9UWI1jTw4cKTtnvnIuk1 OJic6xFqib6E41Vv9SQ+T1lfhPQdxyg/3lrOt2L9I7gH7iw0sTrXrAUtAVGDhXCmgQUFqRRclSn FgdMNGKjWdWto1Gz/idY= X-Google-Smtp-Source: AGHT+IHrC4i2hWa9IHhCr0+U3N6KCaNFSn7ilbroBAcO5aNcXxSpToAJF5Q1NFuia5UH9SXRONtSQw== X-Received: by 2002:a05:600c:4f51:b0:439:92ca:f01b with SMTP id 5b1f17b1804b1-43bd29bb5f2mr54974405e9.13.1741276275496; Thu, 06 Mar 2025 07:51:15 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 48/54] target/xtensa: Finalize config in xtensa_register_core() Date: Thu, 6 Mar 2025 16:47:30 +0100 Message-ID: <20250306154737.70886-49-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276984540019100 Make XtensaConfigList::config not const. Only modify XtensaConfig within xtensa_register_core(), when the class is registered, not when it is initialized. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Acked-by: Max Filippov Message-Id: <20250210133134.90879-4-philmd@linaro.org> --- target/xtensa/cpu.h | 2 +- target/xtensa/helper.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index 0e6302c5bd3..8d70bfc0cd4 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -490,7 +490,7 @@ typedef struct XtensaConfig { } XtensaConfig; =20 typedef struct XtensaConfigList { - const XtensaConfig *config; + XtensaConfig *config; struct XtensaConfigList *next; } XtensaConfigList; =20 diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c index 2978c471c1f..f64699b116d 100644 --- a/target/xtensa/helper.c +++ b/target/xtensa/helper.c @@ -173,9 +173,8 @@ static void xtensa_core_class_init(ObjectClass *oc, voi= d *data) { CPUClass *cc =3D CPU_CLASS(oc); XtensaCPUClass *xcc =3D XTENSA_CPU_CLASS(oc); - XtensaConfig *config =3D data; + const XtensaConfig *config =3D data; =20 - xtensa_finalize_config(config); xcc->config =3D config; =20 /* @@ -195,6 +194,8 @@ void xtensa_register_core(XtensaConfigList *node) .class_data =3D (void *)node->config, }; =20 + xtensa_finalize_config(node->config); + node->next =3D xtensa_cores; xtensa_cores =3D node; type.name =3D g_strdup_printf(XTENSA_CPU_TYPE_NAME("%s"), node->config= ->name); --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741278824; cv=none; d=zohomail.com; s=zohoarc; b=jd4WqqHP5cjWsF7diUitJGqaaWEoo0K+4qpR/arKfZ5+D/4dk/rwmErGQpoUskn1i9qWmHrqHXs3dZtmHyBfRBrekzGqzetw/GagIiMZs1xJ0/2Wa5bet128YKCVcYWJNP/C1cKYvfx5bGoAgXGhdl6SAEqn0PrVz8FUA8QC35g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741278824; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=MMBWRuSyGswvYNYlsgr7kSCVcGseu6BMoO5K2Fo6R7M=; b=bpIkjJomgmFUzocfeY0ZL7UZ69aL33ldH6NWuAhq43zBjZnqZ01hhLmy/1JykxWV/I79y/cvyXOffqcPzjuQAML0ic+wQ3Sjm0vBixaHs3Rc6OdwUj5HmTvbjHUhvUc4521UNbz3ceqLOnmbMG5Ntf2rx4DJEO25nd7nxMImHT8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741278824796532.4687626065096; Thu, 6 Mar 2025 08:33:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVs-00050a-DW; Thu, 06 Mar 2025 10:51:56 -0500 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 1tqDVd-0004Y1-Mm for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:41 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDVJ-0006lq-MH for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:23 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43bc4b16135so5232945e9.1 for ; Thu, 06 Mar 2025 07:51:21 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfb79adsm2400486f8f.7.2025.03.06.07.51.19 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276280; x=1741881080; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MMBWRuSyGswvYNYlsgr7kSCVcGseu6BMoO5K2Fo6R7M=; b=Tzlg1UvGkehYDQ8JxM8NFQ0h8013J0mKw7RWby+BlP6eIIGnlPLJZusjyvoyhOyw1K MKMkfLzD5b6nWMGIr8FzL08QalHrksBLhW6eoKMmo8/V+mQmCEruIhxoYpQehV49CBTT Z90C9v6K6htnlv/B2dnIsaJGAKtqodzWJCFVRWuMfrjNlWEo2a8zmzcRbehdw/h9WSOa GF0BjP2UqTu9F5O11Xh32bhcS0YUZGbmfzPhvRpTlEVLyO8dyP01M0z5/AdhjEQfwlqF wxe0qyECluNqctYPT9XuYMfGzGv6pqSf2I06VxftzqLnYjyGCk7Ek27FslZZd6oL76yc LCRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276280; x=1741881080; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MMBWRuSyGswvYNYlsgr7kSCVcGseu6BMoO5K2Fo6R7M=; b=aDj8zeMQ4VlfGaeJYvE8Jm5G/0XlojyYz3kSUHy14tx4rLZ2aa4CsGef7nZ6K7/sI1 StCGblrN526Z/Ax/Pg65mlFaKPWfGP6c9ZEoGctw6KLnF6zzjeSHZVPEsjmv49QjyGa0 JtQjd0Nh4/MozqVoe43vEaz3rxEPI6itwy+WeqLGxwDGNkgWceG/9q24JQneN1eJwEBc CrFCZMz+t3q91jmJWMmM3PObEBMJVMGD/X/t70t0Ri3E/VJzGWGkuSGYwK32xfHaS53a xNIM0zsvmPjwwcHsozYJweq2x+Vsmo9LSizfhhzRceafp7M5gEMAkYReodoziVpCYLXr c+jQ== X-Gm-Message-State: AOJu0YyOeiWUqJTpP384dUBvlDWAtAiwMgBo+neslxkINy4IKCR9T+RQ 7k8MKrBmHL1xKBzqnHei3K+xRQlw6DT8go/RzjmFlofLTAY+G7ctiMbA++ms02w/qnHNyJGqZZc fBW4= X-Gm-Gg: ASbGnctbzD1JZSXy2al+V22D/cWZtPZ0G+E0OBN+P5jRGdp0y2vK0c2tA1ShEJefD7g +FwUyOcxrCQ9RFUWPVh38DmvfYHvGtAbzmgvfqKT3QXD9y4NWJ0Pdr/YYkA35CL8V3Dr0kHD14T KmOtPXPWNzuLoAL++ebEJwzocXHv/vOWrNsn7VCpckMzKlvYb5RF3mdOkN7MTX6+JGOA8OCD0Fm AKL0I72OZWkpJwbZgpvOgQopcbfQxq9Yt1an6jTWfT7ZO3aawvfVJeyXjWyhSzMQEIqCy65TfX8 NuNkZGkEmI0NxKzcRSijXbU7KCizH6hVgsAtc+9oXrtMyDdGhYHQX4Ncug27NDbyZSan0aH7LoT uBOHc1O+iLtePf1X7zlM= X-Google-Smtp-Source: AGHT+IGw2gTQleg7DigYl3YSXxike3ld0/4r28imU1bdl08i1jUWfU8qqauNQfNSYvrA6oR+Wj5//Q== X-Received: by 2002:a05:6000:156d:b0:391:10c5:d1a9 with SMTP id ffacd0b85a97d-3911f76e3a4mr8100116f8f.31.1741276279952; Thu, 06 Mar 2025 07:51:19 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 49/54] target/riscv: Declare RISCVCPUClass::misa_mxl_max as RISCVMXL Date: Thu, 6 Mar 2025 16:47:31 +0100 Message-ID: <20250306154737.70886-50-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741278831744019000 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250210133134.90879-5-philmd@linaro.org> --- target/riscv/cpu.h | 2 +- target/riscv/cpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 616c3bdc1c2..7de19b41836 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -539,7 +539,7 @@ struct RISCVCPUClass { =20 DeviceRealize parent_realize; ResettablePhases parent_phases; - uint32_t misa_mxl_max; /* max mxl for this cpu */ + RISCVMXL misa_mxl_max; /* max mxl for this cpu */ }; =20 static inline int riscv_has_ext(CPURISCVState *env, target_ulong ext) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 6da391738f3..d4f01965dfa 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -3056,7 +3056,7 @@ static void riscv_cpu_class_init(ObjectClass *c, void= *data) { RISCVCPUClass *mcc =3D RISCV_CPU_CLASS(c); =20 - mcc->misa_mxl_max =3D (uint32_t)(uintptr_t)data; + mcc->misa_mxl_max =3D (RISCVMXL)(uintptr_t)data; riscv_cpu_validate_misa_mxl(mcc); } =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276777; cv=none; d=zohomail.com; s=zohoarc; b=QfNSz0I1xqlwkydfiXsriVq+Acd8t+rHxnclu4o5T61K8sYIbER60PKZC2ZPPeWvONUYiNHQHuU/CKPlU9C3vTlu+OTufUwku3dcqrEPDD1Y4SOQSieBNwAdRqrEA4jxsBIQt8Bxzx3TAxd0QEtwvz2EByqaLw6jwvGIsP6GRrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276777; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=yJRJRFRnJa+ZW9IwcRJGqVmfoDv1z7czBgbZuXOAeZE=; b=LSvWTWBxGwDakA30IPQl7XNXV1Sn9CKMuB1r1LUwjBb2khrFwvPFKeQrBdbIvPtK3blyaDX6qqOw0Yd8mHHvok0UrDDeoL6w7UtrUxFyf+aWbsE7xd7Gf9zOGWd8EpscvxkThXikg0xT/nvz0n53/l1pYWd6aA4v1Eu+uxjC9Ls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276777959838.1345642720295; Thu, 6 Mar 2025 07:59:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVv-00055C-5P; Thu, 06 Mar 2025 10:51:59 -0500 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 1tqDVd-0004Yj-LB for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:41 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDVO-0006m6-9I for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:28 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43bdf0cbb6bso4720465e9.1 for ; Thu, 06 Mar 2025 07:51:25 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c019557sm2508708f8f.50.2025.03.06.07.51.23 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276284; x=1741881084; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yJRJRFRnJa+ZW9IwcRJGqVmfoDv1z7czBgbZuXOAeZE=; b=jsMDJvmppOvm+u/G4wCcw21Iu/XWMJXC/DQK/cLZHVn5nNaGmTCdFJp62xBHvq7JMZ 7RMkWtcwsoq/Y/b8813u8Cv2Uz9UtxfrW7nBZJw72lHwYHUmyElFpsLLju6uQBKu5idr gfhDbIL4BtC1Luys2k5tnlSNqSWl9+delSJi7J7bS/mzgu7Oi4DCohf4bRkFlOLci+6T PoVydGiFxEU01S/rP4WZU1ETALj0jwOh8Pf8FBpE2Rir+RjwKuW6enluf0GvzOlUhqzF K1Dsbco6WB3uq1Xp1hXUb1gw3OTD9F9CEpDuQqU0Q0IOjkB+b848ceQLBlm1wKavh7Ai pQNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276284; x=1741881084; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yJRJRFRnJa+ZW9IwcRJGqVmfoDv1z7czBgbZuXOAeZE=; b=Uj70dkcEDzOPKsd8HnSqzd0DTUpx0Q7yevSODfsE3xUiWHWAtib2Zp//HOV2NLjw7R ny6lyCRpqZWV+DNERPbbPMe+gQj1i5Rg0JZPUDjJrMUW/6+vGu48STZEZMKzQAM2kXPf Ebyl4d857ihl7XIYecmpTSWJkFjn96LCdCZRbSa4RGEKWSuL541JLtmaneWHoCikILQD newKoKnxAbNjNEb75t/TvHBswTyxQjuR9KebB4l20fv10YF4OtKtDYFdlyfSZHvyZFXz ujJkDsckXqDgz8wf4xft5CTSXnF2065+VLBRLo3rLeLiE49LYQEPEtdrBtkdPHcIilDK ENUA== X-Gm-Message-State: AOJu0Yz6LOT/ECxnCULVRvgMD5aFrZxmSCa21+Tx/C7aymVOmlqft/7K w7l8uonNBbx4BYHvkvLjgj0o9kyh2mQUnfIZalUe75OaFq7kr3k6f7WCyCU7yAXe34AackozxiK BcVk= X-Gm-Gg: ASbGnctQPunv1kkl2wMMI6SjydVkR8qZHbFJyAew1sC/7kKPi728s0diJuPaGxACOzx 0I0TgcwvqC7fKWloU8Bmbm8Wqat02FSV4wdiIKXj1Tpsd1gmF3Hh2zcFQCB27i/6qIqG/15Wd/a i1T6Fi6Io/i2+5vizk7WI0wNhymSSBhe/9a6maLDAKHdxFRr+BTWYEtJA/P5hDEcwbVM0nAz+L8 uOiOQ9hHpwEpFIAABAuGJFEtPEJcoy8fjZb/tyK1c5ei+Zra5KxChHHRaHIZ8pi4kGYQwuBOy+5 tfd4qBbo4gA+yaNwXcQZm/Kumyqx50T8CEUnd55Hpv6oZWpFcNpHeahmR1OkQ+6i+OQGBOLZ9TO LS6VUPdidai4yOcugbAc= X-Google-Smtp-Source: AGHT+IGt+K9pt8CaHDgzW8PJDc9ps+vTGPmB2kt48Xx5Y7VDF2v7XohqSfreBcNwYGZiqCMzSm2n2g== X-Received: by 2002:a05:600c:35ce:b0:43b:cb06:d768 with SMTP id 5b1f17b1804b1-43bd29b3b78mr53677215e9.20.1741276284404; Thu, 06 Mar 2025 07:51:24 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 50/54] target/riscv: Convert misa_mxl_max using GLib macros Date: Thu, 6 Mar 2025 16:47:32 +0100 Message-ID: <20250306154737.70886-51-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276778368019000 Use GLib conversion macros to pass misa_mxl_max as riscv_cpu_class_init() class data. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250210133134.90879-6-philmd@linaro.org> --- target/riscv/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index d4f01965dfa..6db2252aac7 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -3056,7 +3056,7 @@ static void riscv_cpu_class_init(ObjectClass *c, void= *data) { RISCVCPUClass *mcc =3D RISCV_CPU_CLASS(c); =20 - mcc->misa_mxl_max =3D (RISCVMXL)(uintptr_t)data; + mcc->misa_mxl_max =3D (RISCVMXL)GPOINTER_TO_UINT(data); riscv_cpu_validate_misa_mxl(mcc); } =20 @@ -3158,7 +3158,7 @@ void riscv_isa_write_fdt(RISCVCPU *cpu, void *fdt, ch= ar *nodename) .parent =3D TYPE_RISCV_DYNAMIC_CPU, \ .instance_init =3D (initfn), \ .class_init =3D riscv_cpu_class_init, \ - .class_data =3D (void *)(misa_mxl_max) \ + .class_data =3D GUINT_TO_POINTER(misa_mxl_max) \ } =20 #define DEFINE_VENDOR_CPU(type_name, misa_mxl_max, initfn) \ @@ -3167,7 +3167,7 @@ void riscv_isa_write_fdt(RISCVCPU *cpu, void *fdt, ch= ar *nodename) .parent =3D TYPE_RISCV_VENDOR_CPU, \ .instance_init =3D (initfn), \ .class_init =3D riscv_cpu_class_init, \ - .class_data =3D (void *)(misa_mxl_max) \ + .class_data =3D GUINT_TO_POINTER(misa_mxl_max) \ } =20 #define DEFINE_BARE_CPU(type_name, misa_mxl_max, initfn) \ @@ -3176,7 +3176,7 @@ void riscv_isa_write_fdt(RISCVCPU *cpu, void *fdt, ch= ar *nodename) .parent =3D TYPE_RISCV_BARE_CPU, \ .instance_init =3D (initfn), \ .class_init =3D riscv_cpu_class_init, \ - .class_data =3D (void *)(misa_mxl_max) \ + .class_data =3D GUINT_TO_POINTER(misa_mxl_max) \ } =20 #define DEFINE_PROFILE_CPU(type_name, misa_mxl_max, initfn) \ @@ -3185,7 +3185,7 @@ void riscv_isa_write_fdt(RISCVCPU *cpu, void *fdt, ch= ar *nodename) .parent =3D TYPE_RISCV_BARE_CPU, \ .instance_init =3D (initfn), \ .class_init =3D riscv_cpu_class_init, \ - .class_data =3D (void *)(misa_mxl_max) \ + .class_data =3D GUINT_TO_POINTER(misa_mxl_max) \ } =20 static const TypeInfo riscv_cpu_type_infos[] =3D { --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276820; cv=none; d=zohomail.com; s=zohoarc; b=eS3/EtqexkXtGKqZh1DCo6rahrtc1SjCkcyQEE66SkQIWUS8SxyRo7pNuDjb9XuhIDIVvHdODnDVyjEIhmwKWkaaOW66pyxYPBC43zQvq6DHg/UKip9catAmZ8d7tdAlLmuQjrN2HvcElmWEVMwgn5DLBTirJH4DLTW7nA/2GaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276820; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Q/XxsDfHOS1Wk77anKxnWzNd9TMtmnv8t/Ha/8QCoUc=; b=NXvCjffvcLA7o7i2M7DYSeyHgZXL4sbqizqCCxkkZfBc4Rg6LcjIDVpxfVq+86HSxC0zXkLkt2XTuq4iHfjhmrnHFReqz3FYicL10VLiX+Cb4l1TS/rDaqnH3DbbDX7H7v9gQtpEuOJtl8r1vs5qA0pcjpby6bb/SSMn7t6JnTk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276820697528.5887482285402; Thu, 6 Mar 2025 08:00:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDVx-00059l-N0; Thu, 06 Mar 2025 10:52:01 -0500 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 1tqDVe-0004ZO-3C for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:42 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDVS-0006mO-S2 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:32 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-390f69f8083so792225f8f.0 for ; Thu, 06 Mar 2025 07:51:30 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c103f41sm2371624f8f.85.2025.03.06.07.51.28 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276289; x=1741881089; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Q/XxsDfHOS1Wk77anKxnWzNd9TMtmnv8t/Ha/8QCoUc=; b=rVjt2CuKUdiIILIowYcmfg1WSNe6qzM8rAJi3pJ0lLb7Y3Tl2ZWG3iX0GiV92KOoq5 ZFvFjHzfJEahq4dldDwkKpbo68NZJ7zMjPGFGaRyx9DOF0vKY6r8pS6GEH60V3qcHBft M7Q8U+Juk6bv31Fy0FBPfKZZCfKAQ5DNzoRkA1zqrNYtOASuarEPNdP57qFsPtIwlQ/H npp2xP3eGeUHZksQQLcsO5fX2W3ns56WuxnX908Z5V8sQJDyTAUZgZyfIaB0EQ1QWtCi EqgkvtMtae9veSb1Ess3R1XdvYEvcSZhTGh1+x1sE9mWWJ+fQD4oCI0uOgUvCVj8eb72 9KsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276289; x=1741881089; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q/XxsDfHOS1Wk77anKxnWzNd9TMtmnv8t/Ha/8QCoUc=; b=QqFN9iPnTH6u7huIqDGyVM3+MWVpCUN+Sn0jlFAaBIvPif5d6auH9eUyuNoUonoDGp iUknY53+LcSPjXVLcKQTx0EZDLOoUshWtCf4zkw2QbW8ap0Rjh8gN2pTWYpHyHA0BrfH m/c2O6PbVVxynmwHmHy+WnXlRzIlAYhGLxKakyPRSkqgaw81sdaT3xoX3EMde2E7Vg8a k8EaHk6qvKUiCH9lwAPLk6jeeoEy7NCHfql87a27mNIZ9m9iNZizdDLuuBINmfdUrPB0 LgORtgjZd1hKNftJLfXB7oZMccSVEimkjI9ENoHYqvPDGMay6KNgR5p//EHftL7nXFta 7nsA== X-Gm-Message-State: AOJu0YzZCcw5kHW8Ee9DmmWLBaNvpP4huZP/XZxNzrgVOF4hg6p0aAmd TkPZeumvFiJBIkcafDZG5A+lUOmv8T9O1nWeoh8dePCddsdBMfdd1KG6RdZ39fNi6pw08m2rf3k 308w= X-Gm-Gg: ASbGncthdanmPoVhs5ispT3zNUPsAogE9tKgeJ+K3itRfiOAYAYPToTDVQMjpsxbaGU OcPm1lozuQR09flQxlUViVpkJvRzFIjqYNCCisQvakQ1W86RRDvpdQ22d6WZOxcqNq8Kp/OwxqG wWVvCZqxM/Qf1OQ3IPVAYOPUIgsG8vKrEoWGI7p6uvGUkxO70wmDWZRUXLk5IqowlUTapKtV7v8 l0TWjJDCUFvQdfqlpUj8nzcVbyUg+baycS2UD8esBoKMTm2N0EEi0/0H8nGVUHnivbcbedSSE/A UZ1XoTV/2Gzy3LC4G/c71yPUFHxtn8+MMZhY8cYiA8pQLUXvxZjMCK/ZysyEQW68uwO9cApGn2Y Mo/BKXsC641jG15RcwI4= X-Google-Smtp-Source: AGHT+IGGNEqDa0CO5YNd8YzyxzegQ4aopm2urFOdqm7MPPMhG/1u0hidlTkpMaCoM1tqej1CNlMtaA== X-Received: by 2002:a05:6000:156d:b0:391:22e2:cce1 with SMTP id ffacd0b85a97d-39122e2d0c7mr5474838f8f.42.1741276288822; Thu, 06 Mar 2025 07:51:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 51/54] target/alpha: Do not mix exception flags and FPCR bits Date: Thu, 6 Mar 2025 16:47:33 +0100 Message-ID: <20250306154737.70886-52-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276822655019000 get_float_exception_flags() returns exception flags, which are distinct from the FPCR bits used as error code. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250211162604.83446-1-philmd@linaro.org> --- target/alpha/fpu_helper.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/target/alpha/fpu_helper.c b/target/alpha/fpu_helper.c index f810a9b6a47..6aefb9b851a 100644 --- a/target/alpha/fpu_helper.c +++ b/target/alpha/fpu_helper.c @@ -455,29 +455,28 @@ static uint64_t do_cvttq(CPUAlphaState *env, uint64_t= a, int roundmode) { float64 fa; int64_t ret; - uint32_t exc; + uint32_t exc =3D 0; + int flags; =20 fa =3D t_to_float64(a); ret =3D float64_to_int64_modulo(fa, roundmode, &FP_STATUS); =20 - exc =3D get_float_exception_flags(&FP_STATUS); - if (unlikely(exc)) { + flags =3D get_float_exception_flags(&FP_STATUS); + if (unlikely(flags)) { set_float_exception_flags(0, &FP_STATUS); =20 /* We need to massage the resulting exceptions. */ - if (exc & float_flag_invalid_cvti) { + if (flags & float_flag_invalid_cvti) { /* Overflow, either normal or infinity. */ if (float64_is_infinity(fa)) { exc =3D FPCR_INV; } else { exc =3D FPCR_IOV | FPCR_INE; } - } else if (exc & float_flag_invalid) { + } else if (flags & float_flag_invalid) { exc =3D FPCR_INV; - } else if (exc & float_flag_inexact) { + } else if (flags & float_flag_inexact) { exc =3D FPCR_INE; - } else { - exc =3D 0; } } env->error_code =3D exc; --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741276981; cv=none; d=zohomail.com; s=zohoarc; b=Od6oPsb8KF2EK/xuwb6RMuRCkIi3+VKBmdgat6THdaSOyLcDco0eePS86Jigs/dGb/Orx40kw7svpoXqUkJEyhpMzXUUY6YtEFIF5VbjWs2RyQ4srj7A+R+q8eVLWb7ZXtquIBdknARX8WSsGV79CkqNFVnp4OJP78B7N14kH+Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741276981; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=8iAMOsd7yhgOQOkZMNXOMWl45bAeyqtgN6CSQKPbqzQ=; b=Q8JAgdP1mfAkTcMelyB4PBrzoAFSngr35/rCnXnzapiizZyYYQjAFHm/NyNaKSZF+evtYF6Su6v/L42LZH7Dku0NcH3RHiw2JVy7sSg65eSuUBQjMEzuvNYj3SNJgkaG3UZBkR2x1+Ne2ebSD33txe6LveU3KDXRupZzzkSZ2Og= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741276981148623.2884484266393; Thu, 6 Mar 2025 08:03:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDW0-0005E3-EA; Thu, 06 Mar 2025 10:52:04 -0500 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 1tqDVe-0004ZP-3A for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:42 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDVX-0006mc-5n for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:36 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-39127512371so630910f8f.0 for ; Thu, 06 Mar 2025 07:51:34 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c0195bfsm2411546f8f.48.2025.03.06.07.51.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276293; x=1741881093; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=8iAMOsd7yhgOQOkZMNXOMWl45bAeyqtgN6CSQKPbqzQ=; b=QtUAL6MIgsiVYwYRVlsUXwafygnWQ8QkxL0nBB7haHd4LD7TGrRCZjhVVfsAk5vRT6 +G2nYIjS6yAaPJc9C84lEaw8McV/a3fi6JG+bxZ5UtEppjmTKMIacu2iBl4Rdqz2WkBK Ym9gZe+tzmTndyycy6jAh6f7u/RgVlUxwBfmYt5Kwu+MCTqPLh95Cu1owNvwgZTduJMr 17nSodLdJ6BM1YPBQxvZ7CNoLBkIxXOCWzIPtKoY6q9a+9MFeVjay6U3Kq94F59UrpPn 3ZW2LGo2xZ44HLTXGm35jBQkg6PzpFz9ZWjpNQfEz5K3LoDS5qV/2x+g0Z+U1o5D2099 FiOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276293; x=1741881093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8iAMOsd7yhgOQOkZMNXOMWl45bAeyqtgN6CSQKPbqzQ=; b=uEfSncPq79KihvszHNuO5Di3C7ZqQMjZwJZenBrpkCgCISEruyhmloEMhkZz6/amXQ BFYY5RInP6wsmuxALTDWFvGlamy/QCJRoDiIljiSsqb2+LdWrRDr6odYeZVkkWmbhu6A yR/8ZTiwvWvFEaDczCu9FvG2Bx5wJwNXuJY/hc42NE6No7o8Ha9JUlX2Km6U2K7dviXk 0unjwEoHW5dZDyHZXoGBs3zNUg3uq00w0XzCh1vAyqUpssOVtURKX3RoltFM7YAL/8FG FFuGEc2ufwL0kek3PUlcCwF0BpYk7mLG9UO0M5qcF8QU4ihpCW7b++T2OMW10tcgJA5e RGgQ== X-Gm-Message-State: AOJu0YxJJ1DzqXOV4vZznW/ebh0r4T1oq9/X2oOtVaBA9unw6IzF93Nk phY8R1AhEk7R4iu64u9QOPw1QKnNF7DXeXFduVAVk3i7fxLaANute5dBh9Vg20GsaIrZySvWZej Xcrw= X-Gm-Gg: ASbGncv638T/II4gz5qJiUbNEPonCcvuEcMYl4xaNggVt+cGRzJDzMZIHjrNGyQWv83 2bOY0XD6OWHDUMorP5togj/QU/YkIF8nzRVemBudBJuwQtArvX7dgf3W/d4K2fiPhW9MYdjETMs JkVlsNRqXC5qsUQmY8j5z+zGh6JtTgGtt8QV4o/aO2ujAJp3ZfNy342vSvnLVUAcxJCT7b5hL0X RxEYl2zUAMw1uv4tk/+EdH37MtXBxc8lcVgNxWwYiBFNV/4FGlKIqZdu4hid/lRrrVFQ+6h+B5m 4840Rx/4S3rg9ROO8wKOrm7Z4w5tYGq0VrsASM2K9xdnujO4PNwjIBR5/4d6hgBHBHAR9czKizT s2gllY7VasMmRydtpjhI= X-Google-Smtp-Source: AGHT+IFfU6FQV9Lj5NaK+MWlGh1nIjCTFYb3BmaFRFUZYNuw1YriS+rY5v1o6f+Pr2eL8yRSWtAm3w== X-Received: by 2002:a05:6000:1844:b0:391:306f:57d1 with SMTP id ffacd0b85a97d-391306f5a44mr873346f8f.35.1741276293277; Thu, 06 Mar 2025 07:51:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 52/54] target/i386: Mark WHPX APIC region as little-endian Date: Thu, 6 Mar 2025 16:47:34 +0100 Message-ID: <20250306154737.70886-53-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741276984540019101 This device is only used by the x86 targets, which are only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250212113938.38692-6-philmd@linaro.org> --- target/i386/whpx/whpx-apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/whpx/whpx-apic.c b/target/i386/whpx/whpx-apic.c index 4245ab68a27..630a9616d71 100644 --- a/target/i386/whpx/whpx-apic.c +++ b/target/i386/whpx/whpx-apic.c @@ -231,7 +231,7 @@ static void whpx_apic_mem_write(void *opaque, hwaddr ad= dr, static const MemoryRegionOps whpx_apic_io_ops =3D { .read =3D whpx_apic_mem_read, .write =3D whpx_apic_mem_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void whpx_apic_reset(APICCommonState *s) --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741279894; cv=none; d=zohomail.com; s=zohoarc; b=aPRs6AXuBu/aFwJ3UdxI5o2Q03qeXkXkwUfGXAKQtt4hVtRLREAl0jvZJnsr2XsfnCBWAZ8ISjCwvdi1p3rAlKaApHSdNG9XlPaqUZfwGu44kgFCJAE5OhvSg8A9TK+KGvzxMiL+uvBZtzQjcKwL7sMBeKQflTaHqXUYcgAV7Zw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741279894; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=isFVV4mWD6JRdhzxnOMLbfC93cakN53tVgpDr87aOmk=; b=NMM90JyzONCRqv/nZTkjXpGa3UvHDePtbE+eLwNUWGtxBwL3Y6bC2O9c3XyrDBATq4vgZefcTE8EdmK0I7VoxmRjwAMWDf8WKT2zFzUDRFrG+xr/tmfmIECEg3xnxzxN5Zk381J0l/sZgj9Gpx/JA+PtZfhsS1JbCv8bZzwzFNU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741279894689656.3340493742085; Thu, 6 Mar 2025 08:51:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDW7-0005Z3-Mn; Thu, 06 Mar 2025 10:52:11 -0500 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 1tqDVe-0004ZQ-35 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:42 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDVb-0006n7-OF for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:41 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43bd5644de8so9768635e9.3 for ; Thu, 06 Mar 2025 07:51:39 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912bfbab43sm2455333f8f.15.2025.03.06.07.51.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276298; x=1741881098; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=isFVV4mWD6JRdhzxnOMLbfC93cakN53tVgpDr87aOmk=; b=vUBfsgaUEfPseEAjWTIwxqlMxsFi1NT8O3mOH7GwbkAKFxXqqlZ7TSYX7E+L462Q1g vkkRiK8zX4UxpTJNNgeUd32X59PJRiG3CQmCKhVjwXHX+6zRiGnNcKOObP0ZGGPFLMqs YRwghAcP2dBBAJvtNBVSoUiPsNbypy74p9eh7KB8TgICaf8pGiYfBySy1XKGyKMLG2i6 XvnYN6mcY4857sFCyN+HNDpUacmbtZBE4AnY0/hj9fuBV51QLR/ET6WiRhuIifFfRfqF 5unc1/aVgjAq0lgtPDXQpdkrJvzSyE1QhzkP6UVGGyzsFthy8x+iHNcqH3QwGs6lMKNu 1bAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276298; x=1741881098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=isFVV4mWD6JRdhzxnOMLbfC93cakN53tVgpDr87aOmk=; b=b7H/GTcyEEd9p2vnrpxESEdFeYNsdtGiyjwEIEoPLoCjoBsO1oA6hoKZbLoInkbE4U WbreuMF/37OZ1rN3QloofPNj2jJIZqBZTRp3sSSjTposdMm8QfYNaR+gNyeQ9jdYlQRc BDNSMFPI+qDX0CIc9bEwh+mRt+vMX40gUHzaE4valU4ErLaouWqakocbENSijZv5iUdY wiSnnVhjUWjc+l/QAwHW7Pcnk9vUMaVHmY0eK7Vnzv7/5joOFRdjt5HeTAlXWuwqwXE+ gOBOcXiXzfQTT33d99zb/zdnpTUCm6q/8WYKmIQTbChc1eIPZ2R+CyhQni+yCpBXv5IC F//Q== X-Gm-Message-State: AOJu0YypB+7eTAco7jLsnnoalMiFSwtDwZI9Q9VhKBWVHKma0j/KphYC EV2zfUB+Lm2ls2k+xpkqo613CyXtNBfaCxOWGdbFX5Lq1zALD3j5woBVIG0WnXomYrq5FabGSi3 7++Q= X-Gm-Gg: ASbGncsgK0WdiuuP0of4GOLgVKsdDaQcHz6mclKgr8eX0uGH7XCcQV+m++iVgjLmhB3 OzH5UPqPIFTVknZ/ToYvN8VHyh96ZKjkEEesa8gvXu+Vjl9M3U1Z0PO0UGd/VeCvgI/HhQ8Odtq YDD/PH0CnJFrb377AE/B+RFsYm7pqYppSvojroIa2dmBCU0EGiRv+Y0tZkhLXRs0sv7wtGfk0L6 8P8ZzjdC9epTDR97UmxH2/9clUMrqQ8IRdj3nPZKmZiX0wrCz/DLwJzvKLDqD/o+Jl6EWfOqJ7W 0XdlvvqLYz/d+IiVDQjDtXK6Pnb4qwaTr+mMl6kXE/T4NmdpT0X22s5so/e2tW/JOuD7zG/yaup t3MVzkEIqV4Gz/oC40H4= X-Google-Smtp-Source: AGHT+IGk3HhRNg3trnG6UElzcyn23ZHH6RzgbjbAdF2XzZoe2DSzUMOq0r2Z0smWrc6bvosGuQOawQ== X-Received: by 2002:a05:600c:1d0f:b0:439:9b80:ca6f with SMTP id 5b1f17b1804b1-43bd292da03mr90504865e9.5.1741276297665; Thu, 06 Mar 2025 07:51:37 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 53/54] system: Open-code qemu_init_arch_modules() using target_name() Date: Thu, 6 Mar 2025 16:47:35 +0100 Message-ID: <20250306154737.70886-54-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741279897481019100 Mostly revert commit c80cafa0c73 ("system: Add qemu_init_arch_modules") but using target_name() instead of the target specific 'TARGET_NAME' definition. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250305005225.95051-3-philmd@linaro.org> --- include/system/arch_init.h | 2 -- system/arch_init.c | 9 --------- system/vl.c | 7 ++++++- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/include/system/arch_init.h b/include/system/arch_init.h index 5b1c1026f3a..d8b77440487 100644 --- a/include/system/arch_init.h +++ b/include/system/arch_init.h @@ -27,6 +27,4 @@ enum { =20 extern const uint32_t arch_type; =20 -void qemu_init_arch_modules(void); - #endif diff --git a/system/arch_init.c b/system/arch_init.c index d2c32f84887..b1baed18a30 100644 --- a/system/arch_init.c +++ b/system/arch_init.c @@ -22,7 +22,6 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" -#include "qemu/module.h" #include "system/arch_init.h" =20 #ifdef TARGET_SPARC @@ -40,11 +39,3 @@ int graphic_depth =3D 32; #endif =20 const uint32_t arch_type =3D QEMU_ARCH; - -void qemu_init_arch_modules(void) -{ -#ifdef CONFIG_MODULES - module_init_info(qemu_modinfo); - module_allow_arch(TARGET_NAME); -#endif -} diff --git a/system/vl.c b/system/vl.c index 8f776684ec8..04f78466c41 100644 --- a/system/vl.c +++ b/system/vl.c @@ -26,6 +26,7 @@ #include "qemu/help-texts.h" #include "qemu/datadir.h" #include "qemu/units.h" +#include "qemu/module.h" #include "exec/cpu-common.h" #include "exec/page-vary.h" #include "hw/qdev-properties.h" @@ -78,6 +79,7 @@ #include "hw/block/block.h" #include "hw/i386/x86.h" #include "hw/i386/pc.h" +#include "hw/core/cpu.h" #include "migration/cpr.h" #include "migration/misc.h" #include "migration/snapshot.h" @@ -2885,7 +2887,10 @@ void qemu_init(int argc, char **argv) =20 os_setup_limits(); =20 - qemu_init_arch_modules(); +#ifdef CONFIG_MODULES + module_init_info(qemu_modinfo); + module_allow_arch(target_name()); +#endif =20 qemu_init_subsystems(); =20 --=20 2.47.1 From nobody Wed Apr 2 13:11:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741278883; cv=none; d=zohomail.com; s=zohoarc; b=MND/CgIli5JUCvvjYVIK7R859iTdAVtcC8+GAH1RbLoIQ2r6NILyAMGRlTSEb7/D0k0ClkmPkIWUc7umWHudW8WAx+00payy02AN7Jwnpr2hakr7bZaptH8CjDswxWsaJd7Lhi0J36N2r8RYb04E1f49LfUZgyIaKTl7PYL0tB4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741278883; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=xEi19GICoksLADKOo55mK0c9OwojgM4AwDlkdDj14C0=; b=Eb9JEwkTKE5ZMeDrWXV3XuH0dmzRVZoe6E7M91Ui8vS0J9hW5xKCx24h/xSNEPpZ9wYfq/L/GA3ORWiQM2nqle/fv7D3vRKW0nuepNFSvbA6QgOF3t87mEzDU8qhtiyoO2v7tVJlie5eVNQY3ijATxICBqtGqSjPRXirG5Z8hhE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741278883115456.2850691822175; Thu, 6 Mar 2025 08:34:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqDW8-0005am-72; Thu, 06 Mar 2025 10:52:12 -0500 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 1tqDVi-0004rS-H1 for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:46 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqDVg-0006nh-6f for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:51:45 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-390effd3e85so810335f8f.0 for ; Thu, 06 Mar 2025 07:51:43 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c103808sm2438477f8f.97.2025.03.06.07.51.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:51:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276302; x=1741881102; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xEi19GICoksLADKOo55mK0c9OwojgM4AwDlkdDj14C0=; b=Nf7FgUOiC1ppDQZ1S/Ed2O2IYTrP8GWk6dFxoqwBkSi0SF/7KM8XGTgZTdAnqSLNYc tlWwoyWqGmCXKFzT11DW5kZdKYVGQA11/iarX/mGsKTb4IBOOZZO07XBLoM3F/yr/4X2 b08X6C70hJIRorOEMpepX6Lu9yHK9tI4Qig+w5Tg+nmNHKG/L4T3LfJJH0/uXaDkSSgd xAV1inTt3e1qXW+WQ40f9LHrS53LkeCgb4uYnBO1VUHTj59q7x0lJ81dMTDqtDI9iEE8 aQg6JR2Pzcyl2k+JNj64c59SQwa7fJCv0jE/9EporEbIuy63Nyftn+Qx/qGc9dHBK9UI 8KCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276302; x=1741881102; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xEi19GICoksLADKOo55mK0c9OwojgM4AwDlkdDj14C0=; b=mQwDF7fAKGMEF2NQ2bD3PpY1fLgmuBZo0GTr+V3+naG7J3K+kI0ew+nfSEt39t/ylP BhNe0lZlytHabEZG2SCgBTFO0ce4Zm3sp/JpeZH5gz8jcx/GfCTu+8NASgi4h6xNJq12 wqKU+Wl8hulbJ7mBeRG5by0TtN4sCimFCbESBE1hJW0+8Mtm4xPteHgNBEOI7Ympf9gO LTnSUSKB56DqnYTXzKNU2S/HkTAU8zeSy7LC+lm2pK8/0CACy8FmffrW0UmWX7E7sK9Z fYJTyBWRFL8Z0U4x8BM6zGygNRSdbWJp6rC/VrZYy+UfiTDd5ftYmrqCqTn91rZR4ju5 u3/A== X-Gm-Message-State: AOJu0YywqI6n6NWtsDKtX+xAQXmlAPIAUBAw1MMn7cCo+LU4LCRPkNy+ KyTUrqWD7CR+v/eqSJ5hvyJpGkOdHyvg3gcvNlB1h0gxraanCo+Af/qqBNZJzjFvyTg0iirka8A oOwU= X-Gm-Gg: ASbGncs1yXiAzdJ5+ytGm10ZvS4JlqRBe5to4gm85yxD++wUb5SBhycji2Aw864ETxM 6ddP3gkd5cN5kCHMp1wIytjrxIw4hdE2/GRa/3TOmwUx3LZpeuLgrrg0CrYLYK6ROtSnpDS5E+g CuKmeFzcY106EL9eAGuxjgkVbVD5lLPFRx8RdzsBTuI5XVOgMEigVCMDHQLpp5Bz6GiUTIuS3OK 8TEhKTaZyWm7N6bxvUwB+Dmpa1T1NtA4jF9XPeuY8fRASukrzxKKNmU7pTtmKUgvYvRJyWOq9Z8 3+2IDfasYJFXAqIBnOVxfVv6zBE8poKw+lkqaUKgqdfdJseDsb0IVc6DMK4JWyk+7AfvC7O52re SBLsgHDaDhdlxpi8Gxp4= X-Google-Smtp-Source: AGHT+IEVrov16+raJ7o2l7HY9jVUt18KcgUcA0AfP24jVhhusgHCSyixLNk2eCd9tgvCgDUviWTRiQ== X-Received: by 2002:a5d:5f91:0:b0:391:fcc:9ee8 with SMTP id ffacd0b85a97d-3911f740cb5mr7729816f8f.23.1741276302120; Thu, 06 Mar 2025 07:51:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 54/54] include: Poison TARGET_PHYS_ADDR_SPACE_BITS definition Date: Thu, 6 Mar 2025 16:47:36 +0100 Message-ID: <20250306154737.70886-55-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741278883941019100 Ensure common code never use this target specific definition. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250305153929.43687-4-philmd@linaro.org> --- include/exec/poison.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/poison.h b/include/exec/poison.h index f4283f693af..d6d4832854e 100644 --- a/include/exec/poison.h +++ b/include/exec/poison.h @@ -48,6 +48,7 @@ #pragma GCC poison TARGET_PAGE_MASK #pragma GCC poison TARGET_PAGE_BITS #pragma GCC poison TARGET_PAGE_ALIGN +#pragma GCC poison TARGET_PHYS_ADDR_SPACE_BITS =20 #pragma GCC poison CPU_INTERRUPT_HARD #pragma GCC poison CPU_INTERRUPT_EXITTB --=20 2.47.1