From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Klaus Jensen <its@irrelevant.dk>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] hw/block/nvme: Align I/O BAR to 4 KiB
Date: Tue, 30 Jun 2020 11:39:24 +0200 [thread overview]
Message-ID: <5a205368-ca51-d3f6-22a5-5f04194150c7@redhat.com> (raw)
In-Reply-To: <20200630084645.f53iwkmpbewnhilk@apples.localdomain>
On 6/30/20 10:46 AM, Klaus Jensen wrote:
> On Jun 30 10:35, Philippe Mathieu-Daudé wrote:
>> Hi Klaus,
>>
>> On 6/25/20 8:23 PM, Klaus Jensen wrote:
>>> On Jun 25 17:48, Philippe Mathieu-Daudé wrote:
>>>> Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB.
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>> ---
>>>> include/block/nvme.h | 3 +++
>>>> hw/block/nvme.c | 5 ++---
>>>> 2 files changed, 5 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/include/block/nvme.h b/include/block/nvme.h
>>>> index 1720ee1d51..6d87c9c146 100644
>>>> --- a/include/block/nvme.h
>>>> +++ b/include/block/nvme.h
>>>> @@ -22,6 +22,8 @@ typedef struct NvmeBar {
>>>> uint32_t pmrebs;
>>>> uint32_t pmrswtp;
>>>> uint32_t pmrmsc;
>>>> + uint32_t reserved[58];
>>>> + uint8_t cmd_set_specfic[0x100];
>>>> } NvmeBar;
>>>
>>> This ends up as a freak mix of v1.3 and v1.4 specs. Since we already
>>> have the PMR stuff in there, I think it makes more sense to align with
>>> v1.4 and remove the reserved bytes.
>>
>> I'm sorry but I don't understand what you'd prefer, removing the
>> cmd_set_specfic[] for v1.3 and instead use this?
>>
>> uint32_t pmrmsc;
>> + uint32_t reserved[122];
>> } NvmeBar;
>>
>> Or this?
>>
>> uint32_t pmrmsc;
>> + uint8_t reserved[488];
>> } NvmeBar;
>>
>
> Yes, the second one.
>
> But it should be 484 bytes reserved and the bug is in the pmrmsc field
> that should be uint64_t. Can you fix that as well? :)
>
Ah this is what you did in "hw/block/nvme: add NVMe 1.4 specific fields"
https://www.mail-archive.com/qemu-devel@nongnu.org/msg717891.html
prev parent reply other threads:[~2020-06-30 9:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 15:48 [PATCH] hw/block/nvme: Align I/O BAR to 4 KiB Philippe Mathieu-Daudé
2020-06-25 18:23 ` Klaus Jensen
2020-06-30 8:35 ` Philippe Mathieu-Daudé
2020-06-30 8:46 ` Klaus Jensen
2020-06-30 9:39 ` Philippe Mathieu-Daudé [this message]
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=5a205368-ca51-d3f6-22a5-5f04194150c7@redhat.com \
--to=philmd@redhat.com \
--cc=its@irrelevant.dk \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).