From patchwork Wed Jan 22 06:56:23 2025 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: 859138 Delivered-To: patch@linaro.org Received: by 2002:adf:f78a:0:b0:385:e875:8a9e with SMTP id q10csp200345wrp; Tue, 21 Jan 2025 22:57:09 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVkzeP1DZBu1rN968jrVpBceCHBnkANfEdSgyx9nYv2ZeRKYf19uE9QaV3G32Nz4Tmgo+ZPGQ==@linaro.org X-Google-Smtp-Source: AGHT+IEDRciUGbJuw9C+JumLOE+12SP41eb9V23zTwbf6OqhEFtykuCXja0Es6cDyCk+T8+COlHW X-Received: by 2002:ac8:7dd0:0:b0:466:b395:fe with SMTP id d75a77b69052e-46e12b76447mr273977251cf.35.1737529029402; Tue, 21 Jan 2025 22:57:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737529029; cv=none; d=google.com; s=arc-20240605; b=T+2brZJr5NrxFNHxiAa39hp42bCpOGWMkFy0Hm2aRqwic7e+bzgMOE5fdAuxbIr79H fD+PV5g61icCNdFsxlxaZ8Re12x4ant36QLCECXVULRj9h3NjXeUACZlkaHkTazGEcGi h9bDRd6j2qSd/Sh4NFbt9CuZQFKH3F8dZczgVfIAJdVV9gRzQ6xUxB7E/14Onn5bUW95 DERq77jSasS6pFX8qu7cZ7tr3EVP95vHnOV4JwuX7kFTXfTtotrxqFjQA7FbxaHa+gPN k+X6yy2/aF6C8ZgIq/rPbmC/K4D5O6GZeM45cs+9R8uWJNA+rA6HkjYQOUB8TamqyMC4 Ug4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=JhkcSpkbNbYstwLK+TiU/Bm2tD0SpN+f7v0biaDhmNE=; fh=ep02GpjIGXh4Q89plDtZuPjaBX3AlIwAyQ96fi6Kvng=; b=Xb5+Sa3KWw2pBYmq7BqRTWv22iBaSXWNhJPgCDJD0u0Oaf2eC9wEK2AqcAmnahJPR5 iQXjUcA59tTXaAhWawQvdKUkk0RnwGP8q0qGW3r06YrEb/UwEWo9Llo6gLBmqtEzamc/ 7a3fP2u6bD0i97VHqfsDN3KV4Ol4HAl8YJ1oj5W8Se6Po997bkO4MzvUa8VTuqftciBn vYjA4PpScqLVxMktMIqxM6aL2PwlO/1cqckXKFg6PwFInwU+YjCF54IOqNRXp7oUGg4d BVu1PTA8XDrLyczaG0oc3CrKbD1YtbR6zyX0Zx35D4nLCXg4gkwVvkt6u3E7VDQoJcqJ 4btQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=guVkWcuq; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afd1fe70si143056306d6.492.2025.01.21.22.57.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Jan 2025 22:57:09 -0800 (PST) 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=guVkWcuq; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taUfE-0006VF-BR; Wed, 22 Jan 2025 01:56: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 1taUfC-0006V4-OG for qemu-devel@nongnu.org; Wed, 22 Jan 2025 01:56:34 -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 1taUfB-0004qh-Bi for qemu-devel@nongnu.org; Wed, 22 Jan 2025 01:56:34 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-436326dcb1cso45305225e9.0 for ; Tue, 21 Jan 2025 22:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737528991; x=1738133791; darn=nongnu.org; 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=JhkcSpkbNbYstwLK+TiU/Bm2tD0SpN+f7v0biaDhmNE=; b=guVkWcuqYr5F7cZ/cXNo/bUddijd2zEoQltMpIho/5lIPLtLObUlSYI7F28wNb3Aqo ZlExEzDLfH1yGb4wMcGLNW014YctihBSvjyqBTAIGwDIB3EpY614c1ND2qWYqOd7zOrx 8qZXkJ8XAsFhUEsE89iarp8T6hKTjyIQAoVOLvncVsSTK8pskMO+r0ecZBD4Bv7FqhMf /z8RdUZVP08XVNHrypfpe532wkoUmHnCfRc5NwuD6EKA/XtaLxU1osRzeW2I5SY21czj uQ2b9qI84OAaWw/OsQllumU5Qrnw6h9gIC9vkFF90WH/Gth47QAsH8B0zvxPGG4eTEpK OSzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737528991; x=1738133791; 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=JhkcSpkbNbYstwLK+TiU/Bm2tD0SpN+f7v0biaDhmNE=; b=AXENNwI7F12M/INKHymeR8q9N0b9FGPMPZQfTRo2qQY+RE2Rw516O+q8A5Ab1VLYck M6tQIZZtL/F3cS6AAILhaWCvBWBE6meSpa8lb/jFjBEaaOeffsMowkXLp9EeORVwtCC8 +toPo2OA5dtA7WXVvtXLV/IxOfMt09LQIkfdgU7TrzHOYj3iLMGIvkwKWY2MGjTaI07H AIEAKzG1XWO+yRe4KyUqOgi15ad2JhQN3WMFcV9s5shiUkuPKxy/KMAia7frQ+gedYF2 C10RqNAnxvp841GE1i1L5N12kQ9URTByFbBqhXmiIcYVQFdD0gxKt4nnzT/LYfT65Vse 9Prg== X-Gm-Message-State: AOJu0Yy8nd5GYp+qbvrL7ZlXd2+G3aqWv2zYi/W12d/M6WotvZWFnPpa sTP6zcb2DmBwerPRobqg/0ptDkNBhCJM5OVx6OIL7eIGYiifvFbozkC0Q/y0LQ6Rid3rHPk05BY OM5Y= X-Gm-Gg: ASbGncslHYTWr+QrxyD1yNsylB3MrBdkIu8wEH4VkDvmoHzDGaTmHFGrOMaAfNP5Vy8 C1BMe9ZwLu4iFXhSwKq2OfiB8kqSFHXXhW6XceVdFSzsOemOAT+dlcVd0em+NundFMCT+VqGyfV 1PT7wSOXwujKWGQ62aWTOoFOgJZLzKguYpaaVoR/JKxpuuPk+22BT3YEMjD5oTt5iN8qBp+7BGG dVPI+dbpC64IT9Yv2ywIeLKtEYZVltdPM3AyBYf51LFNOhVGocJr104A4iMmk1RHUuKm53UyoLV 9uTyiqt5TfO79q/bCPReknjo/qsMuu3VL1HDy1HQ+2z7 X-Received: by 2002:a05:600c:450e:b0:436:1ac2:1ad2 with SMTP id 5b1f17b1804b1-43891427485mr161877285e9.19.1737528991492; Tue, 21 Jan 2025 22:56:31 -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-438b31af70dsm12479435e9.18.2025.01.21.22.56.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Jan 2025 22:56:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fan Ni , Jonathan Cameron , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] hw/cxl: Remove unused component_registers::io_registers[] array Date: Wed, 22 Jan 2025 07:56:23 +0100 Message-ID: <20250122065624.34203-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250122065624.34203-1-philmd@linaro.org> References: <20250122065624.34203-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Avoid wasting 4K for each component, remove unused io_registers[]. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/cxl/cxl_component.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/cxl/cxl_component.h b/include/hw/cxl/cxl_component.h index 945ee6ffd04..ac61c3f33a5 100644 --- a/include/hw/cxl/cxl_component.h +++ b/include/hw/cxl/cxl_component.h @@ -218,7 +218,6 @@ typedef struct component_registers { * 0xe000 - 0xe3ff CXL ARB/MUX registers * 0xe400 - 0xffff RSVD */ - uint32_t io_registers[CXL2_COMPONENT_IO_REGION_SIZE >> 2]; MemoryRegion io; uint32_t cache_mem_registers[CXL2_COMPONENT_CM_REGION_SIZE >> 2]; From patchwork Wed Jan 22 06:56:24 2025 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: 859139 Delivered-To: patch@linaro.org Received: by 2002:adf:f78a:0:b0:385:e875:8a9e with SMTP id q10csp200373wrp; Tue, 21 Jan 2025 22:57:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWCyIlz7fQCj8A2wKa4Zk6z6WyZInYG9xTVeanewZl5JiF9uWoyNOKLLwMvmUMs4K1eZwxr0A==@linaro.org X-Google-Smtp-Source: AGHT+IEffR1QTDDOr3GxyqzFVSSvzPLWn5GmDwXp/IsReP5P1b4mLRPovGl88dR5T3MI3Lqhw/zC X-Received: by 2002:a05:622a:58f:b0:461:3653:54f with SMTP id d75a77b69052e-46e12a0cf30mr344837281cf.11.1737529035265; Tue, 21 Jan 2025 22:57:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737529035; cv=none; d=google.com; s=arc-20240605; b=RjEFN3kSbD68RspptHxFtO0IxADdGUpnYLFTiLMRA0q3WauassIioTAvwysKs4aG8E 6+VaQFSs0DlLBoiNOj7s1gjDuHUeZJvbUliZ869tB9VgEjzhU2KeBQcs3A/zEZahFTrc YNZZtf0UXgxe3+vxLhUmEd3yL2CGdkcIwU3nHuQszY9ZsrUyFwHPwTQZmCbX3hs41Rfd FjfAk6dZAPIDMIPI2mJC0xxYV8lg7Q/7qu52BAUYc6gy7s3vvO3TouYsLXzAwh4T+cIZ 2vHCs6Ju9/F388FHLO/vm7gE9cSggZhXP/BVgJDRFwKMT27s6oBCqbJ04OXDF79D5WEq QKwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=tjh5IVOBSPsoqIOCCYuc+Rv5XXY/OFaWEQyojhKRV8s=; fh=ep02GpjIGXh4Q89plDtZuPjaBX3AlIwAyQ96fi6Kvng=; b=F41rs3bV/Su3R0OUNW1mclDBJzIkIS3LpkkcFTzrBOlNvJtlpqfYq0rdJ75v5SN2g3 9DAWYQG5keEh3scho56pkq87Pw+3Qy1ZanP0l1BbJ9DqdZFR6c2SQampKZCC3sX8nGiL 5Vg8cgd5RFa9C90X2+xx+a8t9wxaPdCFIREseLweAkKWhgra/a/Bv/gOgazKMu1sKf9d p53I7ccrKYWG0mGK+1lgrJyeDC/nyfp234F+Z7o3SJRAzCRgkj5wnG/BxlIAKPKHAzp9 Aipn1/I2yMpXEtX/hdzLSpFCJha2HmhIYDp/B8xXyqQcDqiDitQLm9hXAiLEX/CLXp4r 66kQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YukDnHI0; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e26976502si93887091cf.51.2025.01.21.22.57.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Jan 2025 22:57:15 -0800 (PST) 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=YukDnHI0; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taUfL-0006Vk-H3; Wed, 22 Jan 2025 01:56:45 -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 1taUfI-0006VZ-FM for qemu-devel@nongnu.org; Wed, 22 Jan 2025 01:56:40 -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 1taUfG-0004r4-Ml for qemu-devel@nongnu.org; Wed, 22 Jan 2025 01:56:40 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-437a92d7b96so64296715e9.2 for ; Tue, 21 Jan 2025 22:56:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737528997; x=1738133797; darn=nongnu.org; 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=tjh5IVOBSPsoqIOCCYuc+Rv5XXY/OFaWEQyojhKRV8s=; b=YukDnHI0g0NWcRdEPUo7fg+Iuu792CjZ3weP+Umc0kp4Vudt0WVCbaLGThW83Mw2LF k0Wg8dMgVOd6tevUqF/pT41cyNBYtE1sOMbRChSKtNfdsYLYADquhBzL/0kSIlEa2r4O lcS01hPVnW5A40XOVKNmSwj1Sq/i/XMvQ2JvGXuc7VqhxvNPn/1svAaE2eLiVpFkFfos 3bij9ynL5C67euqkIW4kUsnp84DUZO2HcHUzo8QD9EY7OxDg5J6mAm2DdsKlBpxhvHgP 9WHN5Vz/monMwAPqjiNUwV3MOkQgDcfIKvrJRJcr1OsoMzrS+PX7xHq+RoCkebhQAcXC /MVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737528997; x=1738133797; 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=tjh5IVOBSPsoqIOCCYuc+Rv5XXY/OFaWEQyojhKRV8s=; b=t2DUtZPrIZ/UCpbY9eyERK7g3xAZbr9FGq6ujMmVx6JSFTaqp1OgMxtAY492p7sgVu gDNyUq4ce9C5USxC62hr+tDei5RBVDOG+8LYM3u22iyeL4jU0DZVJF13v/a45MnM24/x LjJVC9gn+5WgLugjKzNB6peobzso+GZpWQtJqz5QokNBZmo77w8TpRpILa7XcDkR2psE D4tLgjGAvzukR/06KTnDMxWOmPK28316COS5NQmjhbZ3jRRtmbqtyPgf5DYAXTEQHT94 ufc00mveGNtQ3rLprCK6LBhO7G+a+EAkitzwvifiOCGa3vwac9rYdv7tQzUOnfP2bGw8 OMtQ== X-Gm-Message-State: AOJu0Ywt/nfXlXUhh1j1EI0+5q0Gj/GAiJMwOjpDowhA5u2a5U5j0fax 3RKIKC+fXWc7wK4l+W2KWGj/kX6IgEurOBfbidXXRv1SzEVX2RE3PL0e87zCAtVMJnplGo75rWo /7M8= X-Gm-Gg: ASbGncs/lXBgESKHXT6OIyrXzO2/69JVoKzNv1IeUFsb13xGIIG+5EiIUG+azbs1zuY FrhWn/7B7hbsfz3xdRgsBMFAiGXfyPVZ2h/7YuJVrRgNaEoTcqNMxS6RZ5d9b5XDffo/6AumjB1 oJsQvjh3K2pHHXeYFqm930x+92oa9nNUDe42hBf0H3l+oeEYqlEmxuYzqYK9Oa23o0U+jy2lEY8 0HwUZP/u9RP0floYiK+2dSMOUgcYER01x0o7AqfHAAHmz65tNbaNpgM5e2Y/DNYC5yaymUC9UL0 vid1z2HniVKn3MPOp1lOGaOhzTP3KtP2m5epUdX4aaK8 X-Received: by 2002:a05:600c:9a3:b0:434:fa73:a907 with SMTP id 5b1f17b1804b1-4389191b819mr182618535e9.13.1737528996711; Tue, 21 Jan 2025 22:56: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-38bf32845e8sm15666718f8f.97.2025.01.21.22.56.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Jan 2025 22:56:35 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fan Ni , Jonathan Cameron , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] hw/cxl: Allow tracing component I/O accesses Date: Wed, 22 Jan 2025 07:56:24 +0100 Message-ID: <20250122065624.34203-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250122065624.34203-1-philmd@linaro.org> References: <20250122065624.34203-1-philmd@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Map the component I/O region as UnimplementedDevice to be able to trace guest I/O accesses with '-d unimp'. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/cxl/cxl_component.h | 3 ++- hw/cxl/cxl-component-utils.c | 14 +++++++++++--- hw/cxl/Kconfig | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/include/hw/cxl/cxl_component.h b/include/hw/cxl/cxl_component.h index ac61c3f33a5..54fd369a838 100644 --- a/include/hw/cxl/cxl_component.h +++ b/include/hw/cxl/cxl_component.h @@ -18,6 +18,7 @@ #include "qemu/range.h" #include "hw/cxl/cxl_cdat.h" #include "hw/register.h" +#include "hw/misc/unimp.h" #include "qapi/error.h" enum reg_type { @@ -218,7 +219,7 @@ typedef struct component_registers { * 0xe000 - 0xe3ff CXL ARB/MUX registers * 0xe400 - 0xffff RSVD */ - MemoryRegion io; + UnimplementedDeviceState io; uint32_t cache_mem_registers[CXL2_COMPONENT_CM_REGION_SIZE >> 2]; uint32_t cache_mem_regs_write_mask[CXL2_COMPONENT_CM_REGION_SIZE >> 2]; diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index cd116c04012..6d593475d00 100644 --- a/hw/cxl/cxl-component-utils.c +++ b/hw/cxl/cxl-component-utils.c @@ -192,17 +192,25 @@ void cxl_component_register_block_init(Object *obj, const char *type) { ComponentRegisters *cregs = &cxl_cstate->crb; + DeviceState *io_dev; + SysBusDevice *io_sbd; memory_region_init(&cregs->component_registers, obj, type, CXL2_COMPONENT_BLOCK_SIZE); /* io registers controls link which we don't care about in QEMU */ - memory_region_init_io(&cregs->io, obj, NULL, NULL, ".io", - CXL2_COMPONENT_IO_REGION_SIZE); + object_initialize_child(obj, "io", &cregs->io, TYPE_UNIMPLEMENTED_DEVICE); + io_dev = DEVICE(&cregs->io); + io_sbd = SYS_BUS_DEVICE(&cregs->io); + qdev_prop_set_string(io_dev, "name", ".io"); + qdev_prop_set_uint64(io_dev, "size", CXL2_COMPONENT_IO_REGION_SIZE); + sysbus_realize(io_sbd, &error_fatal); + memory_region_init_io(&cregs->cache_mem, obj, &cache_mem_ops, cxl_cstate, ".cache_mem", CXL2_COMPONENT_CM_REGION_SIZE); - memory_region_add_subregion(&cregs->component_registers, 0, &cregs->io); + memory_region_add_subregion(&cregs->component_registers, 0, + sysbus_mmio_get_region(io_sbd, 0)); memory_region_add_subregion(&cregs->component_registers, CXL2_COMPONENT_IO_REGION_SIZE, &cregs->cache_mem); diff --git a/hw/cxl/Kconfig b/hw/cxl/Kconfig index 8e67519b161..d6c7536001e 100644 --- a/hw/cxl/Kconfig +++ b/hw/cxl/Kconfig @@ -1,3 +1,4 @@ config CXL bool default y if PCI_EXPRESS + select UNIMP