Skip to content
Commit 5d66322b authored by Jason Wang's avatar Jason Wang Committed by Michael S. Tsirkin
Browse files

virtio_pmem: set device ready in probe()



The NVDIMM region could be available before the virtio_device_ready()
that is called by virtio_dev_probe(). This means the driver tries to
use device before DRIVER_OK which violates the spec, fixing this by
set device ready before the nvdimm_pmem_region_create().

Note that this means the virtio_pmem_host_ack() could be triggered
before the creation of the nd region, this is safe since the pmem_lock
has been initialized and whether or not any available buffer is added
before is validated by virtio_pmem_host_ack().

Fixes 6e84200c ("virtio-pmem: Add virtio pmem driver")
Acked-by: default avatarPankaj Gupta <pankaj.gupta@amd.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Message-Id: <20220628083430.61856-2-jasowang@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 020e1aed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment