Re: [PATCH] ratelimit: restrict the delay time to a non-negative value

2022-09-20 Thread Wang Liang
On Wed, 2022-09-21 at 06:53 +0200, Markus Armbruster wrote: > Wang Liang writes: > > > On Tue, 2022-09-20 at 13:18 +, Alberto Garcia wrote: > > > On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote: > > > > From: Wang Liang > > > > > > > > The delay time should never be a negative

Re: [PATCH] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-20 Thread 陈浩
在 2022/9/21 13:28, Raphael Norwitz 写道: I have some concerns from the vhost-user-blk side. >On Tue, Sep 13, 2022 at 5:13 PM Hao Chen wrote: >> >> When use dpdk-vdpa tests vdpa device. You need to specify the mac address to >> start the virtual machine through libvirt or qemu, but now, the l

[PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-20 Thread chenh
From: Hao Chen When use dpdk-vdpa tests vdpa device. You need to specify the mac address to start the virtual machine through libvirt or qemu, but now, the libvirt or qemu can call dpdk vdpa vendor driver's ops .get_config through vhost_net_get_config to get the mac address of the vdpa hardware

Re: [PATCH] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-20 Thread Raphael Norwitz
I have some concerns from the vhost-user-blk side. >On Tue, Sep 13, 2022 at 5:13 PM Hao Chen wrote: >> >> When use dpdk-vdpa tests vdpa device. You need to specify the mac address to >> start the virtual machine through libvirt or qemu, but now, the libvirt or >> qemu can call dpdk vdpa ven

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-20 Thread Markus Armbruster
Bernhard Beschow writes: > Am 20. September 2022 11:36:47 UTC schrieb Markus Armbruster > : >>Alistair Francis writes: >> >>> On Tue, Sep 20, 2022 at 9:18 AM Bernhard Beschow wrote: SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to inherit from TYPE_MACHIN

Re: [PATCH] ratelimit: restrict the delay time to a non-negative value

2022-09-20 Thread Markus Armbruster
Wang Liang writes: > On Tue, 2022-09-20 at 13:18 +, Alberto Garcia wrote: >> On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote: >> > From: Wang Liang >> > >> > The delay time should never be a negative value. >> > >> > -return limit->slice_end_time - now; >> > +return M

Re: [PATCH v9 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-20 Thread Damien Le Moal
On 9/20/22 17:51, Klaus Jensen wrote: On Sep 10 13:27, Sam Li wrote: Add a new zoned_host_device BlockDriver. The zoned_host_device option accepts only zoned host block devices. By adding zone management operations in this new BlockDriver, users can use the new block layer APIs including Report

Re: [PATCH] vhost-user-blk: fix the resize crash

2022-09-20 Thread Raphael Norwitz
>If the os is not installed and doesn't have the virtio guest driver, >the vhost dev isn't started, so the dev->vdev is NULL. > >Reproduce: mount a Win 2019 iso, go into the install ui, then resize >the virtio-blk device, qemu crash. > >Signed-off-by: Li Feng fen...@smartx.com

Re: [PATCH] ratelimit: restrict the delay time to a non-negative value

2022-09-20 Thread Wang Liang
On Tue, 2022-09-20 at 13:18 +, Alberto Garcia wrote: > On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote: > > From: Wang Liang > > > > The delay time should never be a negative value. > > > > -return limit->slice_end_time - now; > > +return MAX(limit->slice_end_time - now

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-20 Thread Bernhard Beschow
Am 20. September 2022 09:02:41 UTC schrieb BALATON Zoltan : > > >On Tue, 20 Sep 2022, Philippe Mathieu-Daudé via wrote: > >> On 20/9/22 01:17, Bernhard Beschow wrote: >>> The functions just access a global pointer and perform some pointer >>> arithmetic on top. Allow the compiler to see through thi

Re: [PATCH 0/9] Deprecate sysbus_get_default() and get_system_memory() et. al

2022-09-20 Thread Bernhard Beschow
Am 20. September 2022 15:36:26 UTC schrieb Mark Cave-Ayland : >On 20/09/2022 10:55, Peter Maydell wrote: > >> On Tue, 20 Sept 2022 at 00:18, Bernhard Beschow wrote: >>> >>> In address-spaces.h it can be read that get_system_memory() and >>> get_system_io() are temporary interfaces which "should

Re: [PATCH 0/9] Deprecate sysbus_get_default() and get_system_memory() et. al

2022-09-20 Thread Bernhard Beschow
Am 20. September 2022 09:55:37 UTC schrieb Peter Maydell : >On Tue, 20 Sept 2022 at 00:18, Bernhard Beschow wrote: >> >> In address-spaces.h it can be read that get_system_memory() and >> get_system_io() are temporary interfaces which "should only be used >> temporarily >> until a proper bus int

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-20 Thread Bernhard Beschow
Am 20. September 2022 11:36:47 UTC schrieb Markus Armbruster : >Alistair Francis writes: > >> On Tue, Sep 20, 2022 at 9:18 AM Bernhard Beschow wrote: >>> >>> SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to >>> inherit from TYPE_MACHINE. This is an inconsistency which can

Re: [PATCH 8/9] softmmu/physmem: Let SysBusState absorb memory region and address space singletons

2022-09-20 Thread Bernhard Beschow
Am 20. September 2022 08:50:01 UTC schrieb BALATON Zoltan : > > >On Tue, 20 Sep 2022, Philippe Mathieu-Daudé via wrote: > >> On 20/9/22 01:17, Bernhard Beschow wrote: >>> These singletons are actually properties of the system bus but so far it >>> hasn't been modelled that way. Fix this to make thi

Re: [PATCH 2/9] exec/hwaddr.h: Add missing include

2022-09-20 Thread Bernhard Beschow
Am 20. September 2022 04:50:51 UTC schrieb "Philippe Mathieu-Daudé" : >On 20/9/22 01:17, Bernhard Beschow wrote: >> The next commit would not compile w/o the include directive. >> >> Signed-off-by: Bernhard Beschow >> --- >> include/exec/hwaddr.h | 1 + >> 1 file changed, 1 insertion(+) >> >

Re: [PATCH] block: use the request length for iov alignment

2022-09-20 Thread Keith Busch
On Wed, Sep 14, 2022 at 11:36:14AM +0100, Kevin Wolf wrote: > Am 13.09.2022 um 15:12 hat Keith Busch geschrieben: > > On Thu, Sep 08, 2022 at 09:45:26AM -0700, Keith Busch wrote: > > > From: Keith Busch > > > > > > An iov length needs to be aligned to the logical block size, which may > > > be la

Re: [PATCH 0/9] Deprecate sysbus_get_default() and get_system_memory() et. al

2022-09-20 Thread Mark Cave-Ayland
On 20/09/2022 10:55, Peter Maydell wrote: On Tue, 20 Sept 2022 at 00:18, Bernhard Beschow wrote: In address-spaces.h it can be read that get_system_memory() and get_system_io() are temporary interfaces which "should only be used temporarily until a proper bus interface is available". This sta

[PATCH] ratelimit: restrict the delay time to a non-negative value

2022-09-20 Thread wangliangzz
From: Wang Liang The delay time should never be a negative value. Signed-off-by: Wang Liang --- include/qemu/ratelimit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h index 48bf59e857..c8ea855fc1 100644 --- a/include/qem

Re: [PATCH 4/9] hw/ppc/spapr: Fix code style problems reported by checkpatch

2022-09-20 Thread Daniel Henrique Barboza
On 9/19/22 20:17, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow --- Reviewed-by: Daniel Henrique Barboza And I've queued it in gitlab.com/danielhb/qemu/tree/ppc-next since it's not tied with the rest of the series. Thanks, Daniel include/hw/ppc/spapr.h | 5 +++-- 1 file c

Re: [PATCH] ratelimit: restrict the delay time to a non-negative value

2022-09-20 Thread Alberto Garcia
On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote: > From: Wang Liang > > The delay time should never be a negative value. > > -return limit->slice_end_time - now; > +return MAX(limit->slice_end_time - now, 0); How can this be negative? slice_end_time is guaranteed to be large

Re: [PATCH v9 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-20 Thread Sam Li
Klaus Jensen 于2022年9月20日周二 16:51写道: > > On Sep 10 13:27, Sam Li wrote: > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > accepts only zoned host block devices. By adding zone management > > operations in this new BlockDriver, users can use the new block > > layer APIs i

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-20 Thread Markus Armbruster
Alistair Francis writes: > On Tue, Sep 20, 2022 at 9:18 AM Bernhard Beschow wrote: >> >> SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to >> inherit from TYPE_MACHINE. This is an inconsistency which can cause >> undefined behavior such as memory corruption. >> >> Change S

[PATCH v2 23/39] tests/qtest: ide-test: Open file in binary mode

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng By default Windows opens file in text mode, while a POSIX compliant implementation treats text files and binary files the same. The fopen() 'mode' string can include the letter 'b' to indicate binary mode shall be used. POSIX spec says the character 'b' shall have no effect, b

[PATCH v2 20/39] tests/qtest: {ahci, ide}-test: Use relative path for temporary files for win32

2022-09-20 Thread Bin Meng
From: Bin Meng These test cases uses "blkdebug:path/to/config:path/to/image" for testing. On Windows, absolute file paths contain the delimiter ':' which causes the blkdebug filename parser fail to parse filenames. Signed-off-by: Bin Meng --- (no changes since v1) tests/qtest/ahci-test.c | 2

[PATCH v2 07/39] tests: Avoid using hardcoded /tmp in test cases

2022-09-20 Thread Bin Meng
From: Bin Meng Lots of test cases were written to use hardcoded /tmp directory for temporary files. To avoid this, we update them to use g_dir_make_tmp() or g_file_open_tmp() when appropriate. Signed-off-by: Bin Meng --- Changes in v2: - Use g_dir_make_tmp(), g_file_open_tmp() when appropriate

[PATCH v2 03/39] block: Unify the get_tmp_filename() implementation

2022-09-20 Thread Bin Meng
From: Bin Meng At present get_tmp_filename() has platform specific implementations to get the directory to use for temporary files. Switch over to use g_get_tmp_dir() which works on all supported platforms. Signed-off-by: Bin Meng --- (no changes since v1) block.c | 16 ++-- 1 fi

[PATCH v2 00/39] tests/qtest: Enable running qtest on Windows

2022-09-20 Thread Bin Meng
In preparation to adding virtio-9p support on Windows, this series enables running qtest on Windows, so that we can run the virtio-9p tests on Windows to make sure it does not break accidently. Changes in v2: - new patch: "tests: Change to use g_mkdir()" - new patch: "tests/qtest: i440fx-test: Rew

[PATCH v2 08/39] block/vvfat: Unify the mkdir() call

2022-09-20 Thread Bin Meng
From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng --- Changes in v2: - Change to u

Re: [PATCH 0/9] Deprecate sysbus_get_default() and get_system_memory() et. al

2022-09-20 Thread Peter Maydell
On Tue, 20 Sept 2022 at 00:18, Bernhard Beschow wrote: > > In address-spaces.h it can be read that get_system_memory() and > get_system_io() are temporary interfaces which "should only be used > temporarily > until a proper bus interface is available". This statement certainly extends > to > the

Re: [PATCH 1/8] qtest: "-display none" is set in qtest_init()

2022-09-20 Thread Thomas Huth
On 02/09/2022 18.51, Juan Quintela wrote: So we don't need to set anywhere else. Signed-off-by: Juan Quintela --- ... diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index afc1d20355..94b00288d9 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-20 Thread BALATON Zoltan
On Tue, 20 Sep 2022, Philippe Mathieu-Daudé via wrote: On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch

Re: [PATCH v9 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-20 Thread Klaus Jensen
On Sep 10 13:27, Sam Li wrote: > Add a new zoned_host_device BlockDriver. The zoned_host_device option > accepts only zoned host block devices. By adding zone management > operations in this new BlockDriver, users can use the new block > layer APIs including Report Zone and four zone management ope

Re: [PATCH 8/9] softmmu/physmem: Let SysBusState absorb memory region and address space singletons

2022-09-20 Thread BALATON Zoltan
On Tue, 20 Sep 2022, Philippe Mathieu-Daudé via wrote: On 20/9/22 01:17, Bernhard Beschow wrote: These singletons are actually properties of the system bus but so far it hasn't been modelled that way. Fix this to make this relationship very obvious. The idea of the patch is to restrain futhe

Re: [PATCH 8/8] meson-build: test-crypto-secret depends on CONFIG_SECRET_KEYRING

2022-09-20 Thread Daniel P . Berrangé
On Fri, Sep 02, 2022 at 06:51:26PM +0200, Juan Quintela wrote: > With this change "make check" works when configured with --disable-keyring. > > Signed-off-by: Juan Quintela > --- > tests/unit/meson.build | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tests/unit/mes