opnsense-src/sys/dev/xen
Roger Pau Monné 11432d8f07 xen/blk{front,back}: fix usage of sector sizes different than 512b
The units of the size reported in the 'sectors' xenbus node is always 512b,
regardless of the value of the 'sector-size' node.  The sector offsets in
the ring requests are also always based on 512b sectors, regardless of the
'sector-size' reported in xenbus.

Fix both blkfront and blkback to assume 512b sectors in the required fields.

The blkif.h public header has been recently updated in upstream Xen repository
to fix the regressions in the specification introduced by later modifications,
and clarify the base units of xenstore and shared ring fields.

PR: 280884
Reported by: Christian Kujau
MFC after: 1 week
Sponsored by: Cloud Software Group
Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D46756

(cherry picked from commit e7fe85643735ffdcf18ebef81343eaac9b8d2584)
2024-10-15 10:12:19 +02:00
..
balloon sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
blkback xen/blk{front,back}: fix usage of sector sizes different than 512b 2024-10-15 10:12:19 +02:00
blkfront xen/blk{front,back}: fix usage of sector sizes different than 512b 2024-10-15 10:12:19 +02:00
bus sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
console sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
control xen: improve shutdown hook 2023-12-08 18:02:44 -04:00
cpu sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
debug sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
efi sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
evtchn sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gntdev gntdev: Handle errors from suword32() in gntdev_alloc_gref() 2024-01-01 19:29:56 -05:00
grant_table xen: fix initialization of grant table frame array 2024-10-11 09:06:13 +02:00
netback sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netfront xen-netfront: attempt to make cleanup idempotent 2024-10-11 09:06:25 +02:00
privcmd sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
timer sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
xenpci sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
xenstore sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00