[PATCH v3 0/5] plugins/cache: multicore cache modelling and minor tweaks

2021-07-21 Thread Mahmoud Mandour
Hello, This series introduce some minor improvements/bug fixes in the cache plugins and multicore cache modelling. Multi-core cache modelling is handled such that for full-system emulation, a private L1 cache is maintained to each core available to the system. For multi-threaded userspace emulati

[PATCH v3 5/5] plugins/cache: Fixed "function decl. is not a prototype" warnings

2021-07-21 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 496d6e7d49..cc9020b2d5 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -535,7 +535,7 @

[PATCH v3 4/5] docs/devel/tcg-plugins: added cores arg to cache plugin

2021-07-21 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 595b8e0ea4..370c11373f 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins

[PATCH v3 1/5] plugins/cache: Fixed a bug with destroying FIFO metadata

2021-07-21 Thread Mahmoud Mandour
This manifests itself when associativity degree is greater than the number of sets and FIFO is used, otherwise it's also a memory leak whenever FIFO was used. Signed-off-by: Mahmoud Mandour --- contrib/plugins/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pl

Re: Installation challenges

2021-07-21 Thread Stefan Weil
Am 22.07.21 um 05:02 schrieb Nicholas Kyanda: Hello, Thank you for your software. I just installed the 64 bit windows exe unfortunately, I cannot find it on my desktop. How do I start using it? Sincerely, Nicholas Kyanda QEMU is a console application, therefore there is neither an icon on

Re: [PATCH for-6.2 v2 10/11] machine: Split out the smp parsing code

2021-07-21 Thread wangyanan (Y)
On 2021/7/20 1:20, Andrew Jones wrote: On Mon, Jul 19, 2021 at 11:20:42AM +0800, Yanan Wang wrote: We are going to introduce an unit test for the parser smp_parse() in hw/core/machine.c, but now machine.c is only built in softmmu. In order to solve the build dependency on the smp parsing code a

Installation challenges

2021-07-21 Thread Nicholas Kyanda
Hello, Thank you for your software. I just installed the 64 bit windows exe unfortunately, I cannot find it on my desktop. How do I start using it? Sincerely, Nicholas Kyanda

[PATCH] Makefile: ignore long options

2021-07-21 Thread Alexey Neyman
When searching for options like -n in MAKEFLAGS, current code may result in a false positive match when make is invoked with long options like --no-print-directory. This has been observed with certain versions of host make (e.g. 3.82) while building the Qemu package in buildroot. Filter out such l

Re: [PATCH for-6.2 v2 11/11] tests/unit: Add a unit test for smp parsing

2021-07-21 Thread wangyanan (Y)
On 2021/7/20 2:57, Andrew Jones wrote: On Mon, Jul 19, 2021 at 11:20:43AM +0800, Yanan Wang wrote: Add a QEMU unit test for the parsing of given SMP configuration. Since all the parsing logic is in generic function smp_parse(), this test passes diffenent SMP configurations to the function and co

Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters as zero

2021-07-21 Thread Cornelia Huck
On Thu, Jul 22 2021, Yanan Wang wrote: > In the SMP configuration, we should either specify a topology > parameter with a reasonable value (equal to or greater than 1) > or just leave it omitted and QEMU will calculate its value. > Configurations which explicitly specify the topology parameters >

Re: [PATCH for-6.2 v2 07/11] machine: Prefer cores over sockets in smp parsing since 6.2

2021-07-21 Thread wangyanan (Y)
On 2021/7/20 1:13, Andrew Jones wrote: On Mon, Jul 19, 2021 at 11:20:39AM +0800, Yanan Wang wrote: In the real SMP hardware topology world, it's much more likely that we have high cores-per-socket counts and few sockets totally. While the current preference of sockets over cores in smp parsing r

Re: [PATCH] acpi/gpex: Inform os to keep firmware resource map

2021-07-21 Thread Guenter Roeck
Hi, On Thu, Dec 17, 2020 at 09:29:26PM +0800, Jiahui Cen wrote: > There may be some differences in pci resource assignment between guest os > and firmware. > > Eg. A Bridge with Bus [d2] > -+-[:d2]---01.0-[d3]01.0 > > where [d2:01.00] is a pcie-pci-bridge with BAR0 (mem, 64-bit,

Re: [PATCH for-6.2 v2 07/11] machine: Prefer cores over sockets in smp parsing since 6.2

2021-07-21 Thread wangyanan (Y)
On 2021/7/19 11:40, David Gibson wrote: On Mon, Jul 19, 2021 at 11:20:39AM +0800, Yanan Wang wrote: In the real SMP hardware topology world, it's much more likely that we have high cores-per-socket counts and few sockets totally. While the current preference of sockets over cores in smp parsing

Re: [RFC PATCH 10/27] virtio-snd: Add code for the realize function

2021-07-21 Thread Shreyansh Chouhan
Hi, On Thu, 22 Jul 2021 at 07:48, Deepa gowda wrote: > Hi, Shreyansh, > > When is virtio-snd expected to be completed and available in Qemu GitHub? > > Sorry for the recent absence of activity on this patch series. I have the sound card working with alsa. The output works just fine. The input ne

Re: [PATCH for-6.2 v2 04/11] machine: Use the computed parameters to calculate omitted cpus

2021-07-21 Thread wangyanan (Y)
On 2021/7/20 0:42, Andrew Jones wrote: On Mon, Jul 19, 2021 at 11:20:36AM +0800, Yanan Wang wrote: Currently we directly calculate the omitted cpus based on the already provided parameters. This makes some cmdlines like: -smp maxcpus=16 -smp sockets=2,maxcpus=16 -smp sockets=2,dies=2,ma

[PATCH] Makefile: ignore long options

2021-07-21 Thread Alexey Neyman
When searching for options like -n in MAKEFLAGS, current code may result in a false positive match when make is invoked with long options like --no-print-directory. This has been observed with certain versions of host make (e.g. 3.82) while building the Qemu package in buildroot. Filter out such l

Re: [PATCH for-6.2 v2 03/11] machine: Uniformly use maxcpus to calculate the omitted parameters

2021-07-21 Thread wangyanan (Y)
On 2021/7/20 0:36, Andrew Jones wrote: On Mon, Jul 19, 2021 at 11:20:35AM +0800, Yanan Wang wrote: We are currently using maxcpus to calculate the omitted sockets but using cpus to calculate the omitted cores/threads. This makes cmdlines like: -smp cpus=8,maxcpus=16 -smp cpus=8,cores=4,max

Re: [PATCH v4 3/3] target/ppc: moved store_40x_sler to helper_regs.c

2021-07-21 Thread David Gibson
On Wed, Jul 21, 2021 at 10:21:44AM -0300, Lucas Mateus Castro (alqotel) wrote: > moved store_40x_sler from mmu_common.c to helper_regs.c as it was > more appropriate This message needs a rationale to explain why this is more appropriate. > > Signed-off-by: Lucas Mateus Castro (alqotel) > --- >

Re: [PATCH v4 1/3] target/ppc: divided mmu_helper.c in 2 files

2021-07-21 Thread David Gibson
On Wed, Jul 21, 2021 at 10:21:42AM -0300, Lucas Mateus Castro (alqotel) wrote: > Divided mmu_helper.c in 2 files, functions inside #ifdef CONFIG_SOFTMMU > stayed in mmu_helper.c, other functions moved to mmu_common.c. Updated > meson.build to compile mmu_common.c and only compile mmu_helper.c when

Re: [PATCH v4 2/3] target/ppc: moved ppc_store_sdr1 to mmu_common.c

2021-07-21 Thread David Gibson
On Wed, Jul 21, 2021 at 10:21:43AM -0300, Lucas Mateus Castro (alqotel) wrote: > ppc_store_sdr1 was at first in mmu_helper.c and was moved as part > the patches to enable the disable-tcg option, now it's being moved > back to a file that will be compiled with that option > > Signed-off-by: Lucas M

Re: [RFC PATCH v3 0/5] pSeries FORM2 affinity support

2021-07-21 Thread David Gibson
On Tue, Jul 13, 2021 at 04:40:40PM -0300, Daniel Henrique Barboza wrote: > Hi, > > This new version drops all the NVDIMM related changes from the > previous iteraction after the reviews done in the kernel mailing > list [1]. FORM2 will not use ibm,associativity-reference-points to > determine a se

Re: [PATCH for-6.2 v2 00/11] machine: smp parsing fixes and improvement

2021-07-21 Thread wangyanan (Y)
On 2021/7/21 21:52, Pankaj Gupta wrote: On Mon, Jul 19 2021, Yanan Wang wrote: Hi, This is v2 of the series [1] that I have posted to introduce some smp parsing fixes and improvement, much more work has been processed compared to RFC v1. [1] https://lists.gnu.org/archive/html/qemu-devel/2021

[PATCH for-6.1 0/1] machine: Disallow specifying topology parameters as zero

2021-07-21 Thread Yanan Wang
In the SMP configuration, we should either specify a topology parameter with a reasonable value (equal to or greater than 1) or just leave it omitted and QEMU will calculate its value. Configurations which explicitly specify the topology parameters as zero like "sockets=0" are meaningless, so disal

[PATCH for-6.1 1/1] machine: Disallow specifying topology parameters as zero

2021-07-21 Thread Yanan Wang
In the SMP configuration, we should either specify a topology parameter with a reasonable value (equal to or greater than 1) or just leave it omitted and QEMU will calculate its value. Configurations which explicitly specify the topology parameters as zero like "sockets=0" are meaningless, so disal

Re: [PATCH for-6.2 33/34] target/arm: Implement MVE scatter-gather immediate forms

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE VLDR/VSTR insns which do scatter-gather using base addresses from Qm plus or minus an immediate offset (possibly with writeback). Note that writeback is not predicated but it does have to honour ECI state, so we have to add an eci_mask ch

Re: [PATCH v1 1/1] vfio: Make migration support non experimental by default.

2021-07-21 Thread Liang Yan
On 7/14/21 6:19 AM, Kirti Wankhede wrote: > > > On 7/10/2021 1:14 PM, Claudio Fontana wrote: >> On 3/8/21 5:09 PM, Tarun Gupta wrote: >>> VFIO migration support in QEMU is experimental as of now, which was >>> done to >>> provide soak time and resolve concerns regarding bit-stream. >>> But, with

Re: [PATCH for-6.2 32/34] target/arm: Implement MVE scatter-gather insns

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: +static bool do_ldst_sg(DisasContext *s, arg_vldst_sg *a, MVEGenLdStSGFn fn) +{ +TCGv_i32 addr; +TCGv_ptr qd, qm; + +if (!dc_isar_feature(aa32_mve, s) || +!mve_check_qreg_bank(s, a->qd | a->qm) || +!fn || a->rn == 15) { +

Re: [RFC PATCH 2/6] i386/sev: extend sev-guest property to include SEV-SNP

2021-07-21 Thread Michael Roth via
On Wed, Jul 21, 2021 at 03:08:37PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Tue, Jul 20, 2021 at 02:42:12PM -0500, Michael Roth wrote: > >> On Tue, Jul 13, 2021 at 03:46:19PM +0200, Markus Armbruster wrote: > > [...] > > >> > I recommend to do exactly what we've don

Re: [PATCH] docs: convert writing-qmp-commands.txt to writing-qmp-commands.rst

2021-07-21 Thread Connor Kuehl
On 7/21/21 11:50 AM, John Snow wrote: This does about the bare minimum, converting section headers to ReST ones and adding an indent for code blocks. Signed-off-by: John Snow --- Looks like ReST! The generated document also looks good to me. Reviewed-by: Connor Kuehl

Re: [PATCH for-6.2 31/34] target/arm: Implement MVE VCTP

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE VCTP insn, which sets the VPR.P0 predicate bits so as to predicate any element at index Rn or greater is predicated. As with VPNOT, this insn itself is predicable and subject to beatwise execution. The calculation of the mask is the sam

Re: [PATCH for-6.2 30/34] target/arm: Implement MVE VPNOT

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE VPNOT insn, which inverts the bits in VPR.P0 (subject to both predication and to beatwise execution). Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 1 + target/arm/mve.decode | 1 + target/arm/mve_helper.c|

Re: [PATCH for-6.2 29/34] target/arm: Implement MVE VMOV to/from 2 general-purpose registers

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE VMOV forms that move data between 2 general-purpose registers and 2 32-bit lanes in a vector register. Signed-off-by: Peter Maydell --- target/arm/translate-a32.h | 1 + target/arm/mve.decode | 4 ++ target/arm/translate-mve.c

Re: [PATCH for-6.2 28/34] target/arm: Implement MVE VMAXA, VMINA

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE VMAXA and VMINA insns, which take the absolute value of the signed elements in the input vector and then accumulate the unsigned max or min into the destination vector. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 +

Re: [PATCH for-6.2 27/34] target/arm: Implement MVE VQABS, VQNEG

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE 1-operand saturating operations VQABS and VQNEG. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 target/arm/mve.decode | 3 +++ target/arm/mve_helper.c| 37 +

Re: [PATCH for-6.2 26/34] target/arm: Implement MVE saturating doubling multiply accumulates

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE saturating doubling multiply accumulate insns VQDMLAH, VQRDMLAH, VQDMLASH and VQRDMLASH. These perform a multiply, double, add the accumulator shifted by the element size, possibly round, saturate to twice the element size, then take the

Re: [PATCH for-6.2 25/34] target/arm: Implement MVE VMLA

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE VMLA insn, which multiplies a vector by a scalar and accumulates into another vector. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 target/arm/mve.decode | 3 +++ target/arm/mve_helper.c| 6 ++

Re: [PATCH for-6.2 24/34] target/arm: Implement MVE VMLADAV and VMLSLDAV

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE VMLADAV and VMLSLDAV insns. Like the VMLALDAV and VMLSLDAV insns already implemented, these accumulate multiplied vector elements; but they accumulate a 32-bit result rather than a 64-bit one. Note that these encodings overlap with what

Re: [PATCH for-6.1?] iotest: Further enhance qemu-img-bitmaps

2021-07-21 Thread Nir Soffer
On 7/21/21 11:46 PM, Eric Blake wrote: Add a regression test to make sure we detect attempts to use 'qemu-img bitmap' to modify an in-use local file. Suggested-by: Nir Soffer Signed-off-by: Eric Blake --- Sadly, this missed my bitmaps pull request today. If there's any reason to respin that

[ANNOUNCE] QEMU 6.1.0-rc0 is now available

2021-07-21 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the first release candidate for the QEMU 6.1 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-6.1.0-rc0.tar.xz http://downl

Re: [PATCH for-6.2 23/34] target/arm: Rename MVEGenDualAccOpFn to MVEGenLongDualAccOpFn

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: The MVEGenDualAccOpFn is a bit misnamed, since it is used for the "long dual accumulate" operations that use a 64-bit accumulator. Rename it to MVEGenLongDualAccOpFn so we can use the former name for the 32-bit accumulator insns. Signed-off-by: Peter Mayd

Re: [PATCH for-6.2 22/34] target/arm: Implement MVE narrowing moves

2021-07-21 Thread Richard Henderson
On 7/13/21 3:37 AM, Peter Maydell wrote: Implement the MVE narrowing move insns VMOVN, VQMOVN and VQMOVUN. These take a double-width input, narrow it (possibly saturating) and store the result to either the top or bottom half of the output element. Signed-off-by: Peter Maydell --- target/arm/h

[PULL 1/3] Hexagon (target/hexagon) remove put_user_*/get_user_*

2021-07-21 Thread Taylor Simpson
Replace put_user_* with cpu_st*_data_ra Replace get_user_* with cpu_ld*_data_ra Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson Message-Id: <1626384156-6248-2-git-send-email-tsimp...@quicinc.com> --- target/hexagon/op_helper.c | 39 +

[PULL 2/3] target/hexagon: Drop include of qemu.h

2021-07-21 Thread Taylor Simpson
From: Peter Maydell The qemu.h file is a CONFIG_USER_ONLY header; it doesn't appear on the include path for softmmu builds. Currently we include it unconditionally in target/hexagon/op_helper.c. We used to need it for the put_user_*() and get_user_*() functions, but now that we have removed the

[PULL 3/3] linux-test (tests/tcg/multiarch/linux-test.c) add check

2021-07-21 Thread Taylor Simpson
Add a check that the SIGSEGV handler is called Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson Message-Id: <1626384156-6248-3-git-send-email-tsimp...@quicinc.com> --- tests/tcg/multiarch/linux-test.c | 8 1 file changed, 8 insertions(+) diff --git a/tests/tcg/multiarch/li

[PULL 0/3] SIGSEGV fixes

2021-07-21 Thread Taylor Simpson
s/pull-hex-20210721 for you to fetch changes up to 953ea3e4b426ee0c8349343c53e3358cfec720f2: linux-test (tests/tcg/multiarch/linux-test.c) add check (2021-07-21 15:54:28 -0500) The Hexagon target was silently failing the SIGSEGV test b

Re: [PATCH v2 2/5] migration: Make from_dst_file accesses thread-safe

2021-07-21 Thread Eric Blake
On Wed, Jul 21, 2021 at 03:34:06PM -0400, Peter Xu wrote: > Accessing from_dst_file is potentially racy in current code base like below: > > if (s->from_dst_file) > do_something(s->from_dst_file); > > Because from_dst_file can be reset right after the check in another > thread (rp_thread).

Re: [PATCH for 6.1 1/2] ui/gtk: add a keyboard fifo to the VTE consoles

2021-07-21 Thread Volker Rümelin
+static void gd_vc_send_chars(VirtualConsole *vc) +{ +uint32_t len, avail; +const uint8_t *buf; + +len = qemu_chr_be_can_write(vc->vte.chr); +avail = fifo8_num_used(&vc->vte.out_fifo); +if (len > avail) { +len = avail; +} +while (len > 0) { +uint32_t siz

QEMU question: upstreaming I2C device with unpublished datasheet

2021-07-21 Thread Shengtan Mao
Hi everyone, we are hoping to upstream a MAX I2C device to QEMU. The device's datasheet is not public, and we are contacting the Maxim company to get their permission. If Maxim is okay with upstreaming the device with an unpublished datasheet, will this still be an issue with QEMU? best, Shengtan

Re: About two-dimensional page translation (e.g., Intel EPT) and shadow page table in Linux QEMU/KVM

2021-07-21 Thread Sean Christopherson
On Thu, Jul 15, 2021, harry harry wrote: > Hi Sean, > > Thanks for the explanations. Please see my comments below. Thanks! > > > When TDP (EPT) is used, the hardware MMU has two parts: the TDP PTEs that > > are controlled by KVM, and the IA32 PTEs that are controlled by the guest. > > And ther

[PATCH for-6.1?] iotest: Further enhance qemu-img-bitmaps

2021-07-21 Thread Eric Blake
Add a regression test to make sure we detect attempts to use 'qemu-img bitmap' to modify an in-use local file. Suggested-by: Nir Soffer Signed-off-by: Eric Blake --- Sadly, this missed my bitmaps pull request today. If there's any reason to respin that pull request, I'm inclined to add this in

[PULL 22/27] target/avr: Implement gdb_adjust_breakpoint

2021-07-21 Thread Richard Henderson
Ensure at registration that all breakpoints are in code space, not data space. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/avr/cpu.h | 1 + target/avr/cpu.c | 1 + target/avr/gdbstub.c | 13 + target/avr/translate.c | 14 --

Re: [PATCH v3 2/4] vhost-user-rng-pci: Add vhost-user-rng-pci implementation

2021-07-21 Thread Alex Bennée
Mathieu Poirier writes: > This patch provides a PCI bus interface to the vhost-user-rng backed. > The implentation is similar to what was done for vhost-user-i2c-pci and > vhost-user-fs-pci. > > Signed-off-by: Mathieu Poirier > --- > +static void vhost_user_rng_pci_class_init(ObjectClass *kla

[PULL 23/27] accel/tcg: Merge tb_find into its only caller

2021-07-21 Thread Richard Henderson
We are going to want two things: (1) check for breakpoints will want to break out of the loop here, (2) cflags can only be calculated with pc in hand. Tested-by: Mark Cave-Ayland Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 83 ++-

Re: [PATCH v2 3/6] python/aqmp-tui: Add AQMP TUI draft

2021-07-21 Thread Niteesh G. S.
On Wed, Jul 21, 2021 at 12:34 AM John Snow wrote: > > > On Tue, Jul 13, 2021 at 6:07 PM G S Niteesh Babu > wrote: > >> Added a draft of AQMP TUI. >> >> Implements the follwing basic features: >> 1) Command transmission/reception. >> 2) Shows events asynchronously. >> 3) Shows server status in th

Re: [PATCH v3 3/4] vhost-user-rng: backend: Add RNG vhost-user daemon implementation

2021-07-21 Thread Alex Bennée
Mathieu Poirier writes: > This patch provides the vhost-user backend implementation to work > in tandem with the vhost-user-rng implementation of the QEMU VMM. > > It uses the vhost-user API so that other VMM can re-use the interface > without having to write the driver again. > > Signed-off-by

[PULL 27/27] accel/tcg: Record singlestep_enabled in tb->cflags

2021-07-21 Thread Richard Henderson
Set CF_SINGLE_STEP when single-stepping is enabled. This avoids the need to flush all tb's when turning single-stepping on or off. Tested-by: Mark Cave-Ayland Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 1 + accel/tcg/cp

[PULL 20/27] target/i386: Implement debug_check_breakpoint

2021-07-21 Thread Richard Henderson
Return false for RF set, as we do in i386_tr_breakpoint_check. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/i386/tcg/tcg-cpu.c | 12 1 file changed, 12 insertions(+) diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index e96ec9bbcc..238e3a

[PULL 24/27] accel/tcg: Move breakpoint recognition outside translation

2021-07-21 Thread Richard Henderson
Trigger breakpoints before beginning translation of a TB that would begin with a BP. Thus we never generate code for the BP at all. Single-step instructions within a page containing a BP so that we are sure to check each insn for the BP as above. We no longer need to flush any TBs when changing

Re: [PATCH v2 0/6] python: AQMP-TUI Prototype

2021-07-21 Thread John Snow
On Wed, Jul 21, 2021 at 2:09 PM Niteesh G. S. wrote: > On Wed, Jul 21, 2021 at 12:39 AM John Snow wrote: > >> On Wed, Jul 14, 2021 at 3:07 PM Niteesh G. S. >> wrote: >> >> Why not? >> > I have already updated the status of this > https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg04059.ht

[PULL 16/27] accel/tcg: Handle -singlestep in curr_cflags

2021-07-21 Thread Richard Henderson
Exchange the test in translator_use_goto_tb for CF_NO_GOTO_TB, and the test in tb_gen_code for setting CF_COUNT_MASK to 1. Tested-by: Mark Cave-Ayland Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-Id: <20210717221851.2124573-6-richard.hender...@linaro.org> --- accel/tcg/c

[PULL 14/27] accel/tcg: Add CF_NO_GOTO_TB and CF_NO_GOTO_PTR

2021-07-21 Thread Richard Henderson
Move the -d nochain check to bits on tb->cflags. These will be used for more than -d nochain shortly. Set bits during curr_cflags, test them in translator_use_goto_tb, assert we're not doing anything odd in tcg_gen_goto_tb. The test in tcg_gen_exit_tb is redundant with the assert for goto_tb_issu

[PULL 26/27] accel/tcg: Hoist tb_cflags to a local in translator_loop

2021-07-21 Thread Richard Henderson
The access internal to tb_cflags() is atomic. Avoid re-reading it as such for the multiple uses. Tested-by: Mark Cave-Ayland Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 9 - 1 file changed, 4 insertions(+),

Re: [PATCH v2 00/24] python: introduce Asynchronous QMP package

2021-07-21 Thread Niteesh G. S.
On Thu, Jul 22, 2021 at 1:25 AM John Snow wrote: > Looping qemu-devel back in: I removed them by accident by not hitting > reply-all :( > > On Wed, Jul 21, 2021 at 2:06 PM Niteesh G. S. > wrote: > >> >> >> On Wed, Jul 21, 2021 at 11:03 PM John Snow wrote: >> >>> >>> >>> On Wed, Jul 21, 2021 at

[PULL 25/27] accel/tcg: Remove TranslatorOps.breakpoint_check

2021-07-21 Thread Richard Henderson
The hook is now unused, with breakpoints checked outside translation. Tested-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/translator.h | 11 --- target/arm/helper.h | 2 -- target/a

[PULL 12/27] accel/tcg: Move curr_cflags into cpu-exec.c

2021-07-21 Thread Richard Henderson
We will shortly have more than a simple member read here, with stuff not necessarily exposed to exec/exec-all.h. Tested-by: Mark Cave-Ayland Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210717221851.212

[PULL 17/27] accel/tcg: Use CF_NO_GOTO_{TB, PTR} in cpu_exec_step_atomic

2021-07-21 Thread Richard Henderson
Request that the one TB returns immediately, so that we release the exclusive lock as soon as possible. Tested-by: Mark Cave-Ayland Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Reviewed-by: Alex Bennée Message-Id: <20210717221851.2124573-7-richard.hender...@linaro.org> --- acce

[PULL 18/27] hw/core: Introduce TCGCPUOps.debug_check_breakpoint

2021-07-21 Thread Richard Henderson
New hook to return true when an architectural breakpoint is to be recognized and false when it should be suppressed. First use must wait until other pieces are in place. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/hw/core/tcg-cpu-o

[PULL 15/27] accel/tcg: Drop CF_NO_GOTO_PTR from -d nochain

2021-07-21 Thread Richard Henderson
The purpose of suppressing goto_ptr from -d nochain had been to return to the main loop so that -d cpu would be recognized. But we now include -d cpu logging in helper_lookup_tb_ptr so there is no need to exclude goto_ptr. Tested-by: Mark Cave-Ayland Signed-off-by: Richard Henderson Reviewed-by:

[PULL 13/27] target/alpha: Drop goto_tb path in gen_call_pal

2021-07-21 Thread Richard Henderson
We are certain of a page crossing here, entering the PALcode image, so the call to use_goto_tb that should have been here will never succeed. We are shortly going to add an assert to tcg_gen_goto_tb that would trigger for this case. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Hend

[PULL 21/27] hw/core: Introduce CPUClass.gdb_adjust_breakpoint

2021-07-21 Thread Richard Henderson
This will allow a breakpoint hack to move out of AVR's translator. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 4 cpu.c | 10 ++ 2 files changed, 14 insertions(+) diff --git a/include/hw/core/cpu.h b/include/hw/

[PULL 11/27] accel/tcg: Reduce CF_COUNT_MASK to match TCG_MAX_INSNS

2021-07-21 Thread Richard Henderson
The space reserved for CF_COUNT_MASK was overly large. Reduce to free up cflags bits and eliminate an extra test. Tested-by: Mark Cave-Ayland Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Message-Id: <20210717221851.2124573-2-richard.hender...@linaro.org>

[PULL 19/27] target/arm: Implement debug_check_breakpoint

2021-07-21 Thread Richard Henderson
Reuse the code at the bottom of helper_check_breakpoints, which is what we currently call from *_tr_breakpoint_check. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/internals.h| 3 +++ target/arm/cpu.c | 1 + target/arm

[PULL 10/27] accel/tcg: Push trace info building into atomic_common.c.inc

2021-07-21 Thread Richard Henderson
Use trace_mem_get_info instead of trace_mem_build_info, using the TCGMemOpIdx that we already have. Do this in the atomic_trace_*_pre function as common subroutines. Tested-by: Cole Robinson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 48 +++

[PULL 06/27] accel/tcg: Fold EXTRA_ARGS into atomic_template.h

2021-07-21 Thread Richard Henderson
All instances of EXTRA_ARGS are now identical. Tested-by: Cole Robinson Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 36 accel/tcg/cputlb.c | 1 - accel/tcg/user

[PULL 09/27] trace: Fold mem-internal.h into mem.h

2021-07-21 Thread Richard Henderson
Since the last thing that mem.h does is include mem-internal.h, the symbols are not actually private. Tested-by: Cole Robinson Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- trace/mem-internal.h | 50

[PULL 08/27] accel/tcg: Expand ATOMIC_MMU_LOOKUP_*

2021-07-21 Thread Richard Henderson
Unify the parameters of atomic_mmu_lookup between cputlb.c and user-exec.c. Call the function directly, and remove the macros. Tested-by: Cole Robinson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 41 + accel

[PULL 05/27] accel/tcg: Standardize atomic helpers on softmmu api

2021-07-21 Thread Richard Henderson
Reduce the amount of code duplication by always passing the TCGMemOpIdx argument to helper_atomic_*. This is not currently used for user-only, but it's easy to ignore. Tested-by: Cole Robinson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/tcg-runtime.h | 46 -

[PULL 07/27] accel/tcg: Remove ATOMIC_MMU_DECLS

2021-07-21 Thread Richard Henderson
All definitions are now empty. Tested-by: Cole Robinson Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 12 accel/tcg/cputlb.c | 1 - accel/tcg/user-exec.c | 1 - 3 files changed, 1

[PULL 04/27] tcg: Rename helper_atomic_*_mmu and provide for user-only

2021-07-21 Thread Richard Henderson
Always provide the atomic interface using TCGMemOpIdx oi and uintptr_t retaddr. Rename from helper_* to cpu_* so as to (mostly) match the exec/cpu_ldst.h functions, and to emphasize that they are not callable from TCG directly. Tested-by: Cole Robinson Reviewed-by: Peter Maydell Signed-off-by:

[PULL 02/27] qemu/atomic: Remove pre-C11 atomic fallbacks

2021-07-21 Thread Richard Henderson
We now require c11, so the fallbacks are now dead code Tested-by: Cole Robinson Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- configure | 7 -- include/qemu/atomic.h | 204 +++--- 2 files changed, 10

[PULL 03/27] qemu/atomic: Add aligned_{int64,uint64}_t types

2021-07-21 Thread Richard Henderson
Use it to avoid some clang-12 -Watomic-alignment errors, forcing some structures to be aligned and as a pointer when we have ensured that the address is aligned. Tested-by: Cole Robinson Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/

[PULL 01/27] qemu/atomic: Use macros for CONFIG_ATOMIC64

2021-07-21 Thread Richard Henderson
Clang warnings about questionable atomic usage get localized to the inline function in atomic.h. By using a macro, we get the full traceback to the original use that caused the warning. Tested-by: Cole Robinson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/q

[PULL 00/27] tcg patch queue for rc0

2021-07-21 Thread Richard Henderson
The following changes since commit e77c8b8b8e933414ef07dbed04e02973fccffeb0: Update version for v6.1.0-rc0 release (2021-07-21 17:10:15 +0100) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210721 for you to fetch changes up to

Re: [PATCH v2 00/24] python: introduce Asynchronous QMP package

2021-07-21 Thread John Snow
Looping qemu-devel back in: I removed them by accident by not hitting reply-all :( On Wed, Jul 21, 2021 at 2:06 PM Niteesh G. S. wrote: > > > On Wed, Jul 21, 2021 at 11:03 PM John Snow wrote: > >> >> >> On Wed, Jul 21, 2021 at 1:04 PM Niteesh G. S. >> wrote: >> >>> Hello all, >>> >>> I recentl

[PULL 2/3] qemu-img: Fail fast on convert --bitmaps with inconsistent bitmap

2021-07-21 Thread Eric Blake
Waiting until the end of the convert operation (a potentially time-consuming task) to finally detect that we can't copy a bitmap is bad, comparing to failing fast up front. Furthermore, this prevents us from leaving a file behind with a bitmap that is not marked as inconsistent even though it does

[PULL 3/3] qemu-img: Add --skip-broken-bitmaps for 'convert --bitmaps'

2021-07-21 Thread Eric Blake
The point of 'qemu-img convert --bitmaps' is to be a convenience for actions that are already possible through a string of smaller 'qemu-img bitmap' sub-commands. One situation not accounted for already is that if a source image contains an inconsistent bitmap (for example, because a qemu process

[PULL 0/3] block bitmaps patches for rc1, 2021-07-21

2021-07-21 Thread Eric Blake
The following changes since commit e77c8b8b8e933414ef07dbed04e02973fccffeb0: Update version for v6.1.0-rc0 release (2021-07-21 17:10:15 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-bitmaps-2021-07-21 for you to fetch changes up to 955171e4417bf3

[PULL 1/3] iotests: Improve and rename test 291 to qemu-img-bitmap

2021-07-21 Thread Eric Blake
Enhance the test to demonstrate existing less-than-stellar behavior of qemu-img with a qcow2 image containing an inconsistent bitmap: we don't diagnose the problem until after copying the entire image (a potentially long time), and when we do diagnose the failure, we still end up leaving an empty b

[PATCH v2 5/5] migration: Move the yank unregister of channel_close out

2021-07-21 Thread Peter Xu
It's efficient, but hackish to call yank unregister calls in channel_close(), especially it'll be hard to debug when qemu crashed with some yank function leaked. Remove that hack, but instead explicitly unregister yank functions at the places where needed, they are: (on src) - migrate_fd_clea

[PATCH v2 4/5] migration: Teach QEMUFile to be QIOChannel-aware

2021-07-21 Thread Peter Xu
migration uses QIOChannel typed qemufiles. In follow up patches, we'll need the capability to identify this fact, so that we can get the backing QIOChannel from a QEMUFile. We can also define types for QEMUFile but so far since we only need to be able to identify QIOChannel, introduce a boolean w

[PATCH v2 0/5] migrations: Fix potential rare race of migration-test after yank

2021-07-21 Thread Peter Xu
v2: - Pick r-b for Dave on patch 1/3 - Move migration_file_get_ioc() from patch 5 to patch 4, meanwhile rename it to qemu_file_get_ioc(). [Dave] - Patch 2 "migration: Shutdown src in await_return_path_close_on_source()" is replaced by patch "migration: Make from_dst_file accesses thread-safe" [

[PATCH v2 2/5] migration: Make from_dst_file accesses thread-safe

2021-07-21 Thread Peter Xu
Accessing from_dst_file is potentially racy in current code base like below: if (s->from_dst_file) do_something(s->from_dst_file); Because from_dst_file can be reset right after the check in another thread (rp_thread). One example is migrate_fd_cancel(). Use the same qemu_file_lock to pro

[PATCH v2 3/5] migration: Introduce migration_ioc_[un]register_yank()

2021-07-21 Thread Peter Xu
There're plenty of places in migration/* that checks against either socket or tls typed ioc for yank operations. Provide two helpers to hide all these information. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/channel.c | 15 ++- migration/mult

[PATCH v2 1/5] migration: Fix missing join() of rp_thread

2021-07-21 Thread Peter Xu
It's possible that the migration thread skip the join() of the rp_thread in below race and crash on src right at finishing migration: migration_thread rp_thread - migration_completion()

RE: vulkan support in qemu with virgil

2021-07-21 Thread Kasireddy, Vivek
Hi Tomeu, > On Wed, Jul 21, 2021 at 03:09:21PM +0200, Tomeu Vizoso wrote: > > Hi all, > > > > At Collabora we have started looking at Vulkan support in QEMU with Virgil. > > > > We have seen the work that Vivek has submitted to support the new virtio-gpu > > BLOB API (thanks!) and have identified

Re: [PATCH v7 0/2] support dirtyrate measurement with dirty bitmap

2021-07-21 Thread Peter Xu
On Tue, Jul 20, 2021 at 11:19:15PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > v7: > - do not take bql every time we need when do dirtyrate measuring. > try more things once we take bql so that overhead can be reduced. Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 2/5] migration: Shutdown src in await_return_path_close_on_source()

2021-07-21 Thread Peter Xu
On Wed, Jul 21, 2021 at 07:00:24PM +0100, Dr. David Alan Gilbert wrote: > Yes, I think that's best; but try to do as little as possible with the > lock held. Yep; non-blocking for the OOB thread. Will do. -- Peter Xu

Re: [PATCH v2 0/6] python: AQMP-TUI Prototype

2021-07-21 Thread Niteesh G. S.
On Wed, Jul 21, 2021 at 12:39 AM John Snow wrote: > > > On Wed, Jul 14, 2021 at 3:07 PM Niteesh G. S. > wrote: > >> Hello all, >> >> UPDATE: The pipelines have run and all tests passed #336491916 >> Usually, the pipelines start running as soon as I push my code. But this >> time they took longe

Re: [PATCH 2/5] migration: Shutdown src in await_return_path_close_on_source()

2021-07-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, Jul 21, 2021 at 10:55:00AM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > We have a logic in await_return_path_close_on_source() that we will > > > explicitly > > > shutdown the socket when migration encounters e

Re: [PATCH for-6.2 03/23] target/avr: Drop checks for singlestep_enabled

2021-07-21 Thread Philippe Mathieu-Daudé
+Michael/Alex/Pavel On 7/21/21 8:41 AM, Richard Henderson wrote: > GDB single-stepping is now handled generically. > > Signed-off-by: Richard Henderson > --- > target/avr/translate.c | 19 --- > 1 file changed, 4 insertions(+), 15 deletions(-) > > diff --git a/target/avr/transl

  1   2   3   4   >