On Nov 14 14:50, Joel Granados wrote: > The Open Compute Project defines a Datacenter NVMe SSD Spec that sits on > top of the NVMe spec. Additional commands and NVMe behaviors specific for > the Datacenter. This is a preparation patch that introduces an argument to > activate OCP in nvme. > > Signed-off-by: Joel Granados <j.grana...@samsung.com> > --- > hw/nvme/nvme.h | 1 + > hw/nvme/subsys.c | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/hw/nvme/nvme.h b/hw/nvme/nvme.h > index 79f5c281c2..aa99c0c57c 100644 > --- a/hw/nvme/nvme.h > +++ b/hw/nvme/nvme.h > @@ -56,6 +56,7 @@ typedef struct NvmeSubsystem { > > struct { > char *nqn; > + bool ocp; > } params; > } NvmeSubsystem; > > diff --git a/hw/nvme/subsys.c b/hw/nvme/subsys.c > index 9d2643678b..ecca28449c 100644 > --- a/hw/nvme/subsys.c > +++ b/hw/nvme/subsys.c > @@ -129,8 +129,8 @@ static void nvme_subsys_realize(DeviceState *dev, Error > **errp) > > static Property nvme_subsystem_props[] = { > DEFINE_PROP_STRING("nqn", NvmeSubsystem, params.nqn), > - DEFINE_PROP_END_OF_LIST(), > -}; > + DEFINE_PROP_BOOL("ocp", NvmeSubsystem, params.ocp, false),
It is the controller that implements the OCP specification, not the namespace or the subsystem. The parameter should be on the controller device. We discussed that the Get Log Page was subsystem scoped and not namespace scoped, but that is unrelated to this. > + DEFINE_PROP_END_OF_LIST(), }; > > static void nvme_subsys_class_init(ObjectClass *oc, void *data) > { > -- > 2.30.2 > >
signature.asc
Description: PGP signature