qemu-e2k/hw
Kevin Wolf 51e15194b0 scsi-generic: Fix emulated block limits VPD page
Commits 01ef8185b8 amd 24b36e9813 updated the way that the maximum
transfer length is calculated for patching block limits VPD page in an
INQUIRY response.

The same updates also need to be made for the case where the host device
does not support the block limits VPD page at all and we emulate the
whole page.

Without this fix, on host block devices a maximum transfer length of
(INT_MAX - sector_size) bytes is advertised to the guest, resulting in
I/O errors when a request that exceeds the host limits is made by the
guest. (Prior to commit 24b36e9813, this code path would use the
max_transfer value from the host instead of INT_MAX, but still miss the
fix from 01ef8185b8 where max_transfer is also capped to max_iov
host pages, so it would be less wrong, but still wrong.)

Cc: qemu-stable@nongnu.org
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2096251
Fixes: 01ef8185b8
Fixes: 24b36e9813
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220822125320.48257-1-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2022-08-23 16:01:13 +02:00
..
9pfs trivial typos: namesapce 2022-06-28 11:06:44 +02:00
acpi acpi/nvdimm: Define trace events for NVDIMM and substitute nvdimm_debug() 2022-07-26 10:37:46 -04:00
adc hw/adc: Make adci[*] R/W in NPCM7XX ADC 2022-07-18 13:20:14 +01:00
alpha
arm hw/arm/virt-acpi-build: Present the GICR structure properly for GICv4 2022-08-12 11:25:18 +01:00
audio hw/audio/cs4231a: Const'ify global tables 2022-06-11 11:44:50 +02:00
avr
block virtio-scsi: fix race in virtio_scsi_dataplane_start() 2022-08-17 07:07:37 -04:00
char acpi: serial-is: replace ISADeviceClass::build_aml with AcpiDevAmlIfClass:build_dev_aml 2022-06-09 19:32:48 -04:00
core misc: fix commonly doubled up words 2022-08-01 11:58:02 +02:00
cpu
cris
cxl hw/cxl: Correctly handle variable sized mailbox input payloads. 2022-08-17 13:08:11 -04:00
display xlnx_dp: drop unsupported AUXCommand in xlnx_dp_aux_set_command 2022-08-08 11:40:06 +02:00
dma
gpio hw/gpio/aspeed: Don't let guests modify input pins 2022-07-14 16:24:38 +02:00
hppa lasips2: remove legacy lasips2_initfn() function 2022-07-18 19:28:46 +01:00
hyperv
i2c hw/i2c/pmbus: Add idle state to return 0xff's 2022-07-14 16:24:38 +02:00
i386 x86: disable rng seeding via setup_data 2022-08-17 07:07:37 -04:00
ide block: Change blk_{pread,pwrite}() param order 2022-07-12 12:14:56 +02:00
input pckbd: remove legacy i8042_mm_init() function 2022-07-18 19:28:46 +01:00
intc misc: fix commonly doubled up words 2022-08-01 11:58:02 +02:00
ipack
ipmi ipmi:smbus: Add a check around a memcpy 2022-08-01 06:40:50 -05:00
isa hw/i386/xen/xen-hvm: Inline xen_piix_pci_write_config_client() and remove it 2022-06-29 00:24:59 +02:00
loongarch hw/loongarch: remove acpi-build.c unused variable 'aml_len' 2022-08-05 10:02:07 -07:00
m68k q800: add default vendor and product information for scsi-cd devices 2022-07-13 16:58:58 +02:00
mem
microblaze
mips hw/mips/malta: turn off x86 specific features of PIIX4_PM 2022-08-08 23:23:11 +02:00
misc hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accesses 2022-08-08 23:43:11 +02:00
net hw/net/rocker: Avoid undefined shifts with more than 31 ports 2022-08-09 17:02:18 +08:00
nios2 hw/nios2: virt: pass random seed to fdt 2022-07-22 19:01:44 +02:00
nubus
nvme hw/nvme: do not enable ioeventfd by default 2022-08-01 12:01:21 +02:00
nvram block: Change blk_{pread,pwrite}() param order 2022-07-12 12:14:56 +02:00
openrisc
pci trivial patches pull request 20220629 2022-06-30 04:49:40 +05:30
pci-bridge pci-bridge/cxl_downstream: Add a CXL switch downstream port 2022-06-16 12:54:57 -04:00
pci-host i386/pc: create pci-host qdev prior to pc_memory_init() 2022-07-26 10:40:58 -04:00
pcmcia
ppc hw/ppc: sam460ex.c: store all GPIO lines in mal_irqs[] 2022-08-04 15:20:14 -03:00
rdma
remote vfio-user: handle reset of remote device 2022-06-15 16:43:42 +01:00
riscv hw/riscv: boot: Reduce FDT address alignment constraints 2022-07-03 10:03:20 +10:00
rtc hw/rtc/ls7a_rtc: Drop unused inline functions 2022-07-05 16:17:53 +05:30
rx hw/rx: pass random seed to fdt 2022-07-22 19:01:44 +02:00
s390x misc: fix commonly doubled up words 2022-08-01 11:58:02 +02:00
scsi scsi-generic: Fix emulated block limits VPD page 2022-08-23 16:01:13 +02:00
sd block: Change blk_{pread,pwrite}() param order 2022-07-12 12:14:56 +02:00
sensor hw/sensor: Add Renesas ISL69259 device model 2022-07-14 16:24:38 +02:00
sh4
smbios
sparc
sparc64 hw: Reuse TYPE_I8042 define 2022-06-11 11:44:50 +02:00
ssi aspeed/smc: Fix potential overflow 2022-06-30 09:21:13 +02:00
timer Fix 'writeable' typos 2022-06-08 19:38:47 +01:00
tpm acpi: tpm-tis: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML 2022-06-09 19:32:49 -04:00
tricore
usb hw/usb/hcd-xhci: Fix unbounded loop in xhci_ring_chain_length() (CVE-2020-14394) 2022-08-16 11:37:19 +02:00
vfio ui/console: Do not return a value with ui_info 2022-06-14 10:34:37 +02:00
virtio virtio-pci: don't touch pci on virtio reset 2022-08-17 13:08:11 -04:00
watchdog ppc/spapr: Implement H_WATCHDOG 2022-07-06 10:22:38 -03:00
xen xen/pass-through: don't create needless register group 2022-07-05 14:19:48 +01:00
xenpv
xtensa
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00