Re: [PATCH v2 2/2] acpi, nfit: add support for NVDIMM_FAMILY_INTEL v1.6 DSMs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 31, 2017 at 04:19:32PM -0700, Dan Williams wrote:
> On Tue, Oct 31, 2017 at 3:05 PM, Jerry Hoemann <jerry.hoemann@xxxxxxx> wrote:
> > On Tue, Oct 31, 2017 at 02:42:01PM -0700, Dan Williams wrote:
> [..]
> >> Yes, this can happen. However, for the kernel implementation it can
> >> decide to move to rev-id2 at its leisure since ACPI mandates that
> >> rev-id1 implementations stick around, and if the function number was
> >> reserved in rev-id1 the kernel will already not support it.
> >
> > Unfortunately, we can't do that.  The kernel will still need to support
> > firmware that only knows about Rev ID 1.
> >
> > Example, HPE currently supports customers w/ NVDIMMS with DSM that only
> > responds to rev id 1.
> >
> > Say in the future we ship a new generation of NVDIMMs
> > that extends the DSM health function.  We could make that
> > additional info available only for rev id 2.  If the table
> > above were extended to call health function with rev id 2
> > so that we get the additional info for the new nvdimm, that
> > call will stop working on what will then be legacy systems
> > that only know rev id 1.
> 
> Right, I'm explicitly not supporting that degree of compatibility
> freedom. If a platform wants to change the payload of an existing
> function it had better expand the payload with new information that
> can optionally be ignored by older kernels rather than spin the revid.
> The kernel can't break legacy and neither should the platform, either
> the kernel can call revid1 forever, the function is only available in
> revid2 or later, or that function number is burned and we need to live
> with the breakage that the platform shipped.


Old software would still be calling firmware with revision id 1 and
firmware would still respond with the revision id 1 version of the
call.  So there is no problem there.  This would be the case for
legacy firmware that only understand revision id 1, or new firmware
that understands both revision id 1 and revision id 2.  Calling a
function with revision id 1 should get the revision id 1 version
of the call.  If not, then bug in firmware.

The idea behind revision ids here is to allow both software and firmware
to progress but still work together.   Firmware can extend functionality
by increasing revision ID, but will still answer to old software that
calls with older revision IDS.

Likewise, OS can add support for new revision IDs/functions but still
needs to be aware that firmware at customer sites may be legacy firmware that
doesn't understand the newer firmware revision.  So software needs
to call firmware with revision IDs that the firmware understands.

Specifically, I am pushing back on the idea that the OS could
just start calling a function with revision ID 2.  That doesn't
work on firmware that only understands revision ID 1.  The call
will fail.


> 
> We are already in this position with the "smart threshold" payload
> that has been broken in recent revisions of the Intel spec. In this
> specific case we have ndctl binaries in the wild that are broken, but
> are somewhat saved by the fact that the interface for *setting* alarms
> and thresholds is brand new in v1.6. So my plan is to document that
> smart threshold is broken and require new ndctl binaries with v1.6
> support to implement the new format via the ND_CMD_CALL interface. The
> fact that this compatibility management is on a case by case basis and
> somewhat painful is a feature. Platform implementations must hide DSM
> update thrash from the kernel and shipping binaries as much as
> possible.


I haven't thought through the changes in v1.6.  The threshold one
doesn't seem backwards compatible and it would have been better for
this to have been caught during design review. Oh, well.....

Fortunately, this isn't a customer/legacy bios issue yet, so solutions
are a bit more flexible.

I am concerned how the ND_CMD_CALL interface can handle revision ID
changes in general.  The interface doesn't specify a revision ID so
it can't control the revision of data being returned to the level
it can handle.  Likewise,  there is no mechanism to communicate
back to the application the revision of the call being returned.
This make me think that any application that uses ND_CMD_CALL will
be rev locked to specific kernel revisions.  I need to think about
this more.



-- 

-----------------------------------------------------------------------------
Jerry Hoemann                  Software Engineer   Hewlett Packard Enterprise
-----------------------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux