Re: [PATCH v1 04/21] target/avr: add BQL to do_interrupt and cpu_exec_interrupt

2020-08-06 Thread Robert Foley
On Thu, 6 Aug 2020 at 14:37, Michael Rolnik wrote: > > Hi Robert. > > I am sorry but how can I apply it? following this what I get > > error: patch failed: accel/tcg/cpu-exec.c:558 > error: accel/tcg/cpu-exec.c: patch does not apply > error: patch failed: target/arm/helpe

Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL

2020-08-06 Thread Robert Foley
al, passing all the tests that we tried (so far). :) Thanks, -Rob On Thu, 6 Aug 2020 at 12:11, Robert Foley wrote: > > On Thu, 6 Aug 2020 at 05:22, Paolo Bonzini wrote: > > > > On 05/08/20 21:18, Richard Henderson wrote: > > > On 8/5/20 11:12 AM, Robert Foley wrote:

Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL

2020-08-07 Thread Robert Foley
tions? Or are there other solutions that we should consider here? Thanks & Regards, -Rob On Thu, 6 Aug 2020 at 16:04, Robert Foley wrote: > > The comment around documenting the cpu_mutex fields and critical sections > got us thinking and revisiting our locking assumptions in > c

Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL

2020-08-10 Thread Robert Foley
On Sat, 8 Aug 2020 at 08:00, Paolo Bonzini wrote: > > We are thinking that 2) would be a good option. > > Yes, it is. The only slight complication is that you'd have both > ->do_interrupt and ->do_interrupt_locked so you probably should add some > consistency check, for example > > /* >

Re: [PATCH 007/147] tests/vm: do not pollute configure with --efi-aarch64

2020-08-12 Thread Robert Foley
Reviewed-by: Robert Foley On Mon, 10 Aug 2020 at 13:12, Paolo Bonzini wrote: > > Just make EFI_AARCH64 a variable in the makefile that defaults to the efi > firmware included with QEMU. It can be redefined on the "make" command > line. > > Signed-off-by: Paolo

[PATCH] util/coroutine: Cleanup start_switch_fiber_ for TSAN.

2020-06-26 Thread Robert Foley
->tsan_caller_fiber and co->tsan_co_fiber fields are only access from within #ifdef CONFIG_TSAN. Signed-off-by: Robert Foley --- util/coroutine-ucontext.c | 52 +-- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/util/coroutine-ucontext.c

Re: [PATCH v2 1/2] Introduce (x86) CPU model deprecation API

2020-06-28 Thread Robert Hoo
Hi, Ping for comments:) On Thu, 2020-06-11 at 10:47 +0800, Robert Hoo wrote: > Complement versioned CPU model framework with the ability of marking > some > versions deprecated. When that CPU model is chosen, get some warning. > The > warning message is customized, e.g. telling

RE: [RFC] cpu_map: Remove pconfig from Icelake-Server CPU model

2019-09-30 Thread Hu, Robert
> -Original Message- > From: Eduardo Habkost > Sent: Monday, September 30, 2019 22:11 > To: Jiri Denemark > Cc: libvir-l...@redhat.com; qemu-devel@nongnu.org; Paolo Bonzini > ; Daniel P. Berrangé ; Kang, > Luwei ; thomas.lenda...@amd.com; Robert Hoo > ;

Re: [PATCH 1/2] test-logging: Fix -Werror=maybe-uninitialized warning

2020-01-21 Thread Robert Foley
Good catch. Reviewed-by: Robert Foley On Tue, 21 Jan 2020 at 04:58, Thomas Huth wrote: > > On 21/01/2020 10.28, mreza...@redhat.com wrote: > > From: Miroslav Rezanina > > > > Checking for uninitialized variables raises warning for file path > > varia

plugin interface function qemu_plugin_mem_size_shift

2020-01-21 Thread Robert Henry
I don't understand what unsigned int qemu_plugin_mem_size_shift(qemu_plugin_meminfo_t info); does. The documentation in qemu-plugin.h is silent on this matter. It appears to expose more of the guts of qemu that I don't yet know.

[Bug 1860610] [NEW] cap_disas_plugin leaks memory

2020-01-22 Thread Robert Henry
Public bug reported: Looking at origin/master head, the function cap_disas_plugin leaks memory. per capstone's examples using their ABI, cs_free(insn, count); needs to called just before cs_close. I discovered this running qemu under valgrind. ** Affects: qemu Importance: Undecided

QEMU for aarch64 with plugins seems to fail basic consistency checks

2020-01-23 Thread Robert Henry
I wrote a QEMU plugin for aarch64 where the insn and mem callbacks print out the specifics of the guest instructions as they are "executed". I expect this trace stream to be well behaved but it is not. By well-behaved, I expect memory insns print out some memory details, non-memory insns don't

[PATCH 2/8] tests/vm: increased max timeout for vm boot.

2020-01-24 Thread Robert Foley
Add change to increase timeout waiting for VM to boot. Needed for some emulation cases where it can take longer than 5 minutes to boot. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm

[PATCH 0/8] tests/vm: Add support for aarch64 VMs

2020-01-24 Thread Robert Foley
e scripts for these VMs, we implemented a few enhancements to help with testing. For example, we added support for allowing debug mode to show the ssh output. We also added support for a new --boot-console option which will show the boot console as the VM boots up to aid in debugging problems during

[PATCH 1/8] tests/vm: Debug mode shows ssh output.

2020-01-24 Thread Robert Foley
Add changes to tests/vm/basevm.py so that during debug mode we show ssh output. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index ed5dd4f3d0

[PATCH 6/8] tests/vm: add --boot-console switch

2020-01-24 Thread Robert Foley
Added ability to view console during boot via --boot-console switch. This helps debug issues that occur during the boot sequence. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/vm/basevm.py b/tests/vm

[PATCH 7/8] tests/vm: Added a new script for ubuntu.aarch64.

2020-01-24 Thread Robert Foley
ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. Another new file is also added aarch64vm.py, which is a module with common methods used by aarch64 VMs, such as how to create the flash images. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/Makefile.include

[PATCH 4/8] tests/vm: Add configuration to basevm.py

2020-01-24 Thread Robert Foley
to vary on the VM being created or launched. This will for example allow for creating an aarch64 vm. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 108 ++--- 1 file changed, 82 insertions(+), 26 deletions(-) diff --git a

[PATCH 3/8] tests/vm: change wait_ssh to optionally wait for root.

2020-01-24 Thread Robert Foley
Allow wait_ssh to wait for root user to be ready. This solves the issue where we perform a wait_ssh() successfully, but the root user is not yet ready to be logged in. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 9 +++-- 1 file changed, 7 insertions(+), 2

[PATCH 5/8] tests/vm: Added configuration file support

2020-01-24 Thread Robert Foley
Changes to tests/vm/basevm.py to allow accepting a configuration file as a parameter. Allows for specifying VM options such as cpu, machine, memory, and arbitrary qemu arguments for specifying options such as NUMA configuration. Also added an example config_example.yml. Signed-off-by: Robert

[PATCH 8/8] tests/vm: Added a new script for centos.aarch64.

2020-01-24 Thread Robert Foley
centos.aarch64 creates a CentOS 8 image. Also added a new kickstart script used to build the centos.aarch64 image. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/Makefile.include| 3 +- tests/vm/centos-8-aarch64.ks | 52 + tests/vm/centos.aarch64 | 218

Re: [EXTERNAL] Re: QEMU for aarch64 with plugins seems to fail basic consistency checks

2020-01-24 Thread Robert Henry
, my problems went away. I think this lack of persistence of insn should be documented, or treated as a bug to be fixed. From: Alex Bennée Sent: Friday, January 24, 2020 8:36 AM To: Robert Henry Cc: qemu-devel@nongnu.org Subject: [EXTERNAL] Re: QEMU for aarch64

Re: [PATCH 2/8] tests/vm: increased max timeout for vm boot.

2020-01-24 Thread Robert Foley
the patch. Thanks & Regards, -Rob On Fri, 24 Jan 2020 at 12:12, Philippe Mathieu-Daudé wrote: > > Hi Robert, > > On 1/24/20 5:53 PM, Robert Foley wrote: > > Add change to increase timeout waiting for VM to boot. > > Needed for some emulation cases where it can take longer

[PATCH] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-22 Thread Robert Hoo
just to complement this part, let it dump ZMM of 512bits. Signed-off-by: Robert Hoo --- target/i386/cpu-dump.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/target/i386/cpu-dump.c b/target/i386/cpu-dump.c index aac21f1..789e774 100644 --- a/target

Re: [PATCH] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-23 Thread Robert Hoo
On Mon, 2021-03-22 at 15:06 -0600, Richard Henderson wrote: > On 3/22/21 4:59 AM, Robert Hoo wrote: > > Since commit fa4518741e (target-i386: Rename struct XMMReg to > > ZMMReg), > > CPUX86State.xmm_regs[] has already been extended to 512bit to > > support > > A

[PATCH v2] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-23 Thread Robert Hoo
/ZMM is enabled. This patch is to complement this, let it dump XMM/YMM/ZMM accordingly. Signed-off-by: Robert Hoo --- Changelog: v2: dump XMM/YMM/ZMM according to XSAVE state-components enablement. target/i386/cpu-dump.c | 57 +- target/i386/cpu.h

[PATCH v3] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-24 Thread Robert Hoo
/ZMM is enabled. This patch is to complement this, let it dump XMM/YMM/ZMM accordingly. Signed-off-by: Robert Hoo --- Changelog: v3: fix some coding style issue. v2: dump XMM/YMM/ZMM according to XSAVE state-components enablement. target/i386/cpu-dump.c | 55

Re: [PATCH v3] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-24 Thread Robert Hoo
On Wed, 2021-03-24 at 07:44 -0600, Richard Henderson wrote: > On 3/24/21 2:00 AM, Robert Hoo wrote: > > +if ((env->xcr0 & XFEATURE_AVX512) == XFEATURE_AVX512) { > > +/* XSAVE enabled AVX512 */ > > +nb = (env->hflags & HF_CS64_MASK

Re: [PATCH v3] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-25 Thread Robert Hoo
On Thu, 2021-03-25 at 06:39 -0600, Richard Henderson wrote: > On 3/24/21 9:15 PM, Robert Hoo wrote: > > > > +} else if (env->xcr0 & XFEATURE_AVX) { > > > > > > This is normally a 2-bit test. > > > > I beg your pardon. What 2 bits? &g

Re: [PATCH v3] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-26 Thread Robert Hoo
On Fri, 2021-03-26 at 07:11 -0600, Richard Henderson wrote: > On 3/25/21 7:47 PM, Robert Hoo wrote: > > On Thu, 2021-03-25 at 06:39 -0600, Richard Henderson wrote: > > > On 3/24/21 9:15 PM, Robert Hoo wrote: > > > > > > +} else if (env->xcr0 & X

[PATCH v4] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-26 Thread Robert Hoo
/ZMM is enabled. This patch is to complement this, let it dump XMM/YMM/ZMM accordingly. Signed-off-by: Robert Hoo --- Changelog: v4: stringent AVX512 case and AVX case judgement criteria v3: fix some coding style issue. v2: dump XMM/YMM/ZMM according to XSAVE state-components enablement. target

Re: [PATCH v4] i386/cpu_dump: support AVX512 ZMM regs dump

2021-03-26 Thread Robert Hoo
On Fri, 2021-03-26 at 22:54 +0800, Robert Hoo wrote: > Since commit fa4518741e (target-i386: Rename struct XMMReg to > ZMMReg), > CPUX86State.xmm_regs[] has already been extended to 512bit to support > AVX512. > Also, other qemu level supports for AVX512 registers are there for &g

Re: [PATCH v4] i386/cpu_dump: support AVX512 ZMM regs dump

2021-04-05 Thread Robert Hoo
Hi, Ping... Thanks On Fri, 2021-03-26 at 23:01 +0800, Robert Hoo wrote: > On Fri, 2021-03-26 at 22:54 +0800, Robert Hoo wrote: > > Since commit fa4518741e (target-i386: Rename struct XMMReg to > > ZMMReg), > > CPUX86State.xmm_regs[] has already been extended to 512bit to &

[PATCH v5] i386/cpu_dump: support AVX512 ZMM regs dump

2021-04-15 Thread Robert Hoo
/ZMM is enabled. This patch is to complement this, let it dump XMM/YMM/ZMM accordingly. Signed-off-by: Robert Hoo --- Changelog: v5: fix a minor issue. rebase to latest master. v4: stringent AVX512 case and AVX case judgement criteria v3: fix some coding style issue. v2: dump XMM/YMM/ZMM according to

[PATCH v6] i386/cpu_dump: support AVX512 ZMM regs dump

2021-04-20 Thread Robert Hoo
/ZMM is enabled. This patch is to complement this, let it dump XMM/YMM/ZMM accordingly. Signed-off-by: Robert Hoo Reviewed-by: Richard Henderson --- Changelog: v6: use PRIx64 printf format to satisfy multiple target compiling. v5: fix a minor issue. rebase to latest master. v4: stringent AVX512 case

[Trivial] docs: More precisely describe memory-backend-*::id's user

2021-04-22 Thread Robert Hoo
'id' of memory-backend-{file,ram} is not only for '-numa''s reference, but also other parameters like '-device nvdimm'. More clearly call out this to avoid misinterpretation. Signed-off-by: Robert Hoo --- qemu-options.hx | 6 +++--- 1 file changed, 3 insertio

[PATCH] i386/cpu: Remove the deprecated cpu model 'Icelake-Client'

2021-04-22 Thread Robert Hoo
As it's been marked deprecated since v5.2, now I think it's time remove it from code. Signed-off-by: Robert Hoo --- target/i386/cpu.c | 118 -- 1 file changed, 118 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c ind

Re: [PATCH] i386/cpu: Remove the deprecated cpu model 'Icelake-Client'

2021-04-27 Thread Robert Hoo
On Tue, 2021-04-27 at 16:55 -0400, Eduardo Habkost wrote: > On Thu, Apr 22, 2021 at 05:42:16PM +0800, Robert Hoo wrote: > > As it's been marked deprecated since v5.2, now I think it's time > > remove it > > from code. > > > > Signed-off-by: Robert Ho

[PATCH v2] i386/cpu: Remove the deprecated cpu model 'Icelake-Client'

2021-04-27 Thread Robert Hoo
As it's been marked deprecated since v5.2, now I think it's time remove it from code. Signed-off-by: Robert Hoo --- P.S. Since previously no its deprecation info was recorded in docs/system/deprecated.rst, nothing to update it. --- docs/system/removed-features.rst | 5 ++ target/

[PATCH RESEND v2] i386/cpu: Remove the deprecated cpu model 'Icelake-Client'

2021-04-27 Thread Robert Hoo
As it's been marked deprecated since v5.2, now I think it's time remove it from code. Signed-off-by: Robert Hoo --- (Sorry, forgot to append changelog in last send.) Changelog: v2: Update removed-features.rst. Since previously no its deprecation info was recorded in d

Re: [PATCH RESEND v2] i386/cpu: Remove the deprecated cpu model 'Icelake-Client'

2021-04-28 Thread Robert Hoo
On Wed, 2021-04-28 at 11:24 -0400, Eduardo Habkost wrote: > On Wed, Apr 28, 2021 at 10:41:13AM +0800, Robert Hoo wrote: > > As it's been marked deprecated since v5.2, now I think it's time > > remove it > > from code. > > > > Signed-off-by: Rober

[PATCH v3] i386/cpu: Remove the deprecated cpu model 'Icelake-Client'

2021-04-28 Thread Robert Hoo
As it's been marked deprecated since v5.2, now I think it's time remove it from code. Signed-off-by: Robert Hoo --- Changelog: v3: Update deprecated.rst. (Sorry for my carelessness in last search. I sware I did search.) v2: Update removed-features.rst. --- docs/system/depr

Re: Let's remove some deprecated stuff

2021-04-29 Thread Robert Hoo
moval has come. > Extra points for telling us in a reply. "We should remove, but I > can't > do it myself right now" is a valid answer. Let's review the file: > > System emulator command line arguments > -- > [.

Re: [Trivial] docs: More precisely describe memory-backend-*::id's user

2021-04-30 Thread Robert Hoo
Ping for review ... Thanks. On Thu, 2021-04-22 at 16:42 +0800, Robert Hoo wrote: > 'id' of memory-backend-{file,ram} is not only for '-numa''s > reference, but > also other parameters like '-device nvdimm'. > More clearly call out this to avoid mi

Re: logfile issue

2019-11-06 Thread Robert Foley
n when a new handle is set. Thanks for your comments on this. We agree that using RCU is a great solution here. We have this patch well underway and plan to post a patch in the next few days. -Rob On Mon, 4 Nov 2019 at 07:13, Alex Bennée wrote: > > > Robert Foley writes: > > >

[PATCH 2/4] Add use of RCU for qemu_logfile.

2019-11-07 Thread Robert Foley
freeing/closing when readers have finished. Signed-off-by: Robert Foley --- include/qemu/log.h | 47 util/log.c | 78 ++ include/exec/log.h | 33 +--- tcg/tcg.c | 12 +-- 4 files changed

[PATCH 3/4] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-07 Thread Robert Foley
qemu_log_lock() now returns a handle and qemu_log_unlock() receives a handle to unlock. This allows for changing the handle during logging and ensures the lock() and unlock() are for the same file. Signed-off-by: Robert Foley --- include/qemu/log.h| 14 +++--- accel/tcg/cpu

[PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley --- tests/test-logging.c | 74

[PATCH 0/4] Make the qemu_logfile handle thread safe.

2019-11-07 Thread Robert Foley
This patch adds thread safety to the qemu_logfile handle. This now allows changing the logfile while logging is active, and also solves the issue of a seg fault while changing the logfile. This patch adds use of RCU for handling the swap out of the old qemu_logfile file descriptor. Robert

[PATCH 1/4] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-07 Thread Robert Foley
This is being added in preparation for using RCU with the logfile handle. Also added qemu_logfile_init() for initializing the logfile mutex. Signed-off-by: Robert Foley --- util/log.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/util/log.c b/util/log.c index

Re: [PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Robert Foley
e writes: > > > Robert Foley writes: > > > >> One test ensures that the logfile handle is still valid even if > >> the logfile is changed during logging. > >> The other test validates that the logfile handle remains valid under > >> the logfile lock

Re: [PATCH 2/4] Add use of RCU for qemu_logfile.

2019-11-07 Thread Robert Foley
On Thu, 7 Nov 2019 at 11:24, Alex Bennée wrote: > > Robert Foley writes: > > diff --git a/include/qemu/log.h b/include/qemu/log.h > > index a91105b2ad..975de18e23 100644 > > --- a/include/qemu/log.h > > +++ b/include/qemu/log.h > > @@ -3,9 +3,17 @@ > >

Re: [PATCH 3/4] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-07 Thread Robert Foley
019 at 11:25, Alex Bennée wrote: > > > Robert Foley writes: > > > qemu_log_lock() now returns a handle and qemu_log_unlock() receives a > > handle to unlock. This allows for changing the handle during logging > > and ensures the lock() and unlock() are for the same file.

Re: [PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Robert Foley
Agree with all the suggestions below. These are great ideas. Will make the changes. Thanks, -Rob Foley On Thu, 7 Nov 2019 at 11:32, Alex Bennée wrote: > > > Robert Foley writes: > > > One test ensures that the logfile handle is still valid even if > > the logfile i

Re: [PATCH 1/4] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-07 Thread Robert Foley
, -Rob On Thu, 7 Nov 2019 at 11:53, Alex Bennée wrote: > > > Robert Foley writes: > > > This is being added in preparation for using RCU with the logfile handle. > > Also added qemu_logfile_init() for initializing the logfile mutex. > > > > Signed-off-by: Robert

Re: [PATCH 4/4] Added tests for close and change of logfile.

2019-11-07 Thread Robert Foley
checkout - it could depend on how glibc > was built for your system though. Mine is Debian Buster. > Interesting. We had assumed it was just the way we were running the test. But it sounds like something about our particular setup. I'm using Ubuntu bionic on an aarch64 system. Will l

RE: [PATCH v2] tcg plugins: expose an API version concept

2019-11-11 Thread Robert Foley
old deprecated APIs in the future. > > Signed-off-by: Alex Bennée > Reviewed-by: Philippe Mathieu-Daudé > > --- > v2 > - error out on missing plugin version symbol > - fix missing symbol on hotblocks.so > - more verbose error text, avoid bad grammar > --- Reviewed-by: Robert Foley Thanks, Rob

[PATCH v1 4/5] Added tests for close and change of logfile.

2019-11-12 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley -- v1 - Changes for first round of code

[PATCH v1 3/5] Add use of RCU for qemu_logfile.

2019-11-12 Thread Robert Foley
freeing/closing when readers have finished. Signed-off-by: Robert Foley --- v1 - Changes for review comments. - Minor changes to definition of QemuLogFile. - Changed qemu_log_separate() to fix unbalanced and remove qemu_log_enabled() check. - changed qemu_log_lock() to

[PATCH v1 0/5] Make the qemu_logfile handle thread safe.

2019-11-12 Thread Robert Foley
. - It also includes a fix for an issue in qemu_set_log_filename(). This issue was uncovered by the test added for this patch. --- Robert Foley (5): Add a mutex to guarantee single writer to qemu_logfile handle. qemu_log_lock/unlock now preserves the qemu_logfile handle. Add

[PATCH v1 1/5] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-12 Thread Robert Foley
Also added qemu_logfile_init() for initializing the logfile mutex. Signed-off-by: Robert Foley --- v1 - changed qemu_logfile_init() to use __constructor__. --- util/log.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/util/log.c b/util/log.c index 1ca13059ee..c25643dc99

[PATCH v1 5/5] Fix double free issue in qemu_set_log_filename().

2019-11-12 Thread Robert Foley
After freeing the logfilename, we set logfilename to NULL, in case of an error which returns without setting logfilename. Signed-off-by: Robert Foley --- v1 - This is new in the patch v1. --- util/log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/log.c b/util/log.c index

[PATCH v1 2/5] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-12 Thread Robert Foley
qemu_log_lock() now returns a handle and qemu_log_unlock() receives a handle to unlock. This allows for changing the handle during logging and ensures the lock() and unlock() are for the same file. Signed-off-by: Robert Foley --- v1 - Moved this up in the patch sequence to be before

Re: [PATCH v1 3/5] Add use of RCU for qemu_logfile.

2019-11-12 Thread Robert Foley
call_rcu(logfile, qemu_logfile_free, rcu); } else if(!qemu_logfile && need_to_open_file) { logfile = g_new0(QemuLogFile, 1); __snip__ existing patch logic for opening the qemu_logfile will be inserted here. } qemu_mutex_unlock(&qemu_logfile_mutex); > &g

Re: FW: [PATCH v1 3/5] docs/devel: update tcg-plugins.rst with API versioning details

2019-11-13 Thread Robert Foley
--enable-plugins > + configure --enable-plugins > > Once built a program can be run with multiple plugins loaded each with > -their own arguments: > +their own arguments:: > > -:: > -$QEMU $OTHER_QEMU_ARGS \ > + $QEMU $OTHER_QEMU_ARGS \ >-plugin tests/plugin/libhowvec.so,arg=inline,arg=hint \ >-plugin tests/plugin/libhotblocks.so > > -- > 2.20.1 > > Reviewed-by: Robert Foley

[PATCH v2 0/6] Make the qemu_logfile handle thread safe.

2019-11-15 Thread Robert Foley
. - It also includes a fix for an issue in qemu_set_log_filename(). This issue was uncovered by the test added for this patch. --- Robert Foley (6): Fix double free issue in qemu_set_log_filename(). Cleaned up flow of code in qemu_set_log(), to simplify and clarify. Add a

[PATCH v2 1/6] Fix double free issue in qemu_set_log_filename().

2019-11-15 Thread Robert Foley
After freeing the logfilename, we set logfilename to NULL, in case of an error which returns without setting logfilename. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v2 - moved this change to the beginning of the patch series. --- v1 - This is new in the patch v1. --- util

[PATCH v2 2/6] Cleaned up flow of code in qemu_set_log(), to simplify and clarify.

2019-11-15 Thread Robert Foley
Also added some explanation of the reasoning behind the branches. Signed-off-by: Robert Foley --- v2 - This is new in patch v2. --- util/log.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/util/log.c b/util/log.c index 4316fe74ee..417d16ec66

[PATCH v2 5/6] Add use of RCU for qemu_logfile.

2019-11-15 Thread Robert Foley
freeing/closing when readers have finished. Signed-off-by: Robert Foley --- v2 - No specific changes, just merging in cleanup changes in qemu_set_log(). --- v1 - Changes for review comments. - Minor changes to definition of QemuLogFile. - Changed qemu_log_separate() to fix

[PATCH v2 3/6] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-15 Thread Robert Foley
Also added qemu_logfile_init() for initializing the logfile mutex. Signed-off-by: Robert Foley --- v2 - In qemu_set_log() moved location of mutex lock/unlock due to cleanup changes. --- v1 - changed qemu_logfile_init() to use __constructor__. --- util/log.c | 14 ++ 1

[PATCH v2 4/6] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-15 Thread Robert Foley
qemu_log_lock() now returns a handle and qemu_log_unlock() receives a handle to unlock. This allows for changing the handle during logging and ensures the lock() and unlock() are for the same file. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v1 - Moved this up in the patch

[PATCH v2 6/6] Added tests for close and change of logfile.

2019-11-15 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v1 - Changes

Re: [PATCH v1 1/5] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-18 Thread Robert Foley
the mutex.initialized asserts. Thanks, -Rob On Sat, 16 Nov 2019 at 06:58, Richard Henderson wrote: > > On 11/12/19 4:01 PM, Robert Foley wrote: > > Also added qemu_logfile_init() for initializing the logfile mutex. > > > > Signed-off-by: Robert Foley > > --- > &g

Re: [PATCH v2 3/6] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-18 Thread Robert Foley
, knowing that we would undo these changes later. I will add more details to the commit message. Thanks, -Rob On Mon, 18 Nov 2019 at 07:16, Alex Bennée wrote: > > > Robert Foley writes: > > > Also added qemu_logfile_init() for initializing the logfile mutex. > > > &g

Re: [PATCH v2 5/6] Add use of RCU for qemu_logfile.

2019-11-18 Thread Robert Foley
void) { QemuLogFile *logfile; rcu_read_lock(); logfile = atomic_rcu_read(&qemu_logfile); if (logfile) { qemu_flockfile(logfile->fd); return logfile->fd; } rcu_read_unlock(); return NULL; } I will make the changes. Thanks, -Rob On Mon, 18 Nov 2019 at 07:22, Al

Re: [PATCH v2 5/6] Add use of RCU for qemu_logfile.

2019-11-18 Thread Robert Foley
On Mon, 18 Nov 2019 at 08:23, Alex Bennée wrote: > > > Robert Foley writes: > > > On Mon, 18 Nov 2019 at 07:22, Alex Bennée wrote: > >> > >> > >> > +if (logfile) { > >> > +qemu_flockfile(logfile-

Re: [PATCH v2 5/6] Add use of RCU for qemu_logfile.

2019-11-18 Thread Robert Foley
quot;\n"). Will make this change. Thanks, -Rob On Mon, 18 Nov 2019 at 11:41, Alex Bennée wrote: > > > Robert Foley writes: > > > On Mon, 18 Nov 2019 at 08:23, Alex Bennée wrote: > >> > >> > >> Robert Foley writes: > >> > >>

[PATCH v3 1/6] Fix double free issue in qemu_set_log_filename().

2019-11-18 Thread Robert Foley
After freeing the logfilename, we set logfilename to NULL, in case of an error which returns without setting logfilename. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v2 - moved this change to the beginning of the patch series. --- v1 - This is new in the patch v1. --- util

[PATCH v3 4/6] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-18 Thread Robert Foley
ot;\n")), since the translator can longjmp out of the loop if it attempts to translate an instruction in an inaccessible page. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- v3 - Changes to one use case to remove use of qemu_log_lock()/unlock().

[PATCH v3 5/6] Add use of RCU for qemu_logfile.

2019-11-18 Thread Robert Foley
freeing/closing when readers have finished. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v3 - Changes for qemu_log_lock() to unconditionally hold the rcu_read_lock() until qemu_log_unlock() - Changed qemu_log_unlock() to unconditionally rcu_read_unlock() --- v2

[PATCH v3 0/6] Make the qemu_logfile handle thread safe.

2019-11-18 Thread Robert Foley
also includes a fix for an issue in qemu_set_log_filename(). This issue was uncovered by the test added for this patch. --- Robert Foley (6): Fix double free issue in qemu_set_log_filename(). Cleaned up flow of code in qemu_set_log(), to simplify and clarify. Add a mutex to

[PATCH v3 2/6] Cleaned up flow of code in qemu_set_log(), to simplify and clarify.

2019-11-18 Thread Robert Foley
Also added some explanation of the reasoning behind the branches. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v2 - This is new in patch v2. --- util/log.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/util/log.c b/util/log.c index

[PATCH v3 3/6] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-18 Thread Robert Foley
. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v3 - Removed assert that mutex is initialized. We will rely on the constructor. - Also added details in the commit message regarding the temporary ugliness that will be cleaned up in a later patch. --- v2 - In

[PATCH v3 6/6] Added tests for close and change of logfile.

2019-11-18 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v1 - Changes

Re: [PATCH 1/2] target/arm: Do not reject rt == rt2 for strexd

2019-11-19 Thread Robert Foley
Richard Henderson writes: > > There was too much cut and paste between ldrexd and strexd, > as ldrexd does prohibit two output registers the same. > > Fixes: af288228995 > Reported-by: Michael Goffioul > Signed-off-by: Richard Henderson > --- Reviewed-by: Robert Foley

logfile issue

2019-10-31 Thread Robert Foley
We hit an issue when trying to change the log file from the monitor console. The root of the issue here is that the qemu_logfile handle is not thread safe. So when we try to close the file, we end up with a seg fault. The full analysis is below along with some possible solutions. Will plan to po

Re: [PATCH v4 04/10] tests/vm: add --boot-console switch

2020-05-11 Thread Robert Foley
On Mon, 11 May 2020 at 05:13, Alex Bennée wrote: > > > Robert Foley writes: > > > Added ability to view console during boot via > > --boot-console switch to basevm.py. This helps debug issues that occur > > during the boot sequence. > > Also adde

Re: [PATCH v4 00/10] tests/vm: Add support for aarch64 VMs

2020-05-11 Thread Robert Foley
On Mon, 11 May 2020 at 05:21, Alex Bennée wrote: > Robert Foley writes: > > > This is version 4 of the patch series to > > add support for aarch64 VMs in the vm-build infrastructure. > > - Ubuntu 18.04 aarch64 VM > > - CentOS 8 aarch64 VM > Hi Robert, > >

Re: [PATCH v8 03/74] cpu: introduce cpu_mutex_lock/unlock

2020-05-11 Thread Robert Foley
On Mon, 11 May 2020 at 06:24, Alex Bennée wrote: > Robert Foley writes: snip > > +/* XXX: is this really the max number of CPUs? */ > > +#define CPU_LOCK_BITMAP_SIZE 2048 > > I wonder if we should be asserting this somewhere? Given it's an init > time constant we ca

Re: [PATCH v8 25/74] riscv: convert to cpu_halted

2020-05-11 Thread Robert Foley
On Mon, 11 May 2020 at 06:40, Alex Bennée wrote: > Robert Foley writes: > > > From: "Emilio G. Cota" > > > > Cc: Palmer Dabbelt > > Cc: Sagar Karandikar > > Cc: Bastian Koppelmann > > Cc: Alistair Francis > > Reviewed-by: Palmer Dabb

Re: [PATCH v8 02/74] cpu: rename cpu->work_mutex to cpu->lock

2020-05-11 Thread Robert Foley
On Mon, 11 May 2020 at 10:48, Alex Bennée wrote: > Hmm while bisecting to find another problem I found this commit: > > /home/alex/lsrc/qemu.git/hw/core/cpu.c: In function ‘cpu_common_finalize’: > /home/alex/lsrc/qemu.git/hw/core/cpu.c:383:27: error: incompatible type for > argument 1 of ‘qem

Re: [PATCH v8 74/74] cputlb: queue async flush jobs without the BQL

2020-05-12 Thread Robert Foley
On Tue, 12 May 2020 at 12:27, Alex Bennée wrote: > Robert Foley writes: > > > From: "Emilio G. Cota" > > > > This yields sizable scalability improvements, as the below results show. > > > > Host: Two Intel E5-2683 v3 14-core CPUs at 2.00 GHz

[PATCH v6 0/9] tests/vm: Add support for aarch64 VMs

2020-05-12 Thread Robert Foley
thinking about moving this under the DEBUG=1 option, but decided to remove this since we already have support for logging to a file, which can be used instead. - Went back to Ubuntu 18.04. Still working on 20.04 issues and will plan on a later patch to enable 20.04. Robert Foley (9): tests/vm

[PATCH v6 1/9] tests/vm: Add configuration to basevm.py

2020-05-12 Thread Robert Foley
to vary on the VM being created or launched. This will for example allow for creating an aarch64 vm. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/basevm.py | 170 ++--- 1 file changed, 131 insertions(+), 39 deletions(-) diff --git a

[PATCH v6 5/9] tests/vm: allow wait_ssh() to specify command

2020-05-12 Thread Robert Foley
This allows for waiting for completion of arbitrary commands. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Reviewed-by: Alex Bennée --- tests/vm/basevm.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index

[PATCH v6 2/9] tests/vm: Added configuration file support

2020-05-12 Thread Robert Foley
.yml. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- configure | 9 ++ tests/vm/Makefile.include | 6 tests/vm/basevm.py| 40 +++- tests/vm/conf_example_aarch64.yml | 51 +++ tests

[PATCH v6 4/9] tests/vm: Add ability to select QEMU from current build.

2020-05-12 Thread Robert Foley
Added a new special variable QEMU_LOCAL=1, which will indicate to take the QEMU binary from the current build. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/Makefile.include | 4 tests/vm/basevm.py| 31 ++- 2 files changed, 30

[PATCH v6 6/9] tests/vm: Added a new script for ubuntu.aarch64.

2020-05-12 Thread Robert Foley
ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. Another new file is also added aarch64vm.py, which is a module with common methods used by aarch64 VMs, such as how to create the flash images. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- configure

[PATCH v6 3/9] tests/vm: Pass --debug through for vm-boot-ssh.

2020-05-12 Thread Robert Foley
This helps debug issues that occur during the boot sequence. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/Makefile.include | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 78a2de1f82..4e041103b7 100644 --- a

[PATCH v6 7/9] tests/vm: Added a new script for centos.aarch64.

2020-05-12 Thread Robert Foley
centos.aarch64 creates a CentOS 8 image. Also added a new kickstart script used to build the centos.aarch64 image. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov --- tests/vm/Makefile.include| 3 +- tests/vm/centos-8-aarch64.ks | 51 tests/vm/centos.aarch64 | 227

<    2   3   4   5   6   7   8   9   10   11   >