From: Klaus Jensen <its@irrelevant.dk> To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org Cc: Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>, Gollu Appalanaidu <anaidu.gollu@samsung.com>, Max Reitz <mreitz@redhat.com>, Klaus Jensen <its@irrelevant.dk>, Stefan Hajnoczi <stefanha@redhat.com>, Keith Busch <kbusch@kernel.org> Subject: [PULL for-6.0 1/7] hw/block/nvme: fix pi constraint check Date: Tue, 6 Apr 2021 22:46:21 +0200 [thread overview] Message-ID: <20210406204627.140812-2-its@irrelevant.dk> (raw) In-Reply-To: <20210406204627.140812-1-its@irrelevant.dk> From: Klaus Jensen <k.jensen@samsung.com> Protection Information can only be enabled if there is at least 8 bytes of metadata. Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Gollu Appalanaidu <anaidu.gollu@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org> --- hw/block/nvme-ns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c index 7f8d139a8663..ca04ee1bacfb 100644 --- a/hw/block/nvme-ns.c +++ b/hw/block/nvme-ns.c @@ -394,7 +394,7 @@ static int nvme_ns_check_constraints(NvmeNamespace *ns, Error **errp) return -1; } - if (ns->params.pi && !ns->params.ms) { + if (ns->params.pi && ns->params.ms < 8) { error_setg(errp, "at least 8 bytes of metadata required to enable " "protection information"); return -1; -- 2.31.1
next prev parent reply other threads:[~2021-04-06 20:51 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-06 20:46 [PULL for-6.0 0/7] emulated nvme fixes for -rc3 Klaus Jensen 2021-04-06 20:46 ` Klaus Jensen [this message] 2021-04-06 20:46 ` [PULL for-6.0 2/7] hw/block/nvme: fix missing string representation for ns attachment Klaus Jensen 2021-04-06 20:46 ` [PULL for-6.0 3/7] hw/block/nvme: fix the nsid 'invalid' value Klaus Jensen 2021-04-06 20:46 ` [PULL for-6.0 4/7] hw/block/nvme: fix warning about legacy namespace configuration Klaus Jensen 2021-04-06 20:46 ` [PULL for-6.0 5/7] hw/block/nvme: update dmsrl limit on namespace detachment Klaus Jensen 2021-04-06 20:46 ` [PULL for-6.0 6/7] hw/block/nvme: fix handling of private namespaces Klaus Jensen 2021-04-06 20:46 ` [PULL for-6.0 7/7] hw/block/nvme: add missing copyright headers Klaus Jensen
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=20210406204627.140812-2-its@irrelevant.dk \ --to=its@irrelevant.dk \ --cc=anaidu.gollu@samsung.com \ --cc=fam@euphon.net \ --cc=k.jensen@samsung.com \ --cc=kbusch@kernel.org \ --cc=kwolf@redhat.com \ --cc=mreitz@redhat.com \ --cc=peter.maydell@linaro.org \ --cc=qemu-block@nongnu.org \ --cc=qemu-devel@nongnu.org \ --cc=stefanha@redhat.com \ --subject='Re: [PULL for-6.0 1/7] hw/block/nvme: fix pi constraint check' \ /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
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).