qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Anton Blanchard <anton@samba.org>,
	Keith Busch <keith.busch@intel.com>,
	Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] nvme: 64kB page size fixes
Date: Tue, 02 Dec 2014 21:18:59 +0100	[thread overview]
Message-ID: <547E1EB3.2090601@redhat.com> (raw)
In-Reply-To: <20141127143921.3485a93d@kryten>



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.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> --
> 
> 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);
>  
>      n->bar.vs = 0x00010001;
>      n->bar.intmc = n->bar.intms = 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;
>  
> -    uint16_t    page_size;
> +    uint32_t    page_size;
>      uint16_t    page_bits;
>      uint16_t    max_prp_ents;
>      uint16_t    cqe_size;
> 
> 

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.).

Paolo

  parent reply	other threads:[~2014-12-02 20:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27  3:39 [Qemu-devel] [PATCH] nvme: 64kB page size fixes Anton Blanchard
2014-12-02 15:04 ` Stefan Hajnoczi
2014-12-02 15:17   ` Kevin Wolf
2014-12-02 20:18 ` Paolo Bonzini [this message]
2014-12-09 15:27   ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=547E1EB3.2090601@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=anton@samba.org \
    --cc=keith.busch@intel.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).