From nobody Mon Feb 9 14:38:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1603709720; cv=none; d=zohomail.com; s=zohoarc; b=gZjLVgPlt1muUVcoe1NtGzpeiIQaGPzhttfGYYm6PdtD7YJxtwrMMsK1SDT07FCpfYmkg7gLNNQMDN94DlkFuvpakcJLFNg/vw9cBfWn9xhrznlcRaxQ90Yg3uoXAU/Unu1m5NQ6wfHnEBTbfVS8ezh2G0EdKEYqSpl17yFw0XM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603709720; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=ffM492hetK8u/GqoMVkU0TJmIWrPk8dUIU3q04M7GGw=; b=IJPraaQ5brszSVHJrLUQvXjPTLASSf0RnF+hm/KmB0xNoR/Od5E0LrPk3ZtG6Bqo/Iyql6sBzRvFMMzkLlJs1/GP2GEUgN66GTamrSPWTxqi+ULRrilc+eOR+BTzQ5cmuun6PZHeF3YCobzQYqGlzhBgc8R4EI+Odc8FHkwQ2B0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1603709720659101.43888243367485; Mon, 26 Oct 2020 03:55:20 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-pgpoQXAiPx-jqLLImu6PHw-1; Mon, 26 Oct 2020 06:55:17 -0400 Received: by mail-wr1-f69.google.com with SMTP id p6so8125765wrm.23 for ; Mon, 26 Oct 2020 03:55:17 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (237.red-88-18-140.staticip.rima-tde.net. [88.18.140.237]) by smtp.gmail.com with ESMTPSA id e15sm21209863wro.13.2020.10.26.03.55.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 03:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603709719; 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=ffM492hetK8u/GqoMVkU0TJmIWrPk8dUIU3q04M7GGw=; b=Hw5BQAAAE838N0zxUjDnwvrHTxjmhWL7cEdxvzW+qZcJ21BTx3E34qEJvDr33AbPIPdv0x /MueeF1blyxmK9tA7aQv6Z8J5auU86LOriA+3YNez/rqazaP7hipCJ8RM1Z4BTQE8gf13f GT6y7nXfaOkHFCoxF6mHQbJV+twsgSw= X-MC-Unique: pgpoQXAiPx-jqLLImu6PHw-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=ffM492hetK8u/GqoMVkU0TJmIWrPk8dUIU3q04M7GGw=; b=gmAXJsBjqxvIRefGcmRyNgn+y6bOCdE8k8V4G2ip3VTdzp3S4w6xxCzKQiFQJ5rnry kQuYWP0HY2Z2ctrGPswu7psdHtxXyrsZcltiRFrHurwmXkGhdWVMmixNUHRuNWZf3WWo 0grZMUH4zqGuH1F1NZc6WRLqwCAOq+hs0m7m7BYuHIoC/Cqs26LzXiIaY2Dj1yEmrL8C iIWUqceYqhwlZj7mEK28D5HVoxEY0HmQWjTI+qYKJhPpqa2YJ5u0AL3ptYjdskRjJ7Zc KymTCrK0D8ikZUX6Q9/5VRQKzwrFWQRBjDdO8AdB0hsdirPRDoXvwa3wmXqqfUbbEkS/ NG6A== X-Gm-Message-State: AOAM531qsvPioQWBdxzTrrG73ZexDU2HLq1aTxixUzhu0gcj0fiC/7O+ k9xacj6oRL4JBTc4+aM6QbnFRSmH1bsoJ3pOf+tJNJ1XFhf+YJFcAJRKWkm4/tEw5/gmL8pfomb bDQw3JvyE7sOsmw== X-Received: by 2002:a1c:e1c2:: with SMTP id y185mr14956764wmg.81.1603709716730; Mon, 26 Oct 2020 03:55:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhIuyInzKn2sgFIiJf08tBwESRjMqdMxn5AcKY1mo1jNirvpBOWrhLuNjMMCTmdogxlmeARg== X-Received: by 2002:a1c:e1c2:: with SMTP id y185mr14956750wmg.81.1603709716535; Mon, 26 Oct 2020 03:55:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eric Auger , Alex Williamson , qemu-block@nongnu.org, Fam Zheng , Max Reitz , Stefan Hajnoczi , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 02/19] block/nvme: Set request_alignment at initialization Date: Mon, 26 Oct 2020 11:54:47 +0100 Message-Id: <20201026105504.4023620-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201026105504.4023620-1-philmd@redhat.com> References: <20201026105504.4023620-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) When introducing this driver in commit bdd6a90a9e5 ("block: Add VFIO based NVMe driver") we correctly set the request_alignment in nvme_refresh_limits() but forgot to set it at initialization. Do it now. Reported-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi --- block/nvme.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/nvme.c b/block/nvme.c index 029694975b9..aa290996679 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -727,6 +727,7 @@ static int nvme_init(BlockDriverState *bs, const char *= device, int namespace, 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; + 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