Re: [RFC PATCH 6/9] ui/gtk: Add a new parameter to assign connectors/monitors to GFX VCs

2023-06-20 Thread Markus Armbruster
Dongwon Kim writes: > From: Vivek Kasireddy > > The new parameter named "connector" can be used to assign physical > monitors/connectors to individual GFX VCs such that when the monitor > is connected or hotplugged, the associated GTK window would be > moved to it. If the monitor is

Request for Assistance: Adding I2C Support in QEMU for Raspberry Pi (BCM2835 Peripherals)

2023-06-20 Thread Shivam
Hi, I hope this email finds you well. I am reaching out to seek guidance and assistance regarding a project I am working on involving the addition of I2C support in QEMU for the Raspberry Pi, specifically targeting the BCM2835 peripherals. I have been studying the BCM2835 datasheet to

Re: [PATCH v2 03/10] target/i386: TCG supports RDSEED

2023-06-20 Thread Paolo Bonzini
Il mar 20 giu 2023, 18:24 Richard Henderson ha scritto: > On 6/20/23 17:16, Paolo Bonzini wrote: > > TCG implements RDSEED, and in fact uses qcrypto_random_bytes which is > > secure enough to match hardware behavior. Expose it to guests. > > > > Reviewed-by: Richard Henderson > >

Re: [PATCH 1/4] target/ppc: Fix instruction loading endianness in alignment interrupt

2023-06-20 Thread Nicholas Piggin
On Wed Jun 21, 2023 at 2:54 AM AEST, Nicholas Piggin wrote: > On Wed Jun 21, 2023 at 12:26 AM AEST, BALATON Zoltan wrote: > > On Tue, 20 Jun 2023, Nicholas Piggin wrote: > > > powerpc ifetch endianness depends on MSR[LE] so it has to byteswap > > > after cpu_ldl_code(). This corrects DSISR bits in

Re: [PATCH] Revert "cputlb: Restrict SavedIOTLB to system emulation"

2023-06-20 Thread Richard Henderson
On 6/20/23 19:57, Peter Maydell wrote: This reverts commit d7ee93e24359703debf4137f4cc632563aa4e8d1. That commit tries to make a field in the CPUState struct not be present when CONFIG_USER_ONLY is set. Unfortunately, you can't conditionally omit fields in structs like this based on ifdefs

Re: [PULL 49/52] exec/poison: Do not poison CONFIG_SOFTMMU

2023-06-20 Thread Richard Henderson
On 6/20/23 20:01, Peter Maydell wrote: On Mon, 5 Jun 2023 at 21:23, Richard Henderson wrote: If CONFIG_USER_ONLY is ok generically, so is CONFIG_SOFTMMU, because they are exactly opposite. This isn't quite right. CONFIG_USER_ONLY is theoretically something we should poison, because it's

Re: [PATCH v4] hw/pci: enforce use of slot only slot 0 when devices have an upstream PCIE port

2023-06-20 Thread Michael S. Tsirkin
On Wed, Jun 21, 2023 at 08:09:55AM +0530, Ani Sinha wrote: > > > > On 20-Jun-2023, at 4:13 PM, Michael S. Tsirkin wrote: > > > > On Tue, Jun 20, 2023 at 12:48:05PM +0530, Ani Sinha wrote: > >> When a device has an upstream PCIE port, we can only use slot 0. > > > > Actually, it's when device

Re: [PATCH v4 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-20 Thread Yuquan Wang
On 2023-06-21 01:24, Leif wrote: > Leif, do you think we should bump the minor version here? I think that makes sense, yes. / Leif Thanks for everyone's guidance. There is a new confusion: Which minor version should I bump to (2 or 3) ? As I found that Marcin’s latest patch (add ITS

[PATCH v2] hw/pci: add comment explaining the reason for checking function 0 in hotplug

2023-06-20 Thread Ani Sinha
This change is cosmetic. A comment is added explaining why we need to check for the availability of function 0 when we hotplug a device. CC: m...@redhat.com Signed-off-by: Ani Sinha --- hw/pci/pci.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) changelog: v2: moved comment

Re: [PATCH v4] hw/pci: enforce use of slot only slot 0 when devices have an upstream PCIE port

2023-06-20 Thread Ani Sinha
> On 20-Jun-2023, at 4:13 PM, Michael S. Tsirkin wrote: > > On Tue, Jun 20, 2023 at 12:48:05PM +0530, Ani Sinha wrote: >> When a device has an upstream PCIE port, we can only use slot 0. > > Actually, it's when device is plugged into a PCIE port. > So maybe: > > PCI Express ports only

[PATCH RESEND v2 1/2] target/i386/kvm: introduce 'pmu-cap-disabled' to set KVM_PMU_CAP_DISABLE

2023-06-20 Thread Dongli Zhang
The "perf stat" at the VM side still works even we set "-cpu host,-pmu" in the QEMU command line. That is, neither "-cpu host,-pmu" nor "-cpu EPYC" could disable the pmu virtualization in an AMD environment. We still see below at VM kernel side ... [0.510611] Performance Events: Fam17h+ core

[PATCH RESEND v2 0/2] target/i386/kvm: fix two svm pmu virtualization bugs

2023-06-20 Thread Dongli Zhang
This is to rebase the patchset on top of the most recet QEMU. This patchset is to fix two svm pmu virtualization bugs, x86 only. version 1: https://lore.kernel.org/all/20221119122901.2469-1-dongli.zh...@oracle.com/ 1. The 1st bug is that "-cpu,-pmu" cannot disable svm pmu virtualization. To

[PATCH RESEND v2 2/2] target/i386/kvm: get and put AMD pmu registers

2023-06-20 Thread Dongli Zhang
The QEMU side calls kvm_get_msrs() to save the pmu registers from the KVM side to QEMU, and calls kvm_put_msrs() to store the pmu registers back to the KVM side. However, only the Intel gp/fixed/global pmu registers are involved. There is not any implementation for AMD pmu registers. The

Re: [PATCH] target/riscv/cpu.c: fix veyron-v1 CPU properties

2023-06-20 Thread LIU Zhiwei
On 2023/6/20 23:24, Daniel Henrique Barboza wrote: Commit 7f0bdfb5bfc2 ("target/riscv/cpu.c: remove cfg setup from riscv_cpu_init()") removed code that was enabling mmu, pmp, ext_ifencei and ext_icsr from riscv_cpu_init(), the init() function of TYPE_RISCV_CPU, parent type of all RISC-V CPUss.

RE: [PATCH v2] vfio/migration: Refactor and fix print of "Migration disabled"

2023-06-20 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Sent: Tuesday, June 20, 2023 5:28 PM >To: Duan, Zhenzhong ; Avihai Horon >; qemu-devel@nongnu.org >Cc: alex.william...@redhat.com; c...@redhat.com; Peng, Chao P > >Subject: Re: [PATCH v2] vfio/migration: Refactor and fix print of "Migration

[RFC PATCH 6/9] ui/gtk: Add a new parameter to assign connectors/monitors to GFX VCs

2023-06-20 Thread Dongwon Kim
From: Vivek Kasireddy The new parameter named "connector" can be used to assign physical monitors/connectors to individual GFX VCs such that when the monitor is connected or hotplugged, the associated GTK window would be moved to it. If the monitor is disconnected or unplugged, the associated

[RFC PATCH 4/9] ui/gtk: Disable the scanout when a detached tab is closed

2023-06-20 Thread Dongwon Kim
From: Vivek Kasireddy When a detached tab window is closed, the underlying (EGL) context is destroyed; therefore, disable the scanout which also destroys the underlying framebuffer (id) and other objects. Also add calls to make the context current in disable scanout and other missing places.

[RFC PATCH 2/9] ui/gtk: set the ui size to 0 when invisible

2023-06-20 Thread Dongwon Kim
Getting guest displays disconnected by setting ui size to 0 when the VC is set as invisible. When the VC is set as visible again, the ui size is restored back to its previous size to reconnect guest displays. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe

[RFC PATCH 1/9] ui/gtk: skip drawing guest scanout when associated VC is invisible

2023-06-20 Thread Dongwon Kim
A new flag "visible" that specifies visibility status of the gfx console. The polarity of the flag determines whether the drawing surface should continuously updated upon scanout flush. The flag is set to 'true' when the window bound to the VC is in visible state but set to 'false' when the

[RFC PATCH 7/9] ui/gtk: unblock gl if draw submitted already or fence is not yet signaled

2023-06-20 Thread Dongwon Kim
Remove monitor while a guest frame is still being processed could block the guest (virtio-gpu) scanout pipe line. It is needed to manually flush the pipeline to prevent the permanent lockup. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc:

[RFC PATCH 9/9] ui/gtk: skip refresh/rendering if VC is invisible

2023-06-20 Thread Dongwon Kim
Skip any drawing activities if VC is invisible because it can't be finished. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 4 ui/gtk-gl-area.c | 4

[RFC PATCH 0/9] ui: guest displays multiple connectors suppport and hotplug in

2023-06-20 Thread Dongwon Kim
(This series replace two patch series, [PATCH v2 0/6] ui/gtk: Add a new parameter to assign connectors/monitors (v2) https://lists.gnu.org/archive/html/qemu-devel/2022-11/msg03098.html and [RFC PATCH 0/3] ui/gtk: no render event when vc is invisible

[RFC PATCH 8/9] ui/gtk: skip drawing if any of ctx/surface/image don't exist

2023-06-20 Thread Dongwon Kim
Rendering of scanout could be skipped if ctx/surface/image don't exist due to an asynchronous event such as monitors being disconnected. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon

[RFC PATCH 5/9] ui/gtk: Factor out tab window creation into a separate function

2023-06-20 Thread Dongwon Kim
From: Vivek Kasireddy Pull the code that creates a new window associated with a notebook tab into a separate function. This new function can be useful not just when user wants to detach a tab but also in the future when a new window creation is needed in other scenarios. Cc: Gerd Hoffmann Cc:

[RFC PATCH 3/9] ui/gtk: reset visible flag when window is minimized

2023-06-20 Thread Dongwon Kim
Add a callback for window-state-event that resets vc->gfx.visible when associated window is minimized or restored. In case of virtio-gpu blob scanout, if the window is minimized before the rendering event for the last guest scanout frame is finished, it cancels the draw submission and unblocks

Re: [PATCH] target/riscv/cpu.c: fix veyron-v1 CPU properties

2023-06-20 Thread Alistair Francis
On Wed, Jun 21, 2023 at 1:25 AM Daniel Henrique Barboza wrote: > > Commit 7f0bdfb5bfc2 ("target/riscv/cpu.c: remove cfg setup from > riscv_cpu_init()") removed code that was enabling mmu, pmp, ext_ifencei > and ext_icsr from riscv_cpu_init(), the init() function of > TYPE_RISCV_CPU, parent type

[PATCH RFC 4/6] iotests: use the correct python to run linters

2023-06-20 Thread John Snow
Whichever python is used to run iotest 297 should be the one used to actually run the linters. Signed-off-by: John Snow --- tests/qemu-iotests/linters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/linters.py b/tests/qemu-iotests/linters.py index

[PATCH RFC 0/6] Switch iotests to pyvenv

2023-06-20 Thread John Snow
Hi, this is ... a fairly incomplete series about trying to get iotests to run out of the configure-time venv. I'm looking for some feedback, so out to the list it goes. Primarily, I'm having doubts about these points: 1) I think I need something like "mkvenv install" in the first patch, but

[PATCH RFC 3/6] iotests: get rid of '..' in path environment output

2023-06-20 Thread John Snow
Resolve the build_root before we append more items onto it so that the environment output is more concise with less parent directory confetti in it. Signed-off-by: John Snow --- tests/qemu-iotests/testenv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH RFC 6/6] iotests: don't add qemu.git/python to PYTHONPATH

2023-06-20 Thread John Snow
qemu.* should be provided by the configure-time venv, now. Signed-off-by: John Snow --- tests/qemu-iotests/testenv.py | 4 1 file changed, 4 deletions(-) diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 1b095d70f2..6441145701 100644 ---

[PATCH RFC 2/6] build, tests: Add qemu in-tree packages to pyvenv at configure time.

2023-06-20 Thread John Snow
though, ouch: on my machine this takes 3-4 entire seconds to do. I wish it wasn't so slow, but we can't rely on these packages not having any dependencies any more. We could theoretically use a .pth hack when creating the venv to automatically include this directory as an "installed packages"

[PATCH RFC 5/6] iotests: use pyvenv/bin/python3 to launch child test processes

2023-06-20 Thread John Snow
Now that there's a fancy venv set up for us by configure, we should take care to use it even when check is invoked directly. ./check will now use the pyvenv environment when launching python tests, which allows those tests to find and access the 'qemu.*' packages without PYTHONPATH modifications.

[PATCH RFC 1/6] experiment: add mkvenv install

2023-06-20 Thread John Snow
This is just so I can do "mkvenv install './python'" or "mkvenv install file:python" to install the in-tree packages to pyvenv. It probably isn't quite appropriate to bypass do_ensure in its entirety like this because we miss out on a lot of error handling, but as a quick proof of concept it

Re: [PATCH] hw/pci: add comment explaining the reason for checking function 0 in hotplug

2023-06-20 Thread Michael S. Tsirkin
On Tue, Jun 20, 2023 at 07:55:51PM +0530, Ani Sinha wrote: > This change is cosmetic. A comment is added explaining why we need to check > for > the availability of function 0 when we hotplug a device. > > CC: m...@redhat.com > Signed-off-by: Ani Sinha > --- > hw/pci/pci.c | 5 + > 1 file

Re: [PATCH v2 15/18] target/riscv: make riscv_isa_string_ext() KVM compatible

2023-06-20 Thread Daniel Henrique Barboza
On 6/19/23 06:54, Andrew Jones wrote: On Tue, Jun 13, 2023 at 05:58:54PM -0300, Daniel Henrique Barboza wrote: The isa_edata_arr[] is used by riscv_isa_string_ext() to create the riscv,isa DT attribute. isa_edata_arr[] is kept in sync with the TCG property vector riscv_cpu_extensions[], i.e.

Re: [PATCH V1 2/3] migration: fix suspended runstate

2023-06-20 Thread Peter Xu
On Thu, Jun 15, 2023 at 01:26:39PM -0700, Steve Sistare wrote: > Migration of a guest in the suspended state is broken. The incoming > migration code automatically tries to wake the guest, which IMO is > wrong -- the guest should end migration in the same state it started. > Further, the wakeup

Re: [PATCH 12/12] hw/vmapple/vmapple: Add vmapple machine type

2023-06-20 Thread Bernhard Beschow
Am 14. Juni 2023 22:57:34 UTC schrieb Alexander Graf : >Apple defines a new "vmapple" machine type as part of its proprietary >macOS Virtualization.Framework vmm. This machine type is similar to the >virt one, but with subtle differences in base devices, a few special >vmapple device additions

Re: [PATCH] git-submodule.sh: allow running in validate mode without previous update

2023-06-20 Thread Paolo Bonzini
Il mar 20 giu 2023, 19:35 Nina Schoetterl-Glausch ha scritto: > > +modules="$modules $m" > > +grep $m $substat > /dev/null 2>&1 || $GIT submodule status > $module >> $substat > > +else > > +echo "warn: ignoring non-existent submodule $m" > > What is

Re: [PATCH][RESEND v5 3/3] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon)

2023-06-20 Thread Maciej S. Szmigiero
On 19.06.2023 17:58, David Hildenbrand wrote: [...] Sorry for the late reply! Still trying to make up my mind what the right way forward with this is. This usage is still problematic I suspect (well, and a layer violation regarding the machine). The machine hotplug handler is supposed to

[PULL 0/1] Seabios hppa v7 patches

2023-06-20 Thread Helge Deller
The following changes since commit 327ec8d6c2a2223b78d311153a471036e474c5c5: Merge tag 'pull-tcg-20230423' of https://gitlab.com/rth7680/qemu into staging (2023-04-23 11:20:37 +0100) are available in the Git repository at: https://github.com/hdeller/qemu-hppa.git

[PATCH 1/2] memory: introduce memory_region_init_ram_protected()

2023-06-20 Thread Laurent Vivier
Commit 56918a126a ("memory: Add RAM_PROTECTED flag to skip IOMMU mappings") has introduced the RAM_PROTECTED flag to denote "protected" memory. This flags is only used with qemu_ram_alloc_from_fd() for now. To be able to register memory region with this flag, define

[PATCH 0/2] vhost-vdpa: skip TPM CRB memory section

2023-06-20 Thread Laurent Vivier
An error is reported for vhost-vdpa case: qemu-kvm: vhost_vdpa_listener_region_add received unaligned region Marc-André has proposed a fix to this problem by skipping the memory region owned by the TPM CRB but it seems more generic to skip not DMA-able memory. We have a memory flag for that,

[PATCH 2/2] tpm_crb: mark memory as protected

2023-06-20 Thread Laurent Vivier
This memory is not correctly aligned and cannot be registered by vDPA and VFIO. An error is reported for vhost-vdpa case: qemu-kvm: vhost_vdpa_listener_region_add received unaligned region To make it ignored by VFIO and vDPA devices, mark it as RAM_PROTECTED. The RAM_PROTECTED flag has been

Re: [PATCH v7] Emulate dip switch language layout settings on SUN keyboard

2023-06-20 Thread Henrik Carlqvist
On Tue, 20 Jun 2023 10:22:40 +0100 Daniel P. Berrangé wrote: Thanks for your feedback! > Assuming you have docutils installed, QEMU will build the manual by > default and print any issues on console during build. You can point > your browser to $BUILD/docs/manual/system/index.html to see the

[PATCH v1 21/23] pc/q35: setup q35 for xen

2023-06-20 Thread Joel Upham
Mirrored the init done for piix devices when xen is being used. This is needed for xen memory to be initialized and used with q35. Signed-off-by: Joel Upham --- hw/i386/pc_q35.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc_q35.c

[PATCH v1 12/23] xen/pt: allow to hide PCIe Extended Capabilities

2023-06-20 Thread Joel Upham
We need to hide some unwanted PCI/PCIe capabilities for passed through devices. Normally we do this by marking the capability register group as XEN_PT_GRP_TYPE_HARDWIRED which exclude this capability from the capability list and returns zeroes on attempts to read capability body. Skipping the

[PATCH v1 15/23] xen/pt: add AER PCIe Extended Capability descriptor and sizing

2023-06-20 Thread Joel Upham
The patch provides Advanced Error Reporting PCIe Extended Capability description structure and corresponding capability sizing function. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt_config_init.c | 72 + 1 file changed, 72

[PATCH v1 01/23] pc/xen: Xen Q35 support: provide IRQ handling for PCI devices

2023-06-20 Thread Joel Upham
The primary difference in PCI device IRQ management between Xen HVM and QEMU is that Xen PCI IRQs are "device-centric" while QEMU PCI IRQs are "chipset-centric". Namely, Xen uses PCI device BDF and INTx as coordinates to assert IRQ while QEMU finds out to which chipset PIRQ the IRQ is routed

[PATCH v1 1/1] Q35 Support

2023-06-20 Thread Joel Upham
--- hw/acpi/ich9.c| 22 +- hw/acpi/pcihp.c |6 +- hw/core/machine.c | 19 + hw/i386/pc_piix.c |3 +- hw/i386/pc_q35.c | 39 +- hw/i386/xen/xen-hvm.c |7 +- hw/i386/xen/xen_platform.c| 19 +-

[PATCH v1 23/23] s3 support: enabling s3 with q35

2023-06-20 Thread Joel Upham
Resetting pci devices after s3 causes guest freezes, as xen usually likes to handle resetting devices. Signed-off-by: Joel Upham --- hw/acpi/ich9.c| 12 hw/pci-host/q35.c | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c

[PATCH v1 20/23] xen platform: unplug ahci object

2023-06-20 Thread Joel Upham
This will unplug the ahci device when the Xen driver calls for an unplug. This has been tested to work in linux and Windows guests. When q35 is detected, we will remove the ahci controller with the hard disks. In the libxl config, cdrom devices are put on a seperate ahci controller. This allows

[PATCH v1 09/23] xen/pt: Xen PCIe passthrough support for Q35: bypass PCIe topology check

2023-06-20 Thread Joel Upham
Compared to legacy i440 system, there are certain difficulties while passing through PCIe devices to guest OSes like Windows 7 and above on platforms with native support of PCIe bus (in our case Q35). This problem is not applicable to older OSes like Windows XP -- PCIe passthrough on such OSes can

[PATCH v1 11/23] xen/pt: handle PCIe Extended Capabilities Next register

2023-06-20 Thread Joel Upham
The patch adds new xen_pt_ext_cap_ptr_reg_init function which is used to initialize the emulated next pcie extended capability pointer. Primary mission of this function is to have a method to selectively hide some extended capabilities from the capability linked list, skipping them by altering

[PATCH v1 16/23] xen/pt: add descriptors and size calculation for RCLD/ACS/PMUX/DPA/MCAST/TPH/DPC PCIe Extended Capabilities

2023-06-20 Thread Joel Upham
Add few more PCIe Extended Capabilities entries to the xen_pt_emu_reg_grps[] array along with their corresponding *_size_init() functions. All these capabilities have non-fixed size but their size calculation is very simple, hence adding them in a single batch. For every capability register

[PATCH v1 06/23] xen/pt: XenHostPCIDevice: provide functions for PCI Capabilities and PCIe Extended Capabilities enumeration

2023-06-20 Thread Joel Upham
This patch introduces 2 new functions, - xen_host_pci_find_next_ext_cap (actually a reworked xen_host_pci_find_ext_cap_offset function which is unused) - xen_host_pci_find_next_cap These functions allow to search for PCI/PCIe capabilities in a uniform way. Both functions allow to search either

[PATCH v1 22/23] qdev-monitor/pt: bypass root device check

2023-06-20 Thread Joel Upham
On xen we need to be able to have hotpluggable root devices, even on Q35 at the moment. Having this check disables PT of devices, so lets turn it off for now. Signed-off-by: Joel Upham --- softmmu/qdev-monitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v1 05/23] q35: Fix incorrect values for PCIEXBAR masks

2023-06-20 Thread Joel Upham
There are two small issues in PCIEXBAR address mask handling: - wrong bit positions for address mask bits (see PCIEXBAR description in Q35 datasheet) - incorrect usage of 64ADR_MASK Due to this, attempting to write a valid PCIEXBAR address may cause it to shift to another address, causing

[PATCH v1 07/23] xen/pt: avoid reading PCIe device type and cap version multiple times

2023-06-20 Thread Joel Upham
xen_pt_config_init.c reads Device/Port Type and Capability version fields in many places. Two functions are used for this purpose: get_capability_version and get_device_type. These functions perform PCI conf space reading every time they're called. Another bad thing is that these functions know

[PATCH v1 17/23] xen/pt: add Resizable BAR PCIe Extended Capability descriptor and sizing

2023-06-20 Thread Joel Upham
Unlike other PCIe Extended Capabilities, we currently cannot allow attempts to use Resizable BAR Capability. Without specifically handling BAR resizing we're likely end up with corrupted MMIO hole layout if guest OS will attempt to use this feature. Actually, recent Windows versions started to

[PATCH v1 18/23] xen/pt: add VC/VC9/MFVC PCIe Extended Capabilities descriptors and sizing

2023-06-20 Thread Joel Upham
Virtual Channel/MFVC capabilities are relatively useless for emulation (passing through accesses to them should be enough in most cases) yet they have hardest format of all PCIe Extended Capabilities, mostly because VC capability format allows the sparse config space layout with gaps between the

[PATCH v1 04/23] q35/xen: Add Xen platform device support for Q35

2023-06-20 Thread Joel Upham
Current Xen/QEMU method to control Xen Platform device on i440 is a bit odd -- enabling/disabling Xen platform device actually modifies the QEMU emulated machine type, namely xenfv <--> pc. In order to avoid multiplying machine types, use a new way to control Xen Platform device for QEMU --

[PATCH v1 08/23] xen/pt: determine the legacy/PCIe mode for a passed through device

2023-06-20 Thread Joel Upham
Even if we have some real PCIe device being passed through to a guest, there are situations when we cannot use its PCIe features, primarily allowing to access extended (>256) config space. Basically, we can allow reading PCIe extended config space only if both the device and emulated system are

[PATCH v1 13/23] xen/pt: add Vendor-specific PCIe Extended Capability descriptor and sizing

2023-06-20 Thread Joel Upham
The patch provides Vendor-specific PCIe Extended Capability description structure and corresponding sizing function. In this particular case the size of the Vendor capability is available in the VSEC Length field. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham ---

[PATCH v1 03/23] q35/acpi/xen: Provide ACPI PCI hotplug interface for Xen on Q35

2023-06-20 Thread Joel Upham
This patch allows to use ACPI PCI hotplug functionality for Xen on Q35. All added code depends on xen_enabled(), so no functionality change for non-Xen usage. We need to call the acpi_set_pci_info function from ich9_pm_init as well, so it was made globally visible again (as it was before).

[PATCH v1 00/23] Q35 support for Xen

2023-06-20 Thread Joel Upham
These are the Qemu changes needed to support the q35 chipset for xen I based the patches from 2017 found on the mailing list here: https://lists.xenproject.org/archives/html/xen-devel/2018-03/msg01176.html I have been using a version of these patches on Xen 4.16 with Qemu version 4.1 for over 6

[PATCH v1 10/23] xen/pt: add support for PCIe Extended Capabilities and larger config space

2023-06-20 Thread Joel Upham
This patch provides basic facilities for PCIe Extended Capabilities and support for controlled (via s->pcie_enabled_dev flag) access to PCIe config space (>256). PCIe Extended Capabilities make use of 16-bit capability ID. Also, a capability size might exceed 8-bit width. So as the very first

[PATCH v1 19/23] xen/pt: Fake capability id

2023-06-20 Thread Joel Upham
Some PCIe capabilities needed to be faked for the xen implementation to work. This is the situation when we were asked to hide (aka "hardwire to 0") some PCIe ext capability, but it was located at offset 0x100 in PCIe config space. In this case we can't simply exclude it from the linked list of

[PATCH v1 14/23] xen/pt: add fixed-size PCIe Extended Capabilities descriptors

2023-06-20 Thread Joel Upham
This adds description structures for all fixed-size PCIe Extended Capabilities. For every capability register group, only 2 registers are emulated currently: Capability ID (16 bit) and Next Capability Offset/Version (16 bit). Both needed to implement selective capability hiding. All other

[PATCH v1 02/23] pc/q35: Apply PCI bus BSEL property for Xen PCI device hotplug

2023-06-20 Thread Joel Upham
On Q35 we still need to assign BSEL property to bus(es) for PCI device add/hotplug to work. Extend acpi_set_pci_info() function to support Q35 as well. This patch adds new (trivial) function find_q35() which returns root PCIBus object on Q35, in a way similar to what find_i440fx does.

[PATCH] STM32F100: add support for external memory via FSMC

2023-06-20 Thread Lucas Villa Real
Add support for FSMC on high-density STM32F100 devices and enable mapping of additional memory via the `-m SIZE` command-line option. FSMC Bank1 can address up to 4x64MB of PSRAM memory at 0x6000. RCC is needed to enable peripheral clock for FSMC; this commit implements support for RCC

[PATCH] STM32F100: add support for external memory via FSMC

2023-06-20 Thread Lucas Villa Real
Add support for FSMC on high-density STM32F100 devices and enable mapping of additional memory via the `-m SIZE` command-line option. FSMC Bank1 can address up to 4x64MB of PSRAM memory at 0x6000. RCC is needed to enable peripheral clock for FSMC; this commit implements support for RCC

Re: [PATCH 01/42] migration-test: Be consistent for ppc

2023-06-20 Thread Peter Xu
On Tue, Jun 20, 2023 at 09:27:17PM +0200, Laurent Vivier wrote: > On 6/20/23 16:54, Peter Xu wrote: > > On Fri, Jun 09, 2023 at 12:49:02AM +0200, Juan Quintela wrote: > > > It makes no sense that we don't have the same configuration on both sides. > > > > I hope Laurent can see this one out of

Re: [PATCH V2] migration: file URI

2023-06-20 Thread Peter Xu
On Tue, Jun 20, 2023 at 02:36:58PM -0400, Steven Sistare wrote: > On 6/15/2023 10:50 AM, Fabiano Rosas wrote: > > Peter Xu writes: > > > >> On Wed, Jun 14, 2023 at 02:59:54PM -0300, Fabiano Rosas wrote: > >>> In this message Daniel mentions virDomainSnapshotXXX which would benefit > >>> from

Re: [PATCH 01/42] migration-test: Be consistent for ppc

2023-06-20 Thread Laurent Vivier
On 6/20/23 16:54, Peter Xu wrote: On Fri, Jun 09, 2023 at 12:49:02AM +0200, Juan Quintela wrote: It makes no sense that we don't have the same configuration on both sides. I hope Laurent can see this one out of 40s. I had some luck... Makes sense to me, but does it mean that the devices

Re: [PATCH V2] migration: file URI

2023-06-20 Thread Steven Sistare
On 6/15/2023 10:50 AM, Fabiano Rosas wrote: > Peter Xu writes: > >> On Wed, Jun 14, 2023 at 02:59:54PM -0300, Fabiano Rosas wrote: >>> In this message Daniel mentions virDomainSnapshotXXX which would benefit >>> from using the same "file" migration, but being done live: >>> >>>

Re: [PATCH 05/12] hw/virtio: Add support for apple virtio-blk

2023-06-20 Thread Kevin Wolf
Am 20.06.2023 um 16:35 hat Stefan Hajnoczi geschrieben: > On Wed, Jun 14, 2023 at 10:56:22PM +, Alexander Graf wrote: > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > > index 39e7f23fab..76b85bb3cb 100644 > > --- a/hw/block/virtio-blk.c > > +++ b/hw/block/virtio-blk.c > > @@

Re: [PULL 49/52] exec/poison: Do not poison CONFIG_SOFTMMU

2023-06-20 Thread Peter Maydell
On Mon, 5 Jun 2023 at 21:23, Richard Henderson wrote: > > If CONFIG_USER_ONLY is ok generically, so is CONFIG_SOFTMMU, > because they are exactly opposite. This isn't quite right. CONFIG_USER_ONLY is theoretically something we should poison, because it's unsafe in the general case to use it in

[PATCH] hw/xen: Clarify (lack of) error handling in transaction_commit()

2023-06-20 Thread David Woodhouse
From: David Woodhouse Coverity was unhappy (CID 1508359) because we didn't check the return of init_walk_op() in transaction_commit(), despite doing so at every other call site. Strictly speaking, this is a false positive since it can never fail. It only fails for invalid user input

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-20 Thread Kim, Dongwon
Hello, I just came across this discussion regarding s3/s4 support in virtio-gpu driver and QEMU. We saw similar problem a while ago (QEMU deletes all objects upon suspension) and came up with an experimental solution that is basically making virtio-gpu driver to do object creation for

Re: [PULL 05/27] hw/xen: Watches on XenStore transactions

2023-06-20 Thread David Woodhouse
On Tue, 2023-06-20 at 13:19 +0100, Peter Maydell wrote: > On Fri, 2 Jun 2023 at 18:06, Peter Maydell > wrote: > > > > On Tue, 2 May 2023 at 18:08, Peter Maydell > > wrote: > > > > > > On Tue, 7 Mar 2023 at 18:27, David Woodhouse > > > wrote: > > > > > > > > From: David Woodhouse > > > >

[PATCH] Revert "cputlb: Restrict SavedIOTLB to system emulation"

2023-06-20 Thread Peter Maydell
This reverts commit d7ee93e24359703debf4137f4cc632563aa4e8d1. That commit tries to make a field in the CPUState struct not be present when CONFIG_USER_ONLY is set. Unfortunately, you can't conditionally omit fields in structs like this based on ifdefs that are set per-target. If you try it,

[PATCH qemu v2] change the fdt_load_addr variable datatype to handle 64-bit DRAM address

2023-06-20 Thread ~rlakshmibai
From: Lakshmi Bai Raja Subramanian fdt_load_addr is getting overflowed when there is no DRAM at lower 32 bit address space. To support pure 64-bit DRAM address, fdt_load_addr variable's data type is changed to uint64_t instead of uint32_t. Signed-off-by: Lakshmi Bai Raja Subramanian ---

Re: 'make check-tcg' fails with an assert in qemu_plugin_vcpu_init_hook

2023-06-20 Thread Peter Maydell
On Tue, 20 Jun 2023 at 17:56, Peter Maydell wrote: > > $ make -C build/x86 check-tcg > make: Entering directory > '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86' > [...] > TESTmunmap-pthread on arm > ** > ERROR:../../plugins/core.c:221:qemu_plugin_vcpu_init_hook: assertion > failed:

Re: [PATCH] git-submodule.sh: allow running in validate mode without previous update

2023-06-20 Thread Nina Schoetterl-Glausch
On Sun, 2023-06-18 at 23:20 +0200, Paolo Bonzini wrote: > The call to git-submodule.sh done in configure may happen without a > previous checkout of the roms/SLOF submodule, or even without a > previous run of the script. > > So, handle creating a .git-submodule-status file even in validate >

Re: [PATCH v4 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-20 Thread Leif Lindholm
Hi Peter, On 2023-06-19 13:47, Peter Maydell wrote: On Wed, 7 Jun 2023 at 03:34, Yuquan Wang wrote: The current sbsa-ref cannot use EHCI controller which is only able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB. Hence, this uses system bus XHCI to provide a usb controller

[PATCH V3 1/4] util: strList_from_string

2023-06-20 Thread Steve Sistare
Generalize hmp_split_at_comma() to take any delimiter string, rename as strList_from_string(), and move it to util/strList.c. No functional change. Signed-off-by: Steve Sistare --- include/monitor/hmp.h | 1 - include/qemu/strList.h | 24 monitor/hmp-cmds.c | 19

[PATCH V3 4/4] util: strList unit tests

2023-06-20 Thread Steve Sistare
Signed-off-by: Steve Sistare Reviewed-by: Marc-André Lureau --- tests/unit/meson.build| 1 + tests/unit/test-strList.c | 80 +++ 2 files changed, 81 insertions(+) create mode 100644 tests/unit/test-strList.c diff --git a/tests/unit/meson.build

[PATCH V3 3/4] util: strv_from_strList

2023-06-20 Thread Steve Sistare
Signed-off-by: Steve Sistare Reviewed-by: Marc-André Lureau --- include/qemu/strList.h | 6 ++ util/strList.c | 14 ++ 2 files changed, 20 insertions(+) diff --git a/include/qemu/strList.h b/include/qemu/strList.h index 1f4c11d..629d76b 100644 ---

[PATCH V3 0/4] string list functions

2023-06-20 Thread Steve Sistare
Add some handy string list functions, for general use now, and for eventual use in the cpr/live update patches. Steve Sistare (4): util: strList_from_string qapi: QAPI_LIST_LENGTH util: strv_from_strList util: strList unit tests include/monitor/hmp.h | 1 - include/qapi/util.h

[PATCH V3 2/4] qapi: QAPI_LIST_LENGTH

2023-06-20 Thread Steve Sistare
Signed-off-by: Steve Sistare Reviewed-by: Marc-André Lureau --- include/qapi/util.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/qapi/util.h b/include/qapi/util.h index 81a2b13..e1b8b1d 100644 --- a/include/qapi/util.h +++ b/include/qapi/util.h @@ -56,4 +56,17 @@

Re: 'make check-tcg' fails with an assert in qemu_plugin_vcpu_init_hook

2023-06-20 Thread Richard Henderson
On 6/20/23 18:56, Peter Maydell wrote: ERROR:../../accel/tcg/cpu-exec.c:1024:cpu_exec_setjmp: assertion failed: (cpu == current_cpu) ... The assertion in cpu-exec.c is interesting too and may or may not be relevant. FWIW, the last time I saw this the stack had been clobbered and the saved

'make check-tcg' fails with an assert in qemu_plugin_vcpu_init_hook

2023-06-20 Thread Peter Maydell
$ make -C build/x86 check-tcg make: Entering directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86' [...] TESTmunmap-pthread on arm ** ERROR:../../plugins/core.c:221:qemu_plugin_vcpu_init_hook: assertion failed: (success) ** ERROR:../../accel/tcg/cpu-exec.c:1024:cpu_exec_setjmp:

Re: [PATCH 1/4] target/ppc: Fix instruction loading endianness in alignment interrupt

2023-06-20 Thread Nicholas Piggin
On Wed Jun 21, 2023 at 12:26 AM AEST, BALATON Zoltan wrote: > On Tue, 20 Jun 2023, Nicholas Piggin wrote: > > powerpc ifetch endianness depends on MSR[LE] so it has to byteswap > > after cpu_ldl_code(). This corrects DSISR bits in alignment > > interrupts when running in little endian mode. > > >

Re: [PATCH] pc-bios/keymaps: Use the official xkb name for Arabic layout, not the legacy synonym

2023-06-20 Thread Philippe Mathieu-Daudé
On 20/6/23 18:20, Peter Maydell wrote: The xkb official name for the Arabic keyboard layout is 'ara'. However xkb has for at least the past 15 years also permitted it to be named via the legacy synonym 'ar'. In xkeyboard-config 2.39 this synoynm was removed, which breaks compilation of QEMU:

[PATCH 1/3] exec/memory: Add symbolic value for memory listener priority for accel

2023-06-20 Thread Isaku Yamahata
Add MEMORY_LISTNER_PRIORITY_ACCEL for the symbolic value for the memory listener to replace the hard-coded value 10 for accel. No functional change intended. Signed-off-by: Isaku Yamahata --- accel/hvf/hvf-accel-ops.c | 2 +- accel/kvm/kvm-all.c | 2 +- hw/arm/xen_arm.c|

[PATCH 2/3] exec/memory: Add symbol for memory listener priority for dev backend

2023-06-20 Thread Isaku Yamahata
Add MEMORY_LISTNER_PRIORITY_DEV_BAKCNED for the symbolic value for memory listener to replace the hard-coded value 10 for the device backend. No functional change intended. Signed-off-by: Isaku Yamahata --- accel/kvm/kvm-all.c | 2 +- hw/remote/proxy-memory-listener.c | 2 +-

[PATCH 3/3] exec/memory: Add symbol for the min value of memory listener priority

2023-06-20 Thread Isaku Yamahata
Add MEMORY_LISTNER_PRIORITY_MIN for the symbolic value for the min value of the memory listener instead of the hard-coded magic value 0. Add explicit initialization. No functional change intended. Signed-off-by: Isaku Yamahata --- accel/kvm/kvm-all.c | 1 + include/exec/memory.h | 1 +

[PATCH 0/3] Add symbols for memory listener priority

2023-06-20 Thread Isaku Yamahata
The hard-coded value, 10, is used for memory_listener_register(). Add symbolic values for priority of struct MemoryLister. Replace those hard-coded values with symbols. The background is KVM guest memory[1] or TDX support. I'd like to add one more memory listener whose priority is higher than

Re: [PATCH 2/2] configs: Enable MTTCG for sparc, sparc64

2023-06-20 Thread Philippe Mathieu-Daudé
On 20/6/23 18:40, Richard Henderson wrote: This will be of small comfort to sparc64, because both sun4u and sun4v board models force max_cpus = 1. But it does enable actual smp for sparc32 sun4m. Yay \o/ Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

Re: [PATCH 1/2] target/sparc: Set TCG_GUEST_DEFAULT_MO

2023-06-20 Thread Philippe Mathieu-Daudé
On 20/6/23 18:40, Richard Henderson wrote: Always use TSO, per the Oracle 2015 manual. This is slightly less restrictive than the TCG_MO_ALL default, and happens to match the i386 model, which will eliminate a few extra barriers on that host. Signed-off-by: Richard Henderson ---

  1   2   3   4   5   >