mbox series

[0/2] Init vNVDIMM LSA if applicable

Message ID 1648537663-126032-1-git-send-email-robert.hu@linux.intel.com (mailing list archive)
Headers show
Series Init vNVDIMM LSA if applicable | expand

Message

Robert Hoo March 29, 2022, 7:07 a.m. UTC
QEMU option "-device nvdimm,...,label-size=" designates a vNVDIMM with
Label Storage Area (LSA), where stores the namespace labels and conforms to
some format and rules defined by NVDIMM label protocol[1].

Recent guest Kernel, will by validating LSA to determine if the NVDIMM is
label-capable. So without initialization, guest Kernel will judge it
label-less, though it actually support label.

This patch set, is to init vNVDIMM's LSA, so that guest Kernel can
correctly identify and use it.

[1]:
https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf,
Section 13.19.

Robert Hoo (2):
  NVDIMM: rename NVDIMM::label_size to NVDIMM::lsa_size
  NVDIMM: Init vNVDIMM's LSA index block if it hasn't been

 docs/nvdimm.txt         |   4 +-
 hw/acpi/nvdimm.c        |  14 +-
 hw/mem/nvdimm.c         | 381 ++++++++++++++++++++++++++++++++++++++--
 include/hw/mem/nvdimm.h | 108 +++++++++++-
 4 files changed, 485 insertions(+), 22 deletions(-)


base-commit: 27fc9f365d6f60ff86c2e2be57289bb47a2be882

Comments

Igor Mammedov March 31, 2022, 12:03 p.m. UTC | #1
On Tue, 29 Mar 2022 15:07:41 +0800
Robert Hoo <robert.hu@linux.intel.com> wrote:

> QEMU option "-device nvdimm,...,label-size=" designates a vNVDIMM with
> Label Storage Area (LSA), where stores the namespace labels and conforms to
> some format and rules defined by NVDIMM label protocol[1].
> 
> Recent guest Kernel, will by validating LSA to determine if the NVDIMM is
> label-capable. So without initialization, guest Kernel will judge it
> label-less, though it actually support label.
> 
> This patch set, is to init vNVDIMM's LSA, so that guest Kernel can
> correctly identify and use it.
> 
> [1]:

> https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf,
> Section 13.19.
perhaps there is a typo here,
In above spec, chapter 13 is "ACPI SYSTEM MANAGEMENT BUS INTERFACE SPECIFICATION"
and there is only 13.1-13.3 there.

> 
> Robert Hoo (2):
>   NVDIMM: rename NVDIMM::label_size to NVDIMM::lsa_size
>   NVDIMM: Init vNVDIMM's LSA index block if it hasn't been
> 
>  docs/nvdimm.txt         |   4 +-
>  hw/acpi/nvdimm.c        |  14 +-
>  hw/mem/nvdimm.c         | 381 ++++++++++++++++++++++++++++++++++++++--
>  include/hw/mem/nvdimm.h | 108 +++++++++++-
>  4 files changed, 485 insertions(+), 22 deletions(-)
> 
> 
> base-commit: 27fc9f365d6f60ff86c2e2be57289bb47a2be882
Robert Hoo March 31, 2022, 1:03 p.m. UTC | #2
On Thu, 2022-03-31 at 14:03 +0200, Igor Mammedov wrote:
> On Tue, 29 Mar 2022 15:07:41 +0800
> Robert Hoo <robert.hu@linux.intel.com> wrote:
> 
> > QEMU option "-device nvdimm,...,label-size=" designates a vNVDIMM
> > with
> > Label Storage Area (LSA), where stores the namespace labels and
> > conforms to
> > some format and rules defined by NVDIMM label protocol[1].
> > 
> > Recent guest Kernel, will by validating LSA to determine if the
> > NVDIMM is
> > label-capable. So without initialization, guest Kernel will judge
> > it
> > label-less, though it actually support label.
> > 
> > This patch set, is to init vNVDIMM's LSA, so that guest Kernel can
> > correctly identify and use it.
> > 
> > [1]:
> > https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf,
> > Section 13.19.
> 
> perhaps there is a typo here,
> In above spec, chapter 13 is "ACPI SYSTEM MANAGEMENT BUS INTERFACE
> SPECIFICATION"
> and there is only 13.1-13.3 there.

Right, thanks Igor.
It should be UEFI spec, section 13.19 "NVDIMM Label Protocol"
https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf
> 
> > 
> > Robert Hoo (2):
> >   NVDIMM: rename NVDIMM::label_size to NVDIMM::lsa_size
> >   NVDIMM: Init vNVDIMM's LSA index block if it hasn't been
> > 
> >  docs/nvdimm.txt         |   4 +-
> >  hw/acpi/nvdimm.c        |  14 +-
> >  hw/mem/nvdimm.c         | 381
> > ++++++++++++++++++++++++++++++++++++++--
> >  include/hw/mem/nvdimm.h | 108 +++++++++++-
> >  4 files changed, 485 insertions(+), 22 deletions(-)
> > 
> > 
> > base-commit: 27fc9f365d6f60ff86c2e2be57289bb47a2be882
> 
>