nfit: Add Hyper-V NVDIMM DSM command set to white list
Add the Hyper-V _DSM command set to the white list of NVDIMM command sets. This command set is documented at http://www.uefi.org/RFIC_LIST (see "Virtual NVDIMM 0x1901"). Signed-off-by: Dexuan Cui <decui@microsoft.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
@@ -1846,9 +1846,17 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
|
||||
dev_set_drvdata(&adev_dimm->dev, nfit_mem);
|
||||
|
||||
/*
|
||||
* Until standardization materializes we need to consider 4
|
||||
* different command sets. Note, that checking for function0 (bit0)
|
||||
* tells us if any commands are reachable through this GUID.
|
||||
* There are 4 "legacy" NVDIMM command sets
|
||||
* (NVDIMM_FAMILY_{INTEL,MSFT,HPE1,HPE2}) that were created before
|
||||
* an EFI working group was established to constrain this
|
||||
* proliferation. The nfit driver probes for the supported command
|
||||
* set by GUID. Note, if you're a platform developer looking to add
|
||||
* a new command set to this probe, consider using an existing set,
|
||||
* or otherwise seek approval to publish the command set at
|
||||
* http://www.uefi.org/RFIC_LIST.
|
||||
*
|
||||
* Note, that checking for function0 (bit0) tells us if any commands
|
||||
* are reachable through this GUID.
|
||||
*/
|
||||
for (i = 0; i <= NVDIMM_FAMILY_MAX; i++)
|
||||
if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 1))
|
||||
@@ -1871,6 +1879,8 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
|
||||
dsm_mask &= ~(1 << 8);
|
||||
} else if (nfit_mem->family == NVDIMM_FAMILY_MSFT) {
|
||||
dsm_mask = 0xffffffff;
|
||||
} else if (nfit_mem->family == NVDIMM_FAMILY_HYPERV) {
|
||||
dsm_mask = 0x1f;
|
||||
} else {
|
||||
dev_dbg(dev, "unknown dimm command family\n");
|
||||
nfit_mem->family = -1;
|
||||
@@ -3714,6 +3724,7 @@ static __init int nfit_init(void)
|
||||
guid_parse(UUID_NFIT_DIMM_N_HPE1, &nfit_uuid[NFIT_DEV_DIMM_N_HPE1]);
|
||||
guid_parse(UUID_NFIT_DIMM_N_HPE2, &nfit_uuid[NFIT_DEV_DIMM_N_HPE2]);
|
||||
guid_parse(UUID_NFIT_DIMM_N_MSFT, &nfit_uuid[NFIT_DEV_DIMM_N_MSFT]);
|
||||
guid_parse(UUID_NFIT_DIMM_N_HYPERV, &nfit_uuid[NFIT_DEV_DIMM_N_HYPERV]);
|
||||
|
||||
nfit_wq = create_singlethread_workqueue("nfit");
|
||||
if (!nfit_wq)
|
||||
|
||||
Reference in New Issue
Block a user