[PATCH] target/i386: Use cpu_breakpoint_test in breakpoint_handler

2021-06-19 Thread Richard Henderson
The loop is performing a simple boolean test for the existence of a BP_CPU breakpoint at EIP. Plus it gets the iteration wrong, if we happen to have a BP_GDB breakpoint at the same address. We have a function for this: cpu_breakpoint_test. Signed-off-by: Richard Henderson --- target/i386/tcg/s

[PATCH 2/3] target/avr: Change ctx to DisasContext* in gen_intermediate_code

2021-06-19 Thread Richard Henderson
Prepare for receiving it as a pointer input. Signed-off-by: Richard Henderson --- target/avr/translate.c | 84 +- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index 20c5062730..66e9882422 1

[PATCH 0/3] target/avr: Convert to TranslatorOps

2021-06-19 Thread Richard Henderson
I've reached a point where *all* targets must use the translator loop. Do that. r~ Richard Henderson (3): target/avr: Add DisasContextBase to DisasContext target/avr: Change ctx to DisasContext* in gen_intermediate_code target/avr: Convert to TranslatorOps target/avr/translate.c | 288 +

[PATCH 3/3] target/avr: Convert to TranslatorOps

2021-06-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/avr/translate.c | 238 +++-- 1 file changed, 132 insertions(+), 106 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index 66e9882422..72117bf3b9 100644 --- a/target/avr/translate.c +++ b/tar

[PATCH 1/3] target/avr: Add DisasContextBase to DisasContext

2021-06-19 Thread Richard Henderson
Migrate the bstate, tb and singlestep_enabled fields from DisasContext into the base. Signed-off-by: Richard Henderson --- target/avr/translate.c | 58 +- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/target/avr/translate.c b/target/avr/t

[PATCH 6/7] target/nios2: Remove assignment to env in handle_instruction

2021-06-19 Thread Richard Henderson
Direct assignments to env during translation do not work. As it happens, the only way we can get here is if env->pc is already set to dc->pc. We will trap on the first insn we execute anywhere on the page. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 3 ++- 1 file changed, 2

[PATCH 4/7] target/nios2: Add DisasContextBase to DisasContext

2021-06-19 Thread Richard Henderson
Migrate the is_jmp, tb and singlestep_enabled fields from DisasContext into the base. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 51 +--- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/target/nios2/translate.c b/target/nio

[PATCH 5/7] target/nios2: Convert to TranslatorOps

2021-06-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/nios2/translate.c | 129 +-- 1 file changed, 68 insertions(+), 61 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 31653b7912..e2c8151193 100644 --- a/target/nios2/translate.c +++ b

[PATCH 7/7] target/nios2: Clean up goto in handle_instruction

2021-06-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/nios2/translate.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index ce4a4c40aa..3f4027ff1b 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -753,7

[PATCH 2/7] target/nios2: Use global cpu_env

2021-06-19 Thread Richard Henderson
We do not need to copy this into DisasContext. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 388fae93a2..39538e1870 100644 --- a/target/nios2/t

[PATCH 1/7] target/nios2: Replace DISAS_TB_JUMP with DISAS_NORETURN

2021-06-19 Thread Richard Henderson
The only semantic of DISAS_TB_JUMP is that we've done goto_tb, which is the same as DISAS_NORETURN -- we've exited the tb. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/nios2/translate.c b/target/n

[PATCH 3/7] target/nios2: Use global cpu_R

2021-06-19 Thread Richard Henderson
We do not need to copy this into DisasContext. Signed-off-by: Richard Henderson --- target/nios2/translate.c | 73 +++- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 39538e1870..6bdd38

[PATCH 0/7] target/nios2: Convert to TranslatorOps

2021-06-19 Thread Richard Henderson
I've reached a point where *all* targets must use the translator loop. Do that, plus some other obvious cleanups. r~ Richard Henderson (7): target/nios2: Replace DISAS_TB_JUMP with DISAS_NORETURN target/nios2: Use global cpu_env target/nios2: Use global cpu_R target/nios2: Add DisasCo

[Bug 1799766] Re: -device does not work as -drive do

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1799766 Title: -device doe

[Bug 1806114] Re: Reading sectors from floppy with BIOS INT 13h is broken

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1806114 Title: Reading sec

[Bug 1806040] Re: Nested VMX virtualization error on last Qemu versions

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1806040 Title: Nested VMX

[Bug 1813398] Re: qemu user calls malloc after fork in multi-threaded process

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1813398 Title: qemu user c

[Bug 1807052] Re: Qemu hangs during migration

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1807052 Title: Qemu hangs

[Bug 1814343] Re: Initrd not loaded on riscv32

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814343 Title: Initrd not

[Bug 1808563] Re: Listing the contents of / lists QEMU_LD_PREFIX instead

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1808563 Title: Listing the

[PULL v2 30/33] tcg: Allocate sufficient storage in temp_allocate_frame

2021-06-19 Thread Richard Henderson
This function should have been updated for vector types when they were introduced. Fixes: d2fd745fe8b Resolves: https://gitlab.com/qemu-project/qemu/-/issues/367 Cc: qemu-sta...@nongnu.org Tested-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c

[Bug 1807073] Re: qemu-guest-agent stop work when fsfreeze

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1807073 Title: qemu-guest-

[Bug 1817239] Re: add '--targets' option to qemu-binfmt-conf.sh

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1817239 Title: add '--targ

[Bug 1808824] Re: Mouse leaves VM window when Grab on Hover isn't selected Windows 10 and Intel HAX

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1808824 Title: Mouse leave

[Bug 1809684] Re: amdgpu passthrough on POWER9 (ppc64el) not working

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1809684 Title: amdgpu pass

[Bug 1819908] Re: slight screen corruption when maximizing window

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1819908 Title: slight scre

[PULL v2 00/33] tcg patch queue

2021-06-19 Thread Richard Henderson
s/pull-tcg-20210619-2 for you to fetch changes up to 1c9638667b7068539dc5783c9428d588b14162ea: util/oslib-win32: Fix fatal assertion in qemu_try_memalign (2021-06-19 14:51:51 -0700) TCI cleanup and re-encoding Fixes for #367 and

[Bug 1809144] Re: SVM instructions fail with SVME bit enabled

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1809144 Title: SVM instruc

[Bug 1821595] Re: Failed to emulate MMIO access with EmulatorReturnStatus: 2

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1821595 Title: Failed to e

[Bug 1813045] Re: qemu-ga fsfreeze crashes the kernel

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1813045 Title: qemu-ga fsf

[Bug 1811244] Re: qemu 3.1/i386 crashes/guest hangs when MTTCG is enabled

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1811244 Title: qemu 3.1/i3

[Bug 1814381] Re: qemu can't resolve ::1 when no network is available

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1814381 Title: qemu can't

[PATCH 9/9] target/cris: Use tcg_gen_lookup_and_goto_ptr

2021-06-19 Thread Richard Henderson
Indirect jumps can use this to avoid returning to the main loop. Signed-off-by: Richard Henderson --- target/cris/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/cris/translate.c b/target/cris/translate.c index e4cbc35ebd..8a8d62f11b 100644 --- a/target/cris/translate.c

[Bug 1815993] Re: drive-backup with iscsi will cause vm disk no response

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1815993 Title: drive-backu

[PATCH 7/9] target/cris: Mark static arrays const

2021-06-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/cris/translate.c | 19 ++- target/cris/translate_v10.c.inc | 6 +++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 8c24053f5e..3515c21b7b 100644 --- a/

[PATCH 8/9] target/cris: Use movcond for t_gen_cc_jmp

2021-06-19 Thread Richard Henderson
This is better than branch around assignment. Signed-off-by: Richard Henderson --- target/cris/translate.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 3515c21b7b..e4cbc35ebd 100644 --- a/target/cris/translate

[Bug 1821131] Re: VM running under latest Qemu receives 2, 3, 8, and = when sent the keysyms for @, #, *, and + respectively

2021-06-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1821131 Title: VM running

[PATCH 6/9] target/cris: Mark helper_raise_exception noreturn

2021-06-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/cris/helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/cris/helper.h b/target/cris/helper.h index 20d21c4358..3abf608682 100644 --- a/target/cris/helper.h +++ b/target/cris/helper.h @@ -1,4 +1,4 @@ -DEF_HELPER_2(raise_e

[PATCH 3/9] target/cris: Mark exceptions as DISAS_NORETURN

2021-06-19 Thread Richard Henderson
After we've raised the exception, we have left the TB. Signed-off-by: Richard Henderson --- target/cris/translate.c | 5 +++-- target/cris/translate_v10.c.inc | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 2

[PATCH 2/9] target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN

2021-06-19 Thread Richard Henderson
The only semantic of DISAS_TB_JUMP is that we've done goto_tb, which is the same as DISAS_NORETURN -- we've exited the tb. Signed-off-by: Richard Henderson --- target/cris/translate.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/cris/translate.c b/target/cris

[PATCH 5/9] target/cris: Convert to TranslatorOps

2021-06-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/cris/translate.c | 320 ++-- 1 file changed, 177 insertions(+), 143 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 24dbae6d58..8c24053f5e 100644 --- a/target/cris/translate.c +++ b/

[PATCH 1/9] target/cris: Add DisasContextBase to DisasContext

2021-06-19 Thread Richard Henderson
Migrate the is_jmp, tb and singlestep_enabled fields from DisasContext into the base. Signed-off-by: Richard Henderson --- target/cris/translate.c | 49 + target/cris/translate_v10.c.inc | 4 +-- 2 files changed, 27 insertions(+), 26 deletions(-) diff --

[PATCH 0/9] target/cris: Convert to TranslatorOps

2021-06-19 Thread Richard Henderson
I've reached a point where *all* targets must use the translator loop. Do that, plus some other obvious cleanups. r~ Richard Henderson (9): target/cris: Add DisasContextBase to DisasContext target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN target/cris: Mark exceptions as DISAS_NORE

[PATCH 4/9] target/cris: Remove DISAS_SWI

2021-06-19 Thread Richard Henderson
This value is unused. Signed-off-by: Richard Henderson --- target/cris/translate.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index f8b574b0b6..24dbae6d58 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -55,7 +55,6

[PATCH v4 2/2] target/i386: Add lbr-fmt vPMU option to support guest LBR

2021-06-19 Thread Yang Weijiang
The Last Branch Recording (LBR) is a performance monitor unit (PMU) feature on Intel processors which records a running trace of the most recent branches taken by the processor in the LBR stack. This option indicates the LBR format to enable for guest perf. The LBR feature is enabled if below cond

[PATCH v4 1/2] qdev-properties: Add a new macro with bitmask check for uint64_t property

2021-06-19 Thread Yang Weijiang
The DEFINE_PROP_UINT64_CHECKMASK maro applies certain mask check agaist user-supplied property value, reject the value if it violates the bitmask. Co-developed-by: Like Xu Signed-off-by: Like Xu Signed-off-by: Yang Weijiang --- hw/core/qdev-properties.c| 19 +++ include/hw/

Re: [PATCH] target/ppc/spapr: Update H_GET_CPU_CHARACTERISTICS L1D cache flush bits

2021-06-19 Thread Nicholas Piggin
Excerpts from David Gibson's message of June 19, 2021 7:26 pm: > On Tue, Jun 15, 2021 at 02:41:07PM +1000, Nicholas Piggin wrote: >> There are several new L1D cache flush bits added to the hcall which reflect >> hardware security features for speculative cache access issues. >> >> These behaviours

Re: [PULL 00/33] tcg patch queue

2021-06-19 Thread Richard Henderson
Bah. Somehow I overwrote a minor fix for tcg: Allocate sufficient storage in temp_allocate_frame Will update and repost. r~

Re: [PATCH v2 19/23] hw/i386: Move pc_madt_cpu_entry() to acpi-pc.c

2021-06-19 Thread Michael S. Tsirkin
On Sat, Jun 19, 2021 at 10:45:17AM +0200, Philippe Mathieu-Daudé wrote: > On 6/18/21 1:37 PM, Igor Mammedov wrote: > > On Wed, 16 Jun 2021 22:43:24 +0200 > > Philippe Mathieu-Daudé wrote: > > > >> pc_madt_cpu_entry() is specific to QEMU 'PC' machines, > >> move it to acpi-pc.c. > >> > >> Signed-o

Re: [PATCH v3 0/5] block-copy: make helper APIs thread safe

2021-06-19 Thread Vladimir Sementsov-Ogievskiy
19.06.2021 15:21, Vladimir Sementsov-Ogievskiy wrote: 14.06.2021 11:17, Emanuele Giuseppe Esposito wrote: On 14/06/2021 10:11, Emanuele Giuseppe Esposito wrote: This serie of patches bring thread safety to the smaller APIs used by block-copy, namely ratelimit, progressmeter, co-shared-resourc

Re: [PATCH V3 6/6] block/rbd: drop qemu_rbd_refresh_limits

2021-06-19 Thread Ilya Dryomov
On Wed, May 19, 2021 at 4:26 PM Peter Lieven wrote: > > librbd supports 1 byte alignment for all aio operations. > > Currently, there is no API call to query limits from the ceph backend. > So drop the bdrv_refresh_limits completely until there is such an API call. > > Signed-off-by: Peter Lieven

Re: [PATCH v4 6/6] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-06-19 Thread Vladimir Sementsov-Ogievskiy
14.06.2021 10:33, Emanuele Giuseppe Esposito wrote: By adding acquire/release pairs, we ensure that .ret and .error_is_read fields are written by block_copy_dirty_clusters before .finished is true. And that they are read by API user after .finished is true. The atomic here are necessary beca

Re: [PATCH V3 2/6] block/rbd: store object_size in BDRVRBDState

2021-06-19 Thread Ilya Dryomov
On Wed, May 19, 2021 at 4:29 PM Peter Lieven wrote: > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 18 +++--- > 1 file changed, 7 insertions(+), 11 deletions(-) > > diff --git a/block/rbd.c b/block/rbd.c > index 6b1cbe1d75..b4caea4f1b 100644 > --- a/block/rbd.c > +++ b/block/r

Re: [PATCH V3 3/6] block/rbd: update s->image_size in qemu_rbd_getlength

2021-06-19 Thread Ilya Dryomov
On Wed, May 19, 2021 at 4:26 PM Peter Lieven wrote: > > in case the image size changed we should adjust our internally stored size as > well. > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/rbd.c b/block/rbd.c > index b4caea4f1b

[Bug 1910603] Re: [OSS-Fuzz] Issue 29174 sb16: Abrt in audio_bug

2021-06-19 Thread Alexander Bulekov
OSS-Fuzz confirms this is fixed: https://bugs.chromium.org/p/oss- fuzz/issues/detail?id=30574#c4 ** Changed in: qemu Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net

Re: [PATCH] block/rbd: Add support for rbd image encryption

2021-06-19 Thread Ilya Dryomov
On Thu, Jun 17, 2021 at 6:05 PM Or Ozeri wrote: > > Starting from ceph Pacific, RBD has built-in support for image-level > encryption. > Currently supported formats are LUKS version 1 and 2. > > There are 2 new relevant librbd APIs for controlling encryption, both expect > an > open image contex

[PATCH v2] mc146818rtc: Make PF independent of PIE

2021-06-19 Thread Jason Thorpe
Make the PF flag behave like real hardware by always running the periodic timer without regard to the setting of the PIE bit, so that the PF will be set when the period expires even if an interrupt will not be raised. This behavior is documented on page 16 of the MC146818A advance information data

Re: [PATCH v4 5/6] block-copy: add a CoMutex

2021-06-19 Thread Vladimir Sementsov-Ogievskiy
14.06.2021 10:33, Emanuele Giuseppe Esposito wrote: Add a CoMutex to protect concurrent access of block-copy data structures. This mutex also protects .copy_bitmap, because its thread-safe API does not prevent it from assigning two tasks to the same bitmap region. .finished, .cancelled and read

Re: [PATCH v4 3/6] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-19 Thread Vladimir Sementsov-Ogievskiy
14.06.2021 10:33, Emanuele Giuseppe Esposito wrote: --- a/block/block-copy.c +++ b/block/block-copy.c @@ -52,29 +52,35 @@ typedef struct BlockCopyCallState { /* Coroutine where async block-copy is running */ Coroutine *co; -/* To reference all call states from BlockCopyState */

Re: [PATCH 05/11] target/i386: Use float_flag_inorm_denormal

2021-06-19 Thread Richard Henderson
Ping. Cc paolo, ed. This is the last unreviewed patch in this series, and the one that sparked the work in the first place. r~ On 5/26/21 9:13 PM, Richard Henderson wrote: The FSR and MXCSR DE flags have the semantics of the new flag. We get to remove a big fixme in update_mxcsr_from_sse_st

Re: [PATCH v4 2/6] block-copy: streamline choice of copy_range vs. read/write

2021-06-19 Thread Vladimir Sementsov-Ogievskiy
14.06.2021 10:33, Emanuele Giuseppe Esposito wrote: @@ -158,8 +183,9 @@ static BlockCopyTask *block_copy_task_create(BlockCopyState *s, int64_t offset, int64_t bytes) { BlockCopyTask *task; -int64_t max_chunk = MIN_NON_ZERO(s->copy_size,

[PULL 32/33] tcg: expose TCGCond manipulation routines

2021-06-19 Thread Richard Henderson
From: Alessandro Di Federico This commit moves into a separate file routines used to manipulate TCGCond. These will be employed by the idef-parser. Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Message-Id: <20210619093713.1845446-2-ale.q...@rev.ng> Signed-off-by: Richard

[PULL 28/33] accel/tcg: Probe the proper permissions for atomic ops

2021-06-19 Thread Richard Henderson
We had a single ATOMIC_MMU_LOOKUP macro that probed for read+write on all atomic ops. This is incorrect for plain atomic load and atomic store. For user-only, we rely on the host page permissions. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/390 Reviewed-by: Alex Bennée Signed-off-by

[PULL 31/33] tcg: Restart when exhausting the stack frame

2021-06-19 Thread Richard Henderson
Assume that we'll have fewer temps allocated after restarting with a fewer number of instructions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 47cc66f159..

[PULL 25/33] tcg/tci: Remove the qemu_ld/st_type macros

2021-06-19 Thread Richard Henderson
These macros are only used in one place. By expanding, we get to apply some common-subexpression elimination and create some local variables. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 165

[PULL 27/33] tests/tcg: Increase timeout for TCI

2021-06-19 Thread Richard Henderson
The longest test at the moment seems to be a (slower) aarch64 host, for which test-mmap takes 64 seconds. Tested-by: Philippe Mathieu-Daudé Acked-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- configure | 3 ++

[PULL 23/33] tcg/tci: Split out tci_qemu_ld, tci_qemu_st

2021-06-19 Thread Richard Henderson
We can share this code between 32-bit and 64-bit loads and stores. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 183 +- 1 file changed, 71 insertions(+), 112 deletions(

[PULL 33/33] util/oslib-win32: Fix fatal assertion in qemu_try_memalign

2021-06-19 Thread Richard Henderson
From: Stefan Weil The function is called with alignment == 0 which caused an assertion. Use the code from oslib-posix.c to fix that regression. Fixes: ed6f53f9ca9 Signed-off-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210611105846.347954-1...@weilnetz.de> Signed-off-by:

[PULL 20/33] tcg/tci: Implement clz, ctz, ctpop

2021-06-19 Thread Richard Henderson
Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 12 +-- tcg/tci.c| 44 tcg/tci/tcg-target.c.inc | 9 3 files changed, 59 insertions(+)

[PULL 24/33] Revert "tcg/tci: Use exec/cpu_ldst.h interfaces"

2021-06-19 Thread Richard Henderson
This reverts commit dc09f047eddec8f4a1991c4f5f4a428d7aa3f2c0. For tcg, tracepoints are expanded inline in tcg opcodes. Using a helper which generates a second tracepoint is incorrect. For system mode, the extraction and re-packing of MemOp and mmu_idx lost the alignment information from MemOp. S

[PULL 29/33] tcg/sparc: Fix temp_allocate_frame vs sparc stack bias

2021-06-19 Thread Richard Henderson
We should not be aligning the offset in temp_allocate_frame, because the odd offset produces an aligned address in the end. Instead, pass the logical offset into tcg_set_frame and add the stack bias last. Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Hender

[PULL 17/33] tcg/tci: Implement movcond

2021-06-19 Thread Richard Henderson
When this opcode is not available in the backend, tcg middle-end will expand this as a series of 5 opcodes. So implementing this saves bytecode space. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 4 ++--

Re: [PATCH v4 3/6] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-19 Thread Vladimir Sementsov-Ogievskiy
19.06.2021 18:23, Vladimir Sementsov-Ogievskiy wrote:   typedef struct BlockCopyTask {   AioTask task; +    /* + * IN parameters. Initialized in block_copy_task_create() + * and never changed. + */ That's just not true for method field :( I think, we just need to document that

[PULL 22/33] tcg/tci: Implement add2, sub2

2021-06-19 Thread Richard Henderson
We already had the 32-bit versions for a 32-bit host; expand this to 64-bit hosts as well. The 64-bit opcodes are new. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 8 tcg/tci.c|

[PULL 21/33] tcg/tci: Implement mulu2, muls2

2021-06-19 Thread Richard Henderson
We already had mulu2_i32 for a 32-bit host; expand this to 64-bit hosts as well. The muls2_i32 and the 64-bit opcodes are new. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 8 tcg/tci.c

[PULL 14/33] tcg/tci: Remove tci_write_reg

2021-06-19 Thread Richard Henderson
Inline it into its one caller, tci_write_reg64. Drop the asserts that are redundant with tcg_read_r. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff -

[PULL 15/33] tcg/tci: Change encoding to uint32_t units

2021-06-19 Thread Richard Henderson
This removes all of the problems with unaligned accesses to the bytecode stream. With an 8-bit opcode at the bottom, we have 24 bits remaining, which are generally split into 6 4-bit slots. This fits well with the maximum length opcodes, e.g. INDEX_op_add2_i32, which have 6 register operands. We

[PULL 30/33] tcg: Allocate sufficient storage in temp_allocate_frame

2021-06-19 Thread Richard Henderson
This function should have been updated for vector types when they were introduced. Fixes: d2fd745fe8b Resolves: https://gitlab.com/qemu-project/qemu/-/issues/367 Cc: qemu-sta...@nongnu.org Tested-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c

[PULL 16/33] tcg/tci: Implement goto_ptr

2021-06-19 Thread Richard Henderson
This operation is critical to staying within the interpretation loop longer, which avoids the overhead of setup and teardown for many TBs. The check in tcg_prologue_init is disabled because TCI does want to use NULL to indicate exit, as opposed to branching to a real epilogue. Tested-by: Philippe

[PULL 13/33] tcg/tci: Emit setcond before brcond

2021-06-19 Thread Richard Henderson
The encoding planned for tci does not have enough room for brcond2, with 4 registers and a condition as input as well as the label. Resolve the condition into TCG_REG_TMP, and relax brcond to one register plus a label, considering the condition to always be reg != 0. Tested-by: Philippe Mathieu-D

[PULL 10/33] tcg/tci: Move call-return regs to end of tcg_target_reg_alloc_order

2021-06-19 Thread Richard Henderson
As the only call-clobbered regs for TCI, these should receive the least priority. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/tci/

[PULL 26/33] tcg/tci: Use {set,clear}_helper_retaddr

2021-06-19 Thread Richard Henderson
Wrap guest memory operations for tci like we do for cpu_ld*_data. We cannot actually use the cpu_ldst.h interface without duplicating the memory trace operations performed within, which will already have been expanded into the tcg opcode stream. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Phi

[PULL 09/33] tcg/tci: Improve tcg_target_call_clobber_regs

2021-06-19 Thread Richard Henderson
The current setting is much too pessimistic. Indicating only the one or two registers that are actually assigned after a call should avoid unnecessary movement between the register array and the stack array. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Ri

[PULL 18/33] tcg/tci: Implement andc, orc, eqv, nand, nor

2021-06-19 Thread Richard Henderson
These were already present in tcg-target.c.inc, but not in the interpreter. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 20 ++-- tcg/tci.c| 40 +

[PULL 02/33] tcg: Add tcg_call_flags

2021-06-19 Thread Richard Henderson
We're going to change how to look up the call flags from a TCGop, so extract it as a helper. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 5 + tcg/optimize.c | 3 ++- tcg/tcg.c | 14 ++

[PULL 08/33] tcg: Build ffi data structures for helpers

2021-06-19 Thread Richard Henderson
Add libffi as a build requirement for TCI. Add libffi to the dockerfiles to satisfy that requirement. Construct an ffi_cif structure for each unique typemask. Record the result in a separate hash table for later lookup; this allows helper_table to stay const. Tested-by: Philippe Mathieu-Daudé Re

[PULL 12/33] tcg/tci: Reserve r13 for a temporary

2021-06-19 Thread Richard Henderson
We're about to adjust the offset range on host memory ops, and the format of branches. Both will require a temporary. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 1 + tcg/tci/tcg-target.c.inc | 1 + 2 fi

[PULL 19/33] tcg/tci: Implement extract, sextract

2021-06-19 Thread Richard Henderson
Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 8 tcg/tci.c| 42 tcg/tci/tcg-target.c.inc | 32 ++ 3 files change

[PULL 11/33] tcg/tci: Use ffi for calls

2021-06-19 Thread Richard Henderson
This requires adjusting where arguments are stored. Place them on the stack at left-aligned positions. Adjust the stack frame to be at entirely positive offsets. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h

[PULL 05/33] accel/tcg: Add tcg call flags to plugins helpers

2021-06-19 Thread Richard Henderson
As noted by qemu-plugins.h, plugins can neither read nor write guest registers. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tc

[PULL 06/33] tcg: Store the TCGHelperInfo in the TCGOp for call

2021-06-19 Thread Richard Henderson
This will give us both flags and typemask for use later. We also fix a dumping bug, wherein calls generated for plugins fail tcg_find_helper and print (null) instead of either a name or the raw function pointer. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by

[PULL 01/33] tcg: Combine dh_is_64bit and dh_is_signed to dh_typecode

2021-06-19 Thread Richard Henderson
We will shortly be interested in distinguishing pointers from integers in the helper's declaration, as well as a true void return. We currently have two parallel 1 bit fields; merge them and expand to a 3 bit field. Our current maximum is 7 helper arguments, plus the return makes 8 * 3 = 24 bits

[PULL 07/33] tcg: Add tcg_call_func

2021-06-19 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 5 + tcg/tcg.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h index 6ab8910210..92c91dc

[PULL 03/33] accel/tcg/plugin-gen: Drop inline markers

2021-06-19 Thread Richard Henderson
Let the compiler decide on inlining. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.

[PULL 00/33] tcg patch queue

2021-06-19 Thread Richard Henderson
s/pull-tcg-20210619 for you to fetch changes up to 8169ec35eb766a12ad0ae898119060fde148ab61: util/oslib-win32: Fix fatal assertion in qemu_try_memalign (2021-06-19 11:09:11 -0700) TCI cleanup and re-encoding Fixes for #367 and

[PULL 04/33] plugins: Drop tcg_flags from struct qemu_plugin_dyn_cb

2021-06-19 Thread Richard Henderson
As noted by qemu-plugins.h, enum qemu_plugin_cb_flags is currently unused -- plugins can neither read nor write guest registers. Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-helpers.h | 1 - include/qemu/plugin.h | 1 - accel/tcg/plugin-gen.c

Re: [PATCH 0/9] target/mips: Various fixes & cleanups

2021-06-19 Thread Philippe Mathieu-Daudé
On 6/17/21 7:43 PM, Philippe Mathieu-Daudé wrote: > Fixes and cleanup accumulated during the last month. > Nothing particularly exciting :/ > > Please review, > > Phil. > > Philippe Mathieu-Daudé (9): > target/mips: Do not abort on invalid instruction > target/mips: Fix more TCG temporary le

Re: [PATCH v7 15/27] tcg/tci: Change encoding to uint32_t units

2021-06-19 Thread Richard Henderson
On 6/19/21 10:48 AM, Philippe Mathieu-Daudé wrote: +case INDEX_op_tci_movi: +tci_args_ri(insn, &r0, &i1); +info->fprintf_func(info->stream, "%-12s %s,0x%" TCG_PRIlx "", Missing space in format: "%s, 0x%" Squashed, thanks. r~

Re: [PATCH 0/2] target/mips: Simplify MSA decodetree

2021-06-19 Thread Philippe Mathieu-Daudé
On 6/17/21 7:46 PM, Philippe Mathieu-Daudé wrote: > Merge MSA32 & MSA64. > > Philippe Mathieu-Daudé (2): > target/mips: Remove pointless gen_msa() > target/mips: Merge msa32/msa64 decodetree definitions > > target/mips/tcg/{msa32.decode => msa.decode} | 8 +--- > target/mips/tcg/msa64.d

Re: [PATCH] target/mips: Raise exception when DINSV opcode used with DSP disabled

2021-06-19 Thread Philippe Mathieu-Daudé
On 5/29/21 6:54 PM, Philippe Mathieu-Daudé wrote: > Per the "MIPS® DSP Module for MIPS64 Architecture" manual, rev. 3.02, > Table 5.3 "SPECIAL3 Encoding of Function Field for DSP Module": > > If the Module/ASE is not implemented, executing such an instruction > must cause a Reserved Instructio

  1   2   3   >