From nobody Sat Feb 7 05:01:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603214679; cv=none; d=zohomail.com; s=zohoarc; b=WkKW4LjpjmemV0JTlNFivWg8XJLcvUItr2Xh4TE1Bmir83CajeE3FNEwucBKJ9BBkgEin7Zzx9Gvm90mP+1CbBJLiArqf+Fx3EwUvSGRqXuKnpf67uyBBRwW5BJymZ/CAo5HkH3asIUHPmpTI+F6GdGItjUSjjUxHftCr9Nw7cQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603214679; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=4W8kZsSKWJcjh8HqyDoLc1LkrTctt68co791MXFzTk8=; b=G8hlW5oqg6eATq/NiGV95swb4Eno6CWrkupYJUMm9sz+WhBorfRhqCNDd9KdUpb70ThDO8ljB2xT7n7+iKDpywcyDan1VWCy+D4ip3YxP8qULX+Jm1V3N+OZhG/I0mVA/559t9NEgSXFkPmqvV+YdKNtNWjuImidLDiU6pCnERE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1603214679523674.8770435121198; Tue, 20 Oct 2020 10:24:39 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-596-eT2UwLS8NvuZ62vMo-tqAQ-1; Tue, 20 Oct 2020 13:24:37 -0400 Received: by mail-wm1-f71.google.com with SMTP id r19so697161wmh.9 for ; Tue, 20 Oct 2020 10:24:37 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (237.red-88-18-140.staticip.rima-tde.net. [88.18.140.237]) by smtp.gmail.com with ESMTPSA id p11sm3940667wrm.44.2020.10.20.10.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 10:24:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603214678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4W8kZsSKWJcjh8HqyDoLc1LkrTctt68co791MXFzTk8=; b=JmB8ykMD6NCbm0HEib2brv9/ZNcP4RvUPIjMilxuPsmHGim2OQwYG/S/8xKuXOlES/JM2Q RUrX7/tq8LnsYKNdUXkmrVMgb/gQmIWaP+pG/eejaIHnNOrOB3Wi0DOOpchllTtoskanaJ nXGTqKcUwBvPpdzYRbNYwPU9KCFwVY4= X-MC-Unique: eT2UwLS8NvuZ62vMo-tqAQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4W8kZsSKWJcjh8HqyDoLc1LkrTctt68co791MXFzTk8=; b=lOiQL1PS1/3mkNU8DR8roi0gpIfv4C22UCBBjYlB6wJE4k6/Nkns7toKMakgoLMf8m Bl+hKII6Ee9K3jScFP1DZ6pSyAmTQbWeVSCRrczqJNtwDiiMUihYgujUUmC3bIZQAcZs JmdGQr2rHn9jhWTPaqgpD+s1Khw4AcXjZrQ6I6aYdOiFeg0Fvn/l/bUw1LWeidCOkTb7 l2Jp2zyOO+sLFBG05/iTcyvfoV65BGLJi6cOJ7F/p+VWof+3enNG1P6pI1mSUzYzJNXO 36cPFwc6Kwvb6fe92jCap1QLFWXbRT3YSt6PZMA3OmK6DblVN1EXXuA187ufnslvtKzl 6HIQ== X-Gm-Message-State: AOAM532lvo4hUxbEld7+CWJK61J/ge5/gylpmgIIuNLcTW8RCa8iJPcY pjgmN/iP2AC/ppX1FgPOim94pZiXk4zThMrTytT6WqI6lwMeMwqfV4+zY3vkfOSlONYDaTINRTz jp9arlWHmnh2TTA== X-Received: by 2002:adf:f305:: with SMTP id i5mr4694387wro.346.1603214676002; Tue, 20 Oct 2020 10:24:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5IauIUEXQk0ERMzuRpB8broMsmB1ex+OysnPFWe959gKhHsJWl3VqAf44vKZAZweBHakFAQ== X-Received: by 2002:adf:f305:: with SMTP id i5mr4694358wro.346.1603214675825; Tue, 20 Oct 2020 10:24:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Alex Williamson , Stefan Hajnoczi , Max Reitz , Fam Zheng , qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Auger Subject: [PATCH 01/16] block/nvme: Correct minimum device page size Date: Tue, 20 Oct 2020 19:24:13 +0200 Message-Id: <20201020172428.2220726-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201020172428.2220726-1-philmd@redhat.com> References: <20201020172428.2220726-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) While trying to simplify the code using a macro, we forgot the 12-bit shift... Correct that. Fixes: fad1eb68862 ("block/nvme: Use register definitions from 'block/nvme.= h'") Reported-by: Eric Auger Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Hajnoczi --- block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nvme.c b/block/nvme.c index b48f6f25881..029694975b9 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -724,7 +724,7 @@ static int nvme_init(BlockDriverState *bs, const char *= device, int namespace, goto out; } =20 - s->page_size =3D MAX(4096, 1 << NVME_CAP_MPSMIN(cap)); + s->page_size =3D MAX(4096, 1u << (12 + NVME_CAP_MPSMIN(cap))); s->doorbell_scale =3D (4 << NVME_CAP_DSTRD(cap)) / sizeof(uint32_t); bs->bl.opt_mem_alignment =3D s->page_size; timeout_ms =3D MIN(500 * NVME_CAP_TO(cap), 30000); --=20 2.26.2