Re: [PATCH 08/11] mos6522: add "info via" HMP command for debugging

2022-02-21 Thread Daniel P . Berrangé
On Sun, Feb 20, 2022 at 05:18:33PM +, Mark Cave-Ayland wrote: > On 08/02/2022 13:10, Daniel P. Berrangé wrote: > > > On Tue, Feb 08, 2022 at 01:06:59PM +, Mark Cave-Ayland wrote: > > > On 08/02/2022 12:49, Daniel P. Berrangé wrote: > > > > > > > > I was under the impression that

[PATCH 2/3] util/main-loop: Introduce the main loop into QOM

2022-02-21 Thread Nicolas Saenz Julienne
'event-loop-backend' provides basic property handling for all 'AioContext' based event loops. So let's define a new 'MainLoopClass' that inherits from it. This will permit tweaking the main loop's properties through qapi as well as through the command line using the '-object' keyword[1]. Only one

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-21 Thread Alex Bennée
Peter Maydell writes: > On Thu, 10 Feb 2022 at 11:30, Alex Bennée wrote: >> >> The previous numbers were a guess at best and rather arbitrary without >> taking into account anything that might be loaded. Instead of using >> guesses based on the state of registers implement a new function

Re: [PATCH 2/2] scripts/qemu-gdb/timers.py: the 'last' attribute is no more

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 17:49, David Edmondson wrote: The 'last' member of QEMUClock was removed some time ago, but the python gdb helper did not notice. Fixes: 3c2d4c8aa6 ("timer: last, remove last bits of last") Signed-off-by: David Edmondson --- scripts/qemugdb/timers.py | 5 ++--- 1 file changed, 2

[PATCH 0/2] iotests: Check for zstd support

2022-02-21 Thread Hanna Reitz
Hi, We have two tests (as far as I know) that use compression_type=zstd for qcow2 but do not check whether that is actually supported. Thomas reported this for 065, but it’s also the case for 303. This series makes these tests be skipped when qemu-img reports this compression type to not be

[PATCH v2] aio-posix: fix build failure io_uring 2.2

2022-02-21 Thread Haiyue Wang
The io_uring fixed "Don't truncate addr fields to 32-bit on 32-bit": https://git.kernel.dk/cgit/liburing/commit/?id=d84c29b19ed0b13619cff40141bb1fc3615b This leads to build failure: ../util/fdmon-io_uring.c: In function ‘add_poll_remove_sqe’: ../util/fdmon-io_uring.c:182:36: error: passing

Re: [PATCH 14/20] migration: Add migration_incoming_transport_cleanup()

2022-02-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Add a helper to cleanup the transport listener. > > When do it, we should also null-ify the cleanup hook and the data, then it's > even safe to call it multiple times. > > Move the socket_address_list cleanup altogether, because that's a mirror of > the >

RE: [PATCH v1] aio-posix: fix build failure io_uring 2.2

2022-02-21 Thread Wang, Haiyue
> -Original Message- > From: Peter Maydell > Sent: Monday, February 21, 2022 23:55 > To: Stefan Hajnoczi > Cc: Wang, Haiyue ; Fam Zheng ; > qemu-devel@nongnu.org; open > list:Block I/O path > Subject: Re: [PATCH v1] aio-posix: fix build failure io_uring 2.2 > > On Mon, 21 Feb 2022 at

Re: [PATCH] travis.yml: Update the s390x jobs to Ubuntu Focal

2022-02-21 Thread Alex Bennée
Thomas Huth writes: > QEMU will soon drop the support for Ubuntu 18.04, so let's update > the Travis jobs that were still using this version to 20.04 instead. > > While we're at it, also remove an obsolete comment about Ubuntu > Xenial being the default for our Travis jobs. Queued to

[PATCH 0/2] Minor fixes for the Python GDB plugins

2022-02-21 Thread David Edmondson
In attempting to use the Python GDB plugins a couple of problems were encountered. David Edmondson (2): scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex scripts/qemu-gdb/timers.py: the 'last' attribute is no more scripts/qemugdb/mtree.py | 2 +- scripts/qemugdb/timers.py | 5

[PATCH 2/2] scripts/qemu-gdb/timers.py: the 'last' attribute is no more

2022-02-21 Thread David Edmondson
The 'last' member of QEMUClock was removed some time ago, but the python gdb helper did not notice. Fixes: 3c2d4c8aa6 ("timer: last, remove last bits of last") Signed-off-by: David Edmondson --- scripts/qemugdb/timers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 1/2] scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex

2022-02-21 Thread David Edmondson
When parsing QEMU's native Int128 type, do not attempt to convert from hexadecimal. Fixes: 8037fa55ac ("scripts/qemugdb/mtree.py: fix up mtree dump") Signed-off-by: David Edmondson --- scripts/qemugdb/mtree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

RE: [PATCH v1] aio-posix: fix build failure io_uring 2.2

2022-02-21 Thread Wang, Haiyue
> -Original Message- > From: Stefan Hajnoczi > Sent: Monday, February 21, 2022 22:54 > To: Wang, Haiyue > Cc: qemu-devel@nongnu.org; Fam Zheng ; open list:Block I/O > path > Subject: Re: [PATCH v1] aio-posix: fix build failure io_uring 2.2 > > On Fri, Feb 18, 2022 at 12:16:27AM +0800,

Re: [PATCH v8 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-02-21 Thread Leonardo Bras Soares Passos
Thanks for reviewing, Juan! On Fri, Feb 18, 2022 at 1:36 PM Juan Quintela wrote: > > Leonardo Bras wrote: > > Add flags to io_writev and introduce io_flush as optional callback to > > QIOChannelClass, allowing the implementation of zero copy writes by > > subclasses. > > > > How to use them: >

Re: [PATCH] qapi, target/i386/sev: Add cpu0-id to query-sev-capabilities

2022-02-21 Thread Daniel P . Berrangé
On Mon, Feb 21, 2022 at 04:08:50PM +, Dov Murik wrote: > Add a new field 'cpu0-id' to the response of query-sev-capabilities > QMP command. The value of the field is the hex-encoded 64-byte unique > ID of the CPU0 (socket 0), which can be used to retrieve the signed CEK > of the CPU from

Re: [PATCH 12/20] migration: Export ram_load_postcopy()

2022-02-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Will be reused in postcopy fast load thread. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 2 +- > migration/ram.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/migration/ram.c

Re: [PATCH v7 3/5] migration: Add zero-copy parameter for QMP/HMP for Linux

2022-02-21 Thread Leonardo Bras Soares Passos
Hello Juan, Thanks for thew feedback! On Fri, Feb 18, 2022 at 1:31 PM Juan Quintela wrote: > > Leonardo Bras Soares Passos wrote: > > On Wed, Jan 19, 2022 at 3:16 PM Daniel P. Berrangé > > wrote: > >> > >> On Wed, Jan 19, 2022 at 03:03:29PM -0300, Leonardo Bras Soares Passos > >> wrote: >

Re: [PATCH 3/4] block: improve block_dirty_bitmap_merge(): don't allocate extra bitmap

2022-02-21 Thread Vladimir Sementsov-Ogievskiy
15.02.2022 20:53, Vladimir Sementsov-Ogievskiy wrote: We don't need extra bitmap. All we need is to backup the original bitmap when we do first merge. So, drop extra temporary bitmap and work directly with target and backup. Note that block_dirty_bitmap_merge() semantics changed: on failure

[PATCH] qapi, target/i386/sev: Add cpu0-id to query-sev-capabilities

2022-02-21 Thread Dov Murik
Add a new field 'cpu0-id' to the response of query-sev-capabilities QMP command. The value of the field is the hex-encoded 64-byte unique ID of the CPU0 (socket 0), which can be used to retrieve the signed CEK of the CPU from AMD's Key Distribution Service (KDS). Signed-off-by: Dov Murik ---

Re: [PATCH v6 09/19] vfio-user: find and init PCI device

2022-02-21 Thread Stefan Hajnoczi
On Thu, Feb 17, 2022 at 02:48:56AM -0500, Jagannathan Raman wrote: > @@ -221,6 +272,14 @@ static void vfu_object_finalize(Object *obj) > > o->device = NULL; > > +if (o->unplug_blocker && o->pci_dev) { > +qdev_del_unplug_blocker(DEVICE(o->pci_dev), o->unplug_blocker); > +

Re: [PATCH 11/20] migration: postcopy_pause_fault_thread() never fails

2022-02-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Per the title, remove the return code and simplify the callers as the errors > will never be triggered. No functional change intended. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/postcopy-ram.c | 25

Re: [PATCH 10/20] migration: Enlarge postcopy recovery to capture !-EIO too

2022-02-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We used to have quite a few places making sure -EIO happened and that's the > only way to trigger postcopy recovery. That's based on the assumption that > we'll only return -EIO for channel issues. > > It'll work in 99.99% cases but logically that won't

[PATCH 3/5] python: qmp_shell: refactor disconnection handling

2022-02-21 Thread Damien Hedde
Introduce QMPShellConnectError (subclass of QMPShellError) to handle disconnection in read_exec_command(). Signed-off-by: Damien Hedde --- python/qemu/aqmp/qmp_shell.py | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/python/qemu/aqmp/qmp_shell.py

[PATCH 2/5] python: qmp_shell: refactor the parsing error handling

2022-02-21 Thread Damien Hedde
Instead of handling these error in _excute_cmd(), now raise the exception and let read_exec_command() handle it. Introduce QMPShellParseError (subclass of QMPShellError) to replace QMPShellError. In next commit we will introduce another subclass. Introduce _print_parse_error() method because

Re: [PATCH 06/20] migration: Add postcopy_thread_create()

2022-02-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Postcopy create threads. A common manner is we init a sem and use it to sync > with the thread. Namely, we have fault_thread_sem and listen_thread_sem and > they're only used for this. > > Make it a shared infrastructure so it's easier to create yet

[PATCH 5/5] python: qmp_shell: handle comment lines and escaped eol

2022-02-21 Thread Damien Hedde
In order to support more user-friendly command list file, this commit adds the support for: + comment lines: line staring by '#' are ignored + escaped enf-of-line: line with trailing ' \' are continued on next one For eol: we impose a space before the '\' in order not to trigger the escape if

[PATCH 4/5] python: qmp_shell: add -e/--exit-on-error option

2022-02-21 Thread Damien Hedde
This option makes qmp_shell exit (with error code 1) as soon as one of the following error occurs: + command parsing error + disconnection + command failure (response is an error) _execute_cmd() method now returns None or the response so that read_exec_command() can do the last check. This is

[PATCH 0/5] qmp-shell modifications for non-interactive use

2022-02-21 Thread Damien Hedde
Hi, The main idea of this series is to be a bit more user-friendly when using qmp-shell in a non-interactive way: with an input redirection from a file containing a list of commands. I'm working on dynamic qapi config of a qemu machine, this would be very useful to provide and reproduce small

[PATCH 1/5] python: qmp_shell: don't prompt when stdin is non-interactive

2022-02-21 Thread Damien Hedde
In that case, there is no echo anyway. So the prompt is just garbage. Signed-off-by: Damien Hedde --- python/qemu/aqmp/qmp_shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/qemu/aqmp/qmp_shell.py b/python/qemu/aqmp/qmp_shell.py index d11bf54b00..a6e0f5af42 100644 ---

Re: [PATCH v1] aio-posix: fix build failure io_uring 2.2

2022-02-21 Thread Peter Maydell
On Mon, 21 Feb 2022 at 15:02, Stefan Hajnoczi wrote: > So the QEMU add_poll_remove_sqe() function would do: > > io_uring_prep_poll_remove(sqe, (__u64)(uintptr_t)node); __u64 is a linux-kernel-ism -- we should use uint64_t, I think. thanks -- PMM

Re: [PATCH 04/20] migration: Introduce postcopy channels on dest node

2022-02-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Postcopy handles huge pages in a special way that currently we can only have > one "channel" to transfer the page. > > It's because when we install pages using UFFDIO_COPY, we need to have the > whole > huge page ready, it also means we need to have a temp

Re: [PATCH] hw/input/tsc210x: Don't abort on bad SPI word widths

2022-02-21 Thread Alex Bennée
Peter Maydell writes: > The tsc210x doesn't support anything other than 16-bit reads on the > SPI bus, but the guest can program the SPI controller to attempt > them anyway. If this happens, don't abort QEMU, just log this as > a guest error. > > This fixes our

Re: [PATCH v6 08/19] vfio-user: instantiate vfio-user context

2022-02-21 Thread Stefan Hajnoczi
On Thu, Feb 17, 2022 at 02:48:55AM -0500, Jagannathan Raman wrote: > @@ -124,6 +190,11 @@ static void vfu_object_init(Object *obj) > > k->nr_devs++; > > +if (!phase_check(PHASE_MACHINE_READY)) { > +o->machine_done.notify = vfu_object_machine_done; > +

[PATCH] travis.yml: Update the s390x jobs to Ubuntu Focal

2022-02-21 Thread Thomas Huth
QEMU will soon drop the support for Ubuntu 18.04, so let's update the Travis jobs that were still using this version to 20.04 instead. While we're at it, also remove an obsolete comment about Ubuntu Xenial being the default for our Travis jobs. Signed-off-by: Thomas Huth --- .travis.yml | 12

Re: [PATCH v6 07/19] vfio-user: define vfio-user-server object

2022-02-21 Thread Stefan Hajnoczi
On Thu, Feb 17, 2022 at 02:48:54AM -0500, Jagannathan Raman wrote: > +struct VfuObjectClass { > +ObjectClass parent_class; > + > +unsigned int nr_devs; > + > +/* > + * Can be set to shutdown automatically when all server object > + * instances are destroyed > + */ > +

Re: [PATCH v6 05/19] remote/machine: add vfio-user property

2022-02-21 Thread Stefan Hajnoczi
On Thu, Feb 17, 2022 at 02:48:52AM -0500, Jagannathan Raman wrote: > Add vfio-user to x-remote machine. It is a boolean, which indicates if > the machine supports vfio-user protocol. The machine configures the bus > differently vfio-user and multiprocess protocols, so this property > informs it on

Re: [PATCH v6 04/19] remote/machine: add HotplugHandler for remote machine

2022-02-21 Thread Stefan Hajnoczi
On Thu, Feb 17, 2022 at 02:48:51AM -0500, Jagannathan Raman wrote: > Allow hotplugging of PCI(e) devices to remote machine > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > hw/remote/machine.c | 10 ++ > 1 file changed, 10

Re: [PATCH v6 03/19] qdev: unplug blocker for devices

2022-02-21 Thread Stefan Hajnoczi
On Thu, Feb 17, 2022 at 02:48:50AM -0500, Jagannathan Raman wrote: > diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c > index 01f3834db5..69d9cf3f25 100644 > --- a/softmmu/qdev-monitor.c > +++ b/softmmu/qdev-monitor.c > @@ -945,10 +945,36 @@ void qmp_device_del(const char *id, Error

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-21 Thread Joao Martins
On 2/21/22 06:58, Igor Mammedov wrote: > On Fri, 18 Feb 2022 17:12:21 + > Joao Martins wrote: > >> On 2/14/22 15:31, Igor Mammedov wrote: >>> On Mon, 14 Feb 2022 15:05:00 + >>> Joao Martins wrote: On 2/14/22 14:53, Igor Mammedov wrote: > On Mon, 7 Feb 2022 20:24:20

Re: [PATCH v6 03/19] qdev: unplug blocker for devices

2022-02-21 Thread Stefan Hajnoczi
On Thu, Feb 17, 2022 at 02:48:50AM -0500, Jagannathan Raman wrote: > Add blocker to prevent hot-unplug of devices > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > include/hw/qdev-core.h | 35 +++ >

Re: 'make check-acceptance' failing on s390 tests?

2022-02-21 Thread Thomas Huth
On 18/02/2022 16.04, Peter Maydell wrote: Hi; is anybody else seeing 'make check-acceptance' fail on some of the s390 tests? (009/183) tests/avocado/boot_linux.py:BootLinuxS390X.test_s390_ccw_virtio_tcg: INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout

Re: Call for GSoC and Outreachy project ideas for summer 2022

2022-02-21 Thread Michal Prívozník
On 2/21/22 12:27, Paolo Bonzini wrote: > On 2/21/22 10:36, Michal Prívozník wrote: >> Indeed. Libvirt's participating on its own since 2016, IIRC. Since we're >> still in org acceptance phase we have some time to decide this, >> actually. We can do the final decision after participating orgs are

Re: [PATCH v4 1/4] tls: add macros for coroutine-safe TLS variables

2022-02-21 Thread Peter Maydell
On Mon, 21 Feb 2022 at 14:29, Stefan Hajnoczi wrote: > > Compiler optimizations can cache TLS values across coroutine yield > points, resulting in stale values from the previous thread when a > coroutine is re-entered by a new thread. > > Serge Guelton developed an __attribute__((noinline))

Re: [PATCH 1/2] headers: Add pvpanic.h

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 13:27, zhenwei pi wrote: Since 2020, linux kernel started to export pvpanic.h. Import the latest version from linux into QEMU. Signed-off-by: zhenwei pi --- include/standard-headers/linux/pvpanic.h | 9 + scripts/update-linux-headers.sh | 3 ++- 2 files changed,

Re: [PATCH v4 2/4] util/async: replace __thread with QEMU TLS macros

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 15:29, Stefan Hajnoczi wrote: QEMU TLS macros must be used to make TLS variables safe with coroutines. Signed-off-by: Stefan Hajnoczi --- util/async.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 4/4] cpus: use coroutine TLS macros for iothread_locked

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 15:29, Stefan Hajnoczi wrote: qemu_mutex_iothread_locked() may be used from coroutines. Standard __thread variables cannot be used by coroutines. Use the coroutine TLS macros instead. Signed-off-by: Stefan Hajnoczi --- softmmu/cpus.c | 8 1 file changed, 4 insertions(+),

Re: [PATCH v4 4/4] cpus: use coroutine TLS macros for iothread_locked

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 15:29, Stefan Hajnoczi wrote: qemu_mutex_iothread_locked() may be used from coroutines. Standard __thread variables cannot be used by coroutines. Use the coroutine TLS macros instead. Signed-off-by: Stefan Hajnoczi --- softmmu/cpus.c | 8 1 file changed, 4 insertions(+),

Re: [PATCH v1] aio-posix: fix build failure io_uring 2.2

2022-02-21 Thread Stefan Hajnoczi
On Fri, Feb 18, 2022 at 12:16:27AM +0800, Haiyue Wang wrote: > The io_uring fixed "Don't truncate addr fields to 32-bit on 32-bit": > https://git.kernel.dk/cgit/liburing/commit/?id=d84c29b19ed0b13619cff40141bb1fc3615b > > This leads to build failure: > ../util/fdmon-io_uring.c: In function

[PATCH 1/2] i386: Add Icelake-Server-v6 CPU model with 5-level EPT support

2022-02-21 Thread Vitaly Kuznetsov
Windows 11 with WSL2 enabled (Hyper-V) fails to boot with Icelake-Server {-v5} CPU model but boots well with '-cpu host'. Apparently, it expects 5-level paging and 5-level EPT support to come in pair but QEMU's Icelake-Server CPU model lacks the later. Introduce 'Icelake-Server-v6' CPU model with

[PATCH 2/2] vmxcap: Add 5-level EPT bit

2022-02-21 Thread Vitaly Kuznetsov
5-level EPT is present in Icelake Server CPUs and is supported by QEMU ('vmx-page-walk-5'). Signed-off-by: Vitaly Kuznetsov --- scripts/kvm/vmxcap | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap index 6fe66d5f5753..f140040104bf 100755 ---

RE: [RFC 0/2] qemu-sem-posix: use monotonic clock instead

2022-02-21 Thread longpeng2--- via
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Monday, February 21, 2022 7:31 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > ; berra...@redhat.com; m...@redhat.com > Cc: qemu-devel@nongnu.org;

[PATCH v4 4/4] cpus: use coroutine TLS macros for iothread_locked

2022-02-21 Thread Stefan Hajnoczi
qemu_mutex_iothread_locked() may be used from coroutines. Standard __thread variables cannot be used by coroutines. Use the coroutine TLS macros instead. Signed-off-by: Stefan Hajnoczi --- softmmu/cpus.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/softmmu/cpus.c

RE: [RFC 1/2] sem-posix: remove the posix semaphore support

2022-02-21 Thread longpeng2--- via
Hi Daniel, > -Original Message- > From: Daniel P. Berrangé [mailto:berra...@redhat.com] > Sent: Monday, February 21, 2022 7:12 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > > Cc: pbonz...@redhat.com; m...@redhat.com; qemu-devel@nongnu.org; Gonglei > (Arei) > >

RE: [RFC 2/2] sem-posix: use monotonic clock instead

2022-02-21 Thread longpeng2--- via
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Monday, February 21, 2022 7:42 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > ; berra...@redhat.com; m...@redhat.com > Cc: qemu-devel@nongnu.org;

[PATCH v4 2/4] util/async: replace __thread with QEMU TLS macros

2022-02-21 Thread Stefan Hajnoczi
QEMU TLS macros must be used to make TLS variables safe with coroutines. Signed-off-by: Stefan Hajnoczi --- util/async.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/util/async.c b/util/async.c index 08d25feef5..2ea1172f3e 100644 --- a/util/async.c +++

[PATCH v4 3/4] rcu: use coroutine TLS macros

2022-02-21 Thread Stefan Hajnoczi
RCU may be used from coroutines. Standard __thread variables cannot be used by coroutines. Use the coroutine TLS macros instead. Signed-off-by: Stefan Hajnoczi --- include/qemu/rcu.h | 7 --- tests/unit/rcutorture.c| 10 +- tests/unit/test-rcu-list.c | 4 ++--

[PATCH v4 0/4] tls: add macros for coroutine-safe TLS variables

2022-02-21 Thread Stefan Hajnoczi
v4: - Dropped '[RFC]'. - Dropped inline asm for now. -fPIC versions of the code are missing and I hit several issues including a clang LTO bug where thread local variables are incorrectly discarded because inline asm is not analyzed to find symbol dependencies (Serge Guelton is aware). -

[PATCH v4 1/4] tls: add macros for coroutine-safe TLS variables

2022-02-21 Thread Stefan Hajnoczi
Compiler optimizations can cache TLS values across coroutine yield points, resulting in stale values from the previous thread when a coroutine is re-entered by a new thread. Serge Guelton developed an __attribute__((noinline)) wrapper and tested it with clang and gcc. I formatted his idea

Re: [PATCH 2/2] hw/misc/pvpanic: Use standard headers instead

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 15:11, Peter Maydell wrote: On Mon, 21 Feb 2022 at 13:55, Philippe Mathieu-Daudé wrote: On 21/2/22 13:27, zhenwei pi wrote: QEMU side has already imported pvpanic.h from linux, remove bit definitions from include/hw/misc/pvpanic.h, and use include/standard-headers/linux/pvpanic.h

[PATCH] The processor id in SMBIOS should be same as edx:eax that CPUID instruction returned.

2022-02-21 Thread windy
Signed-off-by: windy --- hw/i386/fw_cfg.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index a283785..44f27ae 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -56,9 +56,14 @@ void fw_cfg_build_smbios(MachineState *ms,

Re: [PATCH 2/2] hw/misc/pvpanic: Use standard headers instead

2022-02-21 Thread Peter Maydell
On Mon, 21 Feb 2022 at 13:55, Philippe Mathieu-Daudé wrote: > > On 21/2/22 13:27, zhenwei pi wrote: > > QEMU side has already imported pvpanic.h from linux, remove bit > > definitions from include/hw/misc/pvpanic.h, and use > > include/standard-headers/linux/pvpanic.h instead. > > Also minor

[PATCH] hw/input/tsc210x: Don't abort on bad SPI word widths

2022-02-21 Thread Peter Maydell
The tsc210x doesn't support anything other than 16-bit reads on the SPI bus, but the guest can program the SPI controller to attempt them anyway. If this happens, don't abort QEMU, just log this as a guest error. This fixes our machine_arm_n8x0.py:N8x0Machine.test_n800 acceptance test, which hits

[PULL v2 00/25] target-arm queue

2022-02-21 Thread Peter Maydell
repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220221-1 for you to fetch changes up to ca511604925eef8572e22ecbf0d3c758d7277924: ui/cocoa: Fix the leak of qemu_console_get_label (2022-02-21 13:30:21 +

Re: [PATCH v2 7/8] x86: Support XFD and AMX xsave data migration

2022-02-21 Thread David Edmondson
On Wednesday, 2022-02-16 at 22:04:33 -08, Yang Zhong wrote: > From: Zeng Guang > > XFD(eXtended Feature Disable) allows to enable a > feature on xsave state while preventing specific > user threads from using the feature. > > Support save and restore XFD MSRs if CPUID.D.1.EAX[4] > enumerate to

[PATCH] iotests: Write test output to TEST_DIR

2022-02-21 Thread Hanna Reitz
Drop the use of OUTPUT_DIR (test/qemu-iotests under the build directory), and instead write test output files (.out.bad, .notrun, and .casenotrun) to TEST_DIR. With this, the same test can be run concurrently without the separate instances interfering, because they will need separate TEST_DIRs

Re: [PATCH 2/2] hw/misc/pvpanic: Use standard headers instead

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 13:27, zhenwei pi wrote: QEMU side has already imported pvpanic.h from linux, remove bit definitions from include/hw/misc/pvpanic.h, and use include/standard-headers/linux/pvpanic.h instead. Also minor changes for PVPANIC_CRASHLOADED -> PVPANIC_CRASH_LOADED. It seems to fail to

Re: [PATCH v2 6/8] x86: add support for KVM_CAP_XSAVE2 and AMX state migration

2022-02-21 Thread David Edmondson
On Wednesday, 2022-02-16 at 22:04:32 -08, Yang Zhong wrote: > From: Jing Liu > > When dynamic xfeatures (e.g. AMX) are used by the guest, the xsave > area would be larger than 4KB. KVM_GET_XSAVE2 and KVM_SET_XSAVE > under KVM_CAP_XSAVE2 works with a xsave buffer larger than 4KB. > Always use the

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-21 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Tue, Feb 15, 2022 at 10:53:58AM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > I don't know what behavior should be if firmware tries to program > > > PCI64 hole beyond supported phys-bits. > > > > Well, you are basically f*cked. > > > >

Re: [PATCH v2 4/8] x86: Add XFD faulting bit for state components

2022-02-21 Thread David Edmondson
On Wednesday, 2022-02-16 at 22:04:30 -08, Yang Zhong wrote: > From: Jing Liu > > Intel introduces XFD faulting mechanism for extended > XSAVE features to dynamically enable the features in > runtime. If CPUID (EAX=0Dh, ECX=n, n>1).ECX[2] is set > as 1, it indicates support for XFD faulting of

Re: [PATCH v3] tests/qtest: add qtests for npcm7xx sdhci

2022-02-21 Thread Peter Maydell
On Wed, 16 Feb 2022 at 17:30, Peter Maydell wrote: > > On Tue, 8 Feb 2022 at 18:18, Patrick Venture wrote: > > > > From: Shengtan Mao > > > > Reviewed-by: Hao Wu > > Reviewed-by: Chris Rauer > > Signed-off-by: Shengtan Mao > > Signed-off-by: Patrick Venture > > --- > > > > Applied to

[PATCH 1/2] headers: Add pvpanic.h

2022-02-21 Thread zhenwei pi
Since 2020, linux kernel started to export pvpanic.h. Import the latest version from linux into QEMU. Signed-off-by: zhenwei pi --- include/standard-headers/linux/pvpanic.h | 9 + scripts/update-linux-headers.sh | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) create

Re: [PATCH v2 1/8] x86: Fix the 64-byte boundary enumeration for extended state

2022-02-21 Thread David Edmondson
On Wednesday, 2022-02-16 at 22:04:27 -08, Yang Zhong wrote: > From: Jing Liu > > The extended state subleaves (EAX=0Dh, ECX=n, n>1).ECX[1] > indicate whether the extended state component locates > on the next 64-byte boundary following the preceding state > component when the compacted format of

Re: [PATCH] hw/arm/mps2-tz.c: Update AN547 documentation URL

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 10:41, Peter Maydell wrote: The AN547 application note URL has changed: update our comment accordingly. (Rev B is still downloadable from the old URL, but there is a new Rev C of the document now.) Signed-off-by: Peter Maydell --- hw/arm/mps2-tz.c | 2 +- 1 file changed, 1

Re: [PATCH v2 2/8] x86: Add AMX XTILECFG and XTILEDATA components

2022-02-21 Thread David Edmondson
On Wednesday, 2022-02-16 at 22:04:28 -08, Yang Zhong wrote: > From: Jing Liu > > The AMX TILECFG register and the TMMx tile data registers are > saved/restored via XSAVE, respectively in state component 17 > (64 bytes) and state component 18 (8192 bytes). > > Add AMX feature bits to

[PULL 18/25] exec/ramblock: Add missing includes

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé "exec/ramblock.h" requires "qemu/rcu.h" for the definition of rcu_head, and "exec/ramlist.h" for the definition of RAMBlockNotifier. Add them to avoid when when refactoring include/: include/exec/ramblock.h:26:21: error: field has incomplete type 'struct

[PATCH 2/2] hw/misc/pvpanic: Use standard headers instead

2022-02-21 Thread zhenwei pi
QEMU side has already imported pvpanic.h from linux, remove bit definitions from include/hw/misc/pvpanic.h, and use include/standard-headers/linux/pvpanic.h instead. Also minor changes for PVPANIC_CRASHLOADED -> PVPANIC_CRASH_LOADED. Signed-off-by: zhenwei pi --- hw/misc/pvpanic-isa.c | 4

[PULL 19/25] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220207082756.82600-7-f4...@amsat.org> Signed-off-by: Thomas Huth --- hw/core/ptimer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/ptimer.c

Re: [PATCH] tests/avocado/machine_s390_ccw_virtio: Adapt test to new default resolution

2022-02-21 Thread Halil Pasic
On Mon, 21 Feb 2022 11:19:33 +0100 Thomas Huth wrote: > QEMU's default screen resolution recently changed to 1280x800, so the > resolution in the screen shot header changed of course, too. > > Reported-by: Peter Maydell > Fixes: de72c4b7cd ("edid: set default resolution to 1280x800 (WXGA)") >

Re: [PATCH] tests/avocado/machine_s390_ccw_virtio: Adapt test to new default resolution

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 11:19, Thomas Huth wrote: QEMU's default screen resolution recently changed to 1280x800, so the resolution in the screen shot header changed of course, too. Reported-by: Peter Maydell Fixes: de72c4b7cd ("edid: set default resolution to 1280x800 (WXGA)") Signed-off-by: Thomas Huth

[PULL 17/25] qtest: Add missing 'hw/qdev-core.h' include

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Add "hw/qdev-core.h" to avoid when refactoring include/: softmmu/qtest.c:404:9: error: use of undeclared identifier 'NamedGPIOList' NamedGPIOList *ngl; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard

Re: [PULL 00/25] qtest patches and misc header clean-ups

2022-02-21 Thread Philippe Mathieu-Daudé
On 21/2/22 12:59, Thomas Huth wrote: * Improve virtio-net failover test * Some small fixes for the qtests * Misc header cleanups by Philippe Philippe

Re: [PATCH v2 0/9] exec: Remove 'qemu/log.h' from 'exec-all.h'

2022-02-21 Thread Thomas Huth
On 07/02/2022 09.27, Philippe Mathieu-Daudé via wrote: Yet another noisy/boring refactor, but it will allow us to better split exec/ includes as being target-agnostic/specific (the next series). Since v1: - Remove unrelated "hw/s390x/virtio: missing 'cpu.h'" (thuth) - Reword some commit

[PULL 25/25] hw/tricore: Remove unused and incorrect header

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé TriCore boards certainly don't need the ARM loader API :) Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220214183144.27402-4-f4...@amsat.org> Signed-off-by: Thomas Huth ---

[PULL 13/25] scripts: Remove the old switch-timer-api script

2022-02-21 Thread Thomas Huth
This script has been useful for the timer API rewrite in 2013, but it is of no use anymore today. Let's remove it now. Message-Id: <20220124102001.35930-1-th...@redhat.com> Signed-off-by: Thomas Huth --- scripts/switch-timer-api | 178 --- 1 file changed, 178

[PULL 24/25] hw/m68k/mcf: Add missing 'exec/hwaddr.h' header

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé hwaddr type is defined in "exec/hwaddr.h". Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220209215446.58402-3-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- include/hw/m68k/mcf.h | 1 + 1 file changed, 1 insertion(+) diff

[PULL 23/25] exec/exec-all: Move 'qemu/log.h' include in units requiring it

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Many files use "qemu/log.h" declarations but neglect to include it (they inherit it via "exec/exec-all.h"). "exec/exec-all.h" is a core component and shouldn't be used that way. Move the "qemu/log.h" inclusion locally to each unit requiring it. Signed-off-by:

Re: [PATCH 08/11] mos6522: add "info via" HMP command for debugging

2022-02-21 Thread Philippe Mathieu-Daudé
+Thomas On 20/2/22 18:18, Mark Cave-Ayland wrote: On 08/02/2022 13:10, Daniel P. Berrangé wrote: On Tue, Feb 08, 2022 at 01:06:59PM +, Mark Cave-Ayland wrote: On 08/02/2022 12:49, Daniel P. Berrangé wrote: I was under the impression that monitor_register_hmp_info_hrt() does all the

[PULL 14/25] hw/tpm: Clean includes

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé "tpm_ppi.h" only requires to include "exec/memory.h" to get the MemoryRegion declaration. tpm_ppi.c requires "hw/qdev-core.h" to use the DEVICE() macro, tpm_crb.c is the only source file requiring "exec/address-spaces.h". Signed-off-by: Philippe Mathieu-Daudé

[PULL 09/25] tests/qtest: failover: check missing guest feature

2022-02-21 Thread Thomas Huth
From: Laurent Vivier If QEMU provides the VIRTIO_NET_F_STANDBY feature but the guest doesn't the primary device must be kept hidden Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-5-lviv...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 33

[PULL 22/25] softmmu/runstate: Clean headers

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Add the missing 'qemu/log.h' header and remove the unused 'exec/exec-all.h' one. Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220207075426.81934-14-f4...@amsat.org> Signed-off-by: Thomas Huth ---

[PULL 11/25] tests/qtest: failover: test migration if the guest doesn't support failover

2022-02-21 Thread Thomas Huth
From: Laurent Vivier The primary device is not plugged and the migration is done only with the standby device Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-7-lviv...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 142

[PULL 21/25] linux-user: Add missing "qemu/timer.h" include

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé "qemu/timer.h" declares cpu_get_host_ticks(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220207082756.82600-9-f4...@amsat.org> Signed-off-by: Thomas Huth --- linux-user/i386/cpu_loop.c | 1 +

[PULL 08/25] tests/qtest: failover: check the feature is correctly provided

2022-02-21 Thread Thomas Huth
From: Laurent Vivier Check QEMU provides the VIRTIO_NET_F_STANDBY if failover is on, and doesn't if failover is off Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-4-lviv...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 139

[PULL 20/25] target: Add missing "qemu/timer.h" include

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé timer_new_ns(), cpu_get_host_ticks() and NANOSECONDS_PER_SECOND are declared in "qemu/timer.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Message-Id:

[PULL 16/25] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Igor Mammedov Message-Id: <20220207082756.82600-4-f4...@amsat.org> Signed-off-by: Thomas Huth --- hw/acpi/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PULL 07/25] tests/qtest: failover: use a macro for check_one_card()

2022-02-21 Thread Thomas Huth
From: Laurent Vivier This allows g_assert() to correctly report the line number of the error in the test case. Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-3-lviv...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 47

[PULL 15/25] hw/remote: Add missing include

2022-02-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Currently "qemu/error-report.h" is implicitly included, however if headers in include/ get refactored, we get: hw/remote/proxy-memory-listener.c: In function ‘proxy_memory_listener_commit’: hw/remote/proxy-memory-listener.c:183:9: error: implicit declaration of

[PULL 12/25] tests/qtest: failover: migration abort test with failover off

2022-02-21 Thread Thomas Huth
From: Laurent Vivier Test abort during active migration when failover is disabled from QEMU or from guest side. Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-8-lviv...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 180

[PULL 06/25] tests/qtest: failover: clean up pathname of tests

2022-02-21 Thread Thomas Huth
From: Laurent Vivier clearly indentify parameters, hotplug and migration tests Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-2-lviv...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 21 + 1 file changed, 13 insertions(+),

[PULL 04/25] tests/qtest/vhost-user-test.c: Use vhostforce=on

2022-02-21 Thread Thomas Huth
From: Eric Auger -netdev vhost-user,vhostforce is deprecated and vhostforce=on should be used instead. Signed-off-by: Eric Auger Reviewed-by: Thomas Huth Message-Id: <20220210145254.157790-2-eric.au...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/vhost-user-test.c | 2 +- 1 file

<    1   2   3   >