From nobody Sun Nov 24 10:34:05 2024 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=quarantine dis=none) header.from=buaa.edu.cn ARC-Seal: i=1; a=rsa-sha256; t=1724581399; cv=none; d=zohomail.com; s=zohoarc; b=F4emGMrgvp3zu0jR0YdRb3jsyLg5WUqPkKa9Qh6NLXTOoJ7Uf6Yom0G8QT3SG/fNLd92L7mkLxp+3Q2SybZcp4Ofu6/80qB320DC7+suvhlDoNstHZbhoLeAbNSM0ng1DrNqM04RlLT5Tt+JglV4B0GJz7U3t23Ia0tTFmtJ020= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1724581399; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ughe4HkEcCtqRyRZ7fpO9i+fyOFkw7Jk4xY6EMQZZdo=; b=WKGZq1lk3T79ex2csMcg+u5uzlgGlj/+ZZR18zS2O14DbcqMuOnEyEbJSoSCU3gIoVCJ5YnTh/KyOfG/1z+FldeeEcbsJMyV87n+UE9NPOXyv7wubtUa83xQpTARj1MZhy2BmnwrO+xrCVuox+E1Qf6zveFaqiXXq8tkw1dUXz0= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1724581398258984.9794609721287; Sun, 25 Aug 2024 03:23:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1siAOH-00009I-E4; Sun, 25 Aug 2024 06:22:33 -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 1siAOD-00007w-01 for qemu-devel@nongnu.org; Sun, 25 Aug 2024 06:22:29 -0400 Received: from zg8tmtyylji0my4xnjeumjiw.icoremail.net ([162.243.161.220]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1siAO9-0008B0-VL for qemu-devel@nongnu.org; Sun, 25 Aug 2024 06:22:28 -0400 Received: from gp-VMware-Virtual-Platform.localdomain (unknown [139.227.253.185]) by coremail-app2 (Coremail) with SMTP id Nyz+CgCnmibVBctmh4yDAQ--.6641S2; Sun, 25 Aug 2024 18:22:15 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=buaa.edu.cn; s=buaa; h=Received:From:To:Cc:Subject:Date: Message-ID:MIME-Version:Content-Transfer-Encoding; bh=Ughe4HkEcC tqRyRZ7fpO9i+fyOFkw7Jk4xY6EMQZZdo=; b=GDWBQRny6pY+74Kl6wNQvDoVN9 vniPzxtXWAWNEcPn9irm0Griswry4jq3uSVCtv2E9wtwizyi11M73t/2HMQtGFOk 9fgw/QxhWsxoA/pFFBK3j8TjZ+HQFVZj5HwBZDCZLqp+SrwbuE+pW56CUv/uG0BM GRBcYb9OT4d7hDZd8= From: peng guo To: jonathan.cameron@huawei.com, fan.ni@samsung.com Cc: mst@redhat.com, qemu-devel@nongnu.org, linux-cxl@vger.kernel.org, peng guo , Jonathan Cameron Subject: [PATCH v3] hw/cxl: fix physical address field in get scan media results output Date: Sun, 25 Aug 2024 18:22:12 +0800 Message-ID: <20240825102212.3871-1-engguopeng@buaa.edu.cn> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-print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X-CM-SenderInfo: d2isijirrujqpexdthxhgxhubq/ 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=162.243.161.220; envelope-from=engguopeng@buaa.edu.cn; helo=zg8tmtyylji0my4xnjeumjiw.icoremail.net 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_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L4=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 @buaa.edu.cn) X-ZM-MESSAGEID: 1724581404165116600 Content-Type: text/plain; charset="utf-8" When using the mailbox command get scan media results, the scan media=20 restart physical address field in the ouput palyload is not 64-byte=20 aligned. This patch removed the error source of the restart physical address.=20 The Scan Media Restart Physical Address is the location from which the=20 host should restart the Scan Media operation. [5:0] bits are reserved. Refer to CXL spec r3.1 Table 8-146 Fixes: 89b5cfcc31e6 ("hw/cxl: Add get scan media results cmd support") Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/linux-cxl/20240819154206.16456-1-engguopeng@b= uaa.edu.cn/ Signed-off-by: peng guo --- v2 -> v3:=20 -- Resend +CC qemu-devel list and Michael Tsirkin. v1 -> v2:=20 -- Add module name to title. --- hw/cxl/cxl-mailbox-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c index 3ebbd32e1028..9258e48f95ee 100644 --- a/hw/cxl/cxl-mailbox-utils.c +++ b/hw/cxl/cxl-mailbox-utils.c @@ -2076,7 +2076,7 @@ static CXLRetCode cmd_media_get_scan_media_results(co= nst struct cxl_cmd *cmd, =20 start =3D ROUND_DOWN(ent->start, 64ull); stop =3D ROUND_DOWN(ent->start, 64ull) + ent->length; - stq_le_p(&out->records[i].addr, start | (ent->type & 0x7)); + stq_le_p(&out->records[i].addr, start); stl_le_p(&out->records[i].length, (stop - start) / CXL_CACHE_LINE_= SIZE); i++; =20 --=20 2.43.0