hw/nvme: add machine compatibility parameter to enable msix exclusive bar
authorKlaus Jensen <k.jensen@samsung.com>
Sun, 10 Mar 2024 10:43:55 +0000 (11:43 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Tue, 12 Mar 2024 15:05:53 +0000 (16:05 +0100)
commitfa905f65c5549703279f68c253914799b10ada47
treec203600d4f2ce21f3ff8ed9dedccde449dde51ed
parentee7bda4d38cda3eaf114c850a723dd12e23d3abc
hw/nvme: add machine compatibility parameter to enable msix exclusive bar

Commit 1901b4967c3f ("hw/block/nvme: move msix table and pba to BAR 0")
moved the MSI-X table and PBA to BAR 0 to make room for enabling CMR and
PMR at the same time. As reported by Julien Grall in #2184, this breaks
migration through system hibernation.

Add a machine compatibility parameter and set it on machines pre 6.0 to
enable the old behavior automatically, restoring the hibernation
migration support.

Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2184
Fixes: 1901b4967c3f ("hw/block/nvme: move msix table and pba to BAR 0")
Reported-by: Julien Grall julien@xen.org
Tested-by: Julien Grall julien@xen.org
Reviewed-by: Jesper Wendel Devantier <foss@defmacro.it>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/core/machine.c
hw/nvme/ctrl.c
hw/nvme/nvme.h