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

2021-11-17 Thread Qi, Yadong
> What is the use case for exposing secure erase in qemu? The whole concept for > a LBA based secure erase is generally not a very smart idea for flash based > media.. Hi, Christoph We got a user requirement: support BLKSECDISCARD in VM. Which is: ioctl(BLKSECDISCARD) in guest -> qemu backend

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

2021-11-15 Thread Qi, Yadong
> >Add new virtio feature: VIRTIO_BLK_F_SECDISCARD. > >Add new virtio command: VIRTIO_BLK_T_SECDISCARD. > > Has a proposal been sent out yet to virtio-comment mailing list for discussing > these specification changes? > Not yet. I will draft a proposal to virtio-comment if no big concern of this

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

2021-11-15 Thread Qi, Yadong
> > Notably absent: qapi/block-core.json. Without changing this, the option can't > be > available in -blockdev, which is the primary option to configure block device > backends. > > This patch seems to contain multiple logical changes that should be split into > separate patches: > > * Adding

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

2021-11-15 Thread Qi, Yadong
> The Linux block layer shares the DISCARD queue limits with SECDISCARD. > That's different from BLKZEROOUT (QEMU's WRITE_ZEROES). This is a Linux > implementation detail but I guess virtio-blk can share the DISCARD limits with > SECDISCARD too... > > > @@ -622,6 +628,7 @@ static int

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

2021-11-15 Thread Qi, Yadong
> > 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 > >

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

2021-11-15 Thread Qi, Yadong
> On Mon, Nov 15, 2021 at 12:52:00PM +0800, yadong...@intel.com wrote: > > 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 &