mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
virtio-blk: add "discard" and "write-zeroes" properties
In order to avoid migration issues, we enable DISCARD and WRITE_ZEROES features only for machine type >= 4.0 As discussed with Michael S. Tsirkin and Stefan Hajnoczi on the list [1], DISCARD operation should not have security implications (eg. page cache attacks), so we can enable it by default. [1] https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg00504.html Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Message-id: 20190221103314.58500-4-sgarzare@redhat.com Message-Id: <20190221103314.58500-4-sgarzare@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
bbe8bd4d85
commit
5c81161f80
2 changed files with 6 additions and 0 deletions
|
@ -33,6 +33,8 @@ GlobalProperty hw_compat_3_1[] = {
|
|||
{ "usb-kbd", "serial", "42" },
|
||||
{ "usb-mouse", "serial", "42" },
|
||||
{ "usb-kbd", "serial", "42" },
|
||||
{ "virtio-blk-device", "discard", "false" },
|
||||
{ "virtio-blk-device", "write-zeroes", "false" },
|
||||
};
|
||||
const size_t hw_compat_3_1_len = G_N_ELEMENTS(hw_compat_3_1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue