From patchwork Fri Aug 18 17:20:09 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: 714675 Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp632215wrs; Fri, 18 Aug 2023 10:20:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5AivVtPAec8jVrzgm4lrgHwg4SedDcD0pMFra02+7xm59Lnnp1H825kcCvAmmwBZ5CDp4 X-Received: by 2002:a05:622a:486:b0:410:bfe:a462 with SMTP id p6-20020a05622a048600b004100bfea462mr3783828qtx.27.1692379251588; Fri, 18 Aug 2023 10:20:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692379251; cv=none; d=google.com; s=arc-20160816; b=tB4x2cM3i4cDhPwom79xnr1bgIAYLQ94VrRpnBxiGAJZ/O8Mrc09GQbI9VdF9dX1Sy ZgT8N5O2s/YGX74IQpUtYTR1yIwuyXONdyO08ycudozx3LAYsqdIB94/VuWw2wM26RSb lbCklTsxwVn753Tq8F5UvoapQqnJNVe/z8Ox9mI0NiA+c07mT0oreE+McspwZXBQo3ln GbyJ+DKT8//ZVu6mjomNqOoPokM2aqdOTrWD51d9aZTwre7WaiYucG5YoQYzRJAjjvRM ygXUhfS8jYPYGjMFJJmESV3arC3fhupRYQk9rg+TzYeLhpU7UHsCazo6oJ9zUVc/ZOQG N7dg== 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=L83jzy0hhBVNaLcKX8Elyc9wPnQzNxExr67xNuVQva4=; b=PYaD6y+sTKByNDw8lpAmlZneiGu1M5tN/GbmSyqzts5rk+8KOTl8Z/3svcxazIVCHZ g9/+qNKn+uuxWaZfbwiK3jIhAiNG0RORkFH0WOzZF9L6S9wfy26W1nHlcHbpw8yj5uhW IXjAhYHT5XLz7wBNGq3gYG3ECeZIMaOhm0qt9IWZUzwH1yz0AKu+eNqr0IG9mn84g9se V8sYyl4ASVnXzh00V3dYIPtA5fK4ArSN7R+kq1t7C2cOOa3N892TEeJSPwnJrWkBqvi2 Iy4O1SCkvO+yF695u5xfkhzsKUhcAKlfR1m/U226Ng6jzAE8A0Rdxc9KhF12prr8NiT9 9kTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="N/xlX/0U"; 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 y14-20020a05622a004e00b0040343612a64si1538706qtw.12.2023.08.18.10.20.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Aug 2023 10:20:51 -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="N/xlX/0U"; 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 1qX39U-0004RX-BW; Fri, 18 Aug 2023 13:20:48 -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 1qX39C-0004Jj-MK for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:20:34 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qX399-0001fN-6H for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:20:29 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-99bf3f59905so146858366b.3 for ; Fri, 18 Aug 2023 10:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692379225; x=1692984025; 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=N/xlX/0U5f7k4DLrB8XbfHpLf8mI3p/OyDl0Qzv4kpd2xATdEJuxHuWiafAyxQGj0g DFC+KSipTcoOdmcey74UlgCF5opDOzEMWInJmkJsaK99Fd1jWG2rnvr3OQrDlJ9TCY61 8Yyk4v4t2Px8cDMIrk83TO0uSRuLdTfFuzJsv6BohYjA66T8dfLPMz07gTY2mxbZh3e1 rTeQ+UVH7cuzir8Fu5OrBYQ/mEwv00Jk05npXroOdZqe6kcxV8zFgQo7PQbKL5DO09I4 lwawbgd/1Y8xSX/yXJ8zjURFdiIli8Spk21pb83f6N87L3bMYtN7k5WpzGCQbHNJd6DE UXiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692379225; x=1692984025; 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=YKNVpH6Fbm8AouKuFSuFXVcID/u4czndlEowDhwiBZ03AJa5Er/4UBaEWAQZ0SgMK/ UZxBR2EXqxKyoR6/u3oP9g8MV4nzsnM6hz/pGoHTj80KNVCpt44BHP4+fU7Ig5/cXS/K sD5BpMxgf75cb+ZCOa6ZMMJ7DrvZIlmyRbYtq2OZ2xN/5WyIBhmVZ/hslH5Je5dQwgHs P2HwBLLN/V/vregmW4OAj9XUErGXniiXaIpuGODLEW212wowb2luuaEYZ8gG0k8iv/Q5 9vguQjFjuxsVFguFXEeKA0pHwLCyo/uYk2o/VLoNPGjgrWDNaAqAbGuhmDDgSyC/yDwT Q6QA== X-Gm-Message-State: AOJu0Ywkv+2EIiJaF0nShtJopFG99CqmeCQeRI+CtLaove/jAe6ox1ZW XlDDOBzJq+W4fBsyDvj5kpH1gXhtmi+OMxiMhJo= X-Received: by 2002:a17:907:75cc:b0:99b:4668:865f with SMTP id jl12-20020a17090775cc00b0099b4668865fmr2330966ejc.10.1692379225214; Fri, 18 Aug 2023 10:20:25 -0700 (PDT) Received: from m1x-phil.lan (cnf78-h01-176-184-27-79.dsl.sta.abo.bbox.fr. [176.184.27.79]) by smtp.gmail.com with ESMTPSA id ja24-20020a170907989800b00992b8d56f3asm1429260ejc.105.2023.08.18.10.20.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 18 Aug 2023 10:20:24 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Huacai Chen , Xiaojuan Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Jiajie Chen , Song Gao Subject: [PATCH v2 1/8] target/loongarch: Log I/O write accesses to CSR registers Date: Fri, 18 Aug 2023 19:20:09 +0200 Message-ID: <20230818172016.24504-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230818172016.24504-1-philmd@linaro.org> References: <20230818172016.24504-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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é Reviewed-by: Song Gao --- 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)