Re: [PATCH v14 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-31 Thread Wu, Fei
On 6/1/2023 9:08 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> +static void collect_jit_profile_info(void *p, uint32_t hash, void >> *userp) >> +{ >> +    struct jit_profile_info *jpi = userp; >> +    TBStatistics *tbs = p; >> + >> +    jpi->translations += tbs->translations.tot

Re: [PULL 00/21] Migration 20230530 patches

2023-05-31 Thread Juan Quintela
Richard Henderson wrote: > On 5/31/23 14:03, Juan Quintela wrote: >> Richard Henderson wrote: >>> On 5/30/23 11:25, Juan Quintela wrote: The following changes since commit aa9bbd865502ed517624ab6fe7d4b5d89ca95e43: Merge tag 'pull-ppc-20230528' of https://gitlab.com/danielhb/qe

[PATCH v2 4/4] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-05-31 Thread Zhenzhong Duan
Commit 63b88968f1 ("intel-iommu: rework the page walk logic") adds IOVA tree to cache mapped ranges so we only need to send MAP or UNMAP when there are changes. But there is still a corner case of unnecessary UNMAP. During invalidation, either domain or device selective, we only need to unmap when

[PATCH v2 0/4] Optimize UNMAP call and bug fix

2023-05-31 Thread Zhenzhong Duan
Hi All, This is an extention to original patch [1] based on discuss in [2]. 1. Fixed a potential VFIO migration issue Peter found, and optimize VFIO dirty page sync in intel_iommu incidentally. 2. Clarify the definition of replay() to match existent optimization in intel_iommu. 3. Optimiz

[PATCH v2 1/4] util: Add iova_tree_foreach_range_data

2023-05-31 Thread Zhenzhong Duan
This function is a variant of iova_tree_foreach and support tranversing a range to trigger callback with a private data. Signed-off-by: Zhenzhong Duan --- include/qemu/iova-tree.h | 17 +++-- util/iova-tree.c | 31 +++ 2 files changed, 46 insertion

[PATCH v2 3/4] memory: Document update on replay()

2023-05-31 Thread Zhenzhong Duan
Currently replay() callback is declared to be exactly same semantics as memory_region_iommu_replay(). Customed replay() may provide some extent of optimization depending on notifier's type. E.g. intel_iommu, IOMMU_NOTIFIER_MAP is optimized to provide only changed entries. Clarify the semantics of

[PATCH v2 2/4] intel_iommu: Fix a potential issue in VFIO dirty page sync

2023-05-31 Thread Zhenzhong Duan
Peter Xu found a potential issue: "The other thing is when I am looking at the new code I found that we actually extended the replay() to be used also in dirty tracking of vfio, in vfio_sync_dirty_bitmap(). For that maybe it's already broken if unmap_all() because afaiu log_sync() can be called i

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-05-31 Thread Weiwei Li
On 2023/6/1 13:27, Alistair Francis wrote: On Mon, May 29, 2023 at 10:19 PM Weiwei Li wrote: Normally, MPRV can be set to 1 only in M mode (It will be cleared when returning to lower-privilege mode by MRET/SRET). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_

[PATCH v2 0/1] hw/arm/sbsa-ref: add XHCI controller on PCIe

2023-05-31 Thread Yuquan Wang
Please review the change. - sbsa-ref: Add an XHCI on PCIe bus to provide an availiable usb controller. Yuquan Wang (1): hw/arm/sbsa-ref: add XHCI controller on PCIe hw/arm/sbsa-ref.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.34.1

[PATCH v2 1/1] hw/arm/sbsa-ref: add XHCI controller on PCIe

2023-05-31 Thread Yuquan Wang
The current sbsa-ref cannot use EHCI controller which is only able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB. Hence, this add an XHCI on PCIe to provide a usb controller with 64-bit DMA capablity. Signed-off-by: Yuquan Wang --- hw/arm/sbsa-ref.c | 2 ++ 1 file changed, 2 insert

Re: [PATCH 7/7] hw: Simplify using sysbus_init_irqs() [manual]

2023-05-31 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Audit the sysbus_init_irq() calls and manually convert > to sysbus_init_irqs() when a loop is involved. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/intc/loongarch_extioi.c | 3 +-- > hw/intc/omap_intc.c| 3 +-- > hw/pci-host/gpex.c | 2 +

Re: [PATCH v14 03/10] accel: collecting TB execution count

2023-05-31 Thread Wu, Fei
On 6/1/2023 8:05 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> From: "Vanderson M. do Rosario" >> >> If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS >> enabled, then we instrument the start code of this TB >> to atomically count the number of times it is executed. >> We

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Wu, Fei
On 6/1/2023 12:16 PM, Richard Henderson wrote: > On 5/31/23 20:19, Wu, Fei wrote: >> On 6/1/2023 8:01 AM, Richard Henderson wrote: >>> On 5/30/23 01:35, Fei Wu wrote: +/* TBStatistic collection controls */ +enum TBStatsStatus { +    TB_STATS_DISABLED = 0, +    TB_STATS_RUNNING,

Re: [PATCH v7 2/3] riscv/virt: Support using pflash via -blockdev option

2023-05-31 Thread Alistair Francis
On Thu, Jun 1, 2023 at 3:01 PM Sunil V L wrote: > > Currently, pflash devices can be configured only via -pflash > or -drive options. This is the legacy way and the > better way is to use -blockdev as in other architectures. > libvirt also has moved to use -blockdev method. > > To support -blockde

Re: [PATCH v7 3/3] docs/system: riscv: Add pflash usage details

2023-05-31 Thread Alistair Francis
On Thu, Jun 1, 2023 at 3:01 PM Sunil V L wrote: > > pflash devices can be used in virt machine for different > purposes like for ROM code or S-mode FW payload. Add a > section in the documentation on how to use pflash devices > for different purposes. > > Signed-off-by: Sunil V L > Reviewed-by: P

Re: [PATCH 4/4] target/riscv: Remove redundant assignment to SXL

2023-05-31 Thread Alistair Francis
On Mon, May 29, 2023 at 10:18 PM Weiwei Li wrote: > > SXL is initialized as env->misa_mxl which is also the mxl value. > So we can just remain it unchanged to keep it read-only. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis Alistair > --- > target

Re: [PATCH 3/4] target/riscv: Support MSTATUS.MPV/GVA only when RVH is enabled

2023-05-31 Thread Alistair Francis
On Mon, May 29, 2023 at 10:18 PM Weiwei Li wrote: > > MPV and GVA bits are added by hypervisor extension to mstatus > and mstatush (if MXLEN=32). > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/csr.c | 10 -- >

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-05-31 Thread Alistair Francis
On Mon, May 29, 2023 at 10:19 PM Weiwei Li wrote: > > Normally, MPRV can be set to 1 only in M mode (It will be cleared > when returning to lower-privilege mode by MRET/SRET). > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > --- > target/riscv/cpu_helper.c | 2 +- > 1 file changed,

Re: [PATCH 1/4] target/riscv: Make MPV only work when MPP != PRV_M

2023-05-31 Thread Alistair Francis
On Mon, May 29, 2023 at 10:19 PM Weiwei Li wrote: > > Upon MRET or explicit memory access with MPRV=1, MPV should be ignored > when MPP=PRV_M. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu_helper.c | 3 ++- > targ

Re: [PATCH v3 0/7] target/riscv: Add support for PC-relative translation

2023-05-31 Thread Alistair Francis
On Fri, May 26, 2023 at 5:24 PM Weiwei Li wrote: > > This patchset tries to add support for PC-relative translation. > > The existence of CF_PCREL can improve performance with the guest > kernel's address space randomization. Each guest process maps libc.so > (et al) at a different virtual addres

[PATCH v7 1/3] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-31 Thread Sunil V L
Currently, virt machine supports two pflash instances each with 32MB size. However, the first pflash is always assumed to contain M-mode firmware and reset vector is set to this if enabled. Hence, for S-mode payloads like EDK2, only one pflash instance is available for use. This means both code and

[PATCH v7 3/3] docs/system: riscv: Add pflash usage details

2023-05-31 Thread Sunil V L
pflash devices can be used in virt machine for different purposes like for ROM code or S-mode FW payload. Add a section in the documentation on how to use pflash devices for different purposes. Signed-off-by: Sunil V L Reviewed-by: Philippe Mathieu-Daudé --- docs/system/riscv/virt.rst | 31

[PATCH v7 0/3] hw/riscv/virt: pflash improvements

2023-05-31 Thread Sunil V L
This series improves the pflash usage in RISC-V virt machine with solutions to below issues. 1) Currently the first pflash is reserved for ROM/M-mode firmware code. But S-mode payload firmware like EDK2 need both pflash devices to have separate code and variable store so that OS distros can keep

[PATCH v7 2/3] riscv/virt: Support using pflash via -blockdev option

2023-05-31 Thread Sunil V L
Currently, pflash devices can be configured only via -pflash or -drive options. This is the legacy way and the better way is to use -blockdev as in other architectures. libvirt also has moved to use -blockdev method. To support -blockdev option, pflash devices need to be created in instance_init i

Re: Performance improvement and regression with 6d740fb01b9f0f5ea7a82f4d5e458d91940a19ee

2023-05-31 Thread Lukáš Doktor
Dne 31. 05. 23 v 19:14 Stefan Hajnoczi napsal(a): > On Wed, 31 May 2023 at 12:50, Lukáš Doktor wrote: >> >> Dne 26. 05. 23 v 12:56 Stefan Hajnoczi napsal(a): >>> On Fri, 26 May 2023 at 04:07, Lukáš Doktor wrote: Dne 25. 05. 23 v 17:21 Stefan Hajnoczi napsal(a): > On Thu, 25 May 2023

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Richard Henderson
On 5/31/23 20:19, Wu, Fei wrote: On 6/1/2023 8:01 AM, Richard Henderson wrote: On 5/30/23 01:35, Fei Wu wrote: +/* TBStatistic collection controls */ +enum TBStatsStatus { +    TB_STATS_DISABLED = 0, +    TB_STATS_RUNNING, +    TB_STATS_PAUSED, +    TB_STATS_STOPPED +}; I don't see what PAUSE

Re: [PATCH] decodetree: Add --output-null for meson testing

2023-05-31 Thread Richard Henderson
On 5/31/23 18:51, Thomas Huth wrote: On 01/06/2023 01.25, Richard Henderson wrote: Using "-o /dev/null" fails on Windows.  Rather that working around this in meson, add a separate command-line option so that we can use python's os.devnull. Reported-by: Thomas Huth Fixes: 65dc7d1b ("tests/d

Re: [PATCH v2 0/2] Implement AES on ARM using x86 instructions and vv

2023-05-31 Thread Richard Henderson
On 5/31/23 10:08, Richard Henderson wrote: On 5/31/23 09:47, Ard Biesheuvel wrote: On Wed, 31 May 2023 at 18:33, Richard Henderson Thanks.  I spent some time yesterday looking at this, with an encrypted disk test case and could only measure 0.6% and 0.5% for total overhead of decrypt and encry

Re: [PATCH v2 1/1] target/i386: add support for LAM in CPUID enumeration

2023-05-31 Thread Binbin Wu
On 5/31/2023 11:45 AM, Xiaoyao Li wrote: On 5/31/2023 9:32 AM, Binbin Wu wrote: From: Robert Hoo Linear Address Masking (LAM) is a new Intel CPU feature, which allows software to use of the untranslated address bits for metadata. The bit definition: CPUID.(EAX=7,ECX=1):EAX[26] Add CPUID

[PATCH v2 1/2] net: Provide MemReentrancyGuard * to qemu_new_nic()

2023-05-31 Thread Akihiko Odaki
Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. In preparation for such a change, add MemReentrancyGuard * as a parameter of qemu_new_nic(). Signed-off-by: Akihik

[PATCH v2 2/2] net: Update MemReentrancyGuard for NIC

2023-05-31 Thread Akihiko Odaki
Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. This implementation follows what bottom half does, but it does not add a tracepoint for the case that the network d

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Wu, Fei
On 6/1/2023 8:01 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> +/* TBStatistic collection controls */ >> +enum TBStatsStatus { >> +    TB_STATS_DISABLED = 0, >> +    TB_STATS_RUNNING, >> +    TB_STATS_PAUSED, >> +    TB_STATS_STOPPED >> +}; > > I don't see what PAUSED or STOPPE

[PATCH v2 0/2] net: Update MemReentrancyGuard for NIC

2023-05-31 Thread Akihiko Odaki
Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. This implementation follows what bottom half does, but it does not add a tracepoint for the case that the network d

Re: [PATCH 7/7] hw: Simplify using sysbus_init_irqs() [manual]

2023-05-31 Thread Richard Henderson
On 5/31/23 15:33, Philippe Mathieu-Daudé wrote: Audit the sysbus_init_irq() calls and manually convert to sysbus_init_irqs() when a loop is involved. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/loongarch_extioi.c | 3 +-- hw/intc/omap_intc.c| 3 +-- hw/pci-host/gpex.c |

Re: [PATCH 6/7] hw: Simplify using sysbus_init_irqs() [automatic]

2023-05-31 Thread Richard Henderson
On 5/31/23 15:33, Philippe Mathieu-Daudé wrote: Change created mechanically using the following coccinelle semantic patch: @@ expression array; identifier i; expression sbd, count; @@ -for (i = 0; i < count; i++) { -sysbus_init_irq(sbd, &array[i]);

Re: [PATCH 5/7] hw/sysbus: Make SYSBUS_DEVICE_GPIO_IRQ API internal

2023-05-31 Thread Richard Henderson
On 5/31/23 15:33, Philippe Mathieu-Daudé wrote: Since we don't have any use of the SYSBUS_DEVICE_GPIO_IRQ definition outside of sysbus.c, we can reduce its scope, making it internal to the API. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sysbus.h | 2 -- hw/core/sysbus.c| 2 ++

Re: [PATCH 4/7] hw/usb/hcd-xhci: Use sysbus_init_irqs()

2023-05-31 Thread Richard Henderson
On 5/31/23 15:33, Philippe Mathieu-Daudé wrote: The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Use the recently introduced sysbus_init_irqs() method to avoid using this internal definition. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-xhci-sysbus.c | 5 ++--

Re: [PATCH 3/7] hw/sysbus: Introduce sysbus_init_irqs()

2023-05-31 Thread Richard Henderson
On 5/31/23 15:33, Philippe Mathieu-Daudé wrote: +void sysbus_init_irqs(SysBusDevice *dev, qemu_irq *p, unsigned count); unsigned count does not match qdev_init_gpio_out_named int n. Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH 2/7] hw/usb/xlnx: Do not open-code sysbus_pass_irq()

2023-05-31 Thread Richard Henderson
On 5/31/23 15:33, Philippe Mathieu-Daudé wrote: The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Here we simply open-coded sysbus_pass_irq(). Replace to use the proper API. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/xlnx-usb-subsystem.c | 2 +- 1 file changed,

Re: [PATCH 1/7] hw/arm/xlnx-versal: Do not open-code sysbus_connect_irq()

2023-05-31 Thread Richard Henderson
On 5/31/23 15:33, Philippe Mathieu-Daudé wrote: The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Here we simply open-coded sysbus_connect_irq(). Replace to use the proper API. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/xlnx-versal.c | 4 +--- 1 file changed, 1

Re: [PATCH] hw/smbios: fix thead count field in type 4 table

2023-05-31 Thread bibo, mao
在 2023/6/1 10:26, Zhao Liu 写道: On Thu, Jun 01, 2023 at 09:09:13AM +0800, bibo, mao wrote: Date: Thu, 1 Jun 2023 09:09:13 +0800 From: "bibo, mao" Subject: Re: [PATCH] hw/smbios: fix thead count field in type 4 table 在 2023/5/31 16:42, Zhao Liu 写道: On Tue, May 30, 2023 at 08:20:34PM +0800,

Re: [PATCH] tap: introduce IFF_NAPI

2023-05-31 Thread Jason Wang
On Wed, May 31, 2023 at 9:46 PM Jon Kohler wrote: > > > > > On May 31, 2023, at 1:27 AM, Jason Wang wrote: > > > > On Wed, May 31, 2023 at 11:55 AM Jason Wang wrote: > >> > >> On Wed, May 31, 2023 at 11:47 AM Jon Kohler wrote: > >>> > >>> > >>> > On May 30, 2023, at 11:35 PM, Jason Wang w

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Richard Henderson
On 5/31/23 18:30, Wu, Fei wrote: On 6/1/2023 7:59 AM, Richard Henderson wrote: On 5/30/23 01:35, Fei Wu wrote: +    /* + * We want to fetch the stats structure before we start code + * generation so we can count interesting things about this + * generation. + */ +    if (tb_stat

Re: [PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-05-31 Thread Richard Henderson
On 5/30/23 01:35, Fei Wu wrote: +static void do_dump_tbs_info(int total, int sort_by) +{ +id = 1; +GList *i; +int count = total; + +g_list_free(last_search); +last_search = NULL; + +qht_iter(&tb_ctx.tb_stats, collect_tb_stats, NULL); + +last_search = g_list_sort_with_d

Re: [PATCH 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-05-31 Thread Chen Baozi
Hi Leif, > On Jun 1, 2023, at 00:36, Leif Lindholm wrote: > > On 2023-05-31 16:27, Peter Maydell wrote: >> On Wed, 31 May 2023 at 15:58, Graeme Gregory wrote: The current sbsa-ref cannot use EHCI controller which is only able to do 32-bit DMA, since sbsa-ref doesn't have RAM above 4GB

Re: [PATCH] hw/smbios: fix thead count field in type 4 table

2023-05-31 Thread Zhao Liu
On Thu, Jun 01, 2023 at 09:09:13AM +0800, bibo, mao wrote: > Date: Thu, 1 Jun 2023 09:09:13 +0800 > From: "bibo, mao" > Subject: Re: [PATCH] hw/smbios: fix thead count field in type 4 table > > > > 在 2023/5/31 16:42, Zhao Liu 写道: > > On Tue, May 30, 2023 at 08:20:34PM +0800, Tianrui Zhao wrote:

Re: [PATCH 3/3] hw/smbios: Fix core count in type4

2023-05-31 Thread Zhao Liu
On Wed, May 31, 2023 at 05:46:48PM +0200, Igor Mammedov wrote: > Date: Wed, 31 May 2023 17:46:48 +0200 > From: Igor Mammedov > Subject: Re: [PATCH 3/3] hw/smbios: Fix core count in type4 > X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) > > On Tue, 30 May 2023 00:43:43 +0800 > Z

Re: [PATCH] decodetree: Add --output-null for meson testing

2023-05-31 Thread Thomas Huth
On 01/06/2023 01.25, Richard Henderson wrote: Using "-o /dev/null" fails on Windows. Rather that working around this in meson, add a separate command-line option so that we can use python's os.devnull. Reported-by: Thomas Huth Fixes: 65dc7d1b ("tests/decode: Convert tests to meson") Signed

Re: [PATCH] fpu: Add conversions between bfloat16 and [u]int8

2023-05-31 Thread LIU Zhiwei
On 2023/6/1 1:47, Richard Henderson wrote: On 5/30/23 23:54, LIU Zhiwei wrote: We missed these functions when upstreaming the bfloat16 support. Signed-off-by: LIU Zhiwei They look ok, so far as it goes.  What will they be used for? T-Head Xuantie CPUs custom extension need these interfaces

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Wu, Fei
On 6/1/2023 7:59 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> +    /* >> + * We want to fetch the stats structure before we start code >> + * generation so we can count interesting things about this >> + * generation. >> + */ >> +    if (tb_stats_collection_enab

Re: [PATCH v14 07/10] tb-stats: reset the tracked TBs on a tb_flush

2023-05-31 Thread Richard Henderson
On 5/30/23 01:35, Fei Wu wrote: diff --git a/accel/tcg/tb-stats.c b/accel/tcg/tb-stats.c index 805e1fc74d..139f049ffc 100644 --- a/accel/tcg/tb-stats.c +++ b/accel/tcg/tb-stats.c @@ -267,6 +267,25 @@ void do_hmp_tbstats_safe(CPUState *cpu, run_on_cpu_data icmd) g_free(cmdinfo); } +/*

Re: [PATCH v14 06/10] monitor: adding tb_stats hmp command

2023-05-31 Thread Richard Henderson
On 5/30/23 01:35, Fei Wu wrote: From: "Vanderson M. do Rosario" Adding tb_stats [start|pause|stop|filter] command to hmp. This allows controlling the collection of statistics. It is also possible to set the level of collection: all, jit, or exec. tb_stats filter allow to only collect statistic

Re: [PATCH v14 05/10] debug: add -d tb_stats to control TBStatistics collection:

2023-05-31 Thread Richard Henderson
On 5/30/23 01:35, Fei Wu wrote: From: "Vanderson M. do Rosario" -d tb_stats[[,level=(+all+jit+exec+time)][,dump_limit=]] "dump_limit" is used to limit the number of dumped TBStats in linux-user mode. Why is user-mode special? [all+jit+exec+time] control the profilling level used by the

Re: [PATCH] hw/smbios: fix thead count field in type 4 table

2023-05-31 Thread bibo, mao
在 2023/5/31 16:42, Zhao Liu 写道: On Tue, May 30, 2023 at 08:20:34PM +0800, Tianrui Zhao wrote: Date: Tue, 30 May 2023 20:20:34 +0800 From: Tianrui Zhao Subject: [PATCH] hw/smbios: fix thead count field in type 4 table X-Mailer: git-send-email 2.39.1 The thread_count value in smbios type_4 ta

Re: [PATCH v14 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-31 Thread Richard Henderson
On 5/30/23 01:35, Fei Wu wrote: +static void collect_jit_profile_info(void *p, uint32_t hash, void *userp) +{ +struct jit_profile_info *jpi = userp; +TBStatistics *tbs = p; + +jpi->translations += tbs->translations.total; +jpi->ops += tbs->code.num_tcg_ops; +if (stat_per_trans

Re: [PATCH 1/3] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-05-31 Thread Jeuk Kim
Hi Philippe, >Hi Jeuk, > >[+Alistair] > >On 26/5/23 07:05, Jeuk Kim wrote: >> Universal Flash Storage (UFS) is a high-performance mass storage device >> with a serial interface. It is primarily used as a high-performance >> data storage device for embedded applications. >> >> This commit contains

Re: [PATCH v14 03/10] accel: collecting TB execution count

2023-05-31 Thread Richard Henderson
On 5/30/23 01:35, Fei Wu wrote: From: "Vanderson M. do Rosario" If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS enabled, then we instrument the start code of this TB to atomically count the number of times it is executed. We count both the number of "normal" executions and atomic execut

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Richard Henderson
On 5/30/23 01:35, Fei Wu wrote: +/* TBStatistic collection controls */ +enum TBStatsStatus { +TB_STATS_DISABLED = 0, +TB_STATS_RUNNING, +TB_STATS_PAUSED, +TB_STATS_STOPPED +}; I don't see what PAUSED or STOPPED actually do. As far as I can see, stats are either being collected o

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Richard Henderson
On 5/30/23 01:35, Fei Wu wrote: +/* + * We want to fetch the stats structure before we start code + * generation so we can count interesting things about this + * generation. + */ +if (tb_stats_collection_enabled()) { +tb->tb_stats = tb_get_stats(phys_pc, pc, cs_ba

[PATCH] decodetree: Add --output-null for meson testing

2023-05-31 Thread Richard Henderson
Using "-o /dev/null" fails on Windows. Rather that working around this in meson, add a separate command-line option so that we can use python's os.devnull. Reported-by: Thomas Huth Fixes: 65dc7d1b ("tests/decode: Convert tests to meson") Signed-off-by: Richard Henderson --- scripts/decodet

Re: [PULL 0/5] Python patches

2023-05-31 Thread Richard Henderson
On 5/31/23 13:43, John Snow wrote: The following changes since commit ab7252279727da51c01cdaf41c5fe563bbded3a6: gitlab: switch from 'stable' to 'latest' docker container tags (2023-05-31 10:29:14 -0700) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git tags/pyth

[PATCH v2] pc: q35: Bump max_cpus to 1024

2023-05-31 Thread Suravee Suthikulpanit
Since KVM_MAX_VCPUS is currently defined to 1024 for x86 as shown in arch/x86/include/asm/kvm_host.h, update QEMU limits to the same number. In case KVM could not support the specified number of vcpus, QEMU would return the following error message: qemu-system-x86_64: kvm_init_vcpu: kvm_get_vcp

[PATCH 3/7] hw/sysbus: Introduce sysbus_init_irqs()

2023-05-31 Thread Philippe Mathieu-Daudé
The SysBus API currently only provides a method to initialize a single IRQ: sysbus_init_irq(). When we want to initialize multiple SysBus IRQs, we have to call this function multiple times. In order to allow further simplifications, introduce the sysbus_init_irqs() method. Signed-off-by: Philippe

[PATCH 5/7] hw/sysbus: Make SYSBUS_DEVICE_GPIO_IRQ API internal

2023-05-31 Thread Philippe Mathieu-Daudé
Since we don't have any use of the SYSBUS_DEVICE_GPIO_IRQ definition outside of sysbus.c, we can reduce its scope, making it internal to the API. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sysbus.h | 2 -- hw/core/sysbus.c| 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) di

[PATCH 4/7] hw/usb/hcd-xhci: Use sysbus_init_irqs()

2023-05-31 Thread Philippe Mathieu-Daudé
The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Use the recently introduced sysbus_init_irqs() method to avoid using this internal definition. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-xhci-sysbus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)

[PATCH 6/7] hw: Simplify using sysbus_init_irqs() [automatic]

2023-05-31 Thread Philippe Mathieu-Daudé
Change created mechanically using the following coccinelle semantic patch: @@ expression array; identifier i; expression sbd, count; @@ -for (i = 0; i < count; i++) { -sysbus_init_irq(sbd, &array[i]); -} +sysbus_init_irqs(sbd, array, count);

[PATCH 7/7] hw: Simplify using sysbus_init_irqs() [manual]

2023-05-31 Thread Philippe Mathieu-Daudé
Audit the sysbus_init_irq() calls and manually convert to sysbus_init_irqs() when a loop is involved. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/loongarch_extioi.c | 3 +-- hw/intc/omap_intc.c| 3 +-- hw/pci-host/gpex.c | 2 +- hw/timer/renesas_tmr.c | 9 +++-- 4 f

[PATCH 0/7] hw/sysbus: Add sysbus_init_irqs and reduce SYSBUS_DEVICE_GPIO_IRQ scope

2023-05-31 Thread Philippe Mathieu-Daudé
This series: - Remove uses (out of sysbus.c) to the SYSBUS_DEVICE_GPIO_IRQ definition, using proper SysBus API methods, - Reduce SYSBUS_DEVICE_GPIO_IRQ scope, making it SysBus API internal, - Convert various for() loops iterating over sysbus_init_irq() by calling a single sysbus_init_irqs()

[PATCH 1/7] hw/arm/xlnx-versal: Do not open-code sysbus_connect_irq()

2023-05-31 Thread Philippe Mathieu-Daudé
The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Here we simply open-coded sysbus_connect_irq(). Replace to use the proper API. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/xlnx-versal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/arm/

[PATCH 2/7] hw/usb/xlnx: Do not open-code sysbus_pass_irq()

2023-05-31 Thread Philippe Mathieu-Daudé
The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Here we simply open-coded sysbus_pass_irq(). Replace to use the proper API. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/xlnx-usb-subsystem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb

Re: [RFC PATCH v2 0/4] vfio/pci: Atomic Ops completer support

2023-05-31 Thread Philippe Mathieu-Daudé
On 27/5/23 01:15, Alex Williamson wrote: This RFC proposes to allow a vfio-pci device to manipulate the PCI Express capability of an associated root port to enable Atomic Op completer support as equivalent to host capabilities. This would [...] While it's not exactly standard practice to modi

Re: [RFC PATCH v2 0/4] vfio/pci: Atomic Ops completer support

2023-05-31 Thread Philippe Mathieu-Daudé
On 1/6/23 00:24, Alex Williamson wrote: On Wed, 31 May 2023 23:55:41 +0200 Robin Voetter wrote: Hi Alex, Thanks for taking the time to implement support for Atomic Op completer support properly :). I have tested out these patches and the kernel patch, and apart from a minor issue with patch 2

Re: [RFC PATCH v2 4/4] vfio/pci: Enable AtomicOps completers on root ports

2023-05-31 Thread Philippe Mathieu-Daudé
On 27/5/23 01:15, Alex Williamson wrote: Dynamically enable Atomic Ops completer support around realize/exit of vfio-pci devices reporting host support for these accesses and adhering to a minimal configuration standard. While the Atomic Ops completer bits in the root port device capabilities2 r

Re: [RFC PATCH v2 0/4] vfio/pci: Atomic Ops completer support

2023-05-31 Thread Alex Williamson
On Wed, 31 May 2023 23:55:41 +0200 Robin Voetter wrote: > Hi Alex, > > Thanks for taking the time to implement support for Atomic Op completer > support properly :). I have tested out these patches and the kernel > patch, and apart from a minor issue with patch 2 everything works fine; Yes, Ced

Re: [PULL 00/27] tcg patch queue

2023-05-31 Thread Richard Henderson
On 5/31/23 11:07, Richard Henderson wrote: On 5/31/23 09:12, Thomas Huth wrote: On 31/05/2023 03.08, Richard Henderson wrote: On 5/30/23 11:59, Richard Henderson wrote: The following changes since commit 7fe6cb68117ac856e03c93d18aca09de015392b0:    Merge tag 'pull-target-arm-20230530-1' ofht

Re: [RFC PATCH v2 3/4] pcie: Add a PCIe capability version helper

2023-05-31 Thread Philippe Mathieu-Daudé
On 1/6/23 00:02, Robin Voetter wrote: On 5/27/23 01:15, Alex Williamson wrote: Report the PCIe capability version for a device Signed-off-by: Alex Williamson Reviewed-by: Robin Voetter Tested-by: Robin Voetter Reviewed-by: Philippe Mathieu-Daudé Kind regards, Robin Voetter

Re: [RFC PATCH v2 4/4] vfio/pci: Enable AtomicOps completers on root ports

2023-05-31 Thread Robin Voetter
On 5/27/23 01:15, Alex Williamson wrote: > Dynamically enable Atomic Ops completer support around realize/exit of > vfio-pci devices reporting host support for these accesses and adhering > to a minimal configuration standard. While the Atomic Ops completer > bits in the root port device capabi

Re: [RFC PATCH v2 3/4] pcie: Add a PCIe capability version helper

2023-05-31 Thread Robin Voetter
On 5/27/23 01:15, Alex Williamson wrote: > Report the PCIe capability version for a device > > Signed-off-by: Alex Williamson Reviewed-by: Robin > Voetter Tested-by: Robin Voetter Kind regards, Robin Voetter

Re: [RFC PATCH v2 0/4] vfio/pci: Atomic Ops completer support

2023-05-31 Thread Robin Voetter
Hi Alex, Thanks for taking the time to implement support for Atomic Op completer support properly :). I have tested out these patches and the kernel patch, and apart from a minor issue with patch 2 everything works fine; ROCm programs that use device->host atomic operations work properly. Somethi

Re: [PULL 01/11] *-user: remove the guest_user_syscall tracepoints

2023-05-31 Thread Richard Henderson
On 5/31/23 12:48, Stefan Hajnoczi wrote: --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -531,7 +531,6 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, CPUState *cpu = env_cpu(cpu_env); abi_long ret; -trace_guest_user_syscall(cpu

Re: [PULL 00/21] Migration 20230530 patches

2023-05-31 Thread Richard Henderson
On 5/31/23 14:03, Juan Quintela wrote: Richard Henderson wrote: On 5/30/23 11:25, Juan Quintela wrote: The following changes since commit aa9bbd865502ed517624ab6fe7d4b5d89ca95e43: Merge tag 'pull-ppc-20230528' of https://gitlab.com/danielhb/qemu into staging (2023-05-29 14:31:52 -0700) are

Re: [PATCH v3 3/7] hw/isa/vt82c686: Remove via_isa_set_irq()

2023-05-31 Thread Philippe Mathieu-Daudé
On 31/5/23 23:10, Bernhard Beschow wrote: Now that via_isa_set_irq() is unused it can be removed. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland --- include/hw/isa/vt82c686.h | 2 -- hw/isa/vt82c686.c | 6 -- 2 files changed, 8 deletions(-) Reviewed-by: Philipp

Re: [PATCH v3 6/7] hw/ide/pci: Replace some magic numbers by constants

2023-05-31 Thread Philippe Mathieu-Daudé
On 31/5/23 23:10, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow --- hw/ide/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 5/7] hw/ide: Extract bmdma_status_writeb()

2023-05-31 Thread Philippe Mathieu-Daudé
On 31/5/23 23:10, Bernhard Beschow wrote: Every TYPE_PCI_IDE device performs the same not-so-trivial bit manipulation by copy'n'paste code. Extract this into bmdma_status_writeb(), mirroring bmdma_cmd_writeb(). Signed-off-by: Bernhard Beschow Reviewed-by: BALATON Zoltan --- include/hw/ide/pc

[PATCH v3 1/7] hw/ide/pci: Expose legacy interrupts as named GPIOs

2023-05-31 Thread Bernhard Beschow
Exposing the legacy IDE interrupts as GPIOs allows them to be connected in the parent device through qdev_connect_gpio_out(), i.e. without accessing private data of TYPE_PCI_IDE. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland --- hw/ide/pci.c | 9 + 1 file changed, 9 inse

[PATCH v3 4/7] hw/ide: Extract IDEBus assignment into bmdma_init()

2023-05-31 Thread Bernhard Beschow
Every invocation of bmdma_init() is followed by `d->bmdma[i].bus = &d->bus[i]`. Resolve this redundancy by extracting it into bmdma_init(). Signed-off-by: Bernhard Beschow Reviewed-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- hw/ide/cmd646.c | 1 -

[PATCH v3 3/7] hw/isa/vt82c686: Remove via_isa_set_irq()

2023-05-31 Thread Bernhard Beschow
Now that via_isa_set_irq() is unused it can be removed. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland --- include/hw/isa/vt82c686.h | 2 -- hw/isa/vt82c686.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h i

[PATCH v3 0/7] VIA and general PCI IDE cleanup

2023-05-31 Thread Bernhard Beschow
This series is split off from a more general PCI IDE refactoring aiming for a common implementation of the PCI IDE controller specification for all TYPE_PCI_IDE models [1]. The first three patches resolve a circular dependency between the VIA IDE controller and its south bridge. The next three pat

[PATCH v3 6/7] hw/ide/pci: Replace some magic numbers by constants

2023-05-31 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/ide/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 0b26a4ce9f..a25b352537 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -320,7 +320,8 @@ void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val) v

[PATCH v3 2/7] hw/ide/via: Wire up IDE legacy interrupts in host device

2023-05-31 Thread Bernhard Beschow
Resolves circular depencency between IDE function and south bridge. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland --- hw/ide/via.c | 6 -- hw/isa/vt82c686.c | 5 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index 177ba

[PATCH v3 5/7] hw/ide: Extract bmdma_status_writeb()

2023-05-31 Thread Bernhard Beschow
Every TYPE_PCI_IDE device performs the same not-so-trivial bit manipulation by copy'n'paste code. Extract this into bmdma_status_writeb(), mirroring bmdma_cmd_writeb(). Signed-off-by: Bernhard Beschow Reviewed-by: BALATON Zoltan --- include/hw/ide/pci.h | 1 + hw/ide/cmd646.c | 2 +- hw/id

[PATCH v3 7/7] hw/ide/piix: Move registration of VMStateDescription to DeviceClass

2023-05-31 Thread Bernhard Beschow
The modern, declarative way to set up VM state handling is to assign to DeviceClass::vmsd attribute. There shouldn't be any change in behavior since dc->vmsd causes vmstate_register_with_alias_id() to be called on the instance during the instance init phase. vmstate_register() was also called duri

Re: [PULL 00/21] Migration 20230530 patches

2023-05-31 Thread Juan Quintela
Richard Henderson wrote: > On 5/30/23 11:25, Juan Quintela wrote: >> The following changes since commit aa9bbd865502ed517624ab6fe7d4b5d89ca95e43: >>Merge tag 'pull-ppc-20230528' of https://gitlab.com/danielhb/qemu >> into staging (2023-05-29 14:31:52 -0700) >> are available in the Git reposito

Re: [PATCH v2 00/10] hw/virtio: Build various target-agnostic objects just once

2023-05-31 Thread Michael S. Tsirkin
On Wed, May 31, 2023 at 10:39:48PM +0200, Philippe Mathieu-Daudé wrote: > Hi Michael, > > On 24/5/23 11:37, Philippe Mathieu-Daudé wrote: > > All patches reviewed. > > Could you take this series via your virtio tree? > > Thanks! > > Phil. Will do, in next pull. Thanks! > > Less controvertial

Re: [PATCH v2 20/23] q800: don't access Nubus bus directly from the mac-nubus-bridge device

2023-05-31 Thread Laurent Vivier
Le 31/05/2023 à 14:53, Mark Cave-Ayland a écrit : Instead use the qdev_get_child_bus() function which is intended for this exact purpose. Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c ind

[PULL 3/5] python/machine: use connect-based interface for existing sockets

2023-05-31 Thread John Snow
Instead of using accept() with sockets (which uses open_with_socket()), use calls to connect() to utilize existing sockets instead. A benefit of this is more robust error handling already present within the connect() call that isn't present in open_with_socket(). Signed-off-by: John Snow Message-

[PULL 5/5] Revert "python/qmp/protocol: add open_with_socket()"

2023-05-31 Thread John Snow
This reverts commit a3cfea92e2030926e00a2519d299384ea648e36e. (It's being rolled back in favor of a different API, which brings the in-tree and out-of-tree versions of qemu.qmp back in sync.) Signed-off-by: John Snow Message-id: 20230517163406.2593480-6-js...@redhat.com Signed-off-by: John Snow

[PULL 4/5] python/qmp/legacy: remove open_with_socket() calls

2023-05-31 Thread John Snow
Favor using connect() when passing a socket instead of open_with_socket(). Simultaneously, update constructor calls to use the combined address argument for QEMUMonitorProtocol(). Signed-off-by: John Snow Message-id: 20230517163406.2593480-5-js...@redhat.com Signed-off-by: John Snow --- python/

[PULL 1/5] python/qmp: allow sockets to be passed to connect()

2023-05-31 Thread John Snow
Allow existing sockets to be passed to connect(). The changes are pretty minimal, and this allows for far greater flexibility in setting up communications with an endpoint. Signed-off-by: John Snow Message-id: 20230517163406.2593480-2-js...@redhat.com Signed-off-by: John Snow --- python/qemu/qm

[PULL 2/5] python/qmp/legacy: allow using sockets for connect()

2023-05-31 Thread John Snow
Instead of asserting that we have an address, allow the use of sockets instead of addresses during a call to connect(). Signed-off-by: John Snow Message-id: 20230517163406.2593480-3-js...@redhat.com Signed-off-by: John Snow --- python/qemu/qmp/legacy.py | 5 +++-- 1 file changed, 3 insertions(+

  1   2   3   4   5   >