From nobody Mon Feb 9 08:57:03 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=1603964084; cv=none; d=zohomail.com; s=zohoarc; b=b2PpbxmsRDY9+EnqnY/7qqn+4Q5HNk08K1UQqmCjs3vwiY+efiiLZpUesuTKHn8hfEriAdmobuQHp3WZmRvbsPGltwS+z3+vzaTc7vY7b9dv3DkNEQgtbctxy7PR6JBvlwLiAW+FFV5gxCwNShMgZQL1SCxwV/SsY+fTT6pQGYs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603964084; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=JSY478yiFOxfyipIIVIRTU0bevcPEjwiKUZ7hzso9Eo=; b=J73BYV063Yh4cs9QUyK2ZVm/I5EWY66ELmV813gnmEFfMRW1VzXs2/oLxvDlmwQwvncK9TSGWRBzKBEeYKSyerhbC74q9hfmSPM+kHeUzvItMbQVBxTqmmcAdRMyzZzElazTkR64vylxoQU/L5BTag5CmkwMJt9uuacKFKOBvBo= 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 1603964084789183.36386867853628; Thu, 29 Oct 2020 02:34:44 -0700 (PDT) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-WBzmK-DuNymZxgqb0SeuKw-1; Thu, 29 Oct 2020 05:34:42 -0400 Received: by mail-ed1-f72.google.com with SMTP id dn20so939692edb.14 for ; Thu, 29 Oct 2020 02:34:41 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id m19sm1145059eda.72.2020.10.29.02.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 02:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603964083; 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=JSY478yiFOxfyipIIVIRTU0bevcPEjwiKUZ7hzso9Eo=; b=NNBYfHeUJYyE5Yh5bUFB4D44RqCEXlNAkRKNTxRy4UJuRAHspxQ6PJhDBIZ3tC5pvKM0kS twmm2LBkYoUaFdV4TOs8pjUVZ2Bw2dQ0Pxh3mNt/Qx0oEV27tgUoF6IPrATezwDGMGaooi 9IUo10TzTeNryOLSj8MpUqa7mzAjzsg= X-MC-Unique: WBzmK-DuNymZxgqb0SeuKw-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=JSY478yiFOxfyipIIVIRTU0bevcPEjwiKUZ7hzso9Eo=; b=GbwrUdql/rkJw9Wl1Y+lpRpad2980BNFxy3zWnRyHo7DNTv2uXSVqw00iVGBxVJT6z Y5bBbeYwvZIotlRbx2S0XlsERw9a9Da19A3PUeioxGZIXIXHM6ndx13hRkHIvkhYx0e0 9QVAbTGqtA+T+xpJrFgTtKPhyjJGvNiZrfktjTaR9iTO/rN+vXOHnOnuYpwZj2mG/ODe Ku0lMwwddq4SDIH/sykg4wJni3S1QsDsTWOlVWJD+WWI2XRxZjnK43E/Wk1GjFbz2pyn ueAPwDER421zbWWbRwmhv5O0shijbsFDQKY9cQhVO7hyqazbhKS0B4yv2k8BdMlOFcyE snPg== X-Gm-Message-State: AOAM533zptDKpT6z4Ju7UVMpeLtxBBdB4X70b+HFmxaO7BQEOKX42OSI E5/qPUkt9O+qyiwIE6wUWs18esV72xZEfPRHcv4gAVhUjgfLVszdVnDmrOPVHONNq2Q5Zge1QM+ XaLPNuY5clvaPxg== X-Received: by 2002:a05:6402:392:: with SMTP id o18mr3052705edv.283.1603964080702; Thu, 29 Oct 2020 02:34:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeYmxKt1Lq9v3GLSodnup8MdE9OlKJ3EwKtZI4k15vDKyB6ksdiQ9fU22CdMTavYoOecYPXg== X-Received: by 2002:a05:6402:392:: with SMTP id o18mr3052691edv.283.1603964080561; Thu, 29 Oct 2020 02:34:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Stefan Hajnoczi , Kevin Wolf , Klaus Jensen , Eric Auger , Max Reitz , Fam Zheng , Keith Busch , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2 v2 17/25] block/nvme: Set request_alignment at initialization Date: Thu, 29 Oct 2020 10:32:58 +0100 Message-Id: <20201029093306.1063879-18-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201029093306.1063879-1-philmd@redhat.com> References: <20201029093306.1063879-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) Commit bdd6a90a9e5 ("block: Add VFIO based NVMe driver") sets the request_alignment in nvme_refresh_limits(). For consistency, also set it during initialization. Reported-by: Stefan Hajnoczi Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- block/nvme.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/nvme.c b/block/nvme.c index cd875555caf..bb75448a09f 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -758,6 +758,7 @@ static int nvme_init(BlockDriverState *bs, const char *= device, int namespace, s->page_size =3D MAX(4096, 1 << 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; + bs->bl.request_alignment =3D s->page_size; timeout_ms =3D MIN(500 * NVME_CAP_TO(cap), 30000); =20 /* Reset device to get a clean state. */ --=20 2.26.2