From nobody Mon Feb 9 08:11:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1613978165; cv=none; d=zohomail.com; s=zohoarc; b=BaChZK1Zh+0pwUpmFnorwBAAeBK+Ud1Po4n9VY7K1z6TYZzpRdV/kyocezbKWyzcP6LB810fwc2V2d/ZdfR0KCFHi7Rmf2epfAlozFDdg1pqpUJ9/oVOv6p16hUIhQyjipqxQ1CO1VtXbWqr1BJzG1olceujwqsIHQP7qvyKjBQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613978165; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VI393SK7a20Uzpl4ceRURsxlhnDBbb01vgkiJjlgaFM=; b=EaDn8YcMj1VIB9j6hDTT7BA3FPkAcK9pTrT0c4+3+KvuUa3LVej1zUTtdTniLB0s3bQbWU7ENbZ9WwM08djv3Fj6p/TzWkgLesbg2LIuSf1IjkcxFUeCJK4yMsUo8i+b4AzsSWmnIH+85st1M+ooPmqxXHr2fl+9mGoOuHlLIGc= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613978164752717.3297588657496; Sun, 21 Feb 2021 23:16:04 -0800 (PST) Received: from localhost ([::1]:58272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lE5Rr-0001sz-8k for importer@patchew.org; Mon, 22 Feb 2021 02:16:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lE5J7-0006fw-QO; Mon, 22 Feb 2021 02:07:01 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:37599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lE5J1-00030d-LQ; Mon, 22 Feb 2021 02:07:01 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9F2FC5C00FB; Mon, 22 Feb 2021 02:06:52 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 22 Feb 2021 02:06:52 -0500 Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id 5531724005D; Mon, 22 Feb 2021 02:06:50 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=VI393SK7a20Uz pl4ceRURsxlhnDBbb01vgkiJjlgaFM=; b=dlFRG1z2OTOHWGNLhvLj/B3cb7rCZ p0yMtw/rC2RQdlOLmIjNUBasyX6jCQJgQFWTRTBneqKZI/08cMktHa7tddWFyU3D guHq9TEtw4Zlv3C8LPkbXpma2uUK0fqmCUEpCmnj4jK6SQBRECBZW7LBdytL/ge8 9IyTMIrX2Gkfm18dOG7FhelF86a1q4SKuvVko5Wbuw0NUBdny38MqQmCkydfglnW 7k+QEQuyfjjAoNS5nVgzZg4fY+oTdEjusE6YYxCXqaxENe6H7VtPa91/7ZV6kgur Ou58knw5yc0ZxVyUQcjAx3YqbcesWaj663C/ywiRENCc44D+4OnkS6xRA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=VI393SK7a20Uzpl4ceRURsxlhnDBbb01vgkiJjlgaFM=; b=RMNsD7Mt gP4iFwn7c9gsaSYPthzWr8Wj7XY1uW0htvIUjhOIy1yWNvNeQS3v9FOKzXqYctId oUMcLJfHHVAkHnIpFPtjecTdc4YWm6YBnPUio+dFpzWOUubWuLxzyRW05/RAci+Q WhPRe0E0AlPDysbjNAmx76jC7hm7KXI/9s3J0tuG7x0CYguMafd9GAz8iulDcsuk 7cCWOOXeFGWJ0ZSxcFn+Q4CEqyQz432hL2yhjQFfV4aWJ8R0du7pkfQNWKK7slDR tHVvyt/Tz8KcMb/S1RYnKF7ahkKY2+f0EeCBgBN/bN/2d0HIJb/Q4Hza7R2SkUdY eIjh5VmTyINP+g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkedvgddutddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeeuleetgeeiuefhgfekfefgveejiefgteekiedtgfdtieefhfdthfefueffvefg keenucfkphepkedtrdduieejrdelkedrudeltdenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH 1/3] hw/block/nvme: nvme_identify fixes Date: Mon, 22 Feb 2021 08:06:13 +0100 Message-Id: <20210222070615.9177-2-its@irrelevant.dk> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210222070615.9177-1-its@irrelevant.dk> References: <20210222070615.9177-1-its@irrelevant.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=66.111.4.29; envelope-from=its@irrelevant.dk; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , qemu-block@nongnu.org, Klaus Jensen , Gollu Appalanaidu , Max Reitz , Keith Busch , Stefan Hajnoczi , Klaus Jensen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Gollu Appalanaidu Remove an unnecessary le_to_cpu conversion and add trace event for Identify. Signed-off-by: Gollu Appalanaidu Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im --- hw/block/nvme.c | 5 ++++- hw/block/trace-events | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 1cd82fa3c9fe..ddc83f7f7a19 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -3415,7 +3415,10 @@ static uint16_t nvme_identify(NvmeCtrl *n, NvmeReque= st *req) { NvmeIdentify *c =3D (NvmeIdentify *)&req->cmd; =20 - switch (le32_to_cpu(c->cns)) { + trace_pci_nvme_identify(nvme_cid(req), c->cns, le16_to_cpu(c->ctrlid), + c->csi); + + switch (c->cns) { case NVME_ID_CNS_NS: /* fall through */ case NVME_ID_CNS_NS_PRESENT: diff --git a/hw/block/trace-events b/hw/block/trace-events index b04f7a3e1890..1f958d09d2a9 100644 --- a/hw/block/trace-events +++ b/hw/block/trace-events @@ -61,6 +61,7 @@ pci_nvme_create_sq(uint64_t addr, uint16_t sqid, uint16_t= cqid, uint16_t qsize, pci_nvme_create_cq(uint64_t addr, uint16_t cqid, uint16_t vector, uint16_t= size, uint16_t qflags, int ien) "create completion queue, addr=3D0x%"PRIx6= 4", cqid=3D%"PRIu16", vector=3D%"PRIu16", qsize=3D%"PRIu16", qflags=3D%"PRI= u16", ien=3D%d" pci_nvme_del_sq(uint16_t qid) "deleting submission queue sqid=3D%"PRIu16"" pci_nvme_del_cq(uint16_t cqid) "deleted completion queue, cqid=3D%"PRIu16"" +pci_nvme_identify(uint16_t cid, uint8_t cns, uint16_t ctrlid, uint8_t csi)= "cid %"PRIu16" cns 0x%"PRIx8" ctrlid %"PRIu16" csi 0x%"PRIx8"" pci_nvme_identify_ctrl(void) "identify controller" pci_nvme_identify_ctrl_csi(uint8_t csi) "identify controller, csi=3D0x%"PR= Ix8"" pci_nvme_identify_ns(uint32_t ns) "nsid %"PRIu32"" --=20 2.30.1