[PATCH v4] tests/qtest: netdev: test stream and dgram backends

2023-01-03 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: v4: - rework EXPECT_STATE() - use g_dir_make_tmp() v3: - Add "-M none" to avoid error: "No machine specified, and there is no default" v2: - Fix ipv6 free port allocation -

[PATCH 04/10] tests/docker: fix a win32 error due to portability

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau docker.py is run during configure, and produces an error: No module named 'pwd'. Use a more portable and recommended alternative to lookup the user "login name". Signed-off-by: Marc-André Lureau --- tests/docker/docker.py | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 05/10] tests/readconfig: spice doesn't support unix socket on windows yet

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/qtest/readconfig-test.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qtest/readconfig-test.c b/tests/qtest/readconfig-test.c index c7a9b0c7dd..9ef870643d 100644 ---

[PATCH 06/10] osdep: implement qemu_socketpair() for win32

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau Manually implement a socketpair() function, using UNIX sockets and simple peer credential checking. QEMU doesn't make much use of socketpair, beside vhost-user which is not available for win32 at this point. However, I intend to use it for writing some new portable

[PATCH 03/10] tests: fix test-io-channel-command on win32

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau socat "PIPE:"" on Windows are named pipes, not fifo path names. Fixes: commit 68406d10859 ("tests/unit: cleanups for test-io-channel-command") Signed-off-by: Marc-André Lureau --- tests/unit/test-io-channel-command.c | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH 01/10] ccid-card-emulated: fix cast warning/error

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau ../hw/usb/ccid-card-emulated.c: In function 'handle_apdu_thread': ../hw/usb/ccid-card-emulated.c:251:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 251 | assert((unsigned long)event > 1000); Signed-off-by:

Re: [PATCH v4 08/30] hw/i386/pc: Create RTC controllers in south bridges

2023-01-03 Thread Thomas Huth
On 02/01/2023 19.25, Bernhard Beschow wrote: Am 2. Januar 2023 17:03:29 UTC schrieb Thomas Huth : On 21/12/2022 17.59, Bernhard Beschow wrote: Just like in the real hardware (and in PIIX4), create the RTC controllers in the south bridges. Signed-off-by: Bernhard Beschow Reviewed-by:

[PATCH 09/10] libqtest: make qtest_qmp_add_client work on win32

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau Use the "get-win32-socket" function to pass an opened socket to QEMU, instead of using "getfd", which relies on socket ancillary FD message passing. Signed-off-by: Marc-André Lureau --- tests/qtest/libqtest.h | 5 ++--- tests/qtest/libqtest.c | 16 ++-- 2

Re: can we reduce the time taken for the msys2 jobs?

2023-01-03 Thread Thomas Huth
On 16/12/2022 17.23, Philippe Mathieu-Daudé wrote: On 16/12/22 15:55, Peter Maydell wrote: The msys2-32bit job currently seems to run into the 70 minute CI timeout quite frequently. This successful pass took 61 minutes: https://gitlab.com/qemu-project/qemu/-/jobs/3479763757 so I don't think

[PATCH 00/10] Various win32 fixes & new 'get-win32-socket' QMP command

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau Hi, The following series first fixes a few tests on win32. The second part focuses on 'add_client' support, by limiting its scope to sockets and adding win32 support. Finally, it enables vnc-display test on win32, to exercise the new code paths and demonstrate its usage.

[PATCH 10/10] qtest: enable vnc-display test on win32

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau Now that qtest_qmp_add_client() works on win32, we can enable the VNC test. Signed-off-by: Marc-André Lureau --- tests/qtest/vnc-display-test.c | 5 - 1 file changed, 5 deletions(-) diff --git a/tests/qtest/vnc-display-test.c b/tests/qtest/vnc-display-test.c index

[PATCH 08/10] qmp: add 'get-win32-socket'

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau A process with enough capabilities can duplicate a socket to QEMU. Add a QMP command to import it and add it to the monitor fd list, so it can be later used by other commands. Note that we actually store the SOCKET in the FD list, appropriate care must now be taken to

[PATCH 02/10] tests: fix path separator, use g_build_filename()

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/unit/test-io-channel-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test-io-channel-command.c b/tests/unit/test-io-channel-command.c index 19f72eab96..096224962c 100644 ---

[PATCH 07/10] qmp: 'add_client' actually expects sockets

2023-01-03 Thread marcandre . lureau
From: Marc-André Lureau Whether it is SPICE, VNC, D-Bus, or the socket chardev, they all actually expect a socket kind or will fail in different ways at runtime. Throw an error early if the given 'add_client' fd is not a socket, and close it to avoid leaks. This allows to replace the close()

[PATCH 6/6] softmmu/rtc: Emit warning when using driftfix=slew on systems without mc146818

2023-01-03 Thread Thomas Huth
The 'slew' lost tick policy is only available on systems with a mc146818 RTC. On other systems, "-rtc driftfix=slew" is currently silently ignored. Let's emit at least a warning in this case to make the users aware that there is something wrong in their command line settings. Signed-off-by:

[PATCH 3/6] hw/intc: Extract the IRQ counting functions into a separate file

2023-01-03 Thread Thomas Huth
These IRQ counting functions will soon be required in binaries that do not include the APIC code, too, so let's extract them into a separate file that can be linked independently of the APIC code. While we're at it, change the apic_* prefix into kvm_* since the functions are used from the i8259

[PATCH 5/6] hw/rtc/mc146818rtc: Make the mc146818 RTC device target independent

2023-01-03 Thread Thomas Huth
The only reason for this code being target dependent was the IRQ-counting related code in rtc_policy_slew_deliver_irq(). Since these functions have been moved into a new, separate file (kvm_irqcount.c) which is now always compiled and linked if either APIC or the mc146818 device are required, and

[PATCH 4/6] hw/rtc/mc146818rtc: Add a property for the availability of the slew tick policy

2023-01-03 Thread Thomas Huth
We want to get rid of the "#ifdef TARGET_I386" statements in the mc146818 code, so we need a different way to decide whether the slew tick policy is available or not. Introduce a new property "slew-tick-policy-available" which can be set by the machines that support this tick policy.

[PATCH 2/6] hw/i386/pc: No need for rtc_state to be an out-parameter

2023-01-03 Thread Thomas Huth
From: Bernhard Beschow Now that the RTC is created as part of the southbridges it doesn't need to be an out-parameter any longer. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Reviewed-by: Michael S. Tsirkin Message-Id: <20221022150508.26830-12-shen...@gmail.com> Signed-off-by:

[PATCH 0/6] mc146818rtc related clean-ups and improvements

2023-01-03 Thread Thomas Huth
This patch series is a follow-up of my previous patch "[PATCH v4] hw/rtc/mc146818rtc: Make this rtc device target independent". It has now been split into multiple patches to ease the review, and some further patches have been added on top. The basic idea is to change hw/rtc/mc146818rtc.c into

Re: [PATCH v2] i386: Deprecate the -no-hpet QEMU command line option

2023-01-03 Thread Peter Krempa
On Thu, Dec 29, 2022 at 12:49:13 +0100, Thomas Huth wrote: > The HPET setting has been turned into a machine property a while ago > already, so we should finally do the next step and deprecate the > legacy CLI option, too. > > Signed-off-by: Thomas Huth > --- > v2: > - Rebased to current

Re: [PATCH v4 09/30] hw/i386/pc: No need for rtc_state to be an out-parameter

2023-01-03 Thread Thomas Huth
On 21/12/2022 17.59, Bernhard Beschow wrote: Now that the RTC is created as part of the southbridges it doesn't need to be an out-parameter any longer. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Reviewed-by: Michael S. Tsirkin Message-Id:

[RFC PATCH] docs: add some details about compilation units to coding style

2023-01-03 Thread Alex Bennée
The build-system documentation remains the canonical description of how the whole build system goes together. However we should at least reference the fact that we use conditional compilation in the coding style document which I assume is the first document a potential contributor actually reads

[PATCH 1/6] hw/i386/pc: Create RTC controllers in south bridges

2023-01-03 Thread Thomas Huth
From: Bernhard Beschow Just like in the real hardware (and in PIIX4), create the RTC controllers in the south bridges. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Message-Id: <20221022150508.26830-11-shen...@gmail.com> Signed-off-by: Thomas Huth ---

Re: [PATCH v5 04/14] vfio/migration: Fix NULL pointer dereference bug

2023-01-03 Thread Dr. David Alan Gilbert
* Avihai Horon (avih...@nvidia.com) wrote: > As part of its error flow, vfio_vmstate_change() accesses > MigrationState->to_dst_file without any checks. This can cause a NULL > pointer dereference if the error flow is taken and > MigrationState->to_dst_file is not set. > > For example, this can

Re: [PATCH v1 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-01-03 Thread Claudio Imbrenda
On Tue, 3 Jan 2023 12:27:32 +0100 Thomas Huth wrote: > On 22/12/2022 16.04, Claudio Imbrenda wrote: > > This patch adds support for the asynchronous teardown for reboot for > > protected VMs. > [...] > > +bool s390_pv_vm_try_disable_async(void) > > +{ > > +char

Re: [PATCH 05/10] tests/readconfig: spice doesn't support unix socket on windows yet

2023-01-03 Thread Thomas Huth
On 03/01/2023 12.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/qtest/readconfig-test.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qtest/readconfig-test.c b/tests/qtest/readconfig-test.c index

Re: [PATCH 07/10] qmp: 'add_client' actually expects sockets

2023-01-03 Thread Philippe Mathieu-Daudé
On 3/1/23 12:08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Whether it is SPICE, VNC, D-Bus, or the socket chardev, they all actually expect a socket kind or will fail in different ways at runtime. Throw an error early if the given 'add_client' fd is not a socket, and close it

Re: [PATCH 4/6] hw/rtc/mc146818rtc: Add a property for the availability of the slew tick policy

2023-01-03 Thread Bernhard Beschow
On Tue, Jan 3, 2023 at 2:32 PM Bernhard Beschow wrote: > > > On Tue, Jan 3, 2023 at 9:48 AM Thomas Huth wrote: > >> We want to get rid of the "#ifdef TARGET_I386" statements in the mc146818 >> code, so we need a different way to decide whether the slew tick policy >> is available or not.

Re: [PATCH] Update scripts/meson-buildoptions.sh

2023-01-03 Thread Thomas Huth
On 02/01/2023 11.41, Alessandro Di Federico wrote: Note: `Makefile` relies on modification dates in the source tree to detect changes to `meson_options.txt`. However, git does not track those. Therefore, the following was necessary to regenerate `meson-buildoptions.sh`: touch

Re: [PATCH v2] net: stream: add a new option to automatically reconnect

2023-01-03 Thread Thomas Huth
On 03/01/2023 15.22, Laurent Vivier wrote: In stream mode, if the server shuts down there is currently no way to reconnect the client to a new server without removing the NIC device and the netdev backend (or to reboot). This patch introduces a reconnect option that specifies a delay to try to

Re: [PATCH] Update scripts/meson-buildoptions.sh

2023-01-03 Thread Stefan Hajnoczi
On Mon, 2 Jan 2023 at 05:42, Alessandro Di Federico via wrote: > > Note: `Makefile` relies on modification dates in the source tree to > detect changes to `meson_options.txt`. However, git does not track > those. Therefore, the following was necessary to regenerate > `meson-buildoptions.sh`: > >

Re: [PATCH v4] tests/qtest: netdev: test stream and dgram backends

2023-01-03 Thread Laurent Vivier
On 1/3/23 15:08, Thomas Huth wrote: On 03/01/2023 12.00, Laurent Vivier wrote: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: v4:    - rework EXPECT_STATE()    - use g_dir_make_tmp() v3: - Add "-M none" to avoid error:    "No machine

Re: [PATCH v6] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-03 Thread Alex Williamson
On Mon, 2 Jan 2023 18:10:24 -0500 Chuck Zmudzinski wrote: > On 1/2/23 12:46 PM, Michael S. Tsirkin wrote: > > On Sun, Jan 01, 2023 at 06:52:03PM -0500, Chuck Zmudzinski wrote: > > > Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, > > > as noted in docs/igd-assign.txt in

Re: [PATCH] Update scripts/meson-buildoptions.sh

2023-01-03 Thread Stefan Hajnoczi
On Tue, 3 Jan 2023 at 10:26, Alessandro Di Federico wrote: > > On Tue, 3 Jan 2023 09:37:51 -0500 > Stefan Hajnoczi wrote: > > > I don't understand the issue. Can you describe the steps that cause > > meson-buildoptions.sh to become out-of-sync with meson_options.txt? > > > > This will continue

Re: [PATCH v1 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-01-03 Thread Thomas Huth
On 22/12/2022 16.04, Claudio Imbrenda wrote: This patch adds support for the asynchronous teardown for reboot for protected VMs. [...] +bool s390_pv_vm_try_disable_async(void) +{ +char tname[VCPU_THREAD_NAME_SIZE]; +QemuThread *t; + +if (!kvm_check_extension(kvm_state,

Re: [PATCH 5/6] hw/isa/piix: Resolve redundant k->config_write assignments

2023-01-03 Thread Philippe Mathieu-Daudé
On 2/1/23 22:35, Bernhard Beschow wrote: The previous patch unified handling of piix_write_config() accross all PIIX device models which allows for assigning k->config_write once in the base class. Signed-off-by: Bernhard Beschow --- hw/isa/piix.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH v2] net: stream: add a new option to automatically reconnect

2023-01-03 Thread Laurent Vivier
In stream mode, if the server shuts down there is currently no way to reconnect the client to a new server without removing the NIC device and the netdev backend (or to reboot). This patch introduces a reconnect option that specifies a delay to try to reconnect with the same parameters. Add a

Re: [PATCH 02/10] tests: fix path separator, use g_build_filename()

2023-01-03 Thread Thomas Huth
On 03/01/2023 12.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/unit/test-io-channel-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test-io-channel-command.c

Re: [PATCH 5/6] hw/rtc/mc146818rtc: Make the mc146818 RTC device target independent

2023-01-03 Thread Bernhard Beschow
On Tue, Jan 3, 2023 at 9:48 AM Thomas Huth wrote: > The only reason for this code being target dependent was the IRQ-counting > related code in rtc_policy_slew_deliver_irq(). Since these functions have > been moved into a new, separate file (kvm_irqcount.c) which is now always > compiled and

Re: [PATCH 6/6] softmmu/rtc: Emit warning when using driftfix=slew on systems without mc146818

2023-01-03 Thread Philippe Mathieu-Daudé
On 3/1/23 09:48, Thomas Huth wrote: The 'slew' lost tick policy is only available on systems with a mc146818 RTC. On other systems, "-rtc driftfix=slew" is currently silently ignored. Let's emit at least a warning in this case to make the users aware that there is something wrong in their

Re: [PATCH] Update scripts/meson-buildoptions.sh

2023-01-03 Thread Alessandro Di Federico via
On Tue, 3 Jan 2023 09:37:51 -0500 Stefan Hajnoczi wrote: > I don't understand the issue. Can you describe the steps that cause > meson-buildoptions.sh to become out-of-sync with meson_options.txt? > > This will continue to be a problem in the future. Is there a way to > fix it permanently? In

Re: [PATCH v2 01/11] hw/watchdog/wdt_aspeed: Rename MMIO region size as 'iosize'

2023-01-03 Thread Peter Delevoryas
On Fri, Dec 30, 2022 at 12:34:54PM +0100, Philippe Mathieu-Daudé wrote: > Avoid confusing two different things: > - the WDT I/O region size ('iosize') > - at which offset the SoC map the WDT ('offset') > While it is often the same, we can map smaller region sizes > at larger offsets. > > Here we

Re: [RFC PATCH] docs: add some details about compilation units to coding style

2023-01-03 Thread Alessandro Di Federico via
Makes sense to me. Reviewed-by: Alessandro Di Federico On Tue, 3 Jan 2023 10:47:58 + Alex Bennée wrote: > +"Templates" and generated code > +== > + > +We make heavy use of C's macro facilities combined with multiple > +inclusion to generate code. This tends to

Re: [PATCH v2 02/11] hw/watchdog/wdt_aspeed: Extend MMIO range to cover more registers

2023-01-03 Thread Cédric Le Goater
On 1/3/23 16:31, Peter Delevoryas wrote: On Mon, Jan 02, 2023 at 02:31:31PM +0100, Cédric Le Goater wrote: On 12/31/22 23:52, Dong, Eddie wrote: When booting the Zephyr demo in [1] we get: aspeed.io: unimplemented device write (size 4, offset 0x185128, value 0x030f1ff1) <-- aspeed.io:

[PATCH] linux-user: fix bug about incorrect base addresss of gdt on i386 and x86_64

2023-01-03 Thread fanwenjie
On linux user mode, CPUX86State::gdt::base from Different CPUX86State Objects have same value, It is incorrect! Every CPUX86State::gdt::base Must points to independent memory space. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1405 Signed-off-by: fanwenjie ---

Re: [PATCH 10/10] qtest: enable vnc-display test on win32

2023-01-03 Thread Thomas Huth
On 03/01/2023 12.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Now that qtest_qmp_add_client() works on win32, we can enable the VNC test. Signed-off-by: Marc-André Lureau --- tests/qtest/vnc-display-test.c | 5 - 1 file changed, 5 deletions(-) diff --git

Re: [PATCH v2] i386: Deprecate the -no-hpet QEMU command line option

2023-01-03 Thread Ján Tomko
On a Thursday in 2022, Thomas Huth wrote: The HPET setting has been turned into a machine property a while ago already, so we should finally do the next step and deprecate the legacy CLI option, too. Signed-off-by: Thomas Huth --- v2: - Rebased to current version from master branch / adjusted

Re: [PATCH 0/6] Resolve TYPE_PIIX3_XEN_DEVICE

2023-01-03 Thread Philippe Mathieu-Daudé
Hi Chuck, On 3/1/23 04:15, Chuck Zmudzinski wrote: On 1/2/23 4:34 PM, Bernhard Beschow wrote: This series first renders TYPE_PIIX3_XEN_DEVICE redundant and finally removes it. The motivation is to 1/ decouple PIIX from Xen and 2/ to make Xen in the PC machine agnostic to the precise

Re: [PATCH 2/6] hw/i386/pc: No need for rtc_state to be an out-parameter

2023-01-03 Thread Philippe Mathieu-Daudé
On 3/1/23 09:47, Thomas Huth wrote: From: Bernhard Beschow Now that the RTC is created as part of the southbridges it doesn't need to be an out-parameter any longer. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Reviewed-by: Michael S. Tsirkin Message-Id:

Re: [PATCH 4/6] hw/rtc/mc146818rtc: Add a property for the availability of the slew tick policy

2023-01-03 Thread Bernhard Beschow
Am 3. Januar 2023 08:47:59 UTC schrieb Thomas Huth : >We want to get rid of the "#ifdef TARGET_I386" statements in the mc146818 >code, so we need a different way to decide whether the slew tick policy >is available or not. Introduce a new property "slew-tick-policy-available" >which can be set

Re: [PATCH 09/10] libqtest: make qtest_qmp_add_client work on win32

2023-01-03 Thread Thomas Huth
On 03/01/2023 12.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Use the "get-win32-socket" function to pass an opened socket to QEMU, instead of using "getfd", which relies on socket ancillary FD message passing. Signed-off-by: Marc-André Lureau --- tests/qtest/libqtest.h |

Re: [PATCH 04/10] tests/docker: fix a win32 error due to portability

2023-01-03 Thread Philippe Mathieu-Daudé
On 3/1/23 12:08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau docker.py is run during configure, and produces an error: No module named 'pwd'. Use a more portable and recommended alternative to lookup the user "login name". Signed-off-by: Marc-André Lureau ---

Re: [PATCH v4] tests/qtest: netdev: test stream and dgram backends

2023-01-03 Thread Thomas Huth
On 03/01/2023 12.00, Laurent Vivier wrote: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: v4: - rework EXPECT_STATE() - use g_dir_make_tmp() v3: - Add "-M none" to avoid error: "No machine specified, and there is no default"

Re: [PATCH v2] net: stream: add a new option to automatically reconnect

2023-01-03 Thread Laurent Vivier
On 1/3/23 15:28, Thomas Huth wrote: On 03/01/2023 15.22, Laurent Vivier wrote: In stream mode, if the server shuts down there is currently no way to reconnect the client to a new server without removing the NIC device and the netdev backend (or to reboot). This patch introduces a reconnect

Re: [PATCH v2 02/11] hw/watchdog/wdt_aspeed: Extend MMIO range to cover more registers

2023-01-03 Thread Peter Delevoryas
On Mon, Jan 02, 2023 at 02:31:31PM +0100, Cédric Le Goater wrote: > On 12/31/22 23:52, Dong, Eddie wrote: > > > When booting the Zephyr demo in [1] we get: > > > > > >aspeed.io: unimplemented device write (size 4, offset 0x185128, value > > > 0x030f1ff1) <-- > > >aspeed.io: unimplemented

Re: [PATCH v2 02/11] hw/watchdog/wdt_aspeed: Extend MMIO range to cover more registers

2023-01-03 Thread Peter Delevoryas
On Tue, Jan 03, 2023 at 04:48:14PM +0100, Cédric Le Goater wrote: > On 1/3/23 16:31, Peter Delevoryas wrote: > > On Mon, Jan 02, 2023 at 02:31:31PM +0100, Cédric Le Goater wrote: > > > On 12/31/22 23:52, Dong, Eddie wrote: > > > > > When booting the Zephyr demo in [1] we get: > > > > > > > > > >

Re: [PATCH v1 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-01-03 Thread Thomas Huth
On 03/01/2023 12.48, Claudio Imbrenda wrote: On Tue, 3 Jan 2023 12:27:32 +0100 Thomas Huth wrote: On 22/12/2022 16.04, Claudio Imbrenda wrote: This patch adds support for the asynchronous teardown for reboot for protected VMs. [...] +bool s390_pv_vm_try_disable_async(void) +{ +char

Re: [PATCH 02/10] tests: fix path separator, use g_build_filename()

2023-01-03 Thread Philippe Mathieu-Daudé
On 3/1/23 12:08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/unit/test-io-channel-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 00/10] Various win32 fixes & new 'get-win32-socket' QMP command

2023-01-03 Thread Philippe Mathieu-Daudé
Cc'ing more Windows specialists. On 3/1/23 12:08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Hi, The following series first fixes a few tests on win32. The second part focuses on 'add_client' support, by limiting its scope to sockets and adding win32 support. Finally, it

Re: [PATCH 4/6] hw/rtc/mc146818rtc: Add a property for the availability of the slew tick policy

2023-01-03 Thread Bernhard Beschow
On Tue, Jan 3, 2023 at 9:48 AM Thomas Huth wrote: > We want to get rid of the "#ifdef TARGET_I386" statements in the mc146818 > code, so we need a different way to decide whether the slew tick policy > is available or not. Introduce a new property "slew-tick-policy-available" > which can be set

Re: [PATCH 0/6] Resolve TYPE_PIIX3_XEN_DEVICE

2023-01-03 Thread Bernhard Beschow
On Tue, Jan 3, 2023 at 2:17 PM Philippe Mathieu-Daudé wrote: > Hi Chuck, > > On 3/1/23 04:15, Chuck Zmudzinski wrote: > > On 1/2/23 4:34 PM, Bernhard Beschow wrote: > >> This series first renders TYPE_PIIX3_XEN_DEVICE redundant and finally > removes > >> it. The motivation is to 1/ decouple PIIX

PING: [PATCH v2 0/1] tcg: add perfmap and jitdump

2023-01-03 Thread Ilya Leoshkevich
On Mon, 2022-11-14 at 17:13 +0100, Ilya Leoshkevich wrote: > v1: > https://lists.nongnu.org/archive/html/qemu-devel/2022-10/msg01824.html > https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg01073.html > > v1 -> v2: > * Use QEMU_LOCK_GUARD (Alex). > * Handle TARGET_TB_PCREL (Alex). > *

Re: [RFC v4 3/3] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-01-03 Thread Jonathan Cameron via
On Tue, 20 Dec 2022 14:27:31 -0500 Gregory Price wrote: > On Tue, Dec 20, 2022 at 03:34:53PM +, Jonathan Cameron wrote: > > > However I don't think this is successful in creating the dax devices, > > > and therefore the reconfiguring into ram. > > > > Sure. I only bothered testing the it

Re: [PATCH 01/10] ccid-card-emulated: fix cast warning/error

2023-01-03 Thread Thomas Huth
On 03/01/2023 12.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau ../hw/usb/ccid-card-emulated.c: In function 'handle_apdu_thread': ../hw/usb/ccid-card-emulated.c:251:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 251 |

Re: [PATCH 3/6] hw/intc: Extract the IRQ counting functions into a separate file

2023-01-03 Thread Bernhard Beschow
On Tue, Jan 3, 2023 at 9:48 AM Thomas Huth wrote: > These IRQ counting functions will soon be required in binaries that > do not include the APIC code, too, so let's extract them into a > separate file that can be linked independently of the APIC code. > > While we're at it, change the apic_*

Re: [PATCH 4/6] hw/rtc/mc146818rtc: Add a property for the availability of the slew tick policy

2023-01-03 Thread Philippe Mathieu-Daudé
On 3/1/23 09:47, Thomas Huth wrote: We want to get rid of the "#ifdef TARGET_I386" statements in the mc146818 code, so we need a different way to decide whether the slew tick policy is available or not. Introduce a new property "slew-tick-policy-available" which can be set by the machines that

Re: [PULL 00/24] QEMU patches for 2022-12-21

2023-01-03 Thread Peter Maydell
On Wed, 21 Dec 2022 at 18:02, Paolo Bonzini wrote: > > The following changes since commit d038d2645acabf6f52fd61baeaa021c3ebe97714: > > Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging > (2022-12-16 13:26:09 +) > > are available in the Git repository at: > >

Re: [PATCH v5 04/14] vfio/migration: Fix NULL pointer dereference bug

2023-01-03 Thread Avihai Horon
On 03/01/2023 13:13, Dr. David Alan Gilbert wrote: External email: Use caution opening links or attachments * Avihai Horon (avih...@nvidia.com) wrote: As part of its error flow, vfio_vmstate_change() accesses MigrationState->to_dst_file without any checks. This can cause a NULL pointer

Re: [PATCH v2 4/8] hw/cxl/events: Add event status register

2023-01-03 Thread Jonathan Cameron via
On Wed, 21 Dec 2022 20:24:34 -0800 Ira Weiny wrote: > The device status register block was defined. However, there were no > individual registers nor any data wired up. > > Define the event status register [CXL 3.0; 8.2.8.3.1] as part of the > device status register block. Wire up the

Re: [PATCH v2 7/8] bswap: Add the ability to store to an unaligned 24 bit field

2023-01-03 Thread Jonathan Cameron via
On Wed, 21 Dec 2022 20:24:37 -0800 Ira Weiny wrote: > CXL has 24 bit unaligned fields which need to be stored to. CXL is > specified as little endian. > > Define st24_le_p() and the supporting functions to store such a field > from a 32 bit host native value. > > The use of b, w, l, q as the

Re: [PATCH 0/2] hw/intc/arm_gicv3: Bump ITT entry size to 16

2023-01-03 Thread Peter Maydell
On Fri, 23 Dec 2022 at 08:50, Alexander Graf wrote: > > While trying to make Windows work with GICv3 emulation, I stumbled over > the fact that it only supports ITT entry sizes that are power of 2 sized. > > While the spec allows arbitrary sizes, in practice hardware will always > expose power of

Re: [RFC v4 2/3] memory: add depth assert in address_space_to_flatview

2023-01-03 Thread Peter Xu
Hi, Paolo, On Wed, Dec 28, 2022 at 09:27:50AM +0100, Paolo Bonzini wrote: > Il ven 23 dic 2022, 16:54 Peter Xu ha scritto: > > > > This is not valid because the transaction could happen in *another* > > thread. > > > In that case memory_region_transaction_depth() will be > 0, but RCU is > > >

Re: [RFC PATCH v5 14/52] hw/xen: Add xen_overlay device for emulating shared xenheap pages

2023-01-03 Thread Dr. David Alan Gilbert
* David Woodhouse (dw...@infradead.org) wrote: > From: David Woodhouse > > For the shared info page and for grant tables, Xen shares its own pages > from the "Xen heap" to the guest. The guest requests that a given page > from a certain address space (XENMAPSPACE_shared_info, etc.) be mapped >

Re: [PULL v2 0/6] testing updates

2023-01-03 Thread Alex Bennée
Peter Maydell writes: > On Fri, 23 Dec 2022 at 17:21, Alex Bennée wrote: >> >> The following changes since commit 222059a0fccf4af3be776fe35a5ea2d6a68f9a0b: >> >> Merge tag 'pull-ppc-20221221' of https://gitlab.com/danielhb/qemu >> into staging (2022-12-21 18:08:09 +) >> >> are available

[RFC PATCH 29/40] target/arm: Remove m-profile has_vfp and has_dsp properties

2023-01-03 Thread Richard Henderson
Replace the properties with separate cpu classes that have these features disabled. These stand in the way of moving all id-register properties to the cpu class level, because of the case of SSE200, which has one cortex-m33 with dsp+vfp and one without. Create the full set of m-profile cpus with

[RFC PATCH 36/40] target/arm: Move "has_el3" to class property

2023-01-03 Thread Richard Henderson
With the movement of the property, we can remove the field from the cpu entirely, using only the class. Signed-off-by: Richard Henderson --- target/arm/cpu-qom.h | 2 ++ target/arm/cpu.h | 2 -- hw/arm/allwinner-h3.c | 5 ++- hw/arm/exynos4210.c | 18 +- hw/arm/integratorcp.c

[RFC PATCH 37/40] target/arm: Move "cfgend" to class property

2023-01-03 Thread Richard Henderson
Remove the cfgend variable entirely and reuse the property accessor functions created for reset-hivecs. This removes the last setting of cpu->reset_sctlr, to we can remove that as well, using only the class value. Signed-off-by: Richard Henderson --- target/arm/cpu.h| 8

[RFC PATCH 07/40] target/arm: Create TYPE_ARM_V7M_CPU

2023-01-03 Thread Richard Henderson
Create a new intermediate abstract class for v7m, like we do for aarch64. The initialization of ARMCPUClass.info follows the concrete class, so remove that init from arm_v7m_class_init. Signed-off-by: Richard Henderson --- target/arm/cpu-qom.h | 6 ++ target/arm/cpu_tcg.c | 36

[RFC PATCH 13/40] hw/arm/bcm2836: Set mp-affinity property in realize

2023-01-03 Thread Richard Henderson
There was even a TODO comment that we ought to be using a cpu property, but we failed to update when the property was added. Use ARM_AFF1_SHIFT instead of the bare constant 8. Signed-off-by: Richard Henderson --- hw/arm/bcm2836.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)

Re: [PATCH] hw/pci: Display correct size for unmapped BARs in HMP 'info pci'

2023-01-03 Thread Philippe Mathieu-Daudé
On 3/1/23 20:39, Philippe Mathieu-Daudé wrote: On 3/1/23 18:39, BALATON Zoltan wrote: On Tue, 3 Jan 2023, Philippe Mathieu-Daudé wrote: When a BAR is not mapped, the displayed size is shifted by 1 byte:  (qemu) info pci    ...    Bus  0, device  11, function 0: Ethernet controller: PCI

Re: [PATCH] memory: Do not print MR priority in flatview HMP output

2023-01-03 Thread Peter Xu
On Wed, Dec 28, 2022 at 02:04:39PM +0100, Philippe Mathieu-Daudé wrote: > When requesting the flatview output with 'info mtree -f', > the MemoryRegion priority is irrelevant and noise. Remove it. It is in many cases still helpful debugging information to me. Maybe it's because it can cause

Re: [PATCH 0/6] Resolve TYPE_PIIX3_XEN_DEVICE

2023-01-03 Thread Bernhard Beschow
Am 3. Januar 2023 17:25:35 UTC schrieb Chuck Zmudzinski : >On 1/3/2023 8:38 AM, Bernhard Beschow wrote: >> >> >> On Tue, Jan 3, 2023 at 2:17 PM Philippe Mathieu-Daudé >> wrote: >> >> Hi Chuck, >> >> On 3/1/23 04:15, Chuck Zmudzinski wrote: >> > On 1/2/23 4:34 PM, Bernhard Beschow

Re: [PATCH v2 2/5] target/riscv: Update VS timer whenever htimedelta changes

2023-01-03 Thread Anup Patel
Hi Alistair, On Wed, Dec 28, 2022 at 11:08 AM Alistair Francis wrote: > > On Fri, Dec 23, 2022 at 11:14 PM Anup Patel wrote: > > > > On Thu, Dec 15, 2022 at 8:55 AM Alistair Francis > > wrote: > > > > > > On Mon, Dec 12, 2022 at 9:12 PM Anup Patel > > > wrote: > > > > > > > > On Mon, Dec

Re: [PATCH v2 3/8] hw/cxl/mailbox: Use new UUID network order define for cel_uuid

2023-01-03 Thread Jonathan Cameron via
On Wed, 21 Dec 2022 20:24:33 -0800 Ira Weiny wrote: > The cel_uuid was programatically generated previously because there was > no static initializer for network order UUIDs. > > Use the new network order initializer for cel_uuid. Adjust > cxl_initialize_mailbox() because it can't fail now. >

[PATCH] hw/pci: Display correct size for unmapped BARs in HMP 'info pci'

2023-01-03 Thread Philippe Mathieu-Daudé
When a BAR is not mapped, the displayed size is shifted by 1 byte: (qemu) info pci ... Bus 0, device 11, function 0: Ethernet controller: PCI device 1022:2000 PCI subsystem : IRQ 10, pin A BAR0: I/O at 0x [0x001e]. BAR1: 32

Re: [PATCH v3] intel-iommu: Document iova_tree

2023-01-03 Thread Peter Xu
On Mon, Dec 26, 2022 at 12:09:52PM +0800, Jason Wang wrote: > On Sat, Dec 24, 2022 at 12:26 AM Peter Xu wrote: > > > > On Fri, Dec 23, 2022 at 03:48:01PM +0800, Jason Wang wrote: > > > On Wed, Dec 7, 2022 at 6:13 AM Peter Xu wrote: > > > > > > > > It seems not super clear on when iova_tree is

Re: [PATCH] Update scripts/meson-buildoptions.sh

2023-01-03 Thread Peter Maydell
On Tue, 3 Jan 2023 at 16:12, Alessandro Di Federico wrote: > > On Tue, 3 Jan 2023 10:51:36 -0500 > Stefan Hajnoczi wrote: > > > QEMU's Makefile used to a use a technique where it generated > > "timestamp" files and used cmp(1) to check if rebuilding was > > necessary: > > 1. Always generate

Re: [RFC PATCH v5 21/52] i386/xen: handle VCPUOP_register_vcpu_info

2023-01-03 Thread Dr. David Alan Gilbert
* David Woodhouse (dw...@infradead.org) wrote: > From: Joao Martins > > Handle the hypercall to set a per vcpu info, and also wire up the default > vcpu_info in the shared_info page for the first 32 vCPUs. > > To avoid deadlock within KVM a vCPU thread must set its *own* vcpu_info > rather than

[RFC PATCH 20/40] target/arm: Merge kvm64.c with kvm.c

2023-01-03 Thread Richard Henderson
With appropriate sorting of functions, this allows quite a number of prototypes to be removed from kvm_arm.h, and the corresponding functions made static. Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 190 target/arm/kvm.c | 2048

[RFC PATCH 19/40] target/arm: Move most cpu initialization to the class

2023-01-03 Thread Richard Henderson
Quite a lot of the cpu definition is constant, and can be initialized once with the type, rather than for each object instance. For now, leave the "host" cpu with the object init. Note that the "max" class (and even a converted "host") must be delayed until accellerator init, which itself is

[RFC PATCH 15/40] target/arm: Create arm_cpu_mp_affinity

2023-01-03 Thread Richard Henderson
Wrapper to return the mp affinity bits from the cpu. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 5 + hw/arm/virt-acpi-build.c | 2 +- hw/arm/virt.c | 6 +++--- hw/arm/xlnx-versal-virt.c | 3 ++- hw/misc/xlnx-versal-crl.c | 4 ++-- target/arm/arm-powerctl.c

Re: [PATCH v6] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-03 Thread Chuck Zmudzinski
On 1/3/2023 10:14 AM, Alex Williamson wrote: > On Mon, 2 Jan 2023 18:10:24 -0500 > Chuck Zmudzinski wrote: > > > On 1/2/23 12:46 PM, Michael S. Tsirkin wrote: > > > On Sun, Jan 01, 2023 at 06:52:03PM -0500, Chuck Zmudzinski wrote: > > > > Intel specifies that the Intel IGD must occupy slot 2 on

Re: [PATCH v6] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-03 Thread Chuck Zmudzinski
On 1/3/2023 4:50 PM, Chuck Zmudzinski wrote: > On 1/3/2023 10:14 AM, Alex Williamson wrote: > > On Mon, 2 Jan 2023 18:10:24 -0500 > > Chuck Zmudzinski wrote: > > > > > On 1/2/23 12:46 PM, Michael S. Tsirkin wrote: > > > > On Sun, Jan 01, 2023 at 06:52:03PM -0500, Chuck Zmudzinski wrote: > > > >

Re: [RFC PATCH 00/40] Toward class init of cpu features

2023-01-03 Thread Richard Henderson
On 1/3/23 10:16, Richard Henderson wrote: Richard Henderson (40): target/arm: Remove aarch64_cpu_finalizefn target/arm: Create arm_cpu_register_parent target/arm: Remove AArch64CPUClass target/arm: Create TYPE_ARM_V7M_CPU ... target/arm: Utilize arm-cpu instance_post_init hook

[PATCH] Windows installer: keep dependency cache

2023-01-03 Thread Arthur Sengileyev
It should be possible to reuse cache built by previous iteration processing next executables. Already processed dependencies are already skipped later based on dll name. Signed-off-by: Arthur Sengileyev --- scripts/nsis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v10 2/9] KVM: Introduce per-page memory attributes

2023-01-03 Thread Sean Christopherson
On Tue, Jan 03, 2023, Wang, Wei W wrote: > On Tuesday, January 3, 2023 9:40 AM, Chao Peng wrote: > > > Because guest memory defaults to private, and now this patch stores > > > the attributes with KVM_MEMORY_ATTRIBUTE_PRIVATE instead of > > _SHARED, > > > it would bring more KVM_EXIT_MEMORY_FAULT

Re: [PATCH] Update scripts/meson-buildoptions.sh

2023-01-03 Thread Alessandro Di Federico via
On Tue, 3 Jan 2023 10:51:36 -0500 Stefan Hajnoczi wrote: > QEMU's Makefile used to a use a technique where it generated > "timestamp" files and used cmp(1) to check if rebuilding was > necessary: > 1. Always generate meson-buildoptions.sh-timestamp. `meson-buildoptions.sh-timestamp` would be

Re: [PATCH 0/6] Resolve TYPE_PIIX3_XEN_DEVICE

2023-01-03 Thread Chuck Zmudzinski
On 1/3/2023 8:38 AM, Bernhard Beschow wrote: > > > On Tue, Jan 3, 2023 at 2:17 PM Philippe Mathieu-Daudé > wrote: > > Hi Chuck, > > On 3/1/23 04:15, Chuck Zmudzinski wrote: > > On 1/2/23 4:34 PM, Bernhard Beschow wrote: > >> This series first renders TYPE_PIIX3_XEN_DEVICE

[RFC PATCH 28/40] target/arm: Split out xscale*_class_init

2023-01-03 Thread Richard Henderson
Use two intermediate functions to share code between the 13 variants of pxa*_class_init. Signed-off-by: Richard Henderson --- target/arm/cpu_tcg.c | 81 +--- 1 file changed, 23 insertions(+), 58 deletions(-) diff --git a/target/arm/cpu_tcg.c

  1   2   >