Re: [PATCH v5 1/6] device_tree: add qemu_fdt_setprop_strings() helper

2022-10-20 Thread Andrew Jones
On Fri, Oct 21, 2022 at 06:58:03AM +0100, Ben Dooks wrote: > Add a helper to set a property from a set of strings > to reduce the following code: > > static const char * const clint_compat[2] = { > "sifive,clint0", "riscv,clint0" > }; > > qemu_fdt_setprop_string_array(fdt, nod

Re: [PATCH] qga: add channel path to error messages

2022-10-20 Thread Marc-André Lureau
Hi On Fri, Oct 21, 2022 at 2:31 AM Bjørn Forsman wrote: > It's useful to know which device was used if/when it fails. > > channel-win32.c had this since 2015, with > c69403fcd4a0cb89f838a212ab71e4a1a3464c95 ("qemu-ga: debug printouts to > help troubleshoot installation"), this brings channel-pos

Re: [PATCH v13 00/17] qapi: net: add unix socket type support to netdev backend

2022-10-20 Thread Jason Wang
On Fri, Oct 21, 2022 at 2:46 PM Markus Armbruster wrote: > > Jason Wang writes: > > > I've queued this version and will send pull requests shortly. > > > > Any future comment we can do patches on top. > > Please give Laurent and me a few hours to try to improve PATCH 17's > commit message. Which

Re: [PATCH 4/4] hw/block/nvme: add zone descriptor changed AEN

2022-10-20 Thread Klaus Jensen
On Oct 20 17:18, clay.may...@kioxia.com wrote: > From: Clay Mayers > > If a namespace's param.zoned.finish_time is non-zero, > controllers register with the namespace to be notified > when entries are added to its zone-descriptor-changed > log page. If the zone-descriptor-changed aen is enabled,

Re: [PATCH v13 00/17] qapi: net: add unix socket type support to netdev backend

2022-10-20 Thread Markus Armbruster
Jason Wang writes: > I've queued this version and will send pull requests shortly. > > Any future comment we can do patches on top. Please give Laurent and me a few hours to try to improve PATCH 17's commit message. Which you could then integrate without a respin.

Re: [PATCH] hw/acpi/erst.c: Fix memset argument order

2022-10-20 Thread Christian A. Ehrhardt
On Fri, Oct 21, 2022 at 06:22:50AM +0200, Markus Armbruster wrote: > "Christian A. Ehrhardt" writes: > > > Hi Markus, > > > > On Thu, Oct 20, 2022 at 08:14:32AM +0200, Markus Armbruster wrote: > >> "Christian A. Ehrhardt" writes: > >> > >> > Fix memset argument order: The second argument is > >

[PATCH v5 4/6] hw/core: use qemu_fdt_setprop_strings()

2022-10-20 Thread Ben Dooks
Change to using the qemu_fdt_setprop_strings() helper in hw/core code. Signed-off-by: Ben Dooks --- hw/core/guest-loader.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/core/guest-loader.c b/hw/core/guest-loader.c index c61ebc4144..7b8e32e06f 100644 --- a/h

Re: [PATCH 1/4] hw/block/nvme: add ZONE_FINISH_RECOMMENDED functionality

2022-10-20 Thread Klaus Jensen
On Oct 20 17:18, clay.may...@kioxia.com wrote: > From: Clay Mayers > > Adds ns.param.zoned.finish_time, which sets the number of > seconds a zone can remain active before the zone attribute > ZONE_FINISH_RECOMMENDED is set. > > This requires scanning the exp open, imp open and closed lists > of

Re: [PATCH 2/4] hw/block/nvme: add zone descriptor changed log page

2022-10-20 Thread Klaus Jensen
On Okt 20 17:18, clay.may...@kioxia.com wrote: > From: Clay Mayers > > Zones marked with ZONE_FINISH_RECOMMENDED are added to the zone > descriptor changed log page. Once read with RAE cleared, they are > removed from the list. > > Zones stay in the list regardless of what other states the zone

Re: [PATCH 3/4] hw/block/nvme: supply dw1 for aen result

2022-10-20 Thread Klaus Jensen
On Okt 20 17:18, clay.may...@kioxia.com wrote: > From: Clay Mayers > > cqe.dw1 AEN is sometimes required to convey the NSID of the log page > to read. This is the case for the zone descriptor changed log > page. > > Signed-off-by: Clay Mayers > --- > hw/nvme/ctrl.c | 19 +++-

Re: [PATCH] hw/nvme: reenable cqe batching

2022-10-20 Thread Jinhao Fan
at 1:37 PM, Klaus Jensen wrote: > On Okt 21 10:37, Jinhao Fan wrote: >> at 7:35 PM, Klaus Jensen wrote: >> >>> Commit 2e53b0b45024 ("hw/nvme: Use ioeventfd to handle doorbell >>> updates") had the unintended effect of disabling batching of CQEs. >>> >>> This patch changes the sq/cq timers to b

[PATCH v5 2/6] hw/core: don't check return on qemu_fdt_setprop_string_array()

2022-10-20 Thread Ben Dooks
The qemu_fdt_setprop_string_array() does not return error codes and will call exit() if any of the fdt calls fails (and should print an error with the node being altered). This is done to prepare for the change for qemu_fdt_setprop_strings() helper which does not return any error codes (hw/core/gue

add qemu_fdt_setprop_strings

2022-10-20 Thread Ben Dooks
Add a qemu_fdt_setprop_strings to set a string array into a device-tree. Only minor updates from v4 to fix a couple of minor patch issues.

[PATCH v5 6/6] hw/arm: change to use qemu_fdt_setprop_strings()

2022-10-20 Thread Ben Dooks
Change to using qemu_fdt_setprop_strings() instead of using \0 separated string arrays. Note, also there were a few places where qemu_fdt_setprop_string() can be used in the same areas. Signed-off-by: Ben Dooks --- v4: - fixed checkpatch errors with string - fixed patch subject --- hw/arm/boot

Re: [PATCH 0/4] hw/block/nvme: Implement ZNS finish-zone ZDC AEN

2022-10-20 Thread Klaus Jensen
On Okt 20 17:18, clay.may...@kioxia.com wrote: > From: Clay Mayers > > ZNS controllers have the option to limit the time a zone can remain in > the active state. It begins with a background process in the controller > setting the finish-zone-recommended FZR attribute for a zone. As part of > se

[PATCH v5 5/6] hw/mips: use qemu_fdt_setprop_strings()

2022-10-20 Thread Ben Dooks
Change to using qemu_fdt_setprop_strings() helper in hw/mips. Signed-off-by: Ben Dooks Reviewed-by: Peter Maydell --- hw/mips/boston.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index d2ab9da1a0..759f6daafe 100644 --- a/hw/mip

[PATCH v5 3/6] hw/riscv: use qemu_fdt_setprop_strings() for string arrays

2022-10-20 Thread Ben Dooks
Use the qemu_fdt_setprop_strings() in sifve_u.c to simplify the code. Signed-off-by: Ben Dooks --- v5: fix re-ordering in sifive_u --- hw/riscv/sifive_u.c | 18 +- hw/riscv/spike.c| 7 ++- hw/riscv/virt.c | 25 ++--- 3 files changed, 13 insertions

[PATCH v5 1/6] device_tree: add qemu_fdt_setprop_strings() helper

2022-10-20 Thread Ben Dooks
Add a helper to set a property from a set of strings to reduce the following code: static const char * const clint_compat[2] = { "sifive,clint0", "riscv,clint0" }; qemu_fdt_setprop_string_array(fdt, nodename, "compatible", (char **)&clint_compat, ARRAY_SIZE(clint_compa

Re: [PATCH v13 00/17] qapi: net: add unix socket type support to netdev backend

2022-10-20 Thread Jason Wang
On Fri, Oct 21, 2022 at 12:26 AM Laurent Vivier wrote: > > "-netdev socket" only supports inet sockets. > > It's not a complex task to add support for unix sockets, but > the socket netdev parameters are not defined to manage well unix > socket parameters. > > As discussed in: > > "socket.c adde

Re: [PATCH v13 17/17] net: stream: add QAPI events to report connection state

2022-10-20 Thread Markus Armbruster
Laurent Vivier writes: > The netdev reports NETDEV_STREAM_CONNECTED event when the backend > is connected, and NETDEV_STREAM_DISCONNECTED when it is disconnected. Use cases? Could similar event signalling be useful for other kinds of netdev backends? > The NETDEV_STREAM_CONNECTED event include

Re: [PATCH v6 07/10] acpi/tests/avocado/bits: add biosbits config file for running bios tests

2022-10-20 Thread Ani Sinha
On Thu, Oct 20, 2022 at 11:18 PM Alex Bennée wrote: > > > Ani Sinha writes: > > > This change adds initial biosbits config file that instructs biosbits to run > > bios test suits in batch mode. Additionally acpi and smbios structures are > > also > > dumped. > > Is it possible to split this into

Re: [PATCH] hw/nvme: reenable cqe batching

2022-10-20 Thread Klaus Jensen
On Okt 21 10:37, Jinhao Fan wrote: > at 7:35 PM, Klaus Jensen wrote: > > > Commit 2e53b0b45024 ("hw/nvme: Use ioeventfd to handle doorbell > > updates") had the unintended effect of disabling batching of CQEs. > > > > This patch changes the sq/cq timers to bottom halfs and instead of > > calling

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-20 Thread Greg KH
On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: > On 2022-10-20 22:20, Yang Yingliang wrote: > > The previous discussion link: > > https://lore.kernel.org/lkml/0db486eb-6927-927e-3629-958f8f211...@huawei.com/T/ > > The very first discussion on this was here: > > https://www.spinics.

Re: [RFC PATCH 2/3] tcg/riscv: Fix tcg_out_opc_imm when imm exceeds

2022-10-20 Thread Richard Henderson
On Fri, 21 Oct 2022, 12:57 LIU Zhiwei, wrote: > > On 2022/10/20 19:22, Richard Henderson wrote: > > On 10/20/22 20:41, LIU Zhiwei wrote: > >> TYPE-I immediate can only represent a signed 12-bit value. If immediate > >> exceed, mov it to an register. > >> > >> Signed-off-by: LIU Zhiwei > >> --- >

Re: [PATCH] hw/acpi/erst.c: Fix memset argument order

2022-10-20 Thread Markus Armbruster
"Christian A. Ehrhardt" writes: > Hi Markus, > > On Thu, Oct 20, 2022 at 08:14:32AM +0200, Markus Armbruster wrote: >> "Christian A. Ehrhardt" writes: >> >> > Fix memset argument order: The second argument is >> > the value, the length goes last. >> >> Impact of the bug? > > Well, this is a me

[PATCH v1 3/3] hw/loongarch: Add TPM device for LoongArch virt machine

2022-10-20 Thread Xiaojuan Yang
Add TPM device for LoongArch virt machine, including establish TPM acpi info and add TYPE_TPM_TIS_SYSBUS to dynamic_sysbus_devices list. Signed-off-by: Xiaojuan Yang --- hw/loongarch/acpi-build.c | 50 +-- hw/loongarch/virt.c | 4 2 files changed,

[PATCH v1 2/3] hw/loongarch: Improve fdt for LoongArch virt machine

2022-10-20 Thread Xiaojuan Yang
Add new items into LoongArch FDT, including rtc and uart info. Signed-off-by: Xiaojuan Yang --- hw/loongarch/virt.c| 31 +++ include/hw/pci-host/ls7a.h | 1 + 2 files changed, 32 insertions(+) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index fe33

Re: [PATCH 2/4] vhost: toggle device callbacks using used event idx

2022-10-20 Thread Jason Wang
On Thu, Oct 20, 2022 at 11:53 PM Eugenio Pérez wrote: > > Actually use the new field of the used ring and tell the device if SVQ > wants to be notified. > > The code is not reachable at the moment. > > Signed-off-by: Eugenio Pérez > --- > hw/virtio/vhost-shadow-virtqueue.c | 18 +++--

Re: [PATCH] vdpa: Remove shadow CVQ command check

2022-10-20 Thread Jason Wang
On Thu, Oct 20, 2022 at 4:02 PM Eugenio Pérez wrote: > > The guest will see undefined behavior if it issue not negotiate > commands, bit it is expected somehow. > > Simplify code deleting this check. > > Signed-off-by: Eugenio Pérez > Acked-by: Jason Wang Applied. Thanks > --- > net/vhost-vd

Re: [PATCH v3 0/2] virtio-net: re-arm/re-schedule when tx_burst stops virtio_net_flush_tx()

2022-10-20 Thread Jason Wang
On Thu, Oct 20, 2022 at 5:59 PM Laurent Vivier wrote: > > When virtio_net_flush_tx() reaches the tx_burst value all the queue is > not flushed and nothing restart the timer or the bottom half function. > > For BH, this is only missing in the virtio_net_tx_complete() function. > For the timer, the

Re: [RFC PATCH v2 6/8] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-10-20 Thread Jason Wang
On Thu, Oct 20, 2022 at 3:01 PM Eugenio Perez Martin wrote: > > On Thu, Oct 20, 2022 at 6:35 AM Jason Wang wrote: > > > > On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > > > > > Since this capability is emulated by qemu shadowed CVQ cannot forward it > > > to the device. > > > > I wonde

Re: [PATCH] vdpa: Delete duplicated vdpa_feature_bits entry

2022-10-20 Thread Jason Wang
On Thu, Oct 20, 2022 at 4:01 PM Eugenio Pérez wrote: > > This entry was duplicated on referenced commit. Removing it. > > Fixes: 402378407dbd ("vhost-vdpa: multiqueue support") > Signed-off-by: Eugenio Pérez > Acked-by: Jason Wang I've queued this. Thanks > --- > net/vhost-vdpa.c | 1 - > 1

Re: [RFC PATCH v2 2/8] vdpa: Save emulated features list in vhost_vdpa

2022-10-20 Thread Jason Wang
On Thu, Oct 20, 2022 at 2:34 PM Eugenio Perez Martin wrote: > > On Thu, Oct 20, 2022 at 6:23 AM Jason Wang wrote: > > > > On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > > > > > At this moment only _F_LOG is added there. > > > > > > However future patches add features that depend on the

Re: [RFC PATCH 2/3] tcg/riscv: Fix tcg_out_opc_imm when imm exceeds

2022-10-20 Thread LIU Zhiwei
On 2022/10/20 19:22, Richard Henderson wrote: On 10/20/22 20:41, LIU Zhiwei wrote: TYPE-I immediate can only represent a signed 12-bit value. If immediate exceed, mov it to an register. Signed-off-by: LIU Zhiwei ---   tcg/riscv/tcg-target.c.inc | 28 +++-   1 file chan

Re: [PATCH] hw/nvme: reenable cqe batching

2022-10-20 Thread Jinhao Fan
at 7:35 PM, Klaus Jensen wrote: > Commit 2e53b0b45024 ("hw/nvme: Use ioeventfd to handle doorbell > updates") had the unintended effect of disabling batching of CQEs. > > This patch changes the sq/cq timers to bottom halfs and instead of > calling nvme_post_cqes() immediately (causing an interru

[PATCH 11/11] ubifs: Fix memory leak in ubifs_sysfs_init()

2022-10-20 Thread Yang Yingliang via
From: Liu Shixin When insmod ubifs.ko, a kmemleak reported as below: unreferenced object 0x88817fb1a780 (size 8): comm "insmod", pid 25265, jiffies 4295239702 (age 100.130s) hex dump (first 8 bytes): 75 62 69 66 73 00 ff ff ubifs... backtrace: []

[PATCH 10/11] drm/amdgpu/discovery: fix possible memory leak

2022-10-20 Thread Yang Yingliang via
If kset_register() fails, the refcount of kobject is not 0, the name allocated in kobject_set_name(&kset.kobj, ...) is leaked. Fix this by calling kset_put(), so that it will be freed in callback function kobject_cleanup(). Cc: sta...@vger.kernel.org Fixes: a6c40b178092 ("drm/amdgpu: Show IP disco

[PATCH 08/11] erofs: fix possible memory leak in erofs_init_sysfs()

2022-10-20 Thread Yang Yingliang via
Inject fault while loading module, kset_register() may fail, if it fails, but the refcount of kobject is not decreased to 0, the name allocated in kobject_set_name() is leaked. Fix this by calling kset_put(), so that name can be freed in callback function kobject_cleanup(). unreferenced object 0xf

[PATCH 06/11] firmware: qemu_fw_cfg: fix possible memory leak in fw_cfg_build_symlink()

2022-10-20 Thread Yang Yingliang via
Inject fault while loading module, kset_register() may fail, if it fails, but the refcount of kobject is not decreased to 0, the name allocated in kobject_set_name() is leaked. To fix this by calling kset_put(), so that name can be freed in callback function kobject_cleanup() and 'subdir' is freed

Re: [PATCH v2] vhost: Warn if DEVIOTLB_UNMAP is not supported and ats is set

2022-10-20 Thread Jason Wang
On Thu, Oct 20, 2022 at 9:03 PM Eric Auger wrote: > > Hi Jason, > > On 10/20/22 05:58, Jason Wang wrote: > > On Wed, Oct 19, 2022 at 8:27 PM Eric Auger wrote: > >> Since b68ba1ca5767 ("memory: Add IOMMU_NOTIFIER_DEVIOTLB_UNMAP > >> IOMMUTLBNotificationType"), vhost attempts to register DEVIOTLB_U

[PATCH 00/11] fix memory leak while kset_register() fails

2022-10-20 Thread Yang Yingliang via
The previous discussion link: https://lore.kernel.org/lkml/0db486eb-6927-927e-3629-958f8f211...@huawei.com/T/ kset_register() is currently used in some places without calling kset_put() in error path, because the callers think it should be kset internal thing to do, but the driver core can not kno

[PATCH 02/11] kset: add null pointer check in kset_put()

2022-10-20 Thread Yang Yingliang via
kset_put() can be called from drivers, add null pointer check to make it more robust. Signed-off-by: Yang Yingliang --- include/linux/kobject.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 57fb972fea05..e81de8ba41a2

[PATCH 01/11] kset: fix documentation for kset_register()

2022-10-20 Thread Yang Yingliang via
kset_register() is currently used in some places without calling kset_put() in error path, because the callers think it should be kset internal thing to do, but the driver core can not know what caller doing with that memory at times. The memory could be freed both in kset_put() and error path of c

[PATCH 04/11] kobject: fix possible memory leak in kset_create_and_add()

2022-10-20 Thread Yang Yingliang via
Inject fault while loading module (e.g. qemu_fw_cfg.ko), kset_register() may fail in kset_create_and_add(), if it fails, but the refcount of kobject is not decreased to 0, the name allocated in kset_create() is leaked. To fix this by calling kset_put(), so that name can be freed in callback functio

[PATCH 03/11] bus: fix possible memory leak in bus_register()

2022-10-20 Thread Yang Yingliang via
Inject fault while loading module (e.g. edac_core.ko), kset_register() may fail in bus_register(), if it fails, but the refcount of kobject is not decreased to 0, the name allocated in kobject_set_name() is leaked. To fix this by calling kset_put(), so that name can be freed in callback function ko

[PATCH 09/11] ocfs2: possible memory leak in mlog_sys_init()

2022-10-20 Thread Yang Yingliang via
Inject fault while loading module, kset_register() may fail, if it fails, but the refcount of kobject is not decreased to 0, the name allocated in kobject_set_name() is leaked. Fix this by calling kset_put(), so that name can be freed in callback function kobject_cleanup(). unreferenced object 0xf

[PATCH 07/11] f2fs: fix possible memory leak in f2fs_init_sysfs()

2022-10-20 Thread Yang Yingliang via
Inject fault while loading module, kset_register() may fail, if it fails, but the refcount of kobject is not decreased to 0, the name allocated in kobject_set_name() is leaked. Fix this by calling kset_put(), so that name can be freed in callback function kobject_cleanup(). unreferenced object 0xf

[PATCH 05/11] class: fix possible memory leak in __class_register()

2022-10-20 Thread Yang Yingliang via
Inject fault while loading module (e.g. pktcdvd.ko), kset_register() may fail in __class_register(), if it fails, but the refcount of kobject is not decreased to 0, the name allocated in kobject_set_name() is leaked. To fix this by calling kfree_const(). unreferenced object 0x888102fa8190 (siz

Re: [PATCH RESEND] elf2dmp: free memory in failure

2022-10-20 Thread Viktor Prutyanov
On 10/7/22 5:01 AM, luzhipeng wrote: From: lu zhipeng The 'kdgb' is allocating memory in get_kdbg(), but it is not freed in error path. So fix that. Signed-off-by: lu zhipeng --- contrib/elf2dmp/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/elf2dmp/main.c b/contrib/elf

[PATCH v8 2/2] hw/intc: Fix LoongArch extioi coreisr accessing

2022-10-20 Thread Xiaojuan Yang
1. When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. 2. it need not to mask 0x1f when calculate the coreisr array index. Signed-off-by: Xiaojuan Yang

[PATCH v8 0/2] Fix LoongArch extioi coreisr accessing

2022-10-20 Thread Xiaojuan Yang
When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. Changes for v8: 1. Move the iocsr_helper changes to the second patch. 2. Change the argument of GET_

Re: [PATCH] target/riscv: Fix PMP propagation for tlb

2022-10-20 Thread LIU Zhiwei
ping On 2022/10/12 14:00, LIU Zhiwei wrote: Only the pmp index that be checked by pmp_hart_has_privs can be used by pmp_get_tlb_size to avoid an error pmp index. Before modification, we may use an error pmp index. For example, we check address 0x4fc, and the size 0x4 in pmp_hart_has_privs. If t

[PATCH 0/4] hw/block/nvme: Implement ZNS finish-zone ZDC AEN

2022-10-20 Thread clay.mayers
From: Clay Mayers ZNS controllers have the option to limit the time a zone can remain in the active state. It begins with a background process in the controller setting the finish-zone-recommended FZR attribute for a zone. As part of setting this attribute, the zone's id is added to the namespa

[PATCH 2/4] hw/block/nvme: add zone descriptor changed log page

2022-10-20 Thread clay.mayers
From: Clay Mayers Zones marked with ZONE_FINISH_RECOMMENDED are added to the zone descriptor changed log page. Once read with RAE cleared, they are removed from the list. Zones stay in the list regardless of what other states the zones may go through so applications must be aware of ABA issues

[PATCH 1/4] hw/block/nvme: add ZONE_FINISH_RECOMMENDED functionality

2022-10-20 Thread clay.mayers
From: Clay Mayers Adds ns.param.zoned.finish_time, which sets the number of seconds a zone can remain active before the zone attribute ZONE_FINISH_RECOMMENDED is set. This requires scanning the exp open, imp open and closed lists of zones whenever a zone is marked as requiring finishing. The ex

[PATCH 4/4] hw/block/nvme: add zone descriptor changed AEN

2022-10-20 Thread clay.mayers
From: Clay Mayers If a namespace's param.zoned.finish_time is non-zero, controllers register with the namespace to be notified when entries are added to its zone-descriptor-changed log page. If the zone-descriptor-changed aen is enabled, this will cause an AEN to be sent from that controller. S

[PATCH 3/4] hw/block/nvme: supply dw1 for aen result

2022-10-20 Thread clay.mayers
From: Clay Mayers cqe.dw1 AEN is sometimes required to convey the NSID of the log page to read. This is the case for the zone descriptor changed log page. Signed-off-by: Clay Mayers --- hw/nvme/ctrl.c | 19 +++ hw/nvme/nvme.h | 2 ++ hw/nvme/trace-events | 2 +-

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-20 Thread Ani Sinha
On Fri, Oct 21, 2022 at 5:10 AM Ani Sinha wrote: > > > On Fri, Oct 21, 2022 at 12:43 AM Michael S. Tsirkin > wrote: > >> On Thu, Oct 20, 2022 at 06:20:20PM +0530, Ani Sinha wrote: >> > On Thu, Oct 20, 2022 at 6:15 PM Michael S. Tsirkin >> wrote: >> > > >> > > On Thu, Oct 20, 2022 at 06:12:10PM

Re: [PATCH v4] tcg/loongarch64: Add direct jump support

2022-10-20 Thread WANG Xuerui
On October 21, 2022 6:42:58 AM GMT+08:00, Richard Henderson wrote: >Fixed a minor nit: > >> +void tb_target_set_jmp_target(uintptr_t tc_ptr, uintptr_t jmp_rx, >> + uintptr_t jmp_rw, uintptr_t addr) >> +{ >> +tcg_insn_unit i1, i2; >> +ptrdiff_t upper, lower;

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-20 Thread Ani Sinha
On Fri, Oct 21, 2022 at 12:43 AM Michael S. Tsirkin wrote: > On Thu, Oct 20, 2022 at 06:20:20PM +0530, Ani Sinha wrote: > > On Thu, Oct 20, 2022 at 6:15 PM Michael S. Tsirkin > wrote: > > > > > > On Thu, Oct 20, 2022 at 06:12:10PM +0530, Ani Sinha wrote: > > > > On Thu, Oct 20, 2022 at 6:08 PM M

[PATCH] tcg/riscv: Fix reg overlap case in tcg_out_addsub2

2022-10-20 Thread Richard Henderson
There was a typo using opc_addi instead of opc_add with the two registers. While we're at it, simplify the gating test to al == bl to improve dynamic scheduling even when the output register does not overlap the inputs. Reported-by: LIU Zhiwei Signed-off-by: Richard Henderson --- Supersedes: 20

[PATCH v5 09/14] target/arm: Don't shift attrs in get_phys_addr_lpae

2022-10-20 Thread Richard Henderson
Leave the upper and lower attributes in the place they originate from in the descriptor. Shifting them around is confusing, since one cannot read the bit numbers out of the manual. Also, new attributes have been added which would alter the shifts. Reviewed-by: Peter Maydell Signed-off-by: Richa

[PATCH v5 06/14] target/arm: Add ARMFault_UnsuppAtomicUpdate

2022-10-20 Thread Richard Henderson
This fault type is to be used with FEAT_HAFDBS when the guest enables hw updates, but places the tables in memory where atomic updates are unsupported. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/internals.h | 4 1 file changed, 4 insertions(+) diff --git a/

[PATCH v5 08/14] target/arm: Fix fault reporting in get_phys_addr_lpae

2022-10-20 Thread Richard Henderson
Always overriding fi->type was incorrect, as we would not properly propagate the fault type from S1_ptw_translate, or arm_ldq_ptw. Simplify things by providing a new label for a translation fault. For other faults, store into fi directly. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderso

[PATCH v5 04/14] target/arm: Extract HA and HD in aa64_va_parameters

2022-10-20 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/internals.h | 2 ++ target/arm/helper.c| 8 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 2b6889073d..16d7989604 100644 --- a/target/arm/i

[PATCH v5 11/14] target/arm: Tidy merging of attributes from descriptor and table

2022-10-20 Thread Richard Henderson
Replace some gotos with some nested if statements. Signed-off-by: Richard Henderson --- target/arm/ptw.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index cb2e9072ec..165e70d044 100644 --- a/target/a

Re: [PATCH v4] tcg/loongarch64: Add direct jump support

2022-10-20 Thread Richard Henderson
On 10/15/22 19:27, Qi Hu wrote: Similar to the ARM64, LoongArch has PC-relative instructions such as PCADDU18I. These instructions can be used to support direct jump for LoongArch. Additionally, if instruction "B offset" can cover the target address(target is within ±128MB range), a single "B off

[PATCH v5 14/14] target/arm: Use the max page size in a 2-stage ptw

2022-10-20 Thread Richard Henderson
We had only been reporting the stage2 page size. This causes problems if stage1 is using a larger page size (16k, 2M, etc), but stage2 is using a smaller page size, because cputlb does not set large_page_{addr,mask} properly. Fix by using the max of the two page sizes. Reported-by: Marc Zyngier

Re: [PATCH] tcg/aarch64: Remove unused code in tcg_out_op

2022-10-20 Thread Richard Henderson
On 10/17/22 12:08, Qi Hu wrote: AArch64 defines the TCG_TARGET_HAS_direct_jump. So the "else" block is useless in the case of "INDEX_op_goto_tb" in function "tcg_out_op". Add an assertion and delete these codes for clarity. Suggested-by: WANG Xuerui Signed-off-by: Qi Hu --- tcg/aarch64/tcg-t

[PATCH v5 13/14] target/arm: Implement FEAT_HAFDBS, dirty bit portion

2022-10-20 Thread Richard Henderson
Perform the atomic update for hardware management of the dirty bit. Signed-off-by: Richard Henderson --- v5: Move the DB update before attributes are extracted and merged. --- target/arm/cpu64.c | 2 +- target/arm/ptw.c | 16 2 files changed, 17 insertions(+), 1 deletion(-)

[PATCH v5 12/14] target/arm: Implement FEAT_HAFDBS, access flag portion

2022-10-20 Thread Richard Henderson
Perform the atomic update for hardware management of the access flag. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v4: Raise permission fault if pte read-only and atomic update reqd. Split out dirty bit portion. Prepare for a single update for AF + DB. v5: Fix s1ns typ

[PATCH v5 10/14] target/arm: Consider GP an attribute in get_phys_addr_lpae

2022-10-20 Thread Richard Henderson
Both GP and DBM are in the upper attribute block. Extend the computation of attrs to include them, then simplify the setting of guarded. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/ptw.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tar

[PATCH v5 01/14] target/arm: Introduce regime_is_stage2

2022-10-20 Thread Richard Henderson
Reduce the amount of typing required for this check. Signed-off-by: Richard Henderson --- target/arm/internals.h | 5 + target/arm/helper.c| 14 +- target/arm/ptw.c | 14 ++ 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/target/arm/interna

[PATCH v5 07/14] target/arm: Remove loop from get_phys_addr_lpae

2022-10-20 Thread Richard Henderson
The unconditional loop was used both to iterate over levels and to control parsing of attributes. Use an explicit goto in both cases. While this appears less clean for iterating over levels, we will need to jump back into the middle of this loop for atomic updates, which is even uglier. Reviewed

[PATCH v5 02/14] target/arm: Add ptw_idx to S1Translate

2022-10-20 Thread Richard Henderson
Hoist the computation of the mmu_idx for the ptw up to get_phys_addr_with_struct and get_phys_addr_twostage. This removes the duplicate check for stage2 disabled from the middle of the walk, performing it only once. Signed-off-by: Richard Henderson --- target/arm/ptw.c | 71 +

[PATCH v5 05/14] target/arm: Move S1_ptw_translate outside arm_ld[lq]_ptw

2022-10-20 Thread Richard Henderson
Separate S1 translation from the actual lookup. Will enable lpae hardware updates. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/ptw.c | 41 ++--- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/target/arm/ptw.c b/

[PATCH v5 03/14] target/arm: Add isar predicates for FEAT_HAFDBS

2022-10-20 Thread Richard Henderson
The MMFR1 field may indicate support for hardware update of access flag alone, or access flag and dirty bit. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index

[PATCH v5 00/14] target/arm: Implement FEAT_HAFDBS

2022-10-20 Thread Richard Henderson
Changes for v5: * Rebase, including 12 patches. * Add regime_is_stage2, which I should have done ages ago. * Reorg attribute extraction/merging vs descriptor modifications. Patches lacking review: 01-target-arm-Introduce-regime_is_stage2.patch (new) 02-target-arm-Add-ptw_idx-to-S1Transla

Re: [PATCH v3 17/26] MAINTAINERS: fix-up for check-tcg Makefile changes

2022-10-20 Thread Richard Henderson
On 10/20/22 21:52, Alex Bennée wrote: Signed-off-by: Alex Bennée --- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0f4c50e8eb..1b41daba88 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3727,8 +3727,7 @@ Guest Test Compilation

[PATCH] qga: add channel path to error messages

2022-10-20 Thread Bjørn Forsman
It's useful to know which device was used if/when it fails. channel-win32.c had this since 2015, with c69403fcd4a0cb89f838a212ab71e4a1a3464c95 ("qemu-ga: debug printouts to help troubleshoot installation"), this brings channel-posix.c up to speed. Signed-off-by: Bjørn Forsman --- qga/channel-po

Re: [PATCH v3 00/12] VMX/VSX instructions with gvec

2022-10-20 Thread Daniel Henrique Barboza
Thanks for the reviews. Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Daniel On 10/19/22 09:50, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" Patches missing review: 12 v2 -> v3: - Used ctpop in i32 and i64 vprtyb - Changed gvec set up in xvtstdc[

Re: [PATCH v2] memory: prevent dma-reentracy issues

2022-10-20 Thread Alexander Bulekov
On 220712 1034, Stefan Hajnoczi wrote: > On Tue, Jun 21, 2022 at 11:53:06AM -0400, Alexander Bulekov wrote: > > On 220621 1630, Peter Maydell wrote: > > > On Thu, 9 Jun 2022 at 14:59, Alexander Bulekov wrote: > > > > diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h > > > > index 44dacfa224

Re: [PATCH v3 16/26] MAINTAINERS: add features_to_c.sh to gdbstub files

2022-10-20 Thread Richard Henderson
On 10/20/22 21:51, Alex Bennée wrote: Signed-off-by: Alex Bennée --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6a6f4d62bd..0f4c50e8eb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2693,6 +2693,7 @@ F: gdbstub/* F: include/exec/gdbstub.h

Re: [PATCH v3 08/26] tests/tcg: use regular semihosting for nios2-softmmu

2022-10-20 Thread Richard Henderson
On 10/20/22 21:51, Alex Bennée wrote: The nios2 code now plugs into the common semihosting code so we can use the same redirect invocation as the other boards. There is however a bug raised for the fact the tests don't seem to be completing properly and silently passing anyway: https://gitlab

Re: [PATCH v3 09/26] semihosting/arm-compat-semi: Avoid using hardcoded /tmp

2022-10-20 Thread Richard Henderson
On 10/20/22 21:51, Alex Bennée wrote: From: Bin Meng Use g_get_tmp_dir() to get the directory to use for temporary files. Signed-off-by: Bin Meng Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id:<20221006151927.2079583-2-bmeng...@gmail.com> --- semihosting/arm-compat-semi.c | 3

Re: [PATCH v3 05/26] configure: fix the --enable-static --disable-pie case

2022-10-20 Thread Richard Henderson
On 10/20/22 21:51, Alex Bennée wrote: The previous tweak was incomplete as it missed a leg. Fixes: abafb64b6d (configure: explicitly set cflags for --disable-pie) Signed-off-by: Alex Bennée --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Richard Henders

Re: [PATCH v3 04/26] configure: don't enable cross compilers unless in target_list

2022-10-20 Thread Richard Henderson
On 10/20/22 21:51, Alex Bennée wrote: This avoids the unfortunate effect of always builds the pc-bios blobs for targets the user isn't interested in. Suggested-by: Paolo Bonzini Signed-off-by: Alex Bennée --- configure | 9 + 1 file changed, 9 insertions(+) diff --git a/configure b

Re: [PATCH v3 06/26] tests/avocado: extend the timeout for x86_64 tcg tests

2022-10-20 Thread Richard Henderson
On 10/20/22 21:51, Alex Bennée wrote: These are timeing out on gitlab. timing. Acked-by: Richard Henderson Signed-off-by: Alex Bennée --- tests/avocado/boot_linux.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index b75

Re: MultiFD and default channel out of order mapping on receive side.

2022-10-20 Thread Daniel P . Berrangé
On Thu, Oct 20, 2022 at 12:32:06PM -0400, Peter Xu wrote: > On Thu, Oct 20, 2022 at 08:14:19PM +0530, manish.mishra wrote: > > I had one concern, during recover we do not send any magic. As of now we > do not support multifd with postcopy so it should be fine, we can do > explict checking for n

Re: [PATCH v3 01/26] tests/docker: update fedora-win[32|64]-cross with lcitool

2022-10-20 Thread Richard Henderson
On 10/20/22 21:51, Alex Bennée wrote: Convert another two dockerfiles to lcitool and update. I renamed the helper because it is not Debian specific. We need an updated lcitool for this to deal with the weirdness of a 32bit nsis tool for both 32 and 64 bit builds. As a result there are some minor

Re: [PATCH 15/31] tcg: Replace TCG_TARGET_CALL_ALIGN_ARGS with TCG_TARGET_CALL_ARG_I64

2022-10-20 Thread Richard Henderson
On 10/21/22 01:12, Philippe Mathieu-Daudé wrote: On 20/10/22 13:52, Richard Henderson wrote: +++ b/tcg/riscv/tcg-target.h @@ -81,8 +81,8 @@ typedef enum {   /* used for function call generation */   #define TCG_REG_CALL_STACK  TCG_REG_SP   #define TCG_TARGET_STACK_ALIGN  16 -

Re: [PATCH 11/31] tcg: Allocate TCGTemp pairs in host memory order

2022-10-20 Thread Richard Henderson
On 10/21/22 01:01, Philippe Mathieu-Daudé wrote: Hi Richard, On 20/10/22 13:52, Richard Henderson wrote: Allocate the first of a pair at the lower address, and the second of a pair at the higher address.  This will make it easier to find the beginning of the larger memory block. Signed-off-by:

Re: [PATCH v2] target/i386: implement FMA instructions

2022-10-20 Thread Richard Henderson
On 10/20/22 23:43, Paolo Bonzini wrote: The only issue with FMA instructions is that there are_a lot_ of them (30 opcodes, each of which comes in up to 4 versions depending on VEX.W and VEX.L; a total of 96 possibilities). However, they can be implement with only 6 helpers, two for scalar opera

Re: [PATCH v6 03/10] acpi/tests/avocado/bits: disable acpi PSS tests that are failing in biosbits

2022-10-20 Thread Alex Bennée
Ani Sinha writes: > PSS tests in acpi test suite seems to be failing in biosbits. This is because > the test is unable to find PSS support in QEMU bios. Let us disable > them for now so that make check does not fail. We can fix the tests and > re-enable them later. > > Example failure: > >

Re: [PATCH 2/2] thread-pool: use ThreadPool from the running thread

2022-10-20 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Mon, Oct 03, 2022 at 10:52:33AM +0200, Emanuele Giuseppe Esposito wrote: > > > > > > Am 30/09/2022 um 17:45 schrieb Kevin Wolf: > > > Am 30.09.2022 um 14:17 hat Emanuele Giuseppe Esposito geschrieben: > > >> Am 29/09/2022 um 17:30 schrieb Kevin

[PATCH v6 10/10] MAINTAINERS: add myself as the maintainer for acpi biosbits avocado tests

2022-10-20 Thread Ani Sinha
I wrote the biosbits avocado tests for testing QEMU's ACPI/SMBIOS implementation and all the related changes including fixes in biosbits software itself. Making myself as the maintainer for QEMU's biosbits related files and test scripts. Cc: Daniel P. Berrangé Cc: Paolo Bonzini Cc: Maydell Peter

Re: [PULL 00/24] target-arm queue

2022-10-20 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v12 15/17] net: stream: move to QIO to enable additional parameters

2022-10-20 Thread Laurent Vivier
On 10/20/22 15:09, Philippe Mathieu-Daudé wrote: On 20/10/22 11:16, Laurent Vivier wrote: Use QIOChannel, QIOChannelSocket and QIONetListener. This allows net/stream to use all the available parameters provided by SocketAddress. Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin ---  

RE: [PATCH 7/8] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch

2022-10-20 Thread Taylor Simpson
> -Original Message- > From: Matheus Tavares Bernardino > Sent: Thursday, October 20, 2022 10:25 AM > To: Taylor Simpson > Cc: a...@rev.ng; a...@rev.ng; Brian Cain ; > phi...@linaro.org; qemu-devel@nongnu.org; Matheus Bernardino (QUIC) > ; richard.hender...@linaro.org > Subject: Re: [P

Re: [PATCH] hw/acpi/erst.c: Fix memset argument order

2022-10-20 Thread Christian A. Ehrhardt
Hi Markus, On Thu, Oct 20, 2022 at 08:14:32AM +0200, Markus Armbruster wrote: > "Christian A. Ehrhardt" writes: > > > Fix memset argument order: The second argument is > > the value, the length goes last. > > Impact of the bug? Well, this is a memory error, i.e. the potential impact is anyth

  1   2   3   4   >