Re: [PATCH 00/12] hw/nvme: misc fixes and updates

2022-07-13 Thread Klaus Jensen
On Jun 23 23:18, Klaus Jensen wrote: > From: Klaus Jensen > > This series includes a couple of misc fixes as well as some cleanup > pertaining to the aio handling in flush, dsm, copy and zone reset. As > Jinhao gets around to iothread stuff, it might come in handy to have > this stuff cleaned up

[PATCH] hw/nvme: add trace events for ioeventfd

2022-07-13 Thread Klaus Jensen
From: Klaus Jensen While testing Jinhaos ioeventfd patch I found it useful with a couple of additional trace events since we no longer see the mmio events. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 8 hw/nvme/trace-events | 4 2 files changed, 12 insertions(+) diff

Re: [PULL 00/35] Block patches

2022-07-13 Thread Peter Maydell
On Tue, 12 Jul 2022 at 19:10, Hanna Reitz wrote: > > The following changes since commit 9548cbed4253e38570d29b8cff0bf77c998f: > > iotests/copy-before-write: specify required_fmts (2022-07-12 13:21:02 +0530) > > are available in the Git repository at: > > https://gitlab.com/hreitz/qemu.git

Re: [PATCH] hw/nvme: Add options to override hardcoded values

2022-07-13 Thread Keith Busch
On Wed, Jul 13, 2022 at 09:11:41PM +0200, Mauricio Sandt wrote: > On 13/07/2022 20:48, Keith Busch wrote: > > I guess I'm missing the bigger picture here. You are supposed to be able to > > retrieve these fields with ioctl's, so not sure what this has to do with > > malware. Why does the firmware

Re: [PATCH] hw/nvme: Add options to override hardcoded values

2022-07-13 Thread Mauricio Sandt
On 13/07/2022 20:48, Keith Busch wrote: I guess I'm missing the bigger picture here. You are supposed to be able to retrieve these fields with ioctl's, so not sure what this has to do with malware. Why does the firmware revision matter to this program? Oh I'm sorry, I forgot to explain

Re: [PATCH] hw/nvme: Add options to override hardcoded values

2022-07-13 Thread Keith Busch
On Wed, Jul 13, 2022 at 08:06:26PM +0200, Mauricio Sandt wrote: > My specific use case that required this patch is a piece of malware that used > several IOCTLs to read model, firmware, and nqn from the NVMe attached to the > VM. Modifying that info at the hypervisor level was a much better

Re: [PATCH] hw/nvme: Add options to override hardcoded values

2022-07-13 Thread Mauricio Sandt
I want to argue the other way around. Why shouldn't those values be tunable by the user? You are right; if misconfigured, it could potentially break stuff on the driver side, but unless you manually set values for model and firmware, the default is used (just like it is now), so this patch

Re: [PATCH] hw/nvme: Add options to override hardcoded values

2022-07-13 Thread Keith Busch
On Sun, Jun 12, 2022 at 12:35:09AM +0200, Mauricio Sandt wrote: > This small patch is the result of some recent malware research I did > in a QEMU VM. The malware used multiple ways of querying info from > the VM disk and I needed a clean way to change those values from the > hypervisor. > > I

Ping: [PATCH] hw/nvme: Add options to override hardcoded values

2022-07-13 Thread Mauricio Sandt
https://patchew.org/QEMU/20220611223509.32280-1-mauri...@mailbox.org/ https://lore.kernel.org/qemu-devel/20220611223509.32280-1-mauri...@mailbox.org/ On 12/06/2022 00:35, Mauricio Sandt wrote: This small patch is the result of some recent malware research I did in a QEMU VM. The malware used

Re: [RFC v3 3/8] block: pass size to bdrv_unregister_buf()

2022-07-13 Thread Hanna Reitz
On 08.07.22 06:17, Stefan Hajnoczi wrote: The only implementor of bdrv_register_buf() is block/nvme.c, where the size is not needed when unregistering a buffer. This is because util/vfio-helpers.c can look up mappings by address. Future block drivers that implement bdrv_register_buf() may not

Re: [RFC v3 1/8] blkio: add io_uring block driver using libblkio

2022-07-13 Thread Hanna Reitz
On 08.07.22 06:17, Stefan Hajnoczi wrote: libblkio (https://gitlab.com/libblkio/libblkio/) is a library for high-performance disk I/O. It currently supports io_uring and virtio-blk-vhost-vdpa with additional drivers under development. One of the reasons for developing libblkio is that other

Re: [RFC v4 1/9] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.

2022-07-13 Thread Stefan Hajnoczi
On Wed, Jul 13, 2022 at 07:12:17AM +0900, Damien Le Moal wrote: > On 7/13/22 00:49, Stefan Hajnoczi wrote: > > On Tue, Jul 12, 2022 at 10:13:37AM +0800, Sam Li wrote: > >> @@ -1801,6 +1809,130 @@ static off_t copy_file_range(int in_fd, off_t > >> *in_off, int out_fd, > >> } > >> #endif > >> >

Re: [RFC v4 1/9] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.

2022-07-13 Thread Stefan Hajnoczi
On Wed, Jul 13, 2022 at 08:51:45AM +0800, Sam Li wrote: > Stefan Hajnoczi 于2022年7月12日周二 23:49写道: > > > > On Tue, Jul 12, 2022 at 10:13:37AM +0800, Sam Li wrote: > > > diff --git a/block/file-posix.c b/block/file-posix.c > > > index 48cd096624..e7523ae2ed 100644 > > > --- a/block/file-posix.c > >