nvmf/vfio-user: remove vfio-user CSTS.CFS
We will use nvmf library CSTS.CFS instead so that the client can get this error status. Change-Id: I42c248a7333d1f9c940bb29135c887a61c906bd4 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11676 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
a19e5b4dae
commit
a576bccca9
@ -349,9 +349,6 @@ struct nvmf_vfio_user_ctrlr {
|
||||
TAILQ_ENTRY(nvmf_vfio_user_ctrlr) link;
|
||||
|
||||
volatile uint32_t *doorbells;
|
||||
|
||||
/* internal CSTS.CFS register for vfio-user fatal errors */
|
||||
uint32_t cfs : 1;
|
||||
};
|
||||
|
||||
struct nvmf_vfio_user_endpoint {
|
||||
@ -732,15 +729,19 @@ ctrlr_id(struct nvmf_vfio_user_ctrlr *ctrlr)
|
||||
}
|
||||
|
||||
static void
|
||||
fail_ctrlr(struct nvmf_vfio_user_ctrlr *ctrlr)
|
||||
fail_ctrlr(struct nvmf_vfio_user_ctrlr *vu_ctrlr)
|
||||
{
|
||||
assert(ctrlr != NULL);
|
||||
const struct spdk_nvmf_registers *regs;
|
||||
|
||||
if (ctrlr->cfs == 0) {
|
||||
SPDK_ERRLOG(":%s failing controller\n", ctrlr_id(ctrlr));
|
||||
assert(vu_ctrlr != NULL);
|
||||
assert(vu_ctrlr->ctrlr != NULL);
|
||||
|
||||
regs = spdk_nvmf_ctrlr_get_regs(vu_ctrlr->ctrlr);
|
||||
if (regs->csts.bits.cfs == 0) {
|
||||
SPDK_ERRLOG(":%s failing controller\n", ctrlr_id(vu_ctrlr));
|
||||
}
|
||||
|
||||
ctrlr->cfs = 1U;
|
||||
nvmf_ctrlr_set_fatal_status(vu_ctrlr->ctrlr);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
|
@ -70,6 +70,7 @@ DEFINE_STUB(nvmf_ctrlr_save_migr_data, int, (struct spdk_nvmf_ctrlr *ctrlr,
|
||||
struct nvmf_ctrlr_migr_data *data), 0);
|
||||
DEFINE_STUB(nvmf_ctrlr_restore_migr_data, int, (struct spdk_nvmf_ctrlr *ctrlr,
|
||||
struct nvmf_ctrlr_migr_data *data), 0);
|
||||
DEFINE_STUB_V(nvmf_ctrlr_set_fatal_status, (struct spdk_nvmf_ctrlr *ctrlr));
|
||||
|
||||
static void *
|
||||
gpa_to_vva(void *prv, uint64_t addr, uint64_t len, int prot)
|
||||
|
Loading…
Reference in New Issue
Block a user