Re: does drive_get_next(IF_NONE) make sense?

2021-11-14 Thread Peter Maydell
On Fri, 12 Nov 2021 at 13:34, Markus Armbruster wrote: > > Thomas Huth writes: > > > On 03/11/2021 09.41, Markus Armbruster wrote: > >> Peter Maydell writes: > >> > >>> Does it make sense for a device/board to do drive_get_next(IF_NONE) ? > >> Short answer: hell, no! ;) > > > > Would it make se

Re: does drive_get_next(IF_NONE) make sense?

2021-11-14 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 12 Nov 2021 at 13:34, Markus Armbruster wrote: >> >> Thomas Huth writes: >> >> > On 03/11/2021 09.41, Markus Armbruster wrote: >> >> Peter Maydell writes: >> >> >> >>> Does it make sense for a device/board to do drive_get_next(IF_NONE) ? >> >> Short answer: hell

Re: does drive_get_next(IF_NONE) make sense?

2021-11-14 Thread Alistair Francis
On Mon, Nov 15, 2021 at 3:32 PM Markus Armbruster wrote: > > Peter Maydell writes: > > > On Fri, 12 Nov 2021 at 13:34, Markus Armbruster wrote: > >> > >> Thomas Huth writes: > >> > >> > On 03/11/2021 09.41, Markus Armbruster wrote: > >> >> Peter Maydell writes: > >> >> > >> >>> Does it make se

[PATCH 0/2] support BLKSECDISCARD

2021-11-14 Thread yadong . qi
From: Yadong Qi Support BLKSECDISCARD passthrough for raw host_device backend. For virtio-blk device: Add new virtio feature: VIRTIO_BLK_F_SECDISCARD. Add new virtio command: VIRTIO_BLK_T_SECDISCARD. Usage: qemu-system-x86_64 \ ... \ -drive file=/dev/mmcblk0p2,if=none,forma

[PATCH 1/2] block:hdev: support BLKSECDISCARD

2021-11-14 Thread yadong . qi
From: Yadong Qi Add a new option "secdiscard" for block drive. Parse it and record it in bs->open_flags as bit(BDRV_O_SECDISCARD). Add a new BDRV_REQ_SECDISCARD bit for secure discard request from virtual device. For host_device backend: implement by ioctl(BLKSECDISCARD) on real host block devi

[PATCH 2/2] virtio-blk: support BLKSECDISCARD

2021-11-14 Thread yadong . qi
From: Yadong Qi Add new virtio feature: VIRTIO_BLK_F_SECDISCARD. Add new virtio command: VIRTIO_BLK_T_SECDISCARD. This feature is disabled by default, it will check the backend bs->open_flags & BDRV_O_SECDISCARD, enable it if BDRV_O_SECDISCARD is supported. Signed-off-by: Yadong Qi --- hw/blo