1. 13 4月, 2017 2 次提交
  2. 28 3月, 2017 1 次提交
  3. 01 3月, 2017 1 次提交
    • D
      nfit, libnvdimm: fix interleave set cookie calculation · 86ef58a4
      Dan Williams 提交于
      The interleave-set cookie is a sum that sanity checks the composition of
      an interleave set has not changed from when the namespace was initially
      created.  The checksum is calculated by sorting the DIMMs by their
      location in the interleave-set. The comparison for the sort must be
      64-bit wide, not byte-by-byte as performed by memcmp() in the broken
      case.
      
      Fix the implementation to accept correct cookie values in addition to
      the Linux "memcmp" order cookies, but only allow correct cookies to be
      generated going forward. It does mean that namespaces created by
      third-party-tooling, or created by newer kernels with this fix, will not
      validate on older kernels. However, there are a couple mitigating
      conditions:
      
          1/ platforms with namespace-label capable NVDIMMs are not widely
             available.
      
          2/ interleave-sets with a single-dimm are by definition not affected
             (nothing to sort). This covers the QEMU-KVM NVDIMM emulation case.
      
      The cookie stored in the namespace label will be fixed by any write the
      namespace label, the most straightforward way to achieve this is to
      write to the "alt_name" attribute of a namespace in sysfs.
      
      Cc: <stable@vger.kernel.org>
      Fixes: eaf96153 ("libnvdimm, nfit: add interleave-set state-tracking infrastructure")
      Reported-by: NNicholas Moulin <nicholas.w.moulin@linux.intel.com>
      Tested-by: NNicholas Moulin <nicholas.w.moulin@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      86ef58a4
  4. 04 2月, 2017 1 次提交
    • D
      acpi, nfit: fix acpi_nfit_flush_probe() crash · e471486c
      Dan Williams 提交于
      We queue an on-stack work item to 'nfit_wq' and wait for it to complete
      as part of a 'flush_probe' request. However, if the user cancels the
      wait we need to make sure the item is flushed from the queue otherwise
      we are leaving an out-of-scope stack address on the work list.
      
       BUG: unable to handle kernel paging request at ffffbcb3c72f7cd0
       IP: [<ffffffffa9413a7b>] __list_add+0x1b/0xb0
       [..]
       RIP: 0010:[<ffffffffa9413a7b>]  [<ffffffffa9413a7b>] __list_add+0x1b/0xb0
       RSP: 0018:ffffbcb3c7ba7c00  EFLAGS: 00010046
       [..]
       Call Trace:
        [<ffffffffa90bb11a>] insert_work+0x3a/0xc0
        [<ffffffffa927fdda>] ? seq_open+0x5a/0xa0
        [<ffffffffa90bb30a>] __queue_work+0x16a/0x460
        [<ffffffffa90bbb08>] queue_work_on+0x38/0x40
        [<ffffffffc0cf2685>] acpi_nfit_flush_probe+0x95/0xc0 [nfit]
        [<ffffffffc0cf25d0>] ? nfit_visible+0x40/0x40 [nfit]
        [<ffffffffa9571495>] wait_probe_show+0x25/0x60
        [<ffffffffa9546b30>] dev_attr_show+0x20/0x50
      
      Fixes: 7ae0fa43 ("nfit, libnvdimm: async region scrub workqueue")
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e471486c
  5. 21 12月, 2016 1 次提交
    • L
      ACPI / osl: Remove acpi_get_table_with_size()/early_acpi_os_unmap_memory() users · 6b11d1d6
      Lv Zheng 提交于
      This patch removes the users of the deprectated APIs:
       acpi_get_table_with_size()
       early_acpi_os_unmap_memory()
      The following APIs should be used instead of:
       acpi_get_table()
       acpi_put_table()
      
      The deprecated APIs are invented to be a replacement of acpi_get_table()
      during the early stage so that the early mapped pointer will not be stored
      in ACPICA core and thus the late stage acpi_get_table() won't return a
      wrong pointer. The mapping size is returned just because it is required by
      early_acpi_os_unmap_memory() to unmap the pointer during early stage.
      
      But as the mapping size equals to the acpi_table_header.length
      (see acpi_tb_init_table_descriptor() and acpi_tb_validate_table()), when
      such a convenient result is returned, driver code will start to use it
      instead of accessing acpi_table_header to obtain the length.
      
      Thus this patch cleans up the drivers by replacing returned table size with
      acpi_table_header.length, and should be a no-op.
      Reported-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6b11d1d6
  6. 07 12月, 2016 5 次提交
    • D
      tools/testing/nvdimm: unit test acpi_nfit_ctl() · a7de92da
      Dan Williams 提交于
      A recent flurry of bug discoveries in the nfit driver's DSM marshalling
      routine has highlighted the fact that we do not have unit test coverage
      for this routine. Add a self-test of acpi_nfit_ctl() routine before
      probing the "nfit_test.0" device. This mocks stimulus to acpi_nfit_ctl()
      and if any of the tests fail "nfit_test.0" will be unavailable causing
      the rest of the tests to not run / fail.
      
      This unit test will also be a place to land reproductions of quirky BIOS
      behavior discovered in the field and ensure the kernel does not regress
      against implementations it has seen in practice.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a7de92da
    • D
      acpi, nfit: fix bus vs dimm confusion in xlat_status · d6eb270c
      Dan Williams 提交于
      Given dimms and bus commands share the same command number space we need
      to be careful that we are translating status in the correct context.
      Otherwise we can, for example, fail an ND_CMD_GET_CONFIG_SIZE command
      because max_xfer is zero. It fails because that condition erroneously
      correlates with the 'cleared == 0' failure of ND_CMD_CLEAR_ERROR.
      
      Cc: <stable@vger.kernel.org>
      Fixes: aef25338 ("libnvdimm, nfit: centralize command status translation")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      d6eb270c
    • D
      acpi, nfit: validate ars_status output buffer size · 82aa37cf
      Dan Williams 提交于
      If an ARS Status command returns truncated output, do not process
      partial records or otherwise consume non-status fields.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 0caeef63 ("libnvdimm: Add a poison list and export badblocks")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      82aa37cf
    • D
      acpi, nfit, libnvdimm: fix / harden ars_status output length handling · efda1b5d
      Dan Williams 提交于
      Given ambiguities in the ACPI 6.1 definition of the "Output (Size)"
      field of the ARS (Address Range Scrub) Status command, a firmware
      implementation may in practice return 0, 4, or 8 to indicate that there
      is no output payload to process.
      
      The specification states "Size of Output Buffer in bytes, including this
      field.". However, 'Output Buffer' is also the name of the entire
      payload, and earlier in the specification it states "Max Query ARS
      Status Output Buffer Size: Maximum size of buffer (including the Status
      and Extended Status fields)".
      
      Without this fix if the BIOS happens to return 0 it causes memory
      corruption as evidenced by this result from the acpi_nfit_ctl() unit
      test.
      
       ars_status00000000: 00020000 00000000                    ........
       BUG: stack guard page was hit at ffffc90001750000 (stack is ffffc9000174c000..ffffc9000174ffff)
       kernel stack overflow (page fault): 0000 [#1] SMP DEBUG_PAGEALLOC
       task: ffff8803332d2ec0 task.stack: ffffc9000174c000
       RIP: 0010:[<ffffffff814cfe72>]  [<ffffffff814cfe72>] __memcpy+0x12/0x20
       RSP: 0018:ffffc9000174f9a8  EFLAGS: 00010246
       RAX: ffffc9000174fab8 RBX: 0000000000000000 RCX: 000000001fffff56
       RDX: 0000000000000000 RSI: ffff8803231f5a08 RDI: ffffc90001750000
       RBP: ffffc9000174fa88 R08: ffffc9000174fab0 R09: ffff8803231f54b8
       R10: 0000000000000008 R11: 0000000000000001 R12: 0000000000000000
       R13: 0000000000000000 R14: 0000000000000003 R15: ffff8803231f54a0
       FS:  00007f3a611af640(0000) GS:ffff88033ed00000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: ffffc90001750000 CR3: 0000000325b20000 CR4: 00000000000406e0
       Stack:
        ffffffffa00bc60d 0000000000000008 ffffc90000000001 ffffc9000174faac
        0000000000000292 ffffffffa00c24e4 ffffffffa00c2914 0000000000000000
        0000000000000000 ffffffff00000003 ffff880331ae8ad0 0000000800000246
       Call Trace:
        [<ffffffffa00bc60d>] ? acpi_nfit_ctl+0x49d/0x750 [nfit]
        [<ffffffffa01f4fe0>] nfit_test_probe+0x670/0xb1b [nfit_test]
      
      Cc: <stable@vger.kernel.org>
      Fixes: 747ffe11 ("libnvdimm, tools/testing/nvdimm: fix 'ars_status' output buffer sizing")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      efda1b5d
    • V
      acpi, nfit: fix extended status translations for ACPI DSMs · 9a901f54
      Vishal Verma 提交于
      ACPI DSMs can have an 'extended' status which can be non-zero to convey
      additional information about the command. In the xlat_status routine,
      where we translate the command statuses, we were returning an error for
      a non-zero extended status, even if the primary status indicated success.
      
      Return from each command's 'case' once we have verified both its status
      and extend status are good.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 11294d63 ("nfit: fail DSMs that return non-zero status by default")
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      9a901f54
  7. 01 10月, 2016 2 次提交
  8. 22 9月, 2016 1 次提交
  9. 02 9月, 2016 1 次提交
  10. 30 8月, 2016 1 次提交
  11. 23 8月, 2016 2 次提交
  12. 09 8月, 2016 1 次提交
  13. 24 7月, 2016 3 次提交
    • V
      nfit: do an ARS scrub on hitting a latent media error · 6839a6d9
      Vishal Verma 提交于
      When a latent (unknown to 'badblocks') error is encountered, it will
      trigger a machine check exception. On a system with machine check
      recovery, this will only SIGBUS the process(es) which had the bad page
      mapped (as opposed to a kernel panic on platforms without machine
      check recovery features). In the former case, we want to trigger a full
      rescan of that nvdimm bus. This will allow any additional, new errors
      to be captured in the block devices' badblocks lists, and offending
      operations on them can be trapped early, avoiding machine checks.
      
      This is done by registering a callback function with the
      x86_mce_decoder_chain and calling the new ars_rescan functionality with
      the address in the mce notificatiion.
      
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      6839a6d9
    • D
      nfit: move to nfit/ sub-directory · bdf97013
      Dan Williams 提交于
      With the arrival of x86-machine-check support the nfit driver will add a
      (conditionally-compiled) source file.  Prepare for this by moving all
      nfit source to drivers/acpi/nfit/.  This is pure code movement, no
      functional changes.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      bdf97013
    • V
      nfit, libnvdimm: allow an ARS scrub to be triggered on demand · 37b137ff
      Vishal Verma 提交于
      Normally, an ARS (Address Range Scrub) only happens at
      boot/initialization time. There can however arise situations where a
      bus-wide rescan is needed - notably, in the case of discovering a latent
      media error, we should do a full rescan to figure out what other sectors
      are bad, and thus potentially avoid triggering an mce on them in the
      future. Also provide a sysfs trigger to start a bus-wide scrub.
      
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      37b137ff
  14. 23 7月, 2016 1 次提交
  15. 22 7月, 2016 4 次提交
    • D
      libnvdimm: move ->module to struct nvdimm_bus_descriptor · bc9775d8
      Dan Williams 提交于
      Let the provider module be explicitly passed in rather than implicitly
      assumed by the module that calls nvdimm_bus_register().  This is in
      preparation for unifying the nfit and nfit_test driver teardown paths.
      Reviewed-by: NLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      bc9775d8
    • D
      nfit: cleanup acpi_nfit_init calling convention · e7a11b44
      Dan Williams 提交于
      Pass the nfit buffer as a parameter rather than hanging it off of
      acpi_desc.
      Reviewed-by: N"Lee, Chun-Yi" <jlee@suse.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e7a11b44
    • D
      nfit: fix _FIT evaluation memory leak + use after free · 31932041
      Dan Williams 提交于
      acpi_evaluate_object() allocates memory. Free the buffer allocated
      during acpi_nfit_add(). In order for this memory to be freed
      acpi_nfit_init() needs to be converted to duplicate the nfit contents in
      its internal allocation.  Use zero-length arrays to minimize the thrash
      with the rest of the nfit driver implementation.
      
      All of the add_<nfit-sub-table>() routines now validate a minimum table
      size and expect hotplugged tables to match the size of the original
      table to count as a duplicate. For variable length tables, like 'idt'
      and 'flush', we calculate the dynamic size. Note that hotplug by
      definition cannot change the interleave as it would cause data
      corruption of in-use namespaces.
      
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Reported-by: NXiao Guangrong <guangrong.xiao@intel.com>
      Reported-by: NHaozhong Zhang <haozhong.zhang@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      31932041
    • L
      acpi, nfit: treat virtual ramdisk SPA as pmem region · c2f32acd
      Lee, Chun-Yi 提交于
      This patch adds logic to treat virtual ramdisk SPA as pmem region, then
      ramdisk's /dev/pmem* device can be mounted with iso9660.
      
      It's useful to work with the httpboot in EFI firmware to pull a remote
      ISO file to the local memory region for booting and installation.
      
      Wiki page of UEFI HTTPBoot with OVMF:
      	https://en.opensuse.org/UEFI_HTTPBoot_with_OVMF
      
      The ramdisk function in EDK2/OVMF generates a ACPI0012 root device that
      it contains empty _STA but without _DSM:
      
      DefinitionBlock ("ssdt2.aml", "SSDT", 2, "INTEL ", "RamDisk ", 0x00001000)
      {
          Scope (\_SB)
          {
              Device (NVDR)
              {
                  Name (_HID, "ACPI0012")  // _HID: Hardware ID
                  Name (_STR, Unicode ("NVDIMM Root Device"))  // _STR: Description String
                  Method (_STA, 0, NotSerialized)  // _STA: Status
                  {
                      Return (0x0F)
                  }
              }
          }
      }
      
      In section 5.2.25.2 of ACPI 6.1 spec, it mentions that the "SPA Range
      Structure Index" of virtual SPA shall be set to zero. That means virtual SPA
      will not be associated by any NVDIMM region mapping.
      
      The VCD's SPA Range Structure in NFIT is similar to virtual disk region
      as following:
      
      [028h 0040   2]                Subtable Type : 0000 [System Physical Address Range]
      [02Ah 0042   2]                       Length : 0038
      
      [02Ch 0044   2]                  Range Index : 0000
      [02Eh 0046   2]        Flags (decoded below) : 0000
                         Add/Online Operation Only : 0
                            Proximity Domain Valid : 0
      [030h 0048   4]                     Reserved : 00000000
      [034h 0052   4]             Proximity Domain : 00000000
      [038h 0056  16]           Address Range GUID : 77AB535A-45FC-624B-5560-F7B281D1F96E
      [048h 0072   8]           Address Range Base : 00000000B6ABD018
      [050h 0080   8]         Address Range Length : 0000000005500000
      [058h 0088   8]         Memory Map Attribute : 0000000000000000
      
      The way to not associate a SPA range is to never reference it from a "flush hint",
      "interleave", or "control region" table.
      
      After testing on OVMF, pmem driver can support the region that it doesn't
      assoicate to any NVDIMM mapping. So, treat VCD like pmem is a idea to get
      a pmem block device that it contains iso.
      
      v4:
      Instoduce nfit_spa_is_virtual() to check virtual ramdisk SPA and create
      pmem region.
      
      v3:
      To simplify patch, removed useless VCD region in libnvdimm.
      
      v2:
      Removed the code for setting VCD to a read-only region.
      
      Cc: Gary Lin <GLin@suse.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Linda Knippers <linda.knippers@hpe.com>
      Signed-off-by: NLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      c2f32acd
  16. 20 7月, 2016 1 次提交
    • D
      nfit: make DIMM DSMs optional · a7225598
      Dan Williams 提交于
      Commit 4995734e "acpi, nfit: fix acpi_check_dsm() vs zero functions
      implemented" attempted to fix a QEMU regression by supporting its usage
      of a zero-mask as a valid response to a DSM-family probe request.
      However, this behavior breaks HP platforms that return a zero-mask by
      default causing the probe to misidentify the DSM-family.
      
      Instead, the QEMU regression can be fixed by simply not requiring the DSM
      family to be identified.
      
      This effectively reverts commit 4995734e, and removes the DSM
      requirement from the init path.
      
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
      Cc: Linda Knippers <linda.knippers@hpe.com>
      Fixes: 4995734e ("acpi, nfit: fix acpi_check_dsm() vs zero functions implemented")
      Reported-by: NJerry Hoemann <jerry.hoemann@hpe.com>
      Tested-by: NJerry Hoemann <jerry.hoemann@hpe.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a7225598
  17. 12 7月, 2016 3 次提交
    • D
      libnvdimm: introduce nvdimm_flush() and nvdimm_has_flush() · f284a4f2
      Dan Williams 提交于
      nvdimm_flush() is a replacement for the x86 'pcommit' instruction.  It is
      an optional write flushing mechanism that an nvdimm bus can provide for
      the pmem driver to consume.  In the case of the NFIT nvdimm-bus-provider
      nvdimm_flush() is implemented as a series of flush-hint-address [1]
      writes to each dimm in the interleave set (region) that backs the
      namespace.
      
      The nvdimm_has_flush() routine relies on platform firmware to describe
      the flushing capabilities of a platform.  It uses the heuristic of
      whether an nvdimm bus provider provides flush address data to return a
      ternary result:
      
            1: flush addresses defined
            0: dimm topology described without flush addresses (assume ADR)
       -errno: no topology information, unable to determine flush mechanism
      
      The pmem driver is expected to take the following actions on this ternary
      result:
      
            1: nvdimm_flush() in response to REQ_FUA / REQ_FLUSH and shutdown
            0: do not set, WC or FUA on the queue, take no further action
       -errno: warn and then operate as if nvdimm_has_flush() returned '0'
      
      The caveat of this heuristic is that it can not distinguish the "dimm
      does not have flush address" case from the "platform firmware is broken
      and failed to describe a flush address".  Given we are already
      explicitly trusting the NFIT there's not much more we can do beyond
      blacklisting broken firmwares if they are ever encountered.
      
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      f284a4f2
    • D
      libnvdimm, nfit: move flush hint mapping to region-device driver-data · e5ae3b25
      Dan Williams 提交于
      In preparation for triggering flushes of a DIMM's writes-posted-queue
      (WPQ) via the pmem driver move mapping of flush hint addresses to the
      region driver.  Since this uses devm_nvdimm_memremap() the flush
      addresses will remain mapped while any region to which the dimm belongs
      is active.
      
      We need to communicate more information to the nvdimm core to facilitate
      this mapping, namely each dimm object now carries an array of flush hint
      address resources.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e5ae3b25
    • D
      libnvdimm, nfit: remove nfit_spa_map() infrastructure · a8a6d2e0
      Dan Williams 提交于
      Now that all shared mappings are handled by devm_nvdimm_memremap() we no
      longer need nfit_spa_map() nor do we need to trigger a callback to the
      bus provider at region disable time.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a8a6d2e0
  18. 08 7月, 2016 3 次提交
    • D
      libnvdimm: introduce devm_nvdimm_memremap(), convert nfit_spa_map() users · 29b9aa0a
      Dan Williams 提交于
      In preparation for generically mapping flush hint addresses for both the
      BLK and PMEM use case, provide a generic / reference counted mapping
      api.  Given the fact that a dimm may belong to multiple regions (PMEM
      and BLK), the flush hint addresses need to be held valid as long as any
      region associated with the dimm is active.  This is similar to the
      existing BLK-region case where multiple BLK-regions may share an
      aperture mapping.  Up-level this shared / reference-counted mapping
      capability from the nfit driver to a core nvdimm capability.
      
      This eliminates the need for the nd_blk_region.disable() callback.  Note
      that the removal of nfit_spa_map() and related infrastructure is
      deferred to a later patch.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      29b9aa0a
    • D
      nfit: don't override return value of nfit_mem_init · 81ed4e36
      Dan Williams 提交于
      We were needlessly converting nfit_mem_init() errors to -ENOMEM.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      81ed4e36
    • D
      nfit: always associate flush hints · ad9ac5e1
      Dan Williams 提交于
      Before enabling use of flush hints for pmem regions, we need to make
      sure they are always associated.  Move the initialization of nfit_flush
      out of the block-window specific init path to the general init path.
      
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      ad9ac5e1
  19. 07 7月, 2016 1 次提交
  20. 30 6月, 2016 1 次提交
    • D
      nfit: fix format interface code byte order · 1bcbf42d
      Dan Williams 提交于
      Per JEDEC Annex L Release 3 the SPD data is:
      
      Bits 9~5 00 000 = Function Undefined
               00 001 = Byte addressable energy backed
               00 010 = Block addressed
               00 011 = Byte addressable, no energy backed
               All other codes reserved
      Bits 4~0 0 0000 = Proprietary interface
               0 0001 = Standard interface 1
               All other codes reserved; see Definitions of Functions
      
      ...and per the ACPI 6.1 spec:
      
          byte0: Bits 4~0 (0 or 1)
          byte1: Bits 9~5 (1, 2, or 3)
      
      ...so a format interface code displayed as 0x301 should be stored in the
      nfit as (0x1, 0x3), little-endian.
      
      Cc: Toshi Kani <toshi.kani@hpe.com>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Robert Moore <robert.moore@intel.com>
      Cc: Robert Elliott <elliott@hpe.com>
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=121161
      Fixes: 30ec5fd4 ("nfit: fix format interface code byte order per ACPI6.1")
      Fixes: 5ad9a7fd ("acpi/nfit: Update nfit driver to comply with ACPI 6.1")
      Reported-by: NKristin Jacque <kristin.jacque@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      1bcbf42d
  21. 25 6月, 2016 1 次提交
    • D
      acpi, nfit: fix acpi_check_dsm() vs zero functions implemented · 4995734e
      Dan Williams 提交于
      QEMU 2.6 implements nascent support for nvdimm DSMs. Depending on
      configuration it may only implement the function0 dsm to indicate that
      no other DSMs are available. Commit 31eca76b "nfit, libnvdimm:
      limited/whitelisted dimm command marshaling mechanism" breaks QEMU, but
      QEMU is spec compliant.  Per the spec the way to indicate that no
      functions are supported is:
      
          If Function Index is zero, the return is a buffer containing one bit
          for each function index, starting with zero. Bit 0 indicates whether
          there is support for any functions other than function 0 for the
          specified UUID and Revision ID. If set to zero, no functions are
          supported (other than function zero) for the specified UUID and
          Revision ID.
      
      Update the nfit driver to determine the family (interface UUID) without
      requiring the implementation to define any other functions, i.e.
      short-circuit acpi_check_dsm() to succeed per the spec.  The nfit driver
      appears to be the only user passing funcs==0 to acpi_check_dsm(), so
      this behavior change of the common routine should be limited to the
      probing done by the nfit driver.
      
      Cc: Len Brown <lenb@kernel.org>
      Cc: Jerry Hoemann <jerry.hoemann@hpe.com>
      Acked-by: N"Rafael J. Wysocki" <rafael@kernel.org>
      Fixes: 31eca76b ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism")
      Reported-by: NXiao Guangrong <guangrong.xiao@linux.intel.com>
      Tested-by: NXiao Guangrong <guangrong.xiao@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      4995734e
  22. 21 6月, 2016 1 次提交
  23. 06 5月, 2016 2 次提交