Re: [PATCH 3/3] block/nvme: Align NVMeRegs structure to 4KiB and mark it packed

2020-09-17 Thread Stefan Hajnoczi
On Wed, Sep 16, 2020 at 10:40:04PM +0200, Philippe Mathieu-Daudé wrote: > In commit e5ff22ba9fc we changed the doorbells register > declaration but forgot to mark the structure packed (as > MMIO registers), allowing the compiler to optimize it. Does this patch actually change anything? NvmeBar is

[PATCH 3/3] block/nvme: Align NVMeRegs structure to 4KiB and mark it packed

2020-09-16 Thread Philippe Mathieu-Daudé
In commit e5ff22ba9fc we changed the doorbells register declaration but forgot to mark the structure packed (as MMIO registers), allowing the compiler to optimize it. Fix by marking it packed, and align it to avoid: block/nvme.c: In function ‘nvme_create_queue_pair’: block/nvme.c:252:22: error