OSDN Git Service

hw/nvme: Abort copy command when format is one while pif
authorFrancis Pravin Antony Michael Raj <francis.michael@solidigm.com>
Wed, 2 Nov 2022 08:06:00 +0000 (09:06 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Wed, 2 Nov 2022 08:23:05 +0000 (09:23 +0100)
commit632cb6cf07122b330d8ef419ec2f4aab561a9fba
treea0631b60054e3127b0bf43a177a37763ab5fd015
parentd38cc6fd1cafc3f834bb529f79bfc23089e9e54f
hw/nvme: Abort copy command when format is one while pif

As per the NVMe Command Set specification Section 3.2.2, if

  i)  The namespace is formatted to use 16b Guard Protection
      Information (i.e., pif = 0) and
  ii) The Descriptor Format is not cleared to 0h

Then the copy command should be aborted with the status code of Invalid
Namespace or Format

Fixes: 44219b6029fc ("hw/nvme: 64-bit pi support")
Signed-off-by: Francis Pravin Antony Michael Raj <francis.michael@solidigm.com>
Signed-off-by: Jonathan Derrick <jonathan.derrick@solidigm.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ctrl.c