From nobody Mon Feb 9 03:09:34 2026 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=1692367947; cv=none; d=zohomail.com; s=zohoarc; b=EIZ/MgpEffREfHKTrcNaAHZbu5SWqHN8XJUM9NZ5fIfxY8IB3QeVm+ezTB7jMrVp1gg6/T9m08KBDx9eX9NuJFIa5u77Y0fV9laEppHhYENvIOpCC3UPAPrre9yGbPxcoDR+ShgR/8PJB8WDm4ZENRwvQfaUzkTDoMritrPJtLc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692367947; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tvng4YPVMkWkkh2eZJ6qlqU3fIhQVOx369AKXLs8f1o=; b=TyPO9Awl5i+/g1vYR2n3+BOTPADysKOlZX3ywDA4QCZCt0FKkEzIyUKG56/jsUz2VJA1F7wE35BzUGNBwsLJYUcCmQb/COuuLkPtwH09EZHP9XMUa6TTfE+skKkfHjPS+C6G74fKWQpqS2t+jf7vwUkEi+yv/BE5i8gDg4SC8Nw= 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 169236794711714.188344777798761; Fri, 18 Aug 2023 07:12:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX05m-0004xb-P0; Fri, 18 Aug 2023 10:04:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWwoT-0006Lm-DF for qemu-devel@nongnu.org; Fri, 18 Aug 2023 06:34:41 -0400 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 1qWwoQ-0002wl-N9 for qemu-devel@nongnu.org; Fri, 18 Aug 2023 06:34:40 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-31757edd9edso655054f8f.2 for ; Fri, 18 Aug 2023 03:34:38 -0700 (PDT) Received: from localhost.localdomain ([92.88.170.41]) by smtp.gmail.com with ESMTPSA id r11-20020a5d4e4b000000b00317b063590fsm2330351wrt.55.2023.08.18.03.34.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 18 Aug 2023 03:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692354876; x=1692959676; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tvng4YPVMkWkkh2eZJ6qlqU3fIhQVOx369AKXLs8f1o=; b=qiyJDYcFDlEr6qQeCyCJJkeBmKLn8Ygl0Q+qA3Yi1B4L5Y5ERdxx3njPKTo5veWzBF cXIKB7uvST+n9WGH9NLvQjfwTbzflyAE4frULIHH6BTYkQQW+ClaWSaYfrBmkjTsZAPF SjV61yXSBz3xUAzKzRm1o7OqiLlQuh35ONNqCba64WyqS75LyTNMB1M8iPEMBNbNjkWU OuQx3mzg4dZ5J5CjH7Haj/uKKrXcj1G13DiaK9PkvC43+xqwZg3NHJH1RjErEaJw2XI/ y+dHH5/3xwWdaf9+p6nsF2oAbs33qYSzVqfQGuBSbr9+Ddgxl3YEXD1qgZ2HpDRADZWI /1Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692354876; x=1692959676; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tvng4YPVMkWkkh2eZJ6qlqU3fIhQVOx369AKXLs8f1o=; b=kja4Sfle9G/FmPqfQCqEJcWtHA/OeFt3qH/c/cknacRxUeVAo3gxFhEu0+bWRU/AjD Jfo+hqt4BTzn3b9hNl0HROiPl/9Ol79uzafsbARSl+xGUmTI00uEKeU99DwgmkqMxSST RpUkJ9cDpwsRL7NStWVcG2UNdXhl8u8coRR5Ufcxgfy3ewW1x9mcqJUvcOuyco1cHV76 HeP2FdP5iR1zft/vuJ+Nc9XmFYScX5adbab7qjf7jwdAkcskPnEp6uU4y3thZT0+wW5s bJ1nN47mbVlmgqw4787fT11OOtwbpGZzL3Ay6Bw3OaeA4V1ibB1vWAtL7YGqPPCWCnOM AWcQ== X-Gm-Message-State: AOJu0Yz2dByboWyGBsIML2Ucxk3jtCQy57XCOmQe3ZGVU0V1I+65Ginc dmdGAEH39b3GM/bq+oVZ3oeYml8ceXUQsY+tZ7M= X-Google-Smtp-Source: AGHT+IEWeP9u4qmAvb8udtScHkZbRm7x8lFVoMrW69JWYN5YbVYErR8fDpwv5JF0WTV78yMyKaxHXw== X-Received: by 2002:a5d:50d0:0:b0:317:6965:ef4d with SMTP id f16-20020a5d50d0000000b003176965ef4dmr1520039wrt.56.1692354876651; Fri, 18 Aug 2023 03:34:36 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Huacai Chen , Song Gao , Xiaojuan Yang , Jiajie Chen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/4] target/loongarch: Log I/O write accesses to CSR registers Date: Fri, 18 Aug 2023 12:34:22 +0200 Message-ID: <20230818103425.16271-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230818103425.16271-1-philmd@linaro.org> References: <20230818103425.16271-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: 1692367948336100001 Various CSR registers have Read/Write fields. We might want to see guest trying to change such registers. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/loongarch/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index ad93ecac92..7107968699 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -544,6 +544,8 @@ static void loongarch_cpu_realizefn(DeviceState *dev, E= rror **errp) static void loongarch_qemu_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { + qemu_log_mask(LOG_UNIMP, "[%s]: Unimplemented reg 0x%" HWADDR_PRIx "\n= ", + __func__, addr); } =20 static uint64_t loongarch_qemu_read(void *opaque, hwaddr addr, unsigned si= ze) --=20 2.41.0 From nobody Mon Feb 9 03:09:34 2026 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=1692367986; cv=none; d=zohomail.com; s=zohoarc; b=ZK+HC7sRrcUo3tcVhBjN1mxkd8QY2tvQU6+BTUR2i50QxoddJVAnPE2iXTKl8nzfVeq4Zxz5b1yg3rL/43v6AP45X8D8dzpPehtYJf7elLbEilOwC/F+aCgyAiq92n086veKK/sus42zwJghpQmR2y+l8A6fhVZBAz97Dretbow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692367986; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ymM53Ev0232IoCe+uLOGROzpIIU7OjxGy8keEyXRRBo=; b=O5g5xj8qpc2dcCgj0/kxWgM0hDtcVO/NjLYz2qk4N6dA1nCXOkfUnilMGTPoMVnNPvrPzqFiamVkL363ZQO4HtdhZgEsJERV05TMi7RtWFM1Dcm3jkKjyB+h+5o1Mfie892HjdM0PDmgf5G408Gn19+i4NWdiPgwK8+ePvGFNwk= 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 1692367986791248.02570472572233; Fri, 18 Aug 2023 07:13:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX05u-000528-5w; Fri, 18 Aug 2023 10:04:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWwoY-0006Mi-Vo for qemu-devel@nongnu.org; Fri, 18 Aug 2023 06:34:48 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWwoV-0002xA-Q2 for qemu-devel@nongnu.org; Fri, 18 Aug 2023 06:34:46 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3fe24dd8898so7235045e9.2 for ; Fri, 18 Aug 2023 03:34:43 -0700 (PDT) Received: from localhost.localdomain ([92.88.170.41]) by smtp.gmail.com with ESMTPSA id l11-20020a1c790b000000b003fbca942499sm5762728wme.14.2023.08.18.03.34.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 18 Aug 2023 03:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692354882; x=1692959682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ymM53Ev0232IoCe+uLOGROzpIIU7OjxGy8keEyXRRBo=; b=xLu7PcdHMfuNwzZ0Mzv4tNdHLkrl5YILGI4QzYlzjaEJL8Tfgiu8wtGI51WoFQF0eW 35/8Gyag7jrFo8ArapSj7PrZCiTcxcqrSAnNI0bdPzn9J4RoizUO7l1ZiF63WKw4yOr4 c7YblFlFyr1RPNxgIsrNUZ1/3cYuKEnu58DpJXJg/x7dKapPgnVdQGSYt8eibgR5WM2r W2ROSmWozRZyuDu1swDDdE4v6w/eTTOlU8kkeq7egcZhDdx+8O70y6fPjPmtP5D+zeur ceAH8UsCS+ySDa8K9T7yo+1zUmS+K+f70jd6R22zxIZxoGolWXg2dfpM7xgaldaEkJ0Q +36w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692354882; x=1692959682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ymM53Ev0232IoCe+uLOGROzpIIU7OjxGy8keEyXRRBo=; b=cuIxGkPjTfnR0D2PWx5IiL1gbruFgM6DQBJC5FabLJsrOFwAwTre5Y6VWUgksx3KCd FQ616Lh1bxR+MzWAqmdjuBQB+GDFuwZrr9U9CCQIgvx5q9TDe8HUKVkwpQ0xGstIL22o Ulbk0uYQFYxIhWazruY5kOdzYVjpTzoK4xtD9rmqHnRVCQ2MBH9mKgb5j8oGHJMLp0Al RqFVW2+Uh3l5LtbNEUWgyieZiKCfFNvaKvokyjGQilH9BOBqYe3aDKw4il6w5lXU+uBM rQ7Igp3/8hirWakD+q+NjIzUcHc/0m6IReJ+XNMV4ZX3tg9dmc9zgu37gv6w2TkCPYbv LL9A== X-Gm-Message-State: AOJu0YzlNztxKhhksU3Bj/G8tsQdH9dcSXAF5ay8EJTfCtgfZa9FLrez K8YIdjVk6RheOgMz+NFIeqw+T1U1NK7HT+xijDs= X-Google-Smtp-Source: AGHT+IGyGCIdNMlNvgUVxtJGoJsSNMCKrCHtN4BZxna0QvBRwjfkhbOLKq1OHCeFPSFfPpFmfnNiaA== X-Received: by 2002:a05:600c:28f:b0:3fe:26bf:6605 with SMTP id 15-20020a05600c028f00b003fe26bf6605mr1700877wmk.26.1692354882279; Fri, 18 Aug 2023 03:34:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Huacai Chen , Song Gao , Xiaojuan Yang , Jiajie Chen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/4] target/loongarch: Remove duplicated disas_set_info assignment Date: Fri, 18 Aug 2023 12:34:23 +0200 Message-ID: <20230818103425.16271-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230818103425.16271-1-philmd@linaro.org> References: <20230818103425.16271-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::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: 1692367987320100001 Commit 228021f05e ("target/loongarch: Add core definition") sets disas_set_info to loongarch_cpu_disas_set_info. Probably due to a failed git-rebase, commit ca61e75071 ("target/loongarch: Add gdb support") also sets it to the same value. Remove the duplication. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/loongarch/cpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 7107968699..dc617be36f 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -723,7 +723,6 @@ static void loongarch_cpu_class_init(ObjectClass *c, vo= id *data) cc->disas_set_info =3D loongarch_cpu_disas_set_info; cc->gdb_read_register =3D loongarch_cpu_gdb_read_register; cc->gdb_write_register =3D loongarch_cpu_gdb_write_register; - cc->disas_set_info =3D loongarch_cpu_disas_set_info; cc->gdb_num_core_regs =3D 35; cc->gdb_core_xml_file =3D "loongarch-base64.xml"; cc->gdb_stop_before_watchpoint =3D true; --=20 2.41.0 From nobody Mon Feb 9 03:09:34 2026 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=1692367881; cv=none; d=zohomail.com; s=zohoarc; b=A6OmKML6YRAgV+laKgfziTwNBcbMEUHcKvm+THrK7ONg3oBCfQ/KvJd/Bn+tQrU6c3uRyjTEhzVGRkfgGx/sBSk6wiywk1iuvTsTazCRVUHoUDJNujEXu2g2BHH+HZMnuqY1zSXWyY2nlJplM2ZA0IPepaCsJ9QgX+2QzPWuY7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692367881; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IkmPByYqMTHfKD7x50TDBOyupt/4VUOGL0uYh2iijAE=; b=b3KVgHiM4X4jTJl/jcjT54wX/bYPqoRbyfYfGp/dSiGk1Y/UsbsYI9ddsA9PJoe9Qf9PwkJvLGPmFamjq9SAWZL+quqculk/1zEFpJq42XD7cdegjRAXB5lOIDWVGpJlvtx4eLnl2slhBQlZ7NfcDXohz0ZFxASo/8ZBksg1nNE= 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 1692367881121781.4450367204653; Fri, 18 Aug 2023 07:11:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX05v-00053O-Jd; Fri, 18 Aug 2023 10:04:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWwog-0006ND-BN for qemu-devel@nongnu.org; Fri, 18 Aug 2023 06:34:55 -0400 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 1qWwoc-0002xy-2Z for qemu-devel@nongnu.org; Fri, 18 Aug 2023 06:34:53 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3fe32016bc8so6954515e9.1 for ; Fri, 18 Aug 2023 03:34:49 -0700 (PDT) Received: from localhost.localdomain ([92.88.170.41]) by smtp.gmail.com with ESMTPSA id l3-20020a1ced03000000b003fe1a96845bsm5816099wmh.2.2023.08.18.03.34.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 18 Aug 2023 03:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692354888; x=1692959688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IkmPByYqMTHfKD7x50TDBOyupt/4VUOGL0uYh2iijAE=; b=LW5Y12yEweki3nDnVUDoWQRPsG+CsPWs+xaaWO5H3gqcSQFHeLdpdkmYOkt1FUenLi 1uf+F3B5v97uDtjcztl8GhFeegQJwOiZ+Jy4d+eNPaXtpL8Zip5Xsi/bgp+2yABAMhvB zi7lnZkYOvJbartRiMcY9FKe65NKn0apmAzCB/3sTx7qIk+20+WjWpBmks2GSytD/bDk 40baAGgbb6HxVEwqlsc2399Q5xKEnxqELopFuN05mAb0GWknneDg0SETyI9no5QkQZyg xTQvUgCbbokGwLkPTddW9R3fZaxTivkACjYqxQvSaCh/w8LyRY6kSiqe8At4OQNpuzka i7qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692354888; x=1692959688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IkmPByYqMTHfKD7x50TDBOyupt/4VUOGL0uYh2iijAE=; b=QwWKV/EOf0kyInryiMooIpGnuPLS1sdgwMLupiVnj8s3kXT5/SxhWp+DWE1qXLwnHl EYux6AdPdjzhRRncHwXCVkp77k40QcyEgAVKzaM/HDDS231nCLll3Tdte9Dtl+Xi+KRn dcvBYwj6JovAmZ8iBRMO/UWMxr0Dg6DkdRqoU7diue1fDAy4Uk0EhrspKLM9JZe6FNdj XfzCpyL8xUuc54Q87ZjGC5toI5q8+5gXJinO8fDckcCeuoJZyVP7mdnXIvKEj63QFHu4 01C76AIUbvBNb31OOn5Ix2IW3Lkxlfy9y6ML/4sf7zsKH1Z62xgYTcxxgkOEd/z7GPxs hA7w== X-Gm-Message-State: AOJu0YwxHyW41cR8rOS9WyyDw135PUYvi39j6WvoamyvO+FueRGiekBH uwYGFdJsihakDgTtZSP3p+m/d8RyLlRJcH8USsc= X-Google-Smtp-Source: AGHT+IH5vHUowOwQb2y4jkEIq0UkaIK2TFqlwI+E/IDV/ozqiM+8ej943g0wtlrR9PAWy7UAt5bVYQ== X-Received: by 2002:a05:600c:212:b0:3fe:212c:f790 with SMTP id 18-20020a05600c021200b003fe212cf790mr1803146wmi.36.1692354888165; Fri, 18 Aug 2023 03:34:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Huacai Chen , Song Gao , Xiaojuan Yang , Jiajie Chen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/4] target/loongarch: Rename 64-bit specific functions Date: Fri, 18 Aug 2023 12:34:24 +0200 Message-ID: <20230818103425.16271-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230818103425.16271-1-philmd@linaro.org> References: <20230818103425.16271-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: 1692367881492100001 These functions are specific to loongarch64 cores. Rename including the '64' suffix in preparation of supporting loongarch32 cores. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/loongarch/cpu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index dc617be36f..19572e37ad 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -76,7 +76,7 @@ void G_NORETURN do_raise_exception(CPULoongArchState *env, cpu_loop_exit_restore(cs, pc); } =20 -static void loongarch_cpu_set_pc(CPUState *cs, vaddr value) +static void loongarch64_cpu_set_pc(CPUState *cs, vaddr value) { LoongArchCPU *cpu =3D LOONGARCH_CPU(cs); CPULoongArchState *env =3D &cpu->env; @@ -84,7 +84,7 @@ static void loongarch_cpu_set_pc(CPUState *cs, vaddr valu= e) env->pc =3D value; } =20 -static vaddr loongarch_cpu_get_pc(CPUState *cs) +static vaddr loongarch64_cpu_get_pc(CPUState *cs) { LoongArchCPU *cpu =3D LOONGARCH_CPU(cs); CPULoongArchState *env =3D &cpu->env; @@ -356,7 +356,7 @@ static bool loongarch_cpu_has_work(CPUState *cs) #endif } =20 -static void loongarch_la464_initfn(Object *obj) +static void loongarch64_la464_initfn(Object *obj) { LoongArchCPU *cpu =3D LOONGARCH_CPU(obj); CPULoongArchState *env =3D &cpu->env; @@ -694,7 +694,7 @@ static const struct SysemuCPUOps loongarch_sysemu_ops = =3D { }; #endif =20 -static gchar *loongarch_gdb_arch_name(CPUState *cs) +static gchar *loongarch64_gdb_arch_name(CPUState *cs) { return g_strdup("loongarch64"); } @@ -714,8 +714,8 @@ static void loongarch_cpu_class_init(ObjectClass *c, vo= id *data) cc->class_by_name =3D loongarch_cpu_class_by_name; cc->has_work =3D loongarch_cpu_has_work; cc->dump_state =3D loongarch_cpu_dump_state; - cc->set_pc =3D loongarch_cpu_set_pc; - cc->get_pc =3D loongarch_cpu_get_pc; + cc->set_pc =3D loongarch64_cpu_set_pc; + cc->get_pc =3D loongarch64_cpu_get_pc; #ifndef CONFIG_USER_ONLY dc->vmsd =3D &vmstate_loongarch_cpu; cc->sysemu_ops =3D &loongarch_sysemu_ops; @@ -726,14 +726,14 @@ static void loongarch_cpu_class_init(ObjectClass *c, = void *data) cc->gdb_num_core_regs =3D 35; cc->gdb_core_xml_file =3D "loongarch-base64.xml"; cc->gdb_stop_before_watchpoint =3D true; - cc->gdb_arch_name =3D loongarch_gdb_arch_name; + cc->gdb_arch_name =3D loongarch64_gdb_arch_name; =20 #ifdef CONFIG_TCG cc->tcg_ops =3D &loongarch_tcg_ops; #endif } =20 -#define DEFINE_LOONGARCH_CPU_TYPE(model, initfn) \ +#define DEFINE_LOONGARCH64_CPU_TYPE(model, initfn) \ { \ .parent =3D TYPE_LOONGARCH_CPU, \ .instance_init =3D initfn, \ @@ -751,7 +751,7 @@ static const TypeInfo loongarch_cpu_type_infos[] =3D { .class_size =3D sizeof(LoongArchCPUClass), .class_init =3D loongarch_cpu_class_init, }, - DEFINE_LOONGARCH_CPU_TYPE("la464", loongarch_la464_initfn), + DEFINE_LOONGARCH64_CPU_TYPE("la464", loongarch64_la464_initfn), }; =20 DEFINE_TYPES(loongarch_cpu_type_infos) --=20 2.41.0 From nobody Mon Feb 9 03:09:34 2026 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=1692367935; cv=none; d=zohomail.com; s=zohoarc; b=WMHqGknOxi0uOti4xPlnHysA7bbvgn898T0oH8s/jkvrTKUdWDUiiXV1yfxXnTFD9rPgu48kZfxkRKSWsB+f9nXzUzw4+3nLvaNwE9CsOjBbx3xn2OOa4LSQvJmGZBAelsHr1vX9fBp+zN9Jpzt8NcR6niwayZl9XLyflWhK4UU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692367935; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fW46fogpRD0z/3au3liqhnlpv4cot2Ttk3TraxBL1oU=; b=F+vec4nQQn3Bhf298X0mACcx6Ha5/5pAulbwBATfjY9wSiWZq4+W/mNa9DC2mUQKygdd0+J3YJOw8SPg3IR2iqtT8ryRgV+J9TJx7pWuPu6y/2V3FdXOJYcqRVjnPnjoxycb3P7oxIvOjagJWNv3RmH20I4X+DCaa9SoUk3kZB4= 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 1692367935126222.68307996558747; Fri, 18 Aug 2023 07:12:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX05n-0004yD-DS; Fri, 18 Aug 2023 10:04:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWwol-0006Nr-2W for qemu-devel@nongnu.org; Fri, 18 Aug 2023 06:35:00 -0400 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 1qWwoi-0002ye-6j for qemu-devel@nongnu.org; Fri, 18 Aug 2023 06:34:58 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fe1fc8768aso7190605e9.1 for ; Fri, 18 Aug 2023 03:34:55 -0700 (PDT) Received: from localhost.localdomain ([92.88.170.41]) by smtp.gmail.com with ESMTPSA id n24-20020a7bc5d8000000b003fe17e04269sm2371236wmk.40.2023.08.18.03.34.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 18 Aug 2023 03:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692354894; x=1692959694; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fW46fogpRD0z/3au3liqhnlpv4cot2Ttk3TraxBL1oU=; b=nHCqP+Xve8KUI4ERf6Zc+4QKEd6XZkDP7lTAPt7hPg/0n2oZDBL3Toa8jfRVJdJ84+ deMkyuCZrwvFeOHBD+OyUd2AJ/hC0IJbRaQEfPvrytAK/36sb89oYM8MbCi8CrqA9efR pdFH7aPhDJCjmozd0KEoco/q/qdI0FPTEtQZhSJZl7Vp3NKV4Drp5p2GOhh+jqJf1lLG bCpLoTNoMFDaoCTfk2PCAQlaY/5cZDD80wvIl/c6k0WvqusCvKbcfynsvBpmUEdgjSzU h1BhkC8nJJAN4Wz0lejbscD1W64/wDRTLBaSJSpm0rqk0SWUPnEtTwXug2RLVCPbbQF4 LXKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692354894; x=1692959694; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fW46fogpRD0z/3au3liqhnlpv4cot2Ttk3TraxBL1oU=; b=Wq79JMLqcHloGCABDG+YOJ5IED8q2EnwtnG6CbMmONwvCpfSTLoB7OfnX/JUbM5Oxc sETfaF/bkILxPVfW6v9p31UJPDsAlyk85v7OZMuW6ztSwE0TmPwC/EusYl9InAzZQwBI goN7FMQRsvMEwHekAfec6nxaggzKAEecUVsNhk+FRZMbCAx4/Jj6kDzyS1a26lfv7QcA NbnyRGsDw2taRrRkmfYDQjeQ46pU9a2IxC4Mmc1+Tiu1F8QS2XTXfkxX6RCOOu/+DoNr S5M/odYcDRoPbgDtYWXXWWHnJvnyVyJgLtz6xhPuDexAVKQFdnS9Gqfj/sFhir+c9r9I uejQ== X-Gm-Message-State: AOJu0YzN7er5TtqyYBHPvkywNZhfAcl8b6Q4LKKg+WuaX6Jxi4uYzC/X AzvysPJRwZF7fLR2+fs2CfeiSYYcWFAMM+JalWo= X-Google-Smtp-Source: AGHT+IHQIm9urRzeaZyic2I9sONKdzKjR5IN9T6/rZJIAaMNv+lwDjUtP7C7/96AMq9uxfz6No+ucw== X-Received: by 2002:a1c:7c0f:0:b0:3f9:b244:c294 with SMTP id x15-20020a1c7c0f000000b003f9b244c294mr1934808wmc.35.1692354894139; Fri, 18 Aug 2023 03:34:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Huacai Chen , Song Gao , Xiaojuan Yang , Jiajie Chen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/4] target/loongarch: Extract 64-bit specifics to loongarch64_cpu_class_init Date: Fri, 18 Aug 2023 12:34:25 +0200 Message-ID: <20230818103425.16271-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230818103425.16271-1-philmd@linaro.org> References: <20230818103425.16271-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: 1692367937202100007 Extract loongarch64 specific code from loongarch_cpu_class_init() to a new loongarch64_cpu_class_init(). Adapt DEFINE_LOONGARCH64_CPU_TYPE() macro. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/loongarch/cpu.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 19572e37ad..6bd5ca93fd 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -694,11 +694,6 @@ static const struct SysemuCPUOps loongarch_sysemu_ops = =3D { }; #endif =20 -static gchar *loongarch64_gdb_arch_name(CPUState *cs) -{ - return g_strdup("loongarch64"); -} - static void loongarch_cpu_class_init(ObjectClass *c, void *data) { LoongArchCPUClass *lacc =3D LOONGARCH_CPU_CLASS(c); @@ -714,8 +709,6 @@ static void loongarch_cpu_class_init(ObjectClass *c, vo= id *data) cc->class_by_name =3D loongarch_cpu_class_by_name; cc->has_work =3D loongarch_cpu_has_work; cc->dump_state =3D loongarch_cpu_dump_state; - cc->set_pc =3D loongarch64_cpu_set_pc; - cc->get_pc =3D loongarch64_cpu_get_pc; #ifndef CONFIG_USER_ONLY dc->vmsd =3D &vmstate_loongarch_cpu; cc->sysemu_ops =3D &loongarch_sysemu_ops; @@ -723,21 +716,35 @@ static void loongarch_cpu_class_init(ObjectClass *c, = void *data) cc->disas_set_info =3D loongarch_cpu_disas_set_info; cc->gdb_read_register =3D loongarch_cpu_gdb_read_register; cc->gdb_write_register =3D loongarch_cpu_gdb_write_register; - cc->gdb_num_core_regs =3D 35; - cc->gdb_core_xml_file =3D "loongarch-base64.xml"; cc->gdb_stop_before_watchpoint =3D true; - cc->gdb_arch_name =3D loongarch64_gdb_arch_name; =20 #ifdef CONFIG_TCG cc->tcg_ops =3D &loongarch_tcg_ops; #endif } =20 +static gchar *loongarch64_gdb_arch_name(CPUState *cs) +{ + return g_strdup("loongarch64"); +} + +static void loongarch64_cpu_class_init(ObjectClass *c, void *data) +{ + CPUClass *cc =3D CPU_CLASS(c); + + cc->set_pc =3D loongarch64_cpu_set_pc; + cc->get_pc =3D loongarch64_cpu_get_pc; + cc->gdb_num_core_regs =3D 35; + cc->gdb_core_xml_file =3D "loongarch-base64.xml"; + cc->gdb_arch_name =3D loongarch64_gdb_arch_name; +} + #define DEFINE_LOONGARCH64_CPU_TYPE(model, initfn) \ { \ .parent =3D TYPE_LOONGARCH_CPU, \ - .instance_init =3D initfn, \ .name =3D LOONGARCH_CPU_TYPE_NAME(model), \ + .instance_init =3D initfn, \ + .class_init =3D loongarch64_cpu_class_init, \ } =20 static const TypeInfo loongarch_cpu_type_infos[] =3D { --=20 2.41.0