From patchwork Fri Aug 18 10:34:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 714631 Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp523364wrs; Fri, 18 Aug 2023 07:12:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTMdNpn/sCi9lWLd6swTrC0R7QydzPHfk0Oebnz+hH+t6S1edvIH7ysaCudQXi5ahxz25C X-Received: by 2002:a1f:df42:0:b0:47e:8a9:478c with SMTP id w63-20020a1fdf42000000b0047e08a9478cmr3004019vkg.16.1692367948139; Fri, 18 Aug 2023 07:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692367948; cv=none; d=google.com; s=arc-20160816; b=ys+O6kjC9aGX1Aik9DVvnluMmHPhtfTEV7K4LdyFZUGFOYJCsOgBX5nNUuye3gHYPW Bm0vxKyHx4/sGk0IZrKzCaY5+eRNRSRPl/H3jOhFeXg5Nir2MtfK52AKOUsDJEj1OKMa p3AZ2BLYU9Jm/GifbqQW3OqslNHt58LurT2k3+BgBlgeeN25qDzzeX4dhu/RrjNeNf66 l7Ze/KrEUvTbLIFKSaOfYymMt51TTgwxoHy9kn72MJidblnuFch0m2JD+S+gsNa1VwVE 3olpYLMY1i6j0LeT39xqEEI9q73x3kyhcUpY9X7YZUf8Yx9SK63feF46tYaA9d91kVsn ugDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tvng4YPVMkWkkh2eZJ6qlqU3fIhQVOx369AKXLs8f1o=; fh=BVT+wNaEQ6DYU2fJ+3RLrSAfhPFgaPFe1wC3+pPOUB8=; b=foySyvi7eodcz7bmJ6VWtLkEq7/f1YibrW6QzaIoBe1sXk3mBdOhevB012LN5PSNJa 6C/BMU+sIyOWD4tlYZHERCfmK8RfWMcDQn3Kw+kN6LvHdI/lvgyfrq1H5SOiu9/HHh+i woOqQLEEkzfVdxjvOY85ao0wSFBb7iuK8W3MprAIcQunSZIXGkyB/dPw/B1ywAUjoqtQ cKYKaoN9RrTuyupIJn0DvId5f9U5YXK6qlG4gwf5erZak6UBpcq88UUhsIStLn+cDGcR LrrzTrXUCSpOfCZBDO01YvqbO5VHnrl/Snww27BW37htfh4Bvxf1N/HFybuhTVeflmh0 feFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qiyJDYcF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b192-20020a1f1bc9000000b0048af91c36e6si179575vkb.176.2023.08.18.07.12.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Aug 2023 07:12:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qiyJDYcF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Huacai Chen , Song Gao , Xiaojuan Yang , Jiajie Chen , =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Various CSR registers have Read/Write fields. We might want to see guest trying to change such registers. Signed-off-by: Philippe Mathieu-Daudé --- 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, Error **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); } static uint64_t loongarch_qemu_read(void *opaque, hwaddr addr, unsigned size)