[RFC PATCH v2 0/4] vhost: register and change IOMMU flag depending on ATS state

2023-04-30 Thread Viktor Prutyanov
When IOMMU and vhost are enabled together, QEMU tracks IOTLB or Device-TLB unmap events depending on whether Device-TLB is enabled. But even if Device-TLB and PCI ATS is enabled, the guest can reject to use it. For example, this situation appears when Windows Server 2022 is running with intel-iommu

[RFC PATCH v2 2/4] virtio-pci: add handling of ATS and Device-TLB enable

2023-04-30 Thread Viktor Prutyanov
Guest may enable or disable PCI ATS and, accordingly, Device-TLB for the device. Add a flag and a trigger function to handle Device-TLB enable/disable in VirtIO devices and hook it to ATS enable/disable for PCI transport. Signed-off-by: Viktor Prutyanov --- hw/virtio/virtio-pci.c | 17 ++

[RFC PATCH v2 1/4] pci: add handling of Enable bit in ATS Control Register

2023-04-30 Thread Viktor Prutyanov
According to PCIe Address Translation Services specification 5.1.3., ATS Control Register has Enable bit to enable/disable ATS. A trigger function is called at the Enable bit change, so that PCIe devices can handle ATS enable/disable. Signed-off-by: Viktor Prutyanov --- hw/pci/pcie.c | 2

[RFC PATCH v2 3/4] vhost: register and change IOMMU flag depending on Device-TLB state

2023-04-30 Thread Viktor Prutyanov
The guest can disable or never enable Device-TLB. In these cases, it can't be used even if enabled in QEMU. So, check Device-TLB state before registering IOMMU notifier and select unmap flag depending on that. Also, implement a way to change IOMMU notifier flag if Device-TLB state is changed. Bugl

[RFC PATCH v2 4/4] virtio-net: pass Device-TLB enable/disable events to vhost

2023-04-30 Thread Viktor Prutyanov
If vhost is enabled for virtio-net, Device-TLB enable/disable events must be passed to vhost for proper IOMMU unmap flag selection. Signed-off-by: Viktor Prutyanov --- hw/net/vhost_net.c | 11 +++ hw/net/virtio-net.c | 8 include/net/vhost_net.h | 2 ++ 3 files change

Re: [PATCH] hw/acpi: Set memory regions to native endian as a work around

2023-04-30 Thread BALATON Zoltan
On Mon, 1 May 2023, BALATON Zoltan wrote: - unaligned access is not handled correctly in acpi_pm_cnt_write() which now I think is the place where this should be fixed And also when running the test script on QEMU: acpi_pm_cnt_read: 0 2 -> 0x80 acpi_pm_cnt_read: 1 2 -> 0x80 where the second sh

Re: [PATCH] hw/acpi: Set memory regions to native endian as a work around

2023-04-30 Thread BALATON Zoltan
Hello, Finally could get to write some test script and have somebody with a real machine run that so I'm coming back to this with those results. On Tue, 7 Mar 2023, Paolo Bonzini wrote: On 3/7/23 11:01, BALATON Zoltan wrote: I'm not sure I follow what you mean so I'd need a patch to see then

Re: [PATCH v2 3/5] hw/display/virtio-gpu-virgl: define callbacks in realize function

2023-04-30 Thread Bernhard Beschow
Am 28. April 2023 16:48:21 UTC schrieb Gurchetan Singh : >From: Gurchetan Singh > >This reduces the amount of renderer backend specific needed to >be exposed to the GL device. We only need one realize function >per renderer backend. > >Signed-off-by: Gurchetan Singh >Reviewed-by: Philippe Ma

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

2023-04-30 Thread Henrik Carlqvist
I have now changed the patch to instead of using the -k switch use -global escc.sunkbd_layout= to select keyboard layout. It would be nice to somehow document this. Yes, in the monitor, you can type "info qtree" and see something like: dev: escc, id "" gpio-out "sysbus-irq" 2 frequen

回复:[PATCH] hw/usb/canokey: change license to GPLv2+

2023-04-30 Thread CanoKey Support
Apache license is considered by some to be not compatible > with GPLv2+. Since QEMU as combined work is GPLv2-only, > these two files should be made compatible. > > Reported-by: "Daniel P. Berrangé" > Link:https://lore.kernel.org/qemu-devel/zepkxncc%2fe6fk...@redhat.com/ > Signed-off-by: Hongren

Re: [PATCH v4 2/2] hvf: implement guest debugging on Apple Silicon hosts

2023-04-30 Thread Francesco Cagnin
> Other than that, the structure of the patch looks OK, but > I think you need to identify the cause of the problems > with SMP setups that you mention in the cover letter, > since they suggest that there's a bug lurking in here > somewhere. In the current patch, in `hvf_arch_update_guest_debug()`

Re: [PATCH] hw/usb/canokey: change license to GPLv2+

2023-04-30 Thread Philippe Mathieu-Daudé
On 30/4/23 15:58, Hongren (Zenithal) Zheng wrote: Apache license is considered by some to be not compatible with GPLv2+. Since QEMU as combined work is GPLv2-only, these two files should be made compatible. Reported-by: "Daniel P. Berrangé" Link: https://lore.kernel.org/qemu-devel/zepkxncc%2fe6

Re: VNC clipboard support

2023-04-30 Thread Philipp Hahn
Hello, Am 29.04.23 um 17:29 schrieb octavef...@outlook.fr: I'm trying to use the copy/paste with VNC. I'm launching qemu with: $ qemu-system-x86_64 -hda debiandisk.img vnc :1 I'm using tightvncviewer which has support for copy/paste. I try to copy text between guest and host. It doesn't wor

[PATCH] hw/usb/canokey: change license to GPLv2+

2023-04-30 Thread Hongren (Zenithal) Zheng
Apache license is considered by some to be not compatible with GPLv2+. Since QEMU as combined work is GPLv2-only, these two files should be made compatible. Reported-by: "Daniel P. Berrangé" Link: https://lore.kernel.org/qemu-devel/zepkxncc%2fe6fk...@redhat.com/ Signed-off-by: Hongren (Zenithal)

RE: [PATCH v3 1/2] igb: RX descriptors handling cleanup

2023-04-30 Thread Sriram Yagnaraman
> -Original Message- > From: Tomasz Dzieciol > Sent: Thursday, 27 April 2023 12:48 > To: qemu-devel@nongnu.org; akihiko.od...@daynix.com > Cc: Sriram Yagnaraman ; > jasow...@redhat.com; k.kwiec...@samsung.com; > m.socha...@samsung.com > Subject: [PATCH v3 1/2] igb: RX descriptors handlin

[PATCH] tb-maint: do not use mb_read/mb_set

2023-04-30 Thread Paolo Bonzini
The load side can use a relaxed load, which will surely happen before the work item is run by async_safe_run_on_cpu() or before double-checking under mmap_lock. The store side can use an atomic RMW operation. Signed-off-by: Paolo Bonzini --- accel/tcg/tb-maint.c | 4 ++-- 1 file changed, 2 inse

[PATCH] call_rcu: stop using mb_set/mb_read

2023-04-30 Thread Paolo Bonzini
Use a store-release when enqueuing a new call_rcu, and a load-acquire when dequeuing; and read the tail after checking that node->next is consistent, which is the standard message passing pattern and it is clearer than mb_read/mb_set. Signed-off-by: Paolo Bonzini --- util/rcu.c | 38

Re: [PULL v2 00/16] Misc patches for 2023-04-29

2023-04-30 Thread Richard Henderson
On 4/29/23 13:20, Paolo Bonzini wrote: The following changes since commit 05d50ba2d4668d43a835c5a502efdec9b92646e6: Merge tag 'migration-20230427-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-04-28 08:35:06 +0100) are available in the Git repository at: https