Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent

2022-12-09 Thread Thomas Huth
On 07/12/2022 16.29, Mark Cave-Ayland wrote: On 06/12/2022 20:06, Thomas Huth wrote: The only code that is really, really target dependent is the apic-related code in rtc_policy_slew_deliver_irq(). By moving this code into the hw/i386/ folder (renamed to rtc_apic_policy_slew_deliver_irq()) and

[RFC PATCH v2 00/22] Xen HVM support under KVM

2022-12-09 Thread David Woodhouse
Continuing the revival of Oracle's work at https://github.com/jpemartins/qemu/commits/xen-shim-rfc to work against the Xen guest support as it was finally merged into the kernel, and updated to today's QEMU. When complete, this will allow us to run native Xen guests on top of Linux/KVM without

[RFC PATCH v2 02/22] xen: add CONFIG_XENFV_MACHINE and CONFIG_XEN_EMU options for Xen emulation

2022-12-09 Thread David Woodhouse
From: David Woodhouse The XEN_EMU option will cover core Xen support in target/, which exists only for x86 with KVM today but could theoretically also be implemented on Arm/Aarch64 and with TCG or other accelerators. It will also cover the support for architecture-independent grant table and

[RFC PATCH v2 21/22] i386/xen: implement HYPERVISOR_event_channel_op

2022-12-09 Thread David Woodhouse
From: Joao Martins Additionally set XEN_INTERFACE_VERSION to most recent in order to exercise both event_channel_op and event_channel_op_compat. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse --- target/i386/xen.c | 45 + 1 file

[RFC PATCH v2 14/22] i386/xen: implement HYPERVISOR_hvm_op

2022-12-09 Thread David Woodhouse
From: Joao Martins This is when guest queries for support for HVMOP_pagetable_dying. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse --- target/i386/xen.c | 17 + 1 file changed, 17 insertions(+) diff --git a/target/i386/xen.c b/target/i386/xen.c index

[RFC PATCH v2 19/22] i386/xen: implement HVMOP_set_evtchn_upcall_vector

2022-12-09 Thread David Woodhouse
From: Ankur Arora The HVMOP_set_evtchn_upcall_vector hypercall sets the per-vCPU upcall vector, to be delivered to the local APIC just like an MSI (with an EOI). This takes precedence over the system-wide delivery method set by the HVMOP_set_param hypercall with HVM_PARAM_CALLBACK_IRQ. It's

[PATCH] linux-user: Enhance strace output for various syscalls

2022-12-09 Thread Helge Deller
Add appropriate strace printf formats for various Linux syscalls. Signed-off-by: Helge Deller --- linux-user/strace.list | 43 ++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/linux-user/strace.list b/linux-user/strace.list index

[PATCH-for-8.0 v3 0/2] physmem: Remove trace events from trace-root.h

2022-12-09 Thread Philippe Mathieu-Daudé
Trivial housekeeping patches. Philippe Mathieu-Daudé (2): physmem: Remove unused "exec/translate-all.h" physmem: Remove trace events from trace-root.h softmmu/physmem.c| 3 +-- softmmu/trace-events | 5 + trace-events | 5 - 3 files changed, 6 insertions(+), 7

[PATCH-for-8.0 v3 2/2] physmem: Remove trace events from trace-root.h

2022-12-09 Thread Philippe Mathieu-Daudé
Missed in d9f24bf572 ("exec: split out non-softmmu-specific parts"). Signed-off-by: Philippe Mathieu-Daudé --- softmmu/physmem.c| 2 +- softmmu/trace-events | 5 + trace-events | 5 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/softmmu/physmem.c

[PATCH-for-8.0 v3 1/2] physmem: Remove unused "exec/translate-all.h"

2022-12-09 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- softmmu/physmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 1b606a3002..d562c0bb93 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -58,7 +58,6 @@ #include "qemu/rcu_queue.h" #include

[PATCH v2] scripts/archive-source: Use GNU tar on Darwin

2022-12-09 Thread Philippe Mathieu-Daudé
When using the archive-source.sh script on Darwin we get: tar: Option --concatenate is not supported Usage: List:tar -tf Extract: tar -xf Create: tar -cf [filenames...] Help:tar --help 'tar' default to the BSD implementation: $ tar --version bsdtar 3.5.3 -

[PATCH 12/30] modinfo: lookup compile_commands.json by object

2022-12-09 Thread Paolo Bonzini
With Meson 0.63 having fixed various issues with extract_objects, the compile_commands.json lookups can be simplified. If the lookup uses the object file as key, there is no need to use the command line to distinguish among all entries for a given source. Cc: Gerd Hoffmann Signed-off-by: Paolo

Re: [PATCH 02/30] configure: remove dead function

2022-12-09 Thread Peter Maydell
On Fri, 9 Dec 2022 at 11:25, Paolo Bonzini wrote: > > Signed-off-by: Paolo Bonzini > --- > configure | 4 > 1 file changed, 4 deletions(-) > > diff --git a/configure b/configure > index e31d4522ea63..543fd5a48bf0 100755 > --- a/configure > +++ b/configure > @@ -210,10 +210,6 @@ version_ge

[PATCH 25/30] build: move warning flag selection to meson

2022-12-09 Thread Paolo Bonzini
Meson already knows to test with the positive form of the flag, which simplifies the test. Warnings are now tested explicitly for the C++ compiler, instead of hardcoding those that are only available for the C language. At this point all compiler flags in QEMU_CFLAGS are global and only depend

[PATCH] target/mips: Add nanoMIPS ISA support in QEMU

2022-12-09 Thread Milica Lazarevic
nanoMIPS ISA support is planned to be maintained. Signed-off-by: Milica Lazarevic --- MAINTAINERS | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6966490c94..66e083b455 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -237,10 +237,16 @@ R:

[PATCH v12 1/1] vhost-vdpa: add support for vIOMMU

2022-12-09 Thread Cindy Lu
1.Skip the check in vhost_vdpa_listener_skipped_section() while MR is IOMMU, Move this check to vhost_vdpa_iommu_map_notify() 2.Add support for vIOMMU. Add the new function to deal with iommu MR. - during iommu_region_add register a specific IOMMU notifier, and store all notifiers in a list. -

[PATCH v12 0/1] vhost-vdpa: add support for vIOMMU

2022-12-09 Thread Cindy Lu
These patches are to support vIOMMU in vdpa device Verified in vp_vdpa/vdpa_sim_net driverand intel_iommu virtio-iommu device changes in V3 1. Move function vfio_get_xlat_addr to memory.c 2. Use the existing memory listener, while the MR is iommu MR then call the function iommu_region_add/

Re: [PATCH 3/5] include/hw/pci: Clean up a few things checkpatch.pl would flag

2022-12-09 Thread Philippe Mathieu-Daudé
On 9/12/22 14:48, Markus Armbruster wrote: Fix a few style violations so that checkpatch.pl won't complain when I move this code. Signed-off-by: Markus Armbruster --- include/hw/pci/pci.h | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) Reviewed-by: Philippe

Re: [PATCH v10 6/9] KVM: Unmap existing mappings when change the memory attributes

2022-12-09 Thread Fuad Tabba
Hi, On Thu, Dec 8, 2022 at 11:18 AM Chao Peng wrote: > > On Wed, Dec 07, 2022 at 05:16:34PM +, Fuad Tabba wrote: > > Hi, > > > > On Fri, Dec 2, 2022 at 6:19 AM Chao Peng > > wrote: > > > > > > Unmap the existing guest mappings when memory attribute is changed > > > between shared and

Re: [PATCH] blockdev: add 'media=cdrom' argument to support usb cdrom emulated as cdrom

2022-12-09 Thread Paolo Bonzini
On 12/9/22 03:28, Zhipeng Lu wrote: Thanks.  -device usb-bot,id=bot0  -device scsi-{cd,hd},bus=bot0.0,drive=drive0 Qemu implements virtio scsi to emulate scsi controller, but if the virtual machine(for example windows guest os) don't install the virtio scsi driver, it don't work i need the

[PATCH-for-8.0 3/5] accel/tcg: Rename tb_invalidate_phys_page_[locked_]fast()

2022-12-09 Thread Philippe Mathieu-Daudé
Emphasize this function is called with pages locked. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cputlb.c | 2 +- accel/tcg/internal.h | 6 +++--- accel/tcg/tb-maint.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c

[PATCH-for-8.0 2/5] accel/tcg: Remove trace events from trace-root.h

2022-12-09 Thread Philippe Mathieu-Daudé
Commit d9bb58e510 ("tcg: move tcg related files into accel/tcg/ subdirectory") introduced accel/tcg/trace-events, so we don't need to use the root trace-events anymore. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cputlb.c | 2 +- accel/tcg/trace-events | 4 trace-events

[PATCH-for-8.0 4/5] accel/tcg: Factor tb_invalidate_phys_range_fast() out

2022-12-09 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cputlb.c | 5 + accel/tcg/internal.h | 3 +++ accel/tcg/tb-maint.c | 21 + 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 6402fe11c1..03674d598f 100644

[PATCH-for-8.0 1/5] accel/tcg: Restrict cpu_io_recompile() to system emulation

2022-12-09 Thread Philippe Mathieu-Daudé
Missed in commit 6526919224 ("accel/tcg: Restrict cpu_io_recompile() from other accelerators"). Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h index

[PATCH-for-8.0 0/5] accel/tcg: Restrict page_collection structure to system TB maintainance

2022-12-09 Thread Philippe Mathieu-Daudé
Few cleanups noticed while reviewing Richard's "Rewrite user-only vma tracking" v3 ([*], based on top of it). - Move accel/tcg/ trace events out of trace-root.h - Refactor tb_invalidate_phys_range_fast() to restrict page_collection to sysemu. [*]

[RFC PATCH v2 07/22] pc_piix: handle XEN_EMULATE backend init

2022-12-09 Thread David Woodhouse
From: Joao Martins And use newly added xen_emulated_machine_init() to iniitalize the xenstore and the sysdev bus for future emulated devices. Signed-off-by: Joao Martins [dwmw2: Move it to xen-legacy-backend.c] Signed-off-by: David Woodhouse --- hw/i386/pc_piix.c | 5 +

[PATCH 11/30] meson: cleanup dummy-cpus.c rules

2022-12-09 Thread Paolo Bonzini
Now that qtest is available on all targets including Windows, dummy-cpus.c is included unconditionally in the build. Signed-off-by: Paolo Bonzini --- accel/meson.build | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/accel/meson.build b/accel/meson.build index

Re: [PATCH-for-8.0 v3 1/2] physmem: Remove unused "exec/translate-all.h"

2022-12-09 Thread Peter Maydell
On Fri, 9 Dec 2022 at 11:07, Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé > --- > softmmu/physmem.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/softmmu/physmem.c b/softmmu/physmem.c > index 1b606a3002..d562c0bb93 100644 > --- a/softmmu/physmem.c > +++

[PATCH 01/30] configure: remove useless write_c_skeleton

2022-12-09 Thread Paolo Bonzini
This is not needed ever since QEMU stopped detecting -liberty; this happened with the Meson switch but it is quite likely that the library was not really necessary years before. Signed-off-by: Paolo Bonzini --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure

[PATCH 4/5] include/hw/pci: Split pci_device.h off pci.h

2022-12-09 Thread Markus Armbruster
PCIDeviceClass and PCIDevice are defined in pci.h. Many users of the header don't actually need them. Similar structs live in their own headers: PCIBusClass and PCIBus in pci_bus.h, PCIBridge in pci_bridge.h, PCIHostBridgeClass and PCIHostState in pci_host.h, PCIExpressHost in pcie_host.h, and

[PATCH 1/5] include/hw/pci: Clean up superfluous inclusion of pci*/*.h cxl/*.h

2022-12-09 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/alpha/alpha_sys.h | 1 - hw/rdma/rdma_utils.h | 1 - hw/rdma/vmw/pvrdma.h | 1 - hw/usb/hcd-ehci.h | 1 - hw/xen/xen_pt.h | 1 - include/hw/cxl/cxl.h | 1 -

[PATCH 3/5] include/hw/pci: Clean up a few things checkpatch.pl would flag

2022-12-09 Thread Markus Armbruster
Fix a few style violations so that checkpatch.pl won't complain when I move this code. Signed-off-by: Markus Armbruster --- include/hw/pci/pci.h | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index

[PATCH 5/5] include/hw/pci: Include hw/pci/pci.h where needed

2022-12-09 Thread Markus Armbruster
hw/pci/pcie_sriov.h needs PCI_NUM_REGIONS. Without the previous commit, this would close an inclusion loop: hw/pci/pci.h used to include hw/pci/pcie.h for PCIExpressDevice, which includes pcie_sriov.h for PCIESriovPF, which now includes hw/pci/pci.h for PCI_NUM_REGIONS. Signed-off-by: Markus

[PATCH 0/5] include/hw/pci include/hw/cxl: Clean up includes

2022-12-09 Thread Markus Armbruster
Back in 2016, we discussed[1] rules for headers, and these were generally liked: 1. Have a carefully curated header that's included everywhere first. We got that already thanks to Peter: osdep.h. 2. Headers should normally include everything they need beyond osdep.h. If exceptions are

[PATCH 2/5] include/hw/cxl: Include hw/cxl/*.h where needed

2022-12-09 Thread Markus Armbruster
hw/cxl/cxl_component.h needs CDATObject from hw/cxl/cxl_cdat.h. hw/cxl/cxl_device.h needs CXLComponentState from hw/cxl/cxl_component.h. Signed-off-by: Markus Armbruster --- include/hw/cxl/cxl_component.h | 1 + include/hw/cxl/cxl_device.h| 1 + 2 files changed, 2 insertions(+) diff --git

Re: [PATCH 5/5] include/hw/pci: Include hw/pci/pci.h where needed

2022-12-09 Thread Philippe Mathieu-Daudé
On 9/12/22 14:48, Markus Armbruster wrote: hw/pci/pcie_sriov.h needs PCI_NUM_REGIONS. Without the previous commit, this would close an inclusion loop: hw/pci/pci.h used to include hw/pci/pcie.h for PCIExpressDevice, which includes pcie_sriov.h for PCIESriovPF, which now includes hw/pci/pci.h

Re: [PATCH v10 9/9] KVM: Enable and expose KVM_MEM_PRIVATE

2022-12-09 Thread Fuad Tabba
Hi, On Fri, Dec 2, 2022 at 6:20 AM Chao Peng wrote: > > Register/unregister private memslot to fd-based memory backing store > restrictedmem and implement the callbacks for restrictedmem_notifier: > - invalidate_start()/invalidate_end() to zap the existing memory > mappings in the KVM page

[RFC PATCH v2 08/22] xen_platform: exclude vfio-pci from the PCI platform unplug

2022-12-09 Thread David Woodhouse
From: Joao Martins Such that PCI passthrough devices work for Xen emulated guests. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse --- hw/i386/xen/xen_platform.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/hw/i386/xen/xen_platform.c

[RFC PATCH v2 04/22] i386/kvm: handle Xen HVM cpuid leaves

2022-12-09 Thread David Woodhouse
From: Joao Martins Introduce support for emulating CPUID for Xen HVM guests. It doesn't make sense to advertise the KVM leaves to a Xen guest, so do it unconditionally when the xen-version machine property is set. Signed-off-by: Joao Martins [dwmw2: Obtain xen_version from machine property,

Re: [PATCH 03/30] configure: remove useless test

2022-12-09 Thread Peter Maydell
On Fri, 9 Dec 2022 at 11:25, Paolo Bonzini wrote: > > $cpu is derived from preprocessor defines rather than uname these days, > so do not bother using isainfo on Solaris. Likewise do not recognize > BeOS's uname -m output. > > Signed-off-by: Paolo Bonzini > --- > configure | 12 +--- >

Re: [PATCH 01/30] configure: remove useless write_c_skeleton

2022-12-09 Thread Peter Maydell
On Fri, 9 Dec 2022 at 11:26, Paolo Bonzini wrote: > > This is not needed ever since QEMU stopped detecting -liberty; this > happened with the Meson switch but it is quite likely that the > library was not really necessary years before. > > Signed-off-by: Paolo Bonzini > --- > configure | 1 - >

[PATCH 24/30] build: move stack protector flag selection to meson

2022-12-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 44 ++- meson.build | 28 +- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 34 insertions(+), 43 deletions(-)

Re: [RFC PATCH] test-bdrv-drain: keep graph manipulations out of coroutines

2022-12-09 Thread Emanuele Giuseppe Esposito
Am 09/12/2022 um 13:18 schrieb Emanuele Giuseppe Esposito: > > > Am 05/12/2022 um 14:01 schrieb Kevin Wolf: >> Am 02.12.2022 um 18:22 hat Paolo Bonzini geschrieben: >>> On 12/2/22 14:42, Emanuele Giuseppe Esposito wrote: Am 02/12/2022 um 14:27 schrieb Paolo Bonzini: >

Re: [RFC PATCH] test-bdrv-drain: keep graph manipulations out of coroutines

2022-12-09 Thread Emanuele Giuseppe Esposito
Am 05/12/2022 um 14:01 schrieb Kevin Wolf: > Am 02.12.2022 um 18:22 hat Paolo Bonzini geschrieben: >> On 12/2/22 14:42, Emanuele Giuseppe Esposito wrote: >>> >>> >>> Am 02/12/2022 um 14:27 schrieb Paolo Bonzini: Changes to the BlockDriverState graph will have to take the corresponding

Re: [PATCH 19/30] configure, meson: move --enable-debug-info to Meson

2022-12-09 Thread Philippe Mathieu-Daudé
On 9/12/22 12:23, Paolo Bonzini wrote: Older versions of Meson had an unclear description of the -Ddebug option, but this is fixed in 0.63.0 that is required now. Signed-off-by: Paolo Bonzini --- configure | 5 - scripts/meson-buildoptions.py | 2 ++

Re: [PATCH v2 for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent

2022-12-09 Thread Philippe Mathieu-Daudé
On 9/12/22 12:15, Thomas Huth wrote: The only reason for this code being target dependent is the apic-related code in rtc_policy_slew_deliver_irq(). Since these apic functions are rather simple, we can easily move them into a new, separate file (apic_irqcount.c) which will always be compiled and

Re: [PATCH v15 1/6] qmp: add QMP command x-query-virtio

2022-12-09 Thread Jonah Palmer
On 12/7/22 08:22, Markus Armbruster wrote: Jonah Palmer writes: On 12/2/22 10:21, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 2/12/22 13:23, Jonah Palmer wrote: On 11/30/22 11:16, Philippe Mathieu-Daudé wrote: Hi, On 11/8/22 14:24, Jonah Palmer wrote: From: Laurent

Re: [PATCH v10 8/9] KVM: Handle page fault for private memory

2022-12-09 Thread Fuad Tabba
Hi, On Fri, Dec 2, 2022 at 6:19 AM Chao Peng wrote: > > A KVM_MEM_PRIVATE memslot can include both fd-based private memory and > hva-based shared memory. Architecture code (like TDX code) can tell > whether the on-going fault is private or not. This patch adds a > 'is_private' field to

[PATCH-for-8.0] target/arm: Restrict arm_cpu_exec_interrupt() to TCG accelerator

2022-12-09 Thread Philippe Mathieu-Daudé
When building with --disable-tcg on Darwin we get: target/arm/cpu.c:725:16: error: incomplete definition of type 'struct TCGCPUOps' cc->tcg_ops->do_interrupt(cs); ~~~^ Commit 083afd18a9 ("target/arm: Restrict cpu_exec_interrupt() handler to sysemu") limited this block to

[PATCH 10/30] meson: remove static_kwargs

2022-12-09 Thread Paolo Bonzini
After static_kwargs has been changed to an empty dictionary, it has no functional effect and can be removed. Signed-off-by: Paolo Bonzini --- meson.build | 212 +++- tcg/meson.build | 2 +- 2 files changed, 84 insertions(+), 130 deletions(-)

[PATCH 13/30] configure: remove backwards-compatibility code

2022-12-09 Thread Paolo Bonzini
The cmd_line.txt mangling is only needed when rebuilding from very old trees and is kept mostly as an example of how to extend it. However, Meson 0.63 introduces a deprecation mechanism for meson_options.txt that can be used instead, so get rid of our home-grown hack. Signed-off-by: Paolo

[PATCH 28/30] docs: update build system docs

2022-12-09 Thread Paolo Bonzini
Now that configure is only doing compiler and host setup, adjust the relevant documentation. It is also possible to build emulators with ninja directly if one is so inclined. Signed-off-by: Paolo Bonzini --- docs/devel/build-system.rst | 275 +--- 1 file

[PATCH 14/30] configure: test all warnings

2022-12-09 Thread Paolo Bonzini
Some warnings are hardcoded in QEMU_CFLAGS and not tested. There is no particular reason to single out these five, as many more -W flags are present on all the supported compilers. For homogeneity when moving the detection to meson, make them use the same warn_flags infrastructure.

[PATCH 29/30] configure: do not rerun the tests with -Werror

2022-12-09 Thread Paolo Bonzini
Tests run in configure are pretty trivial at this point, so do not bother with the extra complication of running tests both with and without -Werror. Signed-off-by: Paolo Bonzini --- configure | 35 +-- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git

[PATCH 05/30] configure: remove backwards-compatibility and obsolete options

2022-12-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 20 1 file changed, 20 deletions(-) diff --git a/configure b/configure index 4d14ff9c319c..adfff30a6204 100755 --- a/configure +++ b/configure @@ -838,17 +838,6 @@ for opt do ;; --with-coroutine=*) coroutine="$optarg" ;;

Re: [PATCH 16/30] build: move glib detection and workarounds to meson

2022-12-09 Thread Philippe Mathieu-Daudé
On 9/12/22 12:23, Paolo Bonzini wrote: QEMU adds the path to glib.h is added to all compilation commands. add/add/ not clear... Otherwise: Reviewed-by: Philippe Mathieu-Daudé This is simpler due to the pervasive use of static_library, and was grandfathered in from the previous Make-based

Re: [PATCH v1 02/24] vfio-user: add VFIO base abstract class

2022-12-09 Thread John Levon
On Tue, Nov 08, 2022 at 03:13:24PM -0800, John Johnson wrote: > Add an abstract base class both the kernel driver > and user socket implementations can use to share code. LGTM Reviewed-by: John Levon regards john

Re: [PATCH 19/30] configure, meson: move --enable-debug-info to Meson

2022-12-09 Thread Paolo Bonzini
On 12/9/22 13:55, Philippe Mathieu-Daudé wrote: +  printf "%s\n" '  --disable-debug-info Enable debug symbols and other information' We should get '--enable-debug-info' here, ...     printf "%s\n" '  --disable-install-blobs  install provided firmware blobs' ... and here. Do we have a

Re: [PATCH 27/30] build: move compiler version check to meson

2022-12-09 Thread Paolo Bonzini
On 12/9/22 12:52, Peter Maydell wrote: The new code makes it much harder to move our compiler version requirements forward in future, because there's no longer a simple "check for normal clang X or apple clang Y" test where we can bump up X and Y based on what's provided in the various host

Re: [PATCH v1 04/24] vfio-user: add region cache

2022-12-09 Thread John Levon
On Tue, Nov 08, 2022 at 03:13:26PM -0800, John Johnson wrote: > cache VFIO_DEVICE_GET_REGION_INFO results to reduce > memory alloc/free cycles and as prep work for vfio-user LGTM Reviewed-by: John Levon regards john

[RFC PATCH v2 03/22] i386/xen: Add xen-version machine property and init KVM Xen support

2022-12-09 Thread David Woodhouse
From: David Woodhouse This is a machine property for two main reasons. One is that it allows us to set it in default_machine_opts for the xenfv platform when not running on actual Xen. The other is that theoretically we *could* do this with TCG too; we'd just have to implement a bunch of the

[RFC PATCH v2 22/22] i386/xen: implement HYPERVISOR_sched_op

2022-12-09 Thread David Woodhouse
From: Joao Martins It allows to shutdown itself via hypercall with any of the 3 reasons: 1) self-reboot 2) shutdown 3) crash Implementing SCHEDOP_shutdown sub op let us handle crashes gracefully rather than leading to triple faults if it remains unimplemented. Signed-off-by: Joao Martins

[RFC PATCH v2 10/22] i386/xen: handle guest hypercalls

2022-12-09 Thread David Woodhouse
From: Joao Martins This means handling the new exit reason for Xen but still crashing on purpose. As we implement each of the hypercalls we will then return the right return code. Signed-off-by: Joao Martins [dwmw2: Add CPL to hypercall tracing, disallow hypercalls from CPL > 0] Signed-off-by:

[RFC PATCH v2 15/22] i386/xen: implement HYPERVISOR_vcpu_op

2022-12-09 Thread David Woodhouse
From: Joao Martins This is simply when guest tries to register a vcpu_info and since vcpu_info placement is optional in the minimum ABI therefore we can just fail with -ENOSYS Signed-off-by: Joao Martins Signed-off-by: David Woodhouse --- target/i386/xen.c | 25 + 1

[RFC PATCH v2 12/22] hw/xen: Add xen_overlay device for emulating shared xenheap pages

2022-12-09 Thread David Woodhouse
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 to a given GPA using the XENMEM_add_to_physmap hypercall.

[RFC PATCH v2 13/22] i386/xen: implement HYPERVISOR_memory_op

2022-12-09 Thread David Woodhouse
From: Joao Martins Specifically XENMEM_add_to_physmap with space XENMAPSPACE_shared_info to allow the guest to set its shared_info page. Signed-off-by: Joao Martins [dwmw2: Use the xen_overlay device] Signed-off-by: David Woodhouse --- target/i386/trace-events | 1 + target/i386/xen.c

[RFC PATCH v2 17/22] i386/xen: handle VCPUOP_register_vcpu_time_info

2022-12-09 Thread David Woodhouse
From: Joao Martins In order to support Linux vdso in Xen. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse --- target/i386/cpu.h | 1 + target/i386/kvm/kvm.c | 9 ++ target/i386/machine.c | 4 ++- target/i386/xen.c | 70 --- 4

[PATCH 15/30] meson: cleanup compiler detection

2022-12-09 Thread Paolo Bonzini
Detect all compilers at the beginning of meson.build, and store the available languages in an array. Signed-off-by: Paolo Bonzini --- meson.build | 62 ++--- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/meson.build b/meson.build

[PATCH 20/30] meson: prepare move of QEMU_CFLAGS to meson

2022-12-09 Thread Paolo Bonzini
Clean up the handling of compiler flags in meson.build, splitting the general flags that should be included in subprojects as well, from warning flags that only apply to QEMU itself. The two were mixed in both configure tests and meson tests. This split makes it easier to move the compiler tests

[PATCH 07/30] meson: support meson 0.64 -Doptimization=plain

2022-12-09 Thread Paolo Bonzini
In Meson 0.64, the optimization built-in option now accepts the "plain" value, which will not set any optimization flags. While QEMU does not check the contents of the option and therefore does not suffer any ill effect from the new value, it uses get_option to print the optimization flags in the

[PATCH 06/30] meson: tweak hardening options for Windows

2022-12-09 Thread Paolo Bonzini
-Wl,--dynamicbase has been enabled for DLLs upstream for roughly 2 years (https://sourceware.org/bugzilla/show_bug.cgi?id=19011), and also by some distros including Debian for 6 years even (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836365), so just enable it unconditionally. Also add

[PATCH 30/30] meson: always log qemu-iotests verbosely

2022-12-09 Thread Paolo Bonzini
--- tests/qemu-iotests/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 583468c5b9b3..3d8637c8f2b6 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -43,5 +43,6 @@ foreach

[PATCH 19/30] configure, meson: move --enable-debug-info to Meson

2022-12-09 Thread Paolo Bonzini
Older versions of Meson had an unclear description of the -Ddebug option, but this is fixed in 0.63.0 that is required now. Signed-off-by: Paolo Bonzini --- configure | 5 - scripts/meson-buildoptions.py | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 5

[PATCH 18/30] configure, meson: move --enable-modules to Meson

2022-12-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 21 + meson.build | 7 ++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/configure

[PATCH-for-8.0] softmmu: Extract watchpoint API from physmem.c

2022-12-09 Thread Philippe Mathieu-Daudé
The watchpoint API is specific to TCG system emulation. Move it to a new compile unit. The inlined stubs are used for user-mode and non-TCG accelerators. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + include/hw/core/cpu.h | 2 +- softmmu/meson.build | 3 +-

Re: [PATCH v13 1/7] s390x/cpu topology: Creating CPU topology device

2022-12-09 Thread Cédric Le Goater
On 12/8/22 10:44, Pierre Morel wrote: We will need a Topology device to transfer the topology during migration and to implement machine reset. The device creation is fenced by s390_has_topology(). Some of the info you gave in the cover letter would help the reader of this commit log.

Re: [PATCH for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent

2022-12-09 Thread Thomas Huth
On 07/12/2022 15.47, Bernhard Beschow wrote: Am 6. Dezember 2022 20:06:41 UTC schrieb Thomas Huth : The only code that is really, really target dependent is the apic-related code in rtc_policy_slew_deliver_irq(). By moving this code into the hw/i386/ folder (renamed to

[RFC PATCH v2 11/22] i386/xen: implement HYPERCALL_xen_version

2022-12-09 Thread David Woodhouse
From: Joao Martins This is just meant to serve as an example on how we can implement hypercalls. xen_version specifically since Qemu does all kind of feature controllability. So handling that here seems appropriate. Signed-off-by: Joao Martins [dwmw2: Implement kvm_gva_rw() safely]

[RFC PATCH v2 18/22] i386/xen: handle VCPUOP_register_runstate_memory_area

2022-12-09 Thread David Woodhouse
From: Joao Martins Allow guest to setup the vcpu runstates which is used as steal clock. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse --- target/i386/cpu.h | 1 + target/i386/kvm/kvm.c | 9 + target/i386/machine.c | 4 +++- target/i386/xen.c | 35

Re: [PATCH] target/i386: Fix wrong XSAVE feature names

2022-12-09 Thread Yang Zhong
In fact, one month ago, I have sent out V2 for this issue. thanks! https://lists.nongnu.org/archive/html/qemu-devel/2022-10/msg04825.html Yang On Wed, Dec 07, 2022 at 09:47:47PM -0500, Xiaocheng Dong wrote: > The previous patch changes the name from FEAT_XSAVE_COMP_{LO|HI} > to

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-09 Thread Guenter Roeck
On Thu, Dec 08, 2022 at 12:39:57PM -0800, Guenter Roeck wrote: > On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: > > On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > > > > > > > > A cq head doorbell mmio is skipped... And it is not the fault of the > > > > kernel.

[RFC PATCH-for-8.0] target/arm: Keep "internals.h" internal to target/arm/

2022-12-09 Thread Philippe Mathieu-Daudé
"target/arm/internals.h" is supposed to be *internal* to target/arm/. hw/arm/virt.c includes it to get arm_pamax() declaration. Move this declaration to "cpu.h" which can be included out of target/arm/, and move the implementation in machine.c which is always built with system emulation.

[PATCH 23/30] build: move coroutine backend selection to meson

2022-12-09 Thread Paolo Bonzini
To simplify the code, rename coroutine-win32.c to match the option passed to configure. Signed-off-by: Paolo Bonzini --- configure | 62 --- meson.build | 32 +- meson_options.txt

[PATCH 26/30] build: move remaining compiler flag tests to meson

2022-12-09 Thread Paolo Bonzini
Remove the only remaining uses of QEMU_CFLAGS. Now that no feature tests are done in configure, it is possible to remove CONFIGURE_CFLAGS and CONFIGURE_LDFLAGS as well. Signed-off-by: Paolo Bonzini --- configure | 79 - meson.build | 49

[PATCH 17/30] configure: remove pkg-config functions

2022-12-09 Thread Paolo Bonzini
All uses of pkg-config have been moved to Meson. Signed-off-by: Paolo Bonzini --- configure | 19 +++ docs/devel/build-system.rst | 4 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/configure b/configure index fb28dd3963bd..9c336203d8d9

Re: [PATCH 27/30] build: move compiler version check to meson

2022-12-09 Thread Peter Maydell
On Fri, 9 Dec 2022 at 14:09, Paolo Bonzini wrote: > > On 12/9/22 12:52, Peter Maydell wrote: > > The new code makes it much harder to move our compiler version > > requirements forward in future, because there's no longer a simple > > "check for normal clang X or apple clang Y" test where we can

[RFC PATCH v2 16/22] i386/xen: handle VCPUOP_register_vcpu_info

2022-12-09 Thread David Woodhouse
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 it being set from the context in which the hypercall is

[PATCH v2 for-8.0] hw/rtc/mc146818rtc: Make this rtc device target independent

2022-12-09 Thread Thomas Huth
The only reason for this code being target dependent is the apic-related code in rtc_policy_slew_deliver_irq(). Since these apic functions are rather simple, we can easily move them into a new, separate file (apic_irqcount.c) which will always be compiled and linked if either APIC or the mc146818

Re: [SeaBIOS] Re: [PATCH 4/4] be less conservative with the 64bit pci io window

2022-12-09 Thread Gerd Hoffmann
Hi, > > Well, the idea is to adapt to the world moving forward. Running a > > 64-bit capable OS is standard these days, and the resources needed > > by devices (especially GPUs) are becoming larger and larger. > > > > Yes, there is the risk that (old) guests are unhappy with their > > PCI

Re: [PATCH 22/30] build: move SafeStack tests to meson

2022-12-09 Thread Philippe Mathieu-Daudé
On 9/12/22 12:24, Paolo Bonzini wrote: This disables the old behavior of detecting SafeStack from environment CFLAGS. SafeStack is now enabled purely based on the configure arguments. Signed-off-by: Paolo Bonzini --- configure | 73 ---

Re: How to best make include/hw/pci/pcie_sriov.h self-contained

2022-12-09 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Wed, Dec 07, 2022 at 07:25:49AM +0100, Markus Armbruster wrote: >> pcie_sriov.h needs PCI_NUM_REGIONS from pci.h, but doesn't include it. >> pci.h must be included before pcie_sriov.h or else compile fails. >> >> Adding #include "pci/pci.h" to pcie_sriov would

Re: [PATCH v13 0/7] s390x: CPU Topology

2022-12-09 Thread Thomas Huth
On 08/12/2022 10.44, Pierre Morel wrote: Hi, Implementation discussions == CPU models -- Since the S390_FEAT_CONFIGURATION_TOPOLOGY is already in the CPU model for old QEMU we could not activate it as usual from KVM but needed a KVM capability:

Re: [PATCH-for-8.0 v3 1/2] physmem: Remove unused "exec/translate-all.h"

2022-12-09 Thread Philippe Mathieu-Daudé
On 9/12/22 12:43, Peter Maydell wrote: On Fri, 9 Dec 2022 at 11:07, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- softmmu/physmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 1b606a3002..d562c0bb93 100644 ---

Re: [PATCH v1 03/24] vfio-user: add container IO ops vector

2022-12-09 Thread John Levon
On Tue, Nov 08, 2022 at 03:13:25PM -0800, John Johnson wrote: > Used for communication with VFIO driver > (prep work for vfio-user, which will communicate over a socket) > index e573f5a..6fd40f1 100644 > --- a/include/hw/vfio/vfio-common.h > +++ b/include/hw/vfio/vfio-common.h > + > +extern

[RFC PATCH v2 06/22] hw/xen_backend: refactor xen_be_init()

2022-12-09 Thread David Woodhouse
From: Joao Martins Signed-off-by: Joao Martins Signed-off-by: David Woodhouse --- hw/xen/xen-legacy-backend.c | 40 + include/hw/xen/xen-legacy-backend.h | 3 +++ 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/hw/xen/xen-legacy-backend.c

[RFC PATCH v2 20/22] i386/xen: HVMOP_set_param / HVM_PARAM_CALLBACK_IRQ

2022-12-09 Thread David Woodhouse
From: Ankur Arora The HVM_PARAM_CALLBACK_IRQ parameter controls the system-wide event channel upcall method. The vector support is handled by KVM internally, when the evtchn_upcall_pending field in the vcpu_info is set. The GSI and PCI_INTX delivery methods are not supported. yet; those need

[RFC PATCH v2 05/22] xen-platform-pci: allow its creation with XEN_EMULATE mode

2022-12-09 Thread David Woodhouse
From: Joao Martins The only thing we need to handle on KVM side is to change the pfn from R/W to R/O. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse --- hw/i386/xen/xen_platform.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git

Re: [PATCH qemu.git 0/1] hw/arm/virt: add 2x sp804 timer

2022-12-09 Thread Peter Maydell
On Thu, 8 Dec 2022 at 17:25, Axel Heider wrote: > >> For the seL4 specific case, this is currently not possible in > >> the standard configuration. It's only exposed for a special > >> debug and benchmarking configuration. > >> > > It's not clear to me what you mean here -- the generic > > timer

[PATCH 03/30] configure: remove useless test

2022-12-09 Thread Paolo Bonzini
$cpu is derived from preprocessor defines rather than uname these days, so do not bother using isainfo on Solaris. Likewise do not recognize BeOS's uname -m output. Signed-off-by: Paolo Bonzini --- configure | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git

[PATCH 08/30] meson: require 0.63.0

2022-12-09 Thread Paolo Bonzini
This allows cleanups cleanups in modinfo collection and supports the equivalent of QEMU's --static option to configure. Signed-off-by: Paolo Bonzini --- configure | 2 +- meson | 2 +- meson.build | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure

  1   2   >