qemu/hw
Dmitry Tikhov d7fe639cab hw/nvme: add new command abort case
NVMe command set specification for end-to-end data protection formatted
namespace states:

    o If the Reference Tag Check bit of the PRCHK field is set to ‘1’ and
      the namespace is formatted for Type 3 protection, then the
      controller:
          ▪ should not compare the protection Information Reference Tag
            field to the computed reference tag; and
          ▪ may ignore the ILBRT and EILBRT fields. If a command is
            aborted as a result of the Reference Tag Check bit of the
            PRCHK field being set to ‘1’, then that command should be
            aborted with a status code of Invalid Protection Information,
            but may be aborted with a status code of Invalid Field in
            Command.

Currently qemu compares reftag in the nvme_dif_prchk function whenever
Reference Tag Check bit is set in the command. For type 3 namespaces
however, caller of nvme_dif_prchk - nvme_dif_check does not increment
reftag for each subsequent logical block. That way commands incorporating
more than one logical block for type 3 formatted namespaces with reftag
check bit set, always fail with End-to-end Reference Tag Check Error.
Comply with spec by handling case of set Reference Tag Check
bit in the type 3 formatted namespace.

Fixes: 146f720c55 ("hw/block/nvme: end-to-end data protection")
Signed-off-by: Dmitry Tikhov <d.tihov@yadro.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2022-06-03 21:48:24 +02:00
..
9pfs virtio: drop name parameter for virtio_init() 2022-05-16 04:38:40 -04:00
acpi acpi/cxl: Introduce CFMWS structures in CEDT 2022-05-13 07:57:26 -04:00
adc hw/adc/zynq-xadc: Use qemu_irq typedef 2022-05-19 16:19:02 +01:00
alpha
arm hw/arm/aspeed: Add i2c devices for AST2600 EVB 2022-05-25 16:22:37 +02:00
audio hw/audio/ac97: Remove unneeded local variables 2022-05-25 21:26:35 +02:00
avr
block hw: m25p80: allow write_enable latch get/set 2022-05-25 10:31:33 +02:00
char virtio: drop name parameter for virtio_init() 2022-05-16 04:38:40 -04:00
core hw/nvme: do not auto-generate eui64 2022-06-03 21:48:24 +02:00
cpu
cris
cxl hw/cxl/component Add a dumb HDM decoder handler 2022-05-13 07:57:26 -04:00
display hppa: Artist graphics driver fixes for HP-UX and keyboard fix in firmware boot console 2022-05-18 09:32:15 -07:00
dma ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
gpio hw/gpio: replace HWADDR_PRIx with PRIx64 2022-05-25 10:31:33 +02:00
hppa hppa: Fix serial port assignments and pass-through 2022-05-28 12:25:42 +02:00
hyperv hw/hyperv/vmbus: Remove unused vmbus_load/save_req() 2022-05-30 19:49:42 +02:00
i2c
i386 hw/i386/amd_iommu: Fix IOMMU event log encoding errors 2022-05-16 16:15:40 -04:00
ide ide_ioport_read: Return lower octet of data register instead of 0xFF 2022-05-25 21:26:35 +02:00
input virtio: add vhost support for virtio devices 2022-05-16 04:38:40 -04:00
intc pnv/xive2: Don't overwrite PC registers when writing TCTXT registers 2022-05-26 17:11:32 -03:00
ipack
ipmi
isa Warn user if the vga flag is passed but no vga device is created 2022-05-09 08:21:14 +02:00
m68k ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
mem mem/cxl_type3: Add read and write functions for associated hostmem. 2022-05-13 07:57:26 -04:00
microblaze
mips Warn user if the vga flag is passed but no vga device is created 2022-05-09 08:21:14 +02:00
misc lasi: move from hw/hppa to hw/misc 2022-05-08 18:52:37 +01:00
net ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
nios2
nubus
nvme hw/nvme: add new command abort case 2022-06-03 21:48:24 +02:00
nvram machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
openrisc hw/openrisc: use right OMPIC size variable 2022-05-15 10:33:01 +09:00
pci pci/pcie_port: Add pci_find_port_by_pn() 2022-05-13 07:57:26 -04:00
pci-bridge CXL/cxl_component: Add cxl_get_hb_cstate() 2022-05-13 07:57:26 -04:00
pci-host hw/pci-host/gpex-acpi: Add support for dsdt construction for pxb-cxl 2022-05-13 07:57:26 -04:00
pcmcia
ppc spapr: Use address from elf parser for kernel address 2022-05-26 17:11:32 -03:00
rdma
remote QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
riscv hw/riscv: virt: Fix interrupt parent for dynamic platform devices 2022-05-24 10:38:50 +10:00
rtc ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
rx
s390x hw/s390x/s390-virtio-ccw: Improve the machine description string 2022-06-03 08:03:28 +02:00
scsi virtio: add vhost support for virtio devices 2022-05-16 04:38:40 -04:00
sd hw/sd/allwinner-sdhost: report FIFO water level as 1 when data ready 2022-05-30 12:34:46 +01:00
sensor
sh4
smbios
sparc machine: make memory-backend a link property 2022-05-12 12:29:44 +02:00
sparc64 machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
ssi
timer ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
tpm
tricore
usb Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
vfio hw/vfio/pci-quirks: Resolve redundant property getters 2022-05-24 10:38:50 +10:00
virtio vhost-vdpa: change name and polarity for vhost_vdpa_one_time_request() 2022-05-16 16:15:41 -04:00
watchdog
xen hw/xen/xen_pt: Resolve igd_passthrough_isa_bridge_create() indirection 2022-05-12 12:07:06 +02:00
xenpv Warn user if the vga flag is passed but no vga device is created 2022-05-09 08:21:14 +02:00
xtensa hw/xtensa: fix reset value of MIROUT register of MX PIC 2022-05-06 15:27:40 -07:00
Kconfig hw/cxl/component: Introduce CXL components (8.1.x, 8.2.5) 2022-05-13 06:13:35 -04:00
meson.build hw/cxl/component: Introduce CXL components (8.1.x, 8.2.5) 2022-05-13 06:13:35 -04:00