From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyMht-00010z-6c for qemu-devel@nongnu.org; Tue, 09 Dec 2014 10:28:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XyMhn-0000BJ-8V for qemu-devel@nongnu.org; Tue, 09 Dec 2014 10:28:09 -0500 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:56919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyMhn-0000B8-01 for qemu-devel@nongnu.org; Tue, 09 Dec 2014 10:28:03 -0500 Received: by mail-wg0-f44.google.com with SMTP id b13so1126659wgh.31 for ; Tue, 09 Dec 2014 07:28:02 -0800 (PST) Date: Tue, 9 Dec 2014 15:27:57 +0000 From: Stefan Hajnoczi Message-ID: <20141209152757.GB27053@stefanha-thinkpad.redhat.com> References: <20141127143921.3485a93d@kryten> <547E1EB3.2090601@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gj572EiMnwbLXET9" Content-Disposition: inline In-Reply-To: <547E1EB3.2090601@redhat.com> Subject: Re: [Qemu-devel] [PATCH] nvme: 64kB page size fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Keith Busch , Kevin Wolf , Anton Blanchard , Stefan Hajnoczi , qemu-devel@nongnu.org --gj572EiMnwbLXET9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 02, 2014 at 09:18:59PM +0100, Paolo Bonzini wrote: >=20 >=20 > On 27/11/2014 04:39, Anton Blanchard wrote: > > Initialise our maximum page size capability to 64kB and increase > > the page_size variable from 16 to 32 bits. > >=20 > > Signed-off-by: Anton Blanchard > > -- > >=20 > > diff --git a/hw/block/nvme.c b/hw/block/nvme.c > > index 1327658..aa1ed98 100644 > > --- a/hw/block/nvme.c > > +++ b/hw/block/nvme.c > > @@ -811,6 +811,7 @@ static int nvme_init(PCIDevice *pci_dev) > > NVME_CAP_SET_AMS(n->bar.cap, 1); > > NVME_CAP_SET_TO(n->bar.cap, 0xf); > > NVME_CAP_SET_CSS(n->bar.cap, 1); > > + NVME_CAP_SET_MPSMAX(n->bar.cap, 4); > > =20 > > n->bar.vs =3D 0x00010001; > > n->bar.intmc =3D n->bar.intms =3D 0; > > diff --git a/hw/block/nvme.h b/hw/block/nvme.h > > index 993c511..b6ccb65 100644 > > --- a/hw/block/nvme.h > > +++ b/hw/block/nvme.h > > @@ -688,7 +688,7 @@ typedef struct NvmeCtrl { > > NvmeBar bar; > > BlockConf conf; > > =20 > > - uint16_t page_size; > > + uint32_t page_size; > > uint16_t page_bits; > > uint16_t max_prp_ents; > > uint16_t cqe_size; > >=20 > >=20 >=20 > This should probably be a property of the device instead. If you want > to change the default, you need to preserve a backwards-compatible value > for pre-2.3 machine types (-M pc-i440fx-2.2, -M pc-i440fx-2.1 etc.). Hi Anton, Any update on this? Paolo has a point that changing this value would make a guest-visible hardware change. Therefore older machine types, which users might rely on, should continue to show the old value. This is especially important with live migration because hardware should not change underneath the guest due to migration. Stefan --gj572EiMnwbLXET9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUhxT9AAoJEJykq7OBq3PIR+oH/RDlRZimu2Faa6LU3XjSbCJT 79BNgl584cNNXR6Ohhms4Zfm2WWx1F1Iv8U454NVqMOtS8l9XruUhcAjGQb3diAr clZFzvMd50mcaOnIwQo8ZRzPAEUmENFrT1jYIPsss8VhXxZPPbdkZOwHTSj8VAPM ibKnOii/ElGzQqpCfPhDUKVuq0gR0lLjJ/IsXbawYNoC+glRuIDTXipk5/SCAhnv ZKI829vx3QsSvf+mtDOV5/26WVs23xjcMEmDrL5pkvFQ70Ghj+pb3NrLRZuVu3Vd a8od/RQxzRfVRIVTzhfMPRUoLabtLI7JT+UL202Rpni0V7O+aSFysNl/tN2DaS4= =KLFm -----END PGP SIGNATURE----- --gj572EiMnwbLXET9--