From patchwork Mon Aug 21 12:59:52 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: 715369 Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp1820341wrs; Mon, 21 Aug 2023 06:01:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHcf9BjJVA2HaeoOCVqngs9R7Y20WYhNCvGepcm+TbreoiX/CimE4qWzLOeD2aCV61PfIry X-Received: by 2002:a0c:f554:0:b0:64b:e16:a3cb with SMTP id p20-20020a0cf554000000b0064b0e16a3cbmr6691624qvm.61.1692622878045; Mon, 21 Aug 2023 06:01:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692622878; cv=none; d=google.com; s=arc-20160816; b=VXUG67T7qOtSIZ0GJABiOMIK1AwIe88iZzXsQEqDs5/CiKgBFexOaX8M2fPe/8RgkF rFS65QYuhMZZ3cdZyFRyeI2xs90t4AnbQQCwnVSffIyxjcf2U3Un8m4r+uYliuX5lKnX go9oirpMxgQavSXAmoOT4I5nBw4v4ghgk5Faxi3nTwvT7COVncrQjU8wO/ou2OPST91L Bu+6n46pT/b6PdjaZbiL9Mii0oYG10YiTEOuLPZ05+BbOWH9Ggd6yUajRohpaSDVa/YU 1yiV1iCjZqqP5bdacTCksk+0aBrwpAdpY+CowVZZ6vmynQ35KuKH53agKt3yJKVJrjW3 2Q3g== 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=ajIy6AXOv6OC/kq7WdoBWCKBE4f90n/4gU5LLrh9Jio=; fh=5DJtmzMNW8Fio4h4XCWPw7Xe5go+KHWZ7ZW95yGvlMM=; b=GVK6Cdwofh0fmlGLPKMb/eFfqH4jjvOL8SkheuUfuTVMBw7HKlj9RaSV2tWwhhCqOn kEnMNH3md4YcrDiqYmUQ+WM5OAOK9ulx8nXDCryWyKArsEN0IOjDKQMor+QywseY5uXW 2dA7WjecUzoh0KY3kiwOsq8Tg9xtpIxdzwKGTgWVBuI22bnOoAc3YUk/QJSmmZQXjdLR 8hs45CZkN2df+VjWrbVgJ2K+TVDhUJX7Ou22/3eYrFOEzuFCP6s5mxjTDQA9dT3NNmIR JjMgXI+05I2TEEjxdn88h8eGPpXnfNB+O2kF77bX4F3YyGlWk3ie3mUt6iXGzBDhRTJh sHoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YNk3qs6n; 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 b11-20020a0cf04b000000b00630229d25e0si4781032qvl.395.2023.08.21.06.01.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Aug 2023 06:01:18 -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=YNk3qs6n; 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 1qY4Wa-0000Mq-US; Mon, 21 Aug 2023 09:00:57 -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 1qY4Vx-0000BR-Ub for qemu-devel@nongnu.org; Mon, 21 Aug 2023 09:00:14 -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 1qY4Vv-00017A-OS for qemu-devel@nongnu.org; Mon, 21 Aug 2023 09:00:13 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fef56f7248so2025695e9.3 for ; Mon, 21 Aug 2023 06:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692622809; x=1693227609; 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=ajIy6AXOv6OC/kq7WdoBWCKBE4f90n/4gU5LLrh9Jio=; b=YNk3qs6nAFujYDmWCG9otiPJQYyQJYYIk0ky4VbhK63ao7MgP8S0cXOlJDsbT8GcB4 vLOLoa7VoY8jrOeYl+LvIAxXNTMkrW1oiDBsdUNfYwDo5kYHr6Zj4QpS3YpdUEMxNPxv xfTC+CDuD2ryEEJg+Um++bwZz8PxTPG8Pch0LGPGI7GsOJL91rZmX5BLvTc+uxCcOzUq WyQsAmvPgx3ArX+XwfcLFviq02cfGmntnAZVuBUWf+tflRtO4U/xv9+cRvtYwsQzabWE iTO189anKlvxjj/3/+/XyKxABsx0Ur6tE5mnXKM4QTe5RDl97FaMPgVYuk+ln5MVN07b rZ/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692622809; x=1693227609; 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=ajIy6AXOv6OC/kq7WdoBWCKBE4f90n/4gU5LLrh9Jio=; b=jiaJne9z2Agc4oOAySttB3RUWcdf8qrMI+rTGchm0nKzx/67BrUvDkpgZsnkbLyrzK o5YyT0tA/FPCGj0YAVuNlvDqdmScf1wY8w1AJZWP5rROsBCB8zGr+CJnEI8cVZf/UXNy C8YvpR2uwdmKB0Efu2rPIyUSKEqj8rABIlJp879jeJqZaEjXyOJ9zk2kwiIyQPxhdJZi E000OhE8yvQttGyzCrvipLkICigmCiAivJDx/m5QiwLbZFibiuhlF0Fn0/xDk1KEVxoU NPbe6N6b9OrZX6dlZmFwkSu+2qy+g4DzxphbOvI0Odhd4v6SMI81l3MBylaASaBahQyn Qj8A== X-Gm-Message-State: AOJu0YzIBPaOJjCEKLxYzcYTP/s9P4eCwu+gphZzwhtboee+XpgfmYNd rLsosGsttwwnnphZh/u+WA0Nb9PFPKJ7VMTn4v0= X-Received: by 2002:a05:600c:2901:b0:3fe:ef11:d79f with SMTP id i1-20020a05600c290100b003feef11d79fmr2830988wmd.36.1692622809174; Mon, 21 Aug 2023 06:00:09 -0700 (PDT) Received: from m1x-phil.lan (static-176-182-122-208.ncc.abo.bbox.fr. [176.182.122.208]) by smtp.gmail.com with ESMTPSA id f8-20020adfdb48000000b0031934b035d2sm12570855wrj.52.2023.08.21.06.00.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 21 Aug 2023 06:00:08 -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?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Song Gao , Jiajie Chen , Xiaojuan Yang , Huacai Chen Subject: [PATCH v3 1/8] target/loongarch: Log I/O write accesses to CSR registers Date: Mon, 21 Aug 2023 14:59:52 +0200 Message-ID: <20230821125959.28666-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230821125959.28666-1-philmd@linaro.org> References: <20230821125959.28666-1-philmd@linaro.org> MIME-Version: 1.0 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+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)