virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Alvaro Karsz <alvaro.karsz@solid-run.com>
Cc: Jens Axboe <axboe@kernel.dk>, Paolo Bonzini <pbonzini@redhat.com>,
	mst@redhat.com, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v3] virtio_blk: add SECURE ERASE command support
Date: Thu, 22 Sep 2022 13:45:09 -0400	[thread overview]
Message-ID: <YyyfJQo7N/iMPLNP@fedora> (raw)
In-Reply-To: <20220921082729.2516779-1-alvaro.karsz@solid-run.com>


[-- Attachment #1.1: Type: text/plain, Size: 1450 bytes --]

On Wed, Sep 21, 2022 at 11:27:29AM +0300, Alvaro Karsz wrote:
> Support for the VIRTIO_BLK_F_SECURE_ERASE VirtIO feature.
> 
> A device that offers this feature can receive VIRTIO_BLK_T_SECURE_ERASE
> commands.
> 
> A device which supports this feature has the following fields in the
> virtio config:
> 
> - max_secure_erase_sectors
> - max_secure_erase_seg
> - secure_erase_sector_alignment
> 
> max_secure_erase_sectors and secure_erase_sector_alignment are expressed
> in 512-byte units.
> 
> Every secure erase command has the following fields:
> 
> - sectors: The starting offset in 512-byte units.
> - num_sectors: The number of sectors.
> 
> Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>
> ---
> v2:
> 	- Set queue max discard segments as the minimum between
> 	  max_secure_erase_seg and max_discard_seg.
> 	- Set queue discard granularity as the minimum between
> 	  secure_erase_sector_alignment and discard_sector_alignment.
> 
> v3:
> 	- Usage of min_not_zero.
> 	- Fail probe if any of the secure erase parameters in the virtio
> 	  config is 0.
> 	- Add a comment explaining why we use the minimum between the discard
> 	  and secure erase limits.
> ---
>  drivers/block/virtio_blk.c      | 110 ++++++++++++++++++++++++++------
>  include/uapi/linux/virtio_blk.h |  19 ++++++
>  2 files changed, 111 insertions(+), 18 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 183 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2022-09-22 17:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21  8:27 [PATCH v3] virtio_blk: add SECURE ERASE command support Alvaro Karsz
2022-09-22 17:45 ` Stefan Hajnoczi [this message]
2022-09-28 10:48   ` Alvaro Karsz
2022-09-28 13:15     ` Michael S. Tsirkin
2022-09-29  7:13       ` Alvaro Karsz
2022-09-29  7:20         ` Michael S. Tsirkin
2022-09-29  7:29           ` Alvaro Karsz
2022-09-29  7:45             ` Michael S. Tsirkin
2022-09-29  8:51               ` Alvaro Karsz
2022-10-07 13:12                 ` Michael S. Tsirkin
2022-10-08  4:48                 ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YyyfJQo7N/iMPLNP@fedora \
    --to=stefanha@redhat.com \
    --cc=alvaro.karsz@solid-run.com \
    --cc=axboe@kernel.dk \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).