Re: [PATCH 15/24] configure, meson: move libaio check to meson.build

2021-10-07 Thread Richard Henderson
On 10/7/21 6:08 AM, Paolo Bonzini wrote: +++ b/stubs/meson.build @@ -20,7 +20,9 @@ endif stub_ss.add(files('iothread-lock.c')) stub_ss.add(files('isa-bus.c')) stub_ss.add(files('is-daemonized.c')) -stub_ss.add(when: 'CONFIG_LINUX_AIO', if_true: files('linux-aio.c')) +if libaio.found() +

[PATCH v2 07/48] tcg/optimize: Split out copy_propagate

2021-10-07 Thread Richard Henderson
Continue splitting tcg_optimize. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 019c5aaf81..fad6f5de1f 100644 ---

[PATCH v2 15/48] tcg/optimize: Split out fold_const{1,2}

2021-10-07 Thread Richard Henderson
Split out a whole bunch of placeholder functions, which are currently identical. That won't last as more code gets moved. Use CASE_32_64_VEC for some logical operators that previously missed the addition of vectors. Signed-off-by: Richard Henderson --- tcg/optimize.c | 254

[PATCH v2 45/48] tcg/optimize: Propagate sign info for logical operations

2021-10-07 Thread Richard Henderson
Sign repetitions are perforce all identical, whether they are 1 or 0. Bitwise operations preserve the relative quantity of the repetitions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 29 + 1 file changed, 29

[PATCH v2 25/48] tcg/optimize: Split out fold_deposit

2021-10-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 6020a678ab..dd78982330 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -880,6 +880,18 @@ static bool

[PATCH v2 38/48] tcg/optimize: Split out fold_masks

2021-10-07 Thread Richard Henderson
Move all of the known-zero optimizations into the per-opcode functions. Use fold_masks when there is a possibility of the result being determined, and simply set ctx->z_mask otherwise. Signed-off-by: Richard Henderson --- tcg/optimize.c | 545 ++---

[PATCH v2 34/48] tcg/optimize: Split out fold_to_not

2021-10-07 Thread Richard Henderson
Split out the conditional conversion from a more complex logical operation to a simple NOT. Create a couple more helpers to make this easy for the outer-most logical operations. Signed-off-by: Richard Henderson --- tcg/optimize.c | 154 +++-- 1 file

Re: [PATCH 19/24] configure: remove obsolete Solaris ar check

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:17 PM Paolo Bonzini wrote: > Meson already has its own logic to find the "ar" binary, so remove the > Solaris specific check. > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > configure | 15 --- > 1 file changed, 15 deletions(-)

Re: [PATCH 14/24] configure, meson: move pthread_setname_np checks to Meson

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:19 PM Paolo Bonzini wrote: > This makes the pthreads check dead in configure, so remove it > as well. > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau (a shame that g_system_thread_set_name() is not exported imho) --- > configure|

Re: [PATCH 12/24] configure, meson: remove CONFIG_GCOV from config-host.mak

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:24 PM Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > configure | 3 --- > meson.build | 1 + > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/configure b/configure > index 35e25bb960..499c84859d

[PATCH v4 06/13] macfb: add trace events for reading and writing the control registers

2021-10-07 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- hw/display/macfb.c | 8 +++- hw/display/trace-events | 4 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/display/macfb.c b/hw/display/macfb.c index

[PATCH v4 13/13] q800: wire macfb IRQ to separate video interrupt on VIA2

2021-10-07 Thread Mark Cave-Ayland
Whilst the in-built Quadra 800 framebuffer exists within the Nubus address space for slot 9, it has its own dedicated interrupt on VIA2. Force the macfb device to occupy slot 9 in the q800 machine and wire its IRQ to the separate video interrupt since this is what is expected by the MacOS

[PATCH v4 12/13] macfb: add vertical blank interrupt

2021-10-07 Thread Mark Cave-Ayland
The MacOS driver expects a 60.15Hz vertical blank interrupt to be generated by the framebuffer which in turn schedules the mouse driver via the Vertical Retrace Manager. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier --- hw/display/macfb.c | 83

Re: [PATCH 1/2] numa: Set default distance map if needed

2021-10-07 Thread Gavin Shan
Hi Drew, On 10/6/21 10:56 PM, Andrew Jones wrote: On Wed, Oct 06, 2021 at 10:03:25PM +1100, Gavin Shan wrote: On 10/6/21 9:35 PM, Andrew Jones wrote: On Wed, Oct 06, 2021 at 06:22:08PM +0800, Gavin Shan wrote: The following option is used to specify the distance map. It's possible the option

[PATCH v2 17/48] tcg/optimize: Split out fold_brcond2

2021-10-07 Thread Richard Henderson
Reduce some code duplication by folding the NE and EQ cases. Signed-off-by: Richard Henderson --- tcg/optimize.c | 161 + 1 file changed, 83 insertions(+), 78 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 0eaa0127f3..266787957f

[PATCH v2 00/48] tcg: optimize redundant sign extensions

2021-10-07 Thread Richard Henderson
Currently, we have support for optimizing redundant zero extensions, which I think was done with x86 and aarch64 in mind, which zero-extend all 32-bit operations into the 64-bit register. But targets like Alpha, MIPS, and RISC-V do sign-extensions instead. The last 5 patches address this. But

[PATCH v2 06/48] tcg/optimize: Split out init_arguments

2021-10-07 Thread Richard Henderson
There was no real reason for calls to have separate code here. Unify init for calls vs non-calls using the call path, which handles TCG_CALL_DUMMY_ARG. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 25 +++-- 1 file changed, 11

[PATCH v2 04/48] tcg/optimize: Change tcg_opt_gen_{mov, movi} interface

2021-10-07 Thread Richard Henderson
Adjust the interface to take the OptContext parameter instead of TCGContext or both. Signed-off-by: Richard Henderson --- tcg/optimize.c | 67 +- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index

[PATCH v2 30/48] tcg/optimize: Split out fold_xx_to_i

2021-10-07 Thread Richard Henderson
Pull the "op r, a, a => movi r, 0" optimization into a function, and use it in the outer opcode fold functions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 41 - 1 file changed, 24 insertions(+), 17

[PATCH v2 18/48] tcg/optimize: Split out fold_brcond

2021-10-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 266787957f..786d46ed66 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -714,6 +714,22 @@ static

[PATCH v2 09/48] tcg/optimize: Drop nb_oargs, nb_iargs locals

2021-10-07 Thread Richard Henderson
Rather than try to keep these up-to-date across folding, re-read nb_oargs at the end, after re-reading the opcode. A couple of asserts need dropping, but that will take care of itself as we split the function further. Signed-off-by: Richard Henderson --- tcg/optimize.c | 14 -- 1

[PATCH v2 27/48] tcg/optimize: Split out fold_bswap

2021-10-07 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index d2e5727662..7a7c3e25c5 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c

[PATCH v2 32/48] tcg/optimize: Split out fold_xi_to_i

2021-10-07 Thread Richard Henderson
Pull the "op r, a, 0 => movi r, 0" optimization into a function, and use it in the outer opcode fold functions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff

Re: [PATCH 22/24] configure: accept "internal" for --enable-capstone/slirp/fdt

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:25 PM Paolo Bonzini wrote: > Options such as "--enable-capstone=git" do not make much sense when > building > from a tarball. Accept "internal" for consistency with the meson options. > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- >

Re: [PATCH 24/24] configure: automatically parse command line for meson -D options

2021-10-07 Thread Marc-André Lureau
Hi On Thu, Oct 7, 2021 at 5:28 PM Paolo Bonzini wrote: > Right now meson_options.txt lists about 90 options. Each option > needs code in configure to parse it and pass the option down to Meson as > a -D command-line argument; in addition the default must be duplicated > between configure and

Re: [PATCH 13/24] configure, meson: move remaining HAVE_* compiler tests to Meson

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:23 PM Paolo Bonzini wrote: > Remove some special cases by moving them to Meson. > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > configure | 37 - > meson.build | 22 -- > 2 files

Re: [PATCH 08/24] trace: simple: pass trace_file unmodified to config-host.h

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:09 PM Paolo Bonzini wrote: > Add the suffix directly in trace/simple.c, so that quoting is done > properly by Meson. > > Cc: Stefan Hajnoczi > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > configure | 2 -- > meson.build| 2 +- >

Re: [PATCH 13/12] block-backend: fix blk_co_flush prototype to mention coroutine_fn

2021-10-07 Thread Eric Blake
On Thu, Oct 07, 2021 at 07:52:42PM +0200, Vladimir Sementsov-Ogievskiy wrote: > We do have this marker for blk_co_flush function declaration in > block/block-backend.c. Add it in header too. Maybe: We alreaddy have this marker for the blk_co_flush function declaration in block/block-backend.c.

Re: [PATCH v2 04/17] python/aqmp: add send_fd_scm

2021-10-07 Thread Eric Blake
On Thu, Oct 07, 2021 at 12:27:24PM -0400, John Snow wrote: > On Thu, Oct 7, 2021 at 10:52 AM Eric Blake wrote: > > > On Wed, Sep 22, 2021 at 08:49:25PM -0400, John Snow wrote: > > > The single space is indeed required to successfully transmit the file > > > descriptor to QEMU. > > > > Sending

Re: [PATCH 01/15] pcie: Set default and supported MaxReadReq to 512

2021-10-07 Thread Michael S. Tsirkin
On Thu, Oct 07, 2021 at 06:23:52PM +0200, Lukasz Maniak wrote: > From: Knut Omang > > Make the default PCI Express Capability for PCIe devices set > MaxReadReq to 512. code says 256 > Tyipcal modern devices people would want to typo > emulate or simulate would want this. The previous value

[PATCH v4 02/13] macfb: update macfb.c to use the Error API best practices

2021-10-07 Thread Mark Cave-Ayland
As per the current Error API best practices, change macfb_commom_realize() to return a boolean indicating success to reduce errp boiler-plate handling code. Note that memory_region_init_ram_nomigrate() is also updated to use _abort to indicate a non-recoverable error, matching the behaviour

[PATCH v4 03/13] macfb: fix invalid object reference in macfb_common_realize()

2021-10-07 Thread Mark Cave-Ayland
During realize memory_region_init_ram_nomigrate() is used to initialise the RAM memory region used for the framebuffer but the owner object reference is incorrect since MacFbState is a typedef and not a QOM type. Change the memory region owner to be the corresponding DeviceState to fix the issue

[PATCH v4 04/13] macfb: fix overflow of color_palette array

2021-10-07 Thread Mark Cave-Ayland
The palette_current index counter has a maximum size of 256 * 3 to cover a full color palette of 256 RGB entries. Linux assumes that the palette_current index wraps back around to zero after writing 256 RGB entries so ensure that palette_current is reset at this point to prevent data corruption

[PATCH v4 01/13] macfb: handle errors that occur during realize

2021-10-07 Thread Mark Cave-Ayland
Make sure any errors that occur within the macfb realize chain are detected and handled correctly to prevent crashes and to ensure that error messages are reported back to the user. Signed-off-by: Mark Cave-Ayland Reviewed-by: BALATON Zoltan Reviewed-by: Laurent Vivier --- hw/display/macfb.c

Re: [PULL v2 00/15] jobs: mirror: Handle errors after READY cancel

2021-10-07 Thread Richard Henderson
On 10/7/21 8:39 AM, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 9618c5badaa8eed25259cf095ff880efb939fbe7: Merge remote-tracking branch 'remotes/vivier/tags/trivial-branch-for-6.2-pull-request' into staging (2021-10-04 16:27:35 -0700) are available in the Git

[PATCH v2 16/48] tcg/optimize: Split out fold_setcond2

2021-10-07 Thread Richard Henderson
Reduce some code duplication by folding the NE and EQ cases. Signed-off-by: Richard Henderson --- tcg/optimize.c | 145 - 1 file changed, 72 insertions(+), 73 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index e66d935808..0eaa0127f3

[PATCH v2 08/48] tcg/optimize: Split out fold_call

2021-10-07 Thread Richard Henderson
Calls are special in that they have a variable number of arguments, and need to be able to clobber globals. Signed-off-by: Richard Henderson --- tcg/optimize.c | 63 -- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/tcg/optimize.c

[PATCH v2 31/48] tcg/optimize: Split out fold_xx_to_x

2021-10-07 Thread Richard Henderson
Pull the "op r, a, a => mov r, a" optimization into a function, and use it in the outer opcode fold functions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-)

[PATCH v2 23/48] tcg/optimize: Split out fold_extract2

2021-10-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 39 ++- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index c8aa027a5a..8229a67192 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -885,6 +885,25 @@

[PATCH v2 21/48] tcg/optimize: Split out fold_addsub2_i32

2021-10-07 Thread Richard Henderson
Add two additional helpers, fold_add2_i32 and fold_sub2_i32 which will not be simple wrappers forever. Signed-off-by: Richard Henderson --- tcg/optimize.c | 70 +++--- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/tcg/optimize.c

Re: [PATCH 16/24] configure, meson: move vde detection to meson

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:26 PM Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > configure | 35 --- > meson.build | 26 +++--- > meson_options.txt | 2 ++ > net/meson.build | 2

Re: [PATCH 02/24] audio: remove CONFIG_AUDIO_WIN_INT

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:09 PM Paolo Bonzini wrote: > Ever since winwaveaudio was removed in 2015, CONFIG_AUDIO_WIN_INT > is only set if dsound is in use, so use CONFIG_AUDIO_DSOUND directly. > > Cc: Gerd Hoffman > Cc: Volker Rümelin > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André

Re: [PATCH 06/24] kconfig: split CONFIG_SPARSE_MEM from fuzzing

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:20 PM Paolo Bonzini wrote: > Pass CONFIG_FUZZ via host_kconfig, and use it to select the > sparse-mem device. > > Cc: Alexander Oleinik > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > Kconfig.host | 4 > hw/mem/Kconfig | 3

[PATCH v2 2/5] hw/arm: Add Nuvoton SD module to board

2021-10-07 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- hw/arm/npcm7xx.c | 12 +++- include/hw/arm/npcm7xx.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git

[PATCH v2 0/5] hw/arm: Add MMC device for NPCM7XX boards

2021-10-07 Thread Hao Wu
This patch set implements the Nuvoton MMC device for NPCM7XX boards. The MMC device is compatible with the SDHCI interface in QEMU. It allows the user to attach an SD card image to it. Changes since v1: 1. Rearrange the "add SDHCI commands" to just before when it's actually used. 2. Add

Re: Approaches for same-on-same linux-user execve?

2021-10-07 Thread Laurent Vivier
Le 07/10/2021 à 16:32, Alex Bennée a écrit : > Hi, > > I came across a use-case this week for ARM although this may be also > applicable to architectures where QEMU's emulation is ahead of the > hardware currently widely available - for example if you want to > exercise SVE code on AArch64. When

[PATCH v2 10/48] tcg/optimize: Change fail return for do_constant_folding_cond*

2021-10-07 Thread Richard Henderson
Return -1 instead of 2 for failure. This us to use comparisons against 0 for all cases. Signed-off-by: Richard Henderson --- tcg/optimize.c | 145 + 1 file changed, 74 insertions(+), 71 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c

[PATCH v2 20/48] tcg/optimize: Split out fold_mulu2_i32

2021-10-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 6bb5e19e55..01a0925c89 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -891,6 +891,24 @@

[PATCH v2 11/48] tcg/optimize: Return true from tcg_opt_gen_{mov, movi}

2021-10-07 Thread Richard Henderson
This will allow callers to tail call to these functions and return true indicating processing complete. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tcg/optimize.c

[PATCH v2 42/48] tcg/optimize: Add more simplifications for orc

2021-10-07 Thread Richard Henderson
Two simplifications that were missing from before the split to fold functions, and are now easy to provide. Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index ad94f246ff..9c11f83a4a 100644 ---

[PATCH v2 12/48] tcg/optimize: Split out finish_folding

2021-10-07 Thread Richard Henderson
Copy z_mask into OptContext, for writeback to the first output within the new function. Signed-off-by: Richard Henderson --- tcg/optimize.c | 49 + 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c

[PATCH v2 24/48] tcg/optimize: Split out fold_extract, fold_sextract

2021-10-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 48 ++-- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 8229a67192..6020a678ab 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -885,6

[PATCH v2 43/48] tcg/optimize: Stop forcing z_mask to "garbage" for 32-bit values

2021-10-07 Thread Richard Henderson
This "garbage" setting pre-dates the addition of the type changing opcodes INDEX_op_ext_i32_i64, INDEX_op_extu_i32_i64, and INDEX_op_extr{l,h}_i64_i32. So now we have a definitive points at which to adjust z_mask to eliminate such bits from the 32-bit operands. Signed-off-by: Richard Henderson

[PATCH v2 44/48] tcg/optimize: Optimize sign extensions

2021-10-07 Thread Richard Henderson
Certain targets, like riscv, produce signed 32-bit results. This can lead to lots of redundant extensions as values are manipulated. Begin by tracking only the obvious sign-extensions, and converting them to simple copies when possible. Signed-off-by: Richard Henderson --- tcg/optimize.c | 129

Re: [PATCH 10/24] configure, meson: move CONFIG_HOST_DSOSUF to Meson

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:14 PM Paolo Bonzini wrote: > This is just a constant string, there is no need to pass it in > config-host.mak. > > Signed-off-by: Paolo Bonzini > I am surprised not to find a way for meson to return it, but I am not sure where it would fit either.

[PATCH v2 01/48] tcg/optimize: Rename "mask" to "z_mask"

2021-10-07 Thread Richard Henderson
Prepare for tracking different masks by renaming this one. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 142 + 1 file changed, 72 insertions(+), 70 deletions(-) diff --git a/tcg/optimize.c

[PATCH v2 03/48] tcg/optimize: Remove do_default label

2021-10-07 Thread Richard Henderson
Break the final cleanup clause out of the main switch statement. When fully folding an opcode to mov/movi, use "continue" to process the next opcode, else break to fall into the final cleanup. Signed-off-by: Richard Henderson --- tcg/optimize.c | 190

[PATCH v2 19/48] tcg/optimize: Split out fold_setcond

2021-10-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 786d46ed66..6bb5e19e55 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -935,6 +935,17 @@ static bool

[PATCH v2 02/48] tcg/optimize: Split out OptContext

2021-10-07 Thread Richard Henderson
Provide what will become a larger context for splitting the very large tcg_optimize function. Signed-off-by: Richard Henderson --- tcg/optimize.c | 77 ++ 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/tcg/optimize.c

[PATCH v2 14/48] tcg/optimize: Split out fold_mb, fold_qemu_{ld,st}

2021-10-07 Thread Richard Henderson
This puts the separate mb optimization into the same framework as the others. While fold_qemu_{ld,st} are currently identical, that won't last as more code gets moved. Signed-off-by: Richard Henderson --- tcg/optimize.c | 89 +- 1 file changed,

[PATCH v2 40/48] tcg/optimize: Expand fold_addsub2_i32 to 64-bit ops

2021-10-07 Thread Richard Henderson
Rename to fold_addsub2. Use Int128 to implement the wider operation. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 64 +- 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/tcg/optimize.c

[PATCH v2 29/48] tcg/optimize: Split out fold_mov

2021-10-07 Thread Richard Henderson
This is the final entry in the main switch that was in a different form. After this, we have the option to convert the switch into a function dispatch table. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 27 ++- 1 file

[PATCH v2 22/48] tcg/optimize: Split out fold_movcond

2021-10-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 56 -- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 1cec06aa81..c8aa027a5a 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -919,6

[PATCH v2 36/48] tcg/optimize: Split out fold_xi_to_x

2021-10-07 Thread Richard Henderson
Pull the "op r, a, i => mov r, a" optimization into a function, and use them int the outer-most logical operations. Signed-off-by: Richard Henderson --- tcg/optimize.c | 60 +- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git

[PATCH v2 37/48] tcg/optimize: Split out fold_ix_to_i

2021-10-07 Thread Richard Henderson
Pull the "op r, 0, b => movi r, 0" optimization into a function, and use it in fold_shift. Signed-off-by: Richard Henderson --- tcg/optimize.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index

[PATCH v2 33/48] tcg/optimize: Add type to OptContext

2021-10-07 Thread Richard Henderson
Compute the type of the operation early. There are at least 4 places that used a def->flags ladder to determine the type of the operation being optimized. There were two places that assumed !TCG_OPF_64BIT means TCG_TYPE_I32, and so could potentially compute incorrect results for vector

[PATCH v2 41/48] tcg/optimize: Sink commutative operand swapping into fold functions

2021-10-07 Thread Richard Henderson
Most of these are handled by creating a fold_const2_commutative to handle all of the binary operators. The rest were already handled on a case-by-case basis in the switch, and have their own fold function in which to place the call. We now have only one major switch on TCGOpcode. Signed-off-by:

[PATCH v2 39/48] tcg/optimize: Expand fold_mulu2_i32 to all 4-arg multiplies

2021-10-07 Thread Richard Henderson
Rename to fold_multiply2, and handle muls2_i32, mulu2_i64, and muls2_i64. Signed-off-by: Richard Henderson --- tcg/optimize.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index

Re: [PATCH 14/12] block-backend: update blk_co_pwrite() and blk_co_pread() wrappers

2021-10-07 Thread Eric Blake
On Thu, Oct 07, 2021 at 07:52:43PM +0200, Vladimir Sementsov-Ogievskiy wrote: > Make bytes argument int64_t to be consistent with modern block-layer. > Callers should be OK with it as type becomes wider. > > What is inside functions? > > - Conversion from int64_t to size_t. Still, we > can't

Re: [PATCH 01/24] configure: remove --oss-lib

2021-10-07 Thread Marc-André Lureau
Hi On Thu, Oct 7, 2021 at 5:11 PM Paolo Bonzini wrote: > OSS is a kernel API, so the option should not be needed. The library > is used on NetBSD, where OSS is emulated, so keep the variable. > > Cc: Gerd Hoffman > Cc: Volker Rümelin > Signed-off-by: Paolo Bonzini > Not just NetBSD. You

[PATCH v4 07/13] macfb: implement mode sense to allow display type to be detected

2021-10-07 Thread Mark Cave-Ayland
The MacOS toolbox ROM uses the monitor sense to detect the display type and then offer a fixed set of resolutions and colour depths accordingly. Implement the monitor sense using information found in Apple Technical Note HW26: "Macintosh Quadra Built-In Video" along with some local experiments.

[PATCH v4 08/13] macfb: add qdev property to specify display type

2021-10-07 Thread Mark Cave-Ayland
Since the available resolutions and colour depths are determined by the attached display type, add a qdev property to allow the display type to be specified. The main resolutions of interest are high resolution 1152x870 with 8-bit colour and SVGA resolution up to 800x600 with 24-bit colour so

[PATCH v2 3/5] hw/arm: Attach MMC to quanta-gbs-bmc

2021-10-07 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell --- hw/arm/npcm7xx_boards.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/arm/npcm7xx_boards.c

[PATCH v2 46/48] tcg/optimize: Propagate sign info for setcond

2021-10-07 Thread Richard Henderson
The result is either 0 or 1, which means that we have a 2 bit signed result, and thus 62 bits of sign. For clarity, use the smask_from_zmask function. Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index

[PATCH v2 35/48] tcg/optimize: Split out fold_sub_to_neg

2021-10-07 Thread Richard Henderson
Even though there is only one user, place this more complex conversion into its own helper. Signed-off-by: Richard Henderson --- tcg/optimize.c | 84 -- 1 file changed, 47 insertions(+), 37 deletions(-) diff --git a/tcg/optimize.c

[PATCH v2 26/48] tcg/optimize: Split out fold_count_zeros

2021-10-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index dd78982330..d2e5727662 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -875,6 +875,20 @@ static

[PATCH v2 48/48] tcg/optimize: Propagate sign info for shifting

2021-10-07 Thread Richard Henderson
For constant shifts, we can simply shift the s_mask. For variable shifts, we know that sar does not reduce the s_mask, which helps for sequences like ext32s_i64 t, in sar_i64 t, t, v ext32s_i64 out, t allowing the final extend to be eliminated. Signed-off-by: Richard

Re: [PATCH 20/24] configure, meson: move more compiler checks to Meson

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:24 PM Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > lgtm Reviewed-by: Marc-André Lureau > --- > configure | 91 - > meson.build | 45 ++ > 2 files changed, 45 insertions(+), 91

Re: [PATCH 09/24] trace: move configuration from configure to Meson

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:17 PM Paolo Bonzini wrote: > Cc: Stefan Hajnoczi > Signed-off-by: Paolo Bonzini > lgtm Reviewed-by: Marc-André Lureau > --- > configure | 91 + > docs/meson.build| 2 +- > meson.build | 51

[PATCH v4 11/13] macfb: fix 24-bit RGB pixel encoding

2021-10-07 Thread Mark Cave-Ayland
According to Apple Technical Note HW26: "Macintosh Quadra Built-In Video" the in-built framebuffer encodes each 24-bit pixel into 4 bytes. Adjust the 24-bit RGB pixel encoding accordingly which agrees with the encoding expected by MacOS when changing into 24-bit colour mode. Signed-off-by: Mark

[PATCH v2 1/5] hw/sd: add nuvoton MMC

2021-10-07 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- hw/sd/meson.build | 1 + hw/sd/npcm7xx_sdhci.c | 182 ++ include/hw/sd/npcm7xx_sdhci.h | 65

[PATCH v2 4/5] tests/qtest/libqos: add SDHCI commands

2021-10-07 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- tests/qtest/libqos/meson.build | 1 + tests/qtest/libqos/sdhci-cmd.c | 116 + tests/qtest/libqos/sdhci-cmd.h |

Re: [PATCH v4 16/23] target/i386/sev: Remove stubs by using code elision

2021-10-07 Thread Eric Blake
On Thu, Oct 07, 2021 at 06:17:09PM +0200, Philippe Mathieu-Daudé wrote: > Only declare sev_enabled() and sev_es_enabled() when CONFIG_SEV is > set, to allow the compiler to elide unused code. Remove unnecessary > stubs. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/i386/sev.h |

Re: [PATCH 05/24] configure: add command line options for audio drivers

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:13 PM Paolo Bonzini wrote: > Handle the choice of audio drivers the same as all other dependencies. > > Cc: Gerd Hoffman > Cc: Volker Rümelin > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau --- > configure | 39

Re: [PATCH 03/24] configure, meson: move audio driver detection to Meson

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:07 PM Paolo Bonzini wrote: > This brings a change that makes audio drivers more similar to all > other modules. All drivers are built by default, while > --audio-drv-list only governs the default choice of the audio driver. > > Meson options are added to disable the

[PATCH v4 05/13] macfb: use memory_region_init_ram() in macfb_common_realize() for the framebuffer

2021-10-07 Thread Mark Cave-Ayland
Currently macfb_common_realize() defines the framebuffer RAM memory region as being non-migrateable but then immediately registers it for migration. Replace memory_region_init_ram_nomigrate() with memory_region_init_ram() which is clearer and does exactly the same thing. Signed-off-by: Mark

[PATCH v4 09/13] macfb: add common monitor modes supported by the MacOS toolbox ROM

2021-10-07 Thread Mark Cave-Ayland
The monitor modes table is found by experimenting with the Monitors Control Panel in MacOS and analysing the reads/writes. From this it can be found that the mode is controlled by writes to the DAFB_MODE_CTRL1 and DAFB_MODE_CTRL2 registers. Implement the first block of DAFB registers as a

[PATCH v4 00/13] macfb: fixes for booting MacOS

2021-10-07 Thread Mark Cave-Ayland
This is the next set of patches to allow users to boot MacOS in QEMU's q800 machine. Patches 1 to 4 are fixes for existing bugs that I discovered whilst developing the remainder of the patchset whilst patch 5 simplifies the registration of the framebuffer RAM. Patch 6 adds trace events to the

[PATCH v2 13/48] tcg/optimize: Use a boolean to avoid a mass of continues

2021-10-07 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 368457f4a2..699476e2f1 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -713,6 +713,7 @@

[PATCH v2 05/48] tcg/optimize: Move prev_mb into OptContext

2021-10-07 Thread Richard Henderson
This will expose the variable to subroutines that will be broken out of tcg_optimize. Signed-off-by: Richard Henderson --- tcg/optimize.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 627a5b39f6..b875d76354 100644 ---

[PATCH v2 28/48] tcg/optimize: Split out fold_dup, fold_dup2

2021-10-07 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 53 +- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 7a7c3e25c5..db50cf6499 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -917,6

[PATCH v2 47/48] tcg/optimize: Propagate sign info for bit counting

2021-10-07 Thread Richard Henderson
The results are generally 6 bit unsigned values, though the count leading and trailing bits may produce any value for a zero input. Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index

Re: [PATCH 11/24] configure, meson: get HOST_WORDS_BIGENDIAN via the machine object

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:14 PM Paolo Bonzini wrote: > No need to pass it in config-host.mak. > > Signed-off-by: Paolo Bonzini > Or we could eventually use G_BYTE_ORDER, I guess. Reviewed-by: Marc-André Lureau --- > configure | 4 > meson.build | 3 ++- > 2 files changed, 2

Re: [PATCH 21/24] configure: remove deprecated --{enable, disable}-git-update

2021-10-07 Thread Marc-André Lureau
On Thu, Oct 7, 2021 at 5:23 PM Paolo Bonzini wrote: > The options were deprecated in 6.0. That said, we do not really have a > formal deprecation cycle for build-time changes, since they do not affect > users. > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- >

[PATCH v2 5/5] tests/qtest: add qtests for npcm7xx sdhci

2021-10-07 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu --- tests/qtest/meson.build | 1 + tests/qtest/npcm7xx_sdhci-test.c | 209 +++ 2 files changed, 210

Re: Approaches for same-on-same linux-user execve?

2021-10-07 Thread Warner Losh
On Thu, Oct 7, 2021 at 8:56 AM Alex Bennée wrote: > Hi, > > I came across a use-case this week for ARM although this may be also > applicable to architectures where QEMU's emulation is ahead of the > hardware currently widely available - for example if you want to > exercise SVE code on AArch64.

[PATCH v4 10/13] macfb: fix up 1-bit pixel encoding

2021-10-07 Thread Mark Cave-Ayland
The MacOS driver expects the RGB values for the pixel to be in entries 0 and 1 of the colour palette. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier --- hw/display/macfb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/display/macfb.c

Re: [PATCH v2 0/2] vfio: Some fixes about vfio-pci MMIO RAM mapping

2021-10-07 Thread Kunkun Jiang
Kindly ping, Hi all, Will this patch be picked up soon, or is there any other advice? Thanks, Kunkun Jiang On 2021/9/14 9:53, Kunkun Jiang wrote: This series include patches as below: Patch 1: - vfio/pci: Fix vfio-pci sub-page MMIO BAR mmaping in live migration Patch 2: - Added a trace

Re: [PATCH 01/13] target/riscv: Move cpu_get_tb_cpu_state out of line

2021-10-07 Thread Alistair Francis
On Fri, Oct 8, 2021 at 3:52 AM Richard Henderson wrote: > > Move the function to cpu_helper.c, as it is large and growing. > > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.h| 47 ++- >

Re: [PATCH v7 04/10] ACPI ERST: support for ACPI ERST feature

2021-10-07 Thread Ani Sinha
On Thu, 7 Oct 2021, Eric DeVolder wrote: > This implements a PCI device for ACPI ERST. This implements the > non-NVRAM "mode" of operation for ERST as it is supported by > Linux and Windows. > > Signed-off-by: Eric DeVolder > --- > hw/acpi/erst.c | 836 >

  1   2   3   4   5   >