Re: [PATCH 1/3] ui/cocoa: Fix aspect ratio

2024-03-22 Thread Akihiko Odaki
On 2024/03/22 21:55, Peter Maydell wrote: On Fri, 22 Mar 2024 at 12:25, Akihiko Odaki wrote: On 2024/03/22 21:22, Peter Maydell wrote: On Mon, 18 Mar 2024 at 07:53, Akihiko Odaki wrote: [NSWindow setContentAspectRatio:] does not trigger window resize itself, so the wrong aspect ratio will

[PATCH v2 3/3] ui/cocoa: Use NSTrackingInVisibleRect

2024-03-22 Thread Akihiko Odaki
I observed [NSTrackingArea rect] becomes de-synchronized with the view frame with some unknown condition, and fails to track mouse movement on some area of the view. Specify NSTrackingInVisibleRect option to let Cocoa automatically update NSTrackingArea, which also saves code for synchronization.

[PATCH v2 0/3] Fixes for "ui/cocoa: Let the platform toggle fullscreen"

2024-03-22 Thread Akihiko Odaki
This series contains patches for regressions caused by commit 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen"). Signed-off-by: Akihiko Odaki --- Changes in v2: - Added a comment to [QemuCocoaView fixAspectRatio:]. (Peter Maydell) - Renamed [QemuCocoaView fixAspectRatio:] parameter to

[PATCH v2 2/3] ui/cocoa: Resize window after toggling zoom-to-fit

2024-03-22 Thread Akihiko Odaki
Resize the window so that the content will fit without zooming. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell --- ui/cocoa.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index 834ebf5f6

[PATCH v2 1/3] ui/cocoa: Fix aspect ratio

2024-03-22 Thread Akihiko Odaki
[NSWindow setContentAspectRatio:] does not trigger window resize itself, so the wrong aspect ratio will persist if nothing resizes the window. Call [NSWindow setContentSize:] in such a case. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: Akihiko Odaki --- ui/

Re: [PATCH v2 0/2] ARM Sbsa-ref: Enable CPU cluster topology

2024-03-22 Thread Marcin Juszkiewicz
W dniu 22.03.2024 o 19:51, Peter Maydell pisze: On Tue, 12 Mar 2024 at 08:32, Xiong Yining xiongyining1480 (2): hw/arm/sbsa-ref:Enable CPU cluster on ARM sbsa machine hw/arm/sbsa-ref: Add cpu-map to device tree Thanks for these patches. I think we should squash the two patches together

CommandNotFound on QMP Protocol

2024-03-22 Thread Mister Nether
Hi. I am trying to take advantage of QMP and automatically collect some data about vms. I found a nice list of qmp commands. I tried to use them, but many of them just sont seem to work. For example Request: { "execute": "guest-get-cpustats" } Response: {"error": {"class": "CommandNotFound", "desc

Re: rutabaga 0.1.3

2024-03-22 Thread Alyssa Ross
On Mon, Mar 04, 2024 at 04:23:20PM -0800, Gurchetan Singh wrote: > On Sat, Mar 2, 2024 at 6:38 AM Alyssa Ross wrote: > > > Hi Gurchetan, > > > > > >> > Would this be a suitable commit for the 0.1.3 release of rutabaga? > > > >> > > > > >> > https://chromium.googlesource.com/crosvm/crosvm/+/5dfd74a

Re: [PATCH v4 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-22 Thread Si-Wei Liu
On 3/21/2024 10:08 PM, Jason Wang wrote: On Fri, Mar 22, 2024 at 5:43 AM Si-Wei Liu wrote: On 3/20/2024 8:56 PM, Jason Wang wrote: On Thu, Mar 21, 2024 at 5:03 AM Si-Wei Liu wrote: On 3/19/2024 8:27 PM, Jason Wang wrote: On Tue, Mar 19, 2024 at 6:16 AM Si-Wei Liu wrote: On 3/17/2024

Re: [PATCH] build: Re-introduce an 'info' target to build a Texinfo manual.

2024-03-22 Thread Maxim Cournoyer
Hi Daniel, Daniel P. Berrangé writes: > On Tue, Mar 19, 2024 at 11:47:59AM +, Peter Maydell wrote: >> On Mon, 18 Mar 2024 at 03:05, Maxim Cournoyer >> wrote: >> > >> > This reinstates >> > , >> > which was committed at so

Re: [PATCH] build: Re-introduce an 'info' target to build a Texinfo manual.

2024-03-22 Thread Maxim Cournoyer
Hi Peter, Peter Maydell writes: > On Mon, 18 Mar 2024 at 03:05, Maxim Cournoyer > wrote: >> >> This reinstates >> , >> which was committed at some point but reverted many years later in >> cleanups that followed the migration

Re: [PULL 00/15] riscv-to-apply queue

2024-03-22 Thread Daniel Henrique Barboza
On 3/22/24 14:16, Michael Tokarev wrote: 22.03.2024 11:53, Alistair Francis : RISC-V PR for 9.0 * Do not enable all named features by default * A range of Vector fixes * Update APLIC IDC after claiming iforce register * Remove the dependency of Zvfbfmin to Zfbfmin * Fix mode in riscv_tlb_fi

Re: [PATCH v2] target/i386: Fix CPUID encoding of Fn8000001E_ECX

2024-03-22 Thread Moger, Babu
Any feedback or concerns with this patch? Otherwise can this be merged? Thanks Babu On 1/2/24 17:17, Babu Moger wrote: > Observed the following failure while booting the SEV-SNP guest and the > guest fails to boot with the smp parameters: > "-smp 192,sockets=1,dies=12,cores=8,threads=2". > > qemu

Re: [RFC v2 2/2] hw/riscv: Add server platform reference machine

2024-03-22 Thread Atish Kumar Patra
On Tue, Mar 12, 2024 at 6:53 AM Fei Wu wrote: > > The RISC-V Server Platform specification[1] defines a standardized set > of hardware and software capabilities, that portable system software, > such as OS and hypervisors can rely on being present in a RISC-V server > platform. > > A corresponding

Re: [RFC v2 2/2] hw/riscv: Add server platform reference machine

2024-03-22 Thread Atish Kumar Patra
On Fri, Mar 22, 2024 at 2:20 AM Marcin Juszkiewicz wrote: > > W dniu 22.03.2024 o 09:50, Heinrich Schuchardt pisze: > >>> I see no mention of device trees in the spec, but I do see ACPI. Do we > >>> really expect a server platform to use DTs? > >> > >> This platform "kind of" follows sbsa-ref

Re: [PATCH 19/26] RAMBlock: Add support of KVM private guest memfd

2024-03-22 Thread Michael Roth
On Fri, Mar 22, 2024 at 07:11:09PM +0100, Paolo Bonzini wrote: > From: Michael Roth This should be: From: Xiaoyao Li Looks like the author got reset in my tree for some reason and I failed to notice it before posting. Sorry for the mix-up. -Mike > > Add KVM guest_memfd support to RAMBlock

Re: [PATCH v2 0/2] ARM Sbsa-ref: Enable CPU cluster topology

2024-03-22 Thread Peter Maydell
On Tue, 12 Mar 2024 at 08:32, Xiong Yining wrote: > > Enable CPU cluster support on SbsaQemu platform, so that users can > specify a 4-level CPU hierarchy sockets/clusters/cores/threads. And this > topology can be passed to the firmware through DT cpu-map. > > Changes in v2: > - put this code befo

Re: [PATCH 4/7] hw/char/stm32l4x5_usart: Enable serial read and write

2024-03-22 Thread Peter Maydell
On Sun, 17 Mar 2024 at 10:41, Arnaud Minier wrote: > > Implement the ability to read and write characters to the > usart using the serial port. > > Signed-off-by: Arnaud Minier > Signed-off-by: Inès Varhol > --- > hw/char/stm32l4x5_usart.c | 105 +- > hw/char

[PATCH-for-9.1] target/ppc: Unify TYPE_POWERPC_CPU definition for 32/64-bit

2024-03-22 Thread Philippe Mathieu-Daudé
Apparently there is no wordsize special use with the QOM TYPE_POWERPC_CPU typename. Unify 32 and 64-bit with a single common definition. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu-qom.h | 4 1 file changed, 4 deletions(-) diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom

[PATCH] hw/microblaze: Do not allow xlnx-zynqmp-pmu-soc to be created by the user

2024-03-22 Thread Thomas Huth
Using xlnx-zynqmp-pmu-soc on the command line causes QEMU to crash: ./qemu-system-microblazeel -M petalogix-ml605 -device xlnx-zynqmp-pmu-soc ** ERROR:tcg/tcg.c:813:tcg_register_thread: assertion failed: (n < tcg_max_ctxs) Bail out! Aborted (core dumped) Mark the device with "user_creatable

[PATCH] kvm: use configs/ definition to conditionalize debug support

2024-03-22 Thread Paolo Bonzini
If an architecture adds support for KVM_CAP_SET_GUEST_DEBUG but QEMU does not have the necessary code, QEMU will fail to build after updating kernel headers. Avoid this by using a #define in config-target.h instead of KVM_CAP_SET_GUEST_DEBUG. Signed-off-by: Paolo Bonzini --- configs/targets/aar

Re: [External] Re: [PATCH v4 2/2] memory tier: create CPUless memory tiers after obtaining HMAT info

2024-03-22 Thread Ho-Ren (Jack) Chuang
On Fri, Mar 22, 2024 at 1:41 AM Huang, Ying wrote: > > "Ho-Ren (Jack) Chuang" writes: > > > The current implementation treats emulated memory devices, such as > > CXL1.1 type3 memory, as normal DRAM when they are emulated as normal memory > > (E820_TYPE_RAM). However, these emulated devices have

Re: [PATCH 5/7] hw/char/stm32l4x5_usart: Add options for serial parameters setting

2024-03-22 Thread Peter Maydell
On Sun, 17 Mar 2024 at 10:41, Arnaud Minier wrote: > > Add a function to change the settings of the > serial connection. > > Signed-off-by: Arnaud Minier > Signed-off-by: Inès Varhol > --- > hw/char/stm32l4x5_usart.c | 97 +++ > 1 file changed, 97 insertions(

Re: [PATCH] virtio: move logging definitions to hw/virtio/virtio.h

2024-03-22 Thread Philippe Mathieu-Daudé
On 22/3/24 19:03, Paolo Bonzini wrote: They are not included in upstream Linux, and therefore should not be in standard-headers. Otherwise, the next update to the headers would eliminate them. Cc: Michael S. Tsirkin Signed-off-by: Paolo Bonzini --- include/hw/virtio/virtio.h

Re: [PATCH 6/7] hw/arm: Add the USART to the stm32l4x5 SoC

2024-03-22 Thread Peter Maydell
On Sun, 17 Mar 2024 at 10:42, Arnaud Minier wrote: > > Add the USART to the SoC and connect it to the other implemented devices. > > Signed-off-by: Arnaud Minier > Signed-off-by: Inès Varhol > @@ -143,6 +172,7 @@ static void stm32l4x5_soc_realize(DeviceState *dev_soc, > Error **errp) > D

Re: [PATCH 7/7] tests/qtest: Add tests for the STM32L4x5 USART

2024-03-22 Thread Peter Maydell
On Sun, 17 Mar 2024 at 10:42, Arnaud Minier wrote: > > Test: > - read/write from/to the usart registers > - send/receive a character/string over the serial port > > The test to detect overrun is implemented but disabled > because overruns are currently impossible due to how we signal > in the USAR

[PATCH 10/26] [TO SQUASH] hw/i386: Remove redeclaration of struct setup_data

2024-03-22 Thread Paolo Bonzini
From: Michael Roth It is now provided by kernel headers. This needs to be squashed with the header update to avoid temporary build bisect breakage. Keeping it separate for reference. Signed-off-by: Michael Roth Message-ID: <20240320083945.991426-6-michael.r...@amd.com> Signed-off-by: Paolo Bon

[PATCH 13/26] KVM: remove kvm_arch_cpu_check_are_resettable

2024-03-22 Thread Paolo Bonzini
Board reset requires writing a fresh CPU state. As far as KVM is concerned, the only thing that blocks reset is that CPU state is encrypted; therefore, kvm_cpus_are_resettable() can simply check if that is the case. Signed-off-by: Paolo Bonzini --- include/sysemu/kvm.h | 10 -- ac

[PATCH 06/26] s390: Switch to use confidential_guest_kvm_init()

2024-03-22 Thread Paolo Bonzini
From: Xiaoyao Li Use unified confidential_guest_kvm_init() for consistency with other architectures. Signed-off-by: Xiaoyao Li Message-Id: <20240229060038.606591-1-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- target/s390x/kvm/pv.h | 14 -- hw/s390x/s390-virtio-ccw.c

[PATCH 21/26] kvm/memory: Make memory type private by default if it has guest memfd backend

2024-03-22 Thread Paolo Bonzini
From: Xiaoyao Li KVM side leaves the memory to shared by default, while may incur the overhead of paging conversion on the first visit of each page. Because the expectation is that page is likely to private for the VMs that require private memory (has guest memfd). Explicitly set the memory to p

[PATCH 23/26] RAMBlock: make guest_memfd require uncoordinated discard

2024-03-22 Thread Paolo Bonzini
Some subsystems like VFIO might disable ram block discard, but guest_memfd uses discard operations to implement conversions between private and shared memory. Because of this, sequences like the following can result in stale IOMMU mappings: 1. allocate shared page 2. convert page shared->private

[PATCH 16/26] target/i386: SEV: use KVM_SEV_INIT2 if possible

2024-03-22 Thread Paolo Bonzini
Implement support for the KVM_X86_SEV_VM and KVM_X86_SEV_ES_VM virtual machine types, and the KVM_SEV_INIT2 function of KVM_MEMORY_ENCRYPT_OP. These replace the KVM_SEV_INIT and KVM_SEV_ES_INIT functions, and have several advantages: - sharing the initialization sequence with SEV-SNP and TDX - a

[PATCH 15/26] target/i386: Implement mc->kvm_type() to get VM type

2024-03-22 Thread Paolo Bonzini
KVM is introducing a new API to create confidential guests, which will be used by TDX and SEV-SNP but is also available for SEV and SEV-ES. The API uses the VM type argument to KVM_CREATE_VM to identify which confidential computing technology to use. Since there are no other expected uses of VM t

[PATCH 14/26] target/i386: introduce x86-confidential-guest

2024-03-22 Thread Paolo Bonzini
Introduce a common superclass for x86 confidential guest implementations. It will extend ConfidentialGuestSupportClass with a method that provides the VM type to be passed to KVM_CREATE_VM. Signed-off-by: Paolo Bonzini --- target/i386/confidential-guest.h | 40 t

[PATCH 09/26] [HACK] linux-headers: Update headers for 6.8 + kvm-coco-queue + SNP

2024-03-22 Thread Paolo Bonzini
From: Michael Roth Pull in 6.8 kvm-next + kvm-coco-queue + SNP headers. Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini --- include/standard-headers/asm-x86/bootparam.h | 17 +- include/standard-headers/asm-x86/kvm_para.h | 3 +- include/standard-headers/asm-x86/setup_data.h |

[PATCH 22/26] HostMem: Add mechanism to opt in kvm guest memfd via MachineState

2024-03-22 Thread Paolo Bonzini
From: Xiaoyao Li Add a new member "guest_memfd" to memory backends. When it's set to true, it enables RAM_GUEST_MEMFD in ram_flags, thus private kvm guest_memfd will be allocated during RAMBlock allocation. Memory backend's @guest_memfd is wired with @require_guest_memfd field of MachineState. I

[PATCH 25/26] kvm: handle KVM_EXIT_MEMORY_FAULT

2024-03-22 Thread Paolo Bonzini
From: Chao Peng When geeting KVM_EXIT_MEMORY_FAULT exit, it indicates userspace needs to do the memory conversion on the RAMBlock to turn the memory into desired attribute, i.e., private/shared. Currently only KVM_MEMORY_EXIT_FLAG_PRIVATE in flags is valid when KVM_EXIT_MEMORY_FAULT happens. No

[PATCH 18/26] kvm: Introduce support for memory_attributes

2024-03-22 Thread Paolo Bonzini
From: Xiaoyao Li Introduce the helper functions to set the attributes of a range of memory to private or shared. This is necessary to notify KVM the private/shared attribute of each gpa range. KVM needs the information to decide the GPA needs to be mapped at hva-based shared memory or guest_memf

[PATCH 24/26] physmem: Introduce ram_block_discard_guest_memfd_range()

2024-03-22 Thread Paolo Bonzini
From: Xiaoyao Li When memory page is converted from private to shared, the original private memory is back'ed by guest_memfd. Introduce ram_block_discard_guest_memfd_range() for discarding memory in guest_memfd. Based on a patch by Isaku Yamahata . Signed-off-by: Xiaoyao Li Reviewed-by: David

[PATCH 26/26] i386/kvm: Move architectural CPUID leaf generation to separate helper

2024-03-22 Thread Paolo Bonzini
From: Sean Christopherson Move the architectural (for lack of a better term) CPUID leaf generation to a separate helper so that the generation code can be reused by TDX, which needs to generate a canonical VM-scoped configuration. For now this is just a cleanup, so keep the function static. Sig

[PATCH 20/26] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot

2024-03-22 Thread Paolo Bonzini
From: Chao Peng Switch to KVM_SET_USER_MEMORY_REGION2 when supported by KVM. With KVM_SET_USER_MEMORY_REGION2, QEMU can set up memory region that backend'ed both by hva-based shared memory and guest memfd based private memory. Signed-off-by: Chao Peng Co-developed-by: Xiaoyao Li Signed-off-by

[PATCH 19/26] RAMBlock: Add support of KVM private guest memfd

2024-03-22 Thread Paolo Bonzini
From: Michael Roth Add KVM guest_memfd support to RAMBlock so both normal hva based memory and kvm guest memfd based private memory can be associated in one RAMBlock. Introduce new flag RAM_GUEST_MEMFD. When it's set, it calls KVM ioctl to create private guest_memfd during RAMBlock setup. Alloc

[PATCH 05/26] ppc/pef: switch to use confidential_guest_kvm_init/reset()

2024-03-22 Thread Paolo Bonzini
From: Xiaoyao Li Use the unified interface to call confidential guest related kvm_init() and kvm_reset(), to avoid exposing pef specific functions. As a bonus, pef.h goes away since there is no direct call from sPAPR board code to PEF code anymore. Signed-off-by: Xiaoyao Li Signed-off-by: Paol

[PATCH 02/26] q35: Introduce smm_ranges property for q35-pci-host

2024-03-22 Thread Paolo Bonzini
From: Isaku Yamahata Add a q35 property to check whether or not SMM ranges, e.g. SMRAM, TSEG, etc... exist for the target platform. TDX doesn't support SMM and doesn't play nice with QEMU modifying related guest memory ranges. Signed-off-by: Isaku Yamahata Co-developed-by: Sean Christopherson

[PATCH for-9.1 00/26] x86, kvm: common confidential computing subset

2024-03-22 Thread Paolo Bonzini
These are the common bits for TDX and SEV-SNP support for QEMU 9.1. The main changes compared to what Michael posted is: 1) I am including KVM_SEV_INIT2 support patches without the linux-headers update hack (however the linux-headers update in these patches is still not final). This also include

[PATCH 04/26] i386/sev: Switch to use confidential_guest_kvm_init()

2024-03-22 Thread Paolo Bonzini
From: Xiaoyao Li Use confidential_guest_kvm_init() instead of calling SEV specific sev_kvm_init(). This allows the introduction of multiple confidential-guest-support subclasses for different x86 vendors. As a bonus, stubs are not needed anymore since there is no direct call from target/i386/kvm

[PATCH 08/26] scripts/update-linux-headers: Add bits.h to file imports

2024-03-22 Thread Paolo Bonzini
From: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index d48856f9e24..5f20434d5c5 100755 --- a/scri

[PATCH 11/26] runstate: skip initial CPU reset if reset is not actually possible

2024-03-22 Thread Paolo Bonzini
Right now, the system reset is concluded by a call to cpu_synchronize_all_post_reset() in order to sync any changes that the machine reset callback applied to the CPU state. However, for VMs with encrypted state such as SEV-ES guests (currently the only case of guests with non-resettable CPUs) thi

[PATCH 17/26] trace/kvm: Split address space and slot id in trace_kvm_set_user_memory()

2024-03-22 Thread Paolo Bonzini
From: Xiaoyao Li The upper 16 bits of kvm_userspace_memory_region::slot are address space id. Parse it separately in trace_kvm_set_user_memory(). Signed-off-by: Xiaoyao Li Message-ID: <20240229063726.610065-5-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c| 5 ++

[PATCH 07/26] scripts/update-linux-headers: Add setup_data.h to import list

2024-03-22 Thread Paolo Bonzini
From: Michael Roth Data structures like struct setup_data have been moved to a separate setup_data.h header which bootparam.h relies on. Add setup_data.h to the cp_portable() list and sync it along with the other header files. Note that currently struct setup_data is stripped away as part of gen

[PATCH 12/26] KVM: track whether guest state is encrypted

2024-03-22 Thread Paolo Bonzini
So far, KVM has allowed KVM_GET/SET_* ioctls to execute even if the guest state is encrypted, in which case they do nothing. For the new API using VM types, instead, the ioctls will fail which is a safer and more robust approach. The new API will be the only one available for SEV-SNP and TDX, but

[PATCH 03/26] confidential guest support: Add kvm_init() and kvm_reset() in class

2024-03-22 Thread Paolo Bonzini
From: Xiaoyao Li Different confidential VMs in different architectures all have the same needs to do their specific initialization (and maybe resetting) stuffs with KVM. Currently each of them exposes individual *_kvm_init() functions and let machine code or kvm code to call it. To facilitate th

[PATCH 01/26] pci-host/q35: Move PAM initialization above SMRAM initialization

2024-03-22 Thread Paolo Bonzini
From: Isaku Yamahata In mch_realize(), process PAM initialization before SMRAM initialization so that later patch can skill all the SMRAM related with a single check. Signed-off-by: Isaku Yamahata Signed-off-by: Xiaoyao Li Signed-off-by: Michael Roth Message-ID: <20240320083945.991426-18-mich

[PATCH] virtio: move logging definitions to hw/virtio/virtio.h

2024-03-22 Thread Paolo Bonzini
They are not included in upstream Linux, and therefore should not be in standard-headers. Otherwise, the next update to the headers would eliminate them. Cc: Michael S. Tsirkin Signed-off-by: Paolo Bonzini --- include/hw/virtio/virtio.h | 7 +++ include/standard-headers/li

Re: [PATCH 3/7] hw/char/stm32l4x5_usart: Add USART, UART, LPUART types

2024-03-22 Thread Peter Maydell
On Sun, 17 Mar 2024 at 10:41, Arnaud Minier wrote: > > Create different types for the USART, UART and LPUART of the STM32L4x5 > to deduplicate code and enable the implementation of different > behaviors depending on the type. > > Signed-off-by: Arnaud Minier > Signed-off-by: Inès Varhol > --- >

[PATCH v3 2/2] Implement SSH commands in QEMU GA for Windows

2024-03-22 Thread aidan_leuck
From: Aidan Leuck Signed-off-by: Aidan Leuck --- qga/commands-windows-ssh.c | 791 + qga/commands-windows-ssh.h | 26 ++ qga/meson.build| 5 +- qga/qapi-schema.json | 17 +- 4 files changed, 828 insertions(+), 11 deletions(-) create mod

[PATCH v3 1/2] Refactor common functions between POSIX and Windows implementation

2024-03-22 Thread aidan_leuck
From: Aidan Leuck Signed-off-by: Aidan Leuck --- qga/commands-posix-ssh.c | 47 + qga/commands-ssh-core.c | 57 qga/commands-ssh-core.h | 8 ++ qga/meson.build | 1 + 4 files changed, 67 insertions(+), 46

[PATCH v3 0/2] Implement SSH commands in QEMU GA for Windows

2024-03-22 Thread aidan_leuck
From: Aidan Leuck This patch aims to implement guest-ssh-add-authorized-keys, guest-ssh-remove-authorized-keys, and guest-ssh-get-authorized-keys for Windows. This PR is based on Microsoft's OpenSSH implementation https://github.com/PowerShell/Win32-OpenSSH. The guest agents will support Kubev

Re: [PULL 0/9] target/hppa fixes for 9.0

2024-03-22 Thread Richard Henderson
On 3/21/24 18:48, Michael Tokarev wrote: 21.03.2024 21:32, Helge Deller wrote: On 3/21/24 19:25, Sven Schnelle wrote: Michael Tokarev writes: 20.03.2024 03:32, Richard Henderson : Richard Henderson (3):     target/hppa: Fix assemble_16 insns for wide mode     target/hppa: Fix assem

Re: [PULL 00/15] riscv-to-apply queue

2024-03-22 Thread Michael Tokarev
22.03.2024 11:53, Alistair Francis : RISC-V PR for 9.0 * Do not enable all named features by default * A range of Vector fixes * Update APLIC IDC after claiming iforce register * Remove the dependency of Zvfbfmin to Zfbfmin * Fix mode in riscv_tlb_fill * Fix timebase-frequency when using KVM ac

Re: [PATCH v2 1/2] hw/arm: Add support for stm32g000 SoC family

2024-03-22 Thread Peter Maydell
On Wed, 20 Mar 2024 at 20:21, Felipe Balbi wrote: > > Minimal support with USARTs and SPIs working. This SoC will be used to > create and nucleo-g071rb board. > > Signed-off-by: Felipe Balbi > --- > > Changes since v1: > - Convert tabs to spaces (checkpatch.pl) > - Correct lines longer th

Re: [PATCH 3/7] KVM: track whether guest state is encrypted

2024-03-22 Thread Xiaoyao Li
On 3/19/2024 9:59 PM, Paolo Bonzini wrote: So far, KVM has allowed KVM_GET/SET_* ioctls to execute even if the guest state is encrypted, in which case they do nothing. For the new API using VM types, instead, the ioctls will fail which is a safer and more robust approach. The new API will be th

Re: [PATCH 4/7] KVM: remove kvm_arch_cpu_check_are_resettable

2024-03-22 Thread Xiaoyao Li
On 3/19/2024 9:59 PM, Paolo Bonzini wrote: Board reset requires writing a fresh CPU state. As far as KVM is concerned, the only thing that blocks reset is that CPU state is encrypted; therefore, kvm_cpus_are_resettable() can simply check if that is the case. Signed-off-by: Paolo Bonzini Revi

Re: [PATCH-for-9.0 1/2] hw/clock: Let clock_set_mul_div() return boolean value

2024-03-22 Thread Peter Maydell
On Fri, 22 Mar 2024 at 15:58, Philippe Mathieu-Daudé wrote: > > Let clock_set_mul_div() return a boolean value whether the > clock has been updated or not, similarly to clock_set(). > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/clock.h | 4 +++- > hw/core/clock.c| 8 +++- >

Re: [PATCH v5 5/7] migration/multifd: implement initialization of qpl compression

2024-03-22 Thread Peter Xu
On Fri, Mar 22, 2024 at 02:47:02PM +, Liu, Yuan1 wrote: > > -Original Message- > > From: Liu, Yuan1 > > Sent: Friday, March 22, 2024 10:07 AM > > To: Peter Xu > > Cc: Daniel P. Berrangé ; faro...@suse.de; qemu- > > de...@nongnu.org; hao.xi...@bytedance.com; bryan.zh...@bytedance.com; Z

Re: [PATCH-for-9.0 2/2] hw/misc/stm32l4x5_rcc: Propagate period when enabling a clock

2024-03-22 Thread Peter Maydell
On Fri, 22 Mar 2024 at 15:59, Philippe Mathieu-Daudé wrote: > > From: Arnaud Minier > > The "clock_set_mul_div" function doesn't propagate the clock period > to the children if it is changed (e.g. by enabling/disabling a clock > multiplexer). > This was overlooked during the implementation due to

Re: [PATCH v2 0/2] Add support for STM32G0 SoC family

2024-03-22 Thread Peter Maydell
On Wed, 20 Mar 2024 at 20:22, Felipe Balbi wrote: > > Hi all, > > These two patches add support for STM32G0 family and nucleo-g071rb > board. Patches have been tested with minimal embedded rust examples. > > Changes since v1: > > - Patch 1: > - Convert tabs to spaces (checkpatch.pl) > -

[PATCH] hw/s390x: Include missing 'cpu.h' header

2024-03-22 Thread Philippe Mathieu-Daudé
"cpu.h" is implicitly included. Include it explicitly to avoid the following error when refactoring headers: hw/s390x/s390-stattrib.c:86:40: error: use of undeclared identifier 'TARGET_PAGE_SIZE' len = sac->peek_stattr(sas, addr / TARGET_PAGE_SIZE, buflen, vals);

RE: [PATCH v4 1/3] ui/console: Introduce dpy_gl_dmabuf_get_height/width() helpers

2024-03-22 Thread Kim, Dongwon
Hi Marc-André, > -Original Message- > From: Marc-André Lureau > Sent: Friday, March 22, 2024 2:06 AM > To: Kim, Dongwon > Cc: qemu-devel@nongnu.org; phi...@linaro.org > Subject: Re: [PATCH v4 1/3] ui/console: Introduce > dpy_gl_dmabuf_get_height/width() helpers > > Hi Kim > > On Fri, M

[PATCH] hw/ppc/spapr: Include missing 'sysemu/tcg.h' header

2024-03-22 Thread Philippe Mathieu-Daudé
"sysemu/tcg.h" declares tcg_enabled(), and is implicitly included. Include it explicitly to avoid the following error when refactoring headers: hw/ppc/spapr.c:2612:9: error: call to undeclared function 'tcg_enabled'; ISO C99 and later do not support implicit function declarations [-Wimplicit-f

RE: [PATCH v4 3/3] ui/console: Introduce dpy_gl_create_dmabuf() helper

2024-03-22 Thread Kim, Dongwon
Hi Marc-André, > -Original Message- > From: Marc-André Lureau > Sent: Friday, March 22, 2024 2:06 AM > To: Kim, Dongwon > Cc: qemu-devel@nongnu.org; phi...@linaro.org > Subject: Re: [PATCH v4 3/3] ui/console: Introduce dpy_gl_create_dmabuf() > helper > > Hi > > On Fri, Mar 22, 2024 at

Re: [PATCH v2 2/2] hw/arm: Add nucleo-g071rb board

2024-03-22 Thread Peter Maydell
On Wed, 20 Mar 2024 at 20:21, Felipe Balbi wrote: > > This board is based around STM32G071RB SoC, a Cortex-M0 based > device. More information can be found at: > > https://www.st.com/en/product/nucleo-g071rb.html Could you put this URL in a comment in the source file too, please? > > Signed-off-

Re: [PATCH v2 1/2] hw/arm: Add support for stm32g000 SoC family

2024-03-22 Thread Peter Maydell
On Wed, 20 Mar 2024 at 20:21, Felipe Balbi wrote: > > Minimal support with USARTs and SPIs working. This SoC will be used to > create and nucleo-g071rb board. > > Signed-off-by: Felipe Balbi Hi; thanks for this patchset, it looks pretty good, so I think my review comments are mostly going to be

[PULL 2/3] migration/postcopy: Fix high frequency sync

2024-03-22 Thread peterx
From: Peter Xu With current code base I can observe extremely high sync count during precopy, as long as one enables postcopy-ram=on before switchover to postcopy. To provide some context of when QEMU decides to do a full sync: it checks must_precopy (which implies "data must be sent during prec

[PULL 3/3] migration/multifd: Fix clearing of mapped-ram zero pages

2024-03-22 Thread peterx
From: Fabiano Rosas When the zero page detection is done in the multifd threads, we need to iterate the second part of the pages->offset array and clear the file bitmap for each zero page. The piece of code we merged to do that is wrong. The reason this has passed all the tests is because the bi

[PATCH-for-9.1 v2 0/3] exec: Rename NEED_CPU_H -> COMPILING_PER_TARGET

2024-03-22 Thread Philippe Mathieu-Daudé
Since v1: - prerequisites merged - s/CONFIG_TARGET/COMPILING_PER_TARGET/ (Peter) 'NEED_CPU_H' guard target-specific code. Clarify by renaming as COMPILING_PER_TARGET. Philippe Mathieu-Daudé (3): gdbstub: Simplify #ifdef'ry in helpers.h hw/core: Remove check on NEED_CPU_H in tcg-cpu-ops.h ex

[PATCH-for-9.1 v2 2/3] hw/core: Remove check on NEED_CPU_H in tcg-cpu-ops.h

2024-03-22 Thread Philippe Mathieu-Daudé
Commit fd3f7d24d4 ("include/hw/core: Remove i386 conditional on fake_user_interrupt") remove the need to check on NEED_CPU_H. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/core/tcg-cpu-ops.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/hw/c

[PATCH-for-9.1 v2 3/3] exec: Rename NEED_CPU_H -> COMPILING_PER_TARGET

2024-03-22 Thread Philippe Mathieu-Daudé
'NEED_CPU_H' guard target-specific code; it is defined by meson altogether with the 'CONFIG_TARGET' definition. Rename NEED_CPU_H as COMPILING_PER_TARGET to clarify its meaning. Mechanical change running: $ sed -i s/NEED_CPU_H/COMPILING_PER_TARGET/g $(git grep -l NEED_CPU_H) then manually add a

[PULL 0/3] Migration 20240322 patches

2024-03-22 Thread peterx
From: Peter Xu The following changes since commit 853546f8128476eefb701d4a55b2781bb3a46faa: Merge tag 'pull-loongarch-20240322' of https://gitlab.com/gaosong/qemu into staging (2024-03-22 10:59:57 +) are available in the Git repository at: https://gitlab.com/peterx/qem

[PULL 1/3] migration: Revert mapped-ram multifd support to fd: URI

2024-03-22 Thread peterx
From: Fabiano Rosas This reverts commit decdc76772c453ff1444612e910caa0d45cd8eac in full and also the relevant migration-tests from 7a09f092834641b7a793d50a3a261073bbb404a6. After the addition of the new QAPI-based migration address API in 8.2 we've been converting an "fd:" URI into a SocketAddr

[PATCH-for-9.1 v2 1/3] gdbstub: Simplify #ifdef'ry in helpers.h

2024-03-22 Thread Philippe Mathieu-Daudé
Slightly simplify by checking NEED_CPU_H definition in header. Signed-off-by: Philippe Mathieu-Daudé --- include/gdbstub/helpers.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/gdbstub/helpers.h b/include/gdbstub/helpers.h index c573aef2dc..53e88d807c 10064

[PATCH-for-9.0 1/2] hw/clock: Let clock_set_mul_div() return boolean value

2024-03-22 Thread Philippe Mathieu-Daudé
Let clock_set_mul_div() return a boolean value whether the clock has been updated or not, similarly to clock_set(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/clock.h | 4 +++- hw/core/clock.c| 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/hw/c

[PATCH-for-9.0 2/2] hw/misc/stm32l4x5_rcc: Propagate period when enabling a clock

2024-03-22 Thread Philippe Mathieu-Daudé
From: Arnaud Minier The "clock_set_mul_div" function doesn't propagate the clock period to the children if it is changed (e.g. by enabling/disabling a clock multiplexer). This was overlooked during the implementation due to late changes. This commit propagates the change if the multiplier or div

[PATCH-for-9.0 0/2] hw/clock: Propagate clock changes when STM32L4X5 MUX is updated

2024-03-22 Thread Philippe Mathieu-Daudé
Per https://www.qemu.org/docs/master/devel/clocks.html#clock-multiplier-and-divider-settings: Note that clock_set_mul_div() does not automatically call clock_propagate(). If you make a runtime change to the multiplier or divider you must call clock_propagate() yourself. Fix what we forgot

RE: [PATCH-for-9.1 08/27] target/hexagon: Convert to TCGCPUOps::get_cpu_state()

2024-03-22 Thread Brian Cain
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: Tuesday, March 19, 2024 10:43 AM > To: qemu-devel@nongnu.org > Cc: qemu-s3...@nongnu.org; Richard Henderson > ; qemu-...@nongnu.org; qemu- > a...@nongnu.org; qemu-ri...@nongnu.org; Anton Johansson ; > Philippe Mathieu-Daudé ; Br

Re: [PATCH 3/3] qapi: Fix bogus documentation of query-migrationthreads

2024-03-22 Thread John Snow
On Fri, Mar 22, 2024, 9:51 AM Markus Armbruster wrote: > The doc comment documents an argument that doesn't exist. Would > fail compilation if it was marked up correctly. Delete. > > The Returns: section fails to refer to the data type, leaving the user > to guess. Fix that. > > The command na

Re: [PATCH 01/12] qapi: Drop stray Arguments: line from qmp_capabilities docs

2024-03-22 Thread John Snow
On Fri, Mar 22, 2024, 10:09 AM Markus Armbruster wrote: > Reported-by: John Snow > Fixes: 119ebac1feb2 (qapi-schema: use generated marshaller for > 'qmp_capabilities') > Signed-off-by: Markus Armbruster > Reviewed-by: John Snow --- > qapi/control.json | 2 -- > 1 file changed, 2 deletions(-

Re: [PATCH 5/7] target/i386: introduce x86-confidential-guest

2024-03-22 Thread Xiaoyao Li
On 3/19/2024 9:59 PM, Paolo Bonzini wrote: Introduce a common superclass for x86 confidential guest implementations. It will extend ConfidentialGuestSupportClass with a method that provides the VM type to be passed to KVM_CREATE_VM. Signed-off-by: Paolo Bonzini Reviewed-by: Xiaoyao Li

Re: [PATCH 0/3] qapi/migration: Doc fixes

2024-03-22 Thread Peter Xu
On Fri, Mar 22, 2024 at 02:51:14PM +0100, Markus Armbruster wrote: > I'd like to get these into the release. Please review. > > Markus Armbruster (3): > qapi: Improve migration TLS documentation > qapi: Resync MigrationParameter and MigrateSetParameters > qapi: Fix bogus documentation of qu

Re: [PATCH 6/7] target/i386: Implement mc->kvm_type() to get VM type

2024-03-22 Thread Xiaoyao Li
On 3/19/2024 9:59 PM, Paolo Bonzini wrote: From: Xiaoyao Li KVM is introducing a new API to create confidential guests, which will be used by TDX and SEV-SNP but is also available for SEV and SEV-ES. The API uses the VM type argument to KVM_CREATE_VM to identify which confidential computing te

Re: [PATCH for-9.0 v2] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

2024-03-22 Thread Philippe Mathieu-Daudé
On 22/3/24 10:23, Stefano Garzarella wrote: vhost_vdpa_set_vring_ready() could already fail, but if Linux's patch [1] will be merged, it may fail with more chance if userspace does not activate virtqueues before DRIVER_OK when VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated. So better c

Re: [PULL 1/1] target/loongarch: Fix qemu-system-loongarch64 assert failed with the option '-d int'

2024-03-22 Thread Michael Tokarev
22.03.2024 13:03, Song Gao : qemu-system-loongarch64 assert failed with the option '-d int', the helper_idle() raise an exception EXCP_HLT, but the exception name is undefined. Signed-off-by: Song Gao Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240321123606.1704900-1-gaos...@loongson.c

Re: [PATCH 0/4] hw/nmi: Remove @cpu_index argument

2024-03-22 Thread Peter Maydell
On Fri, 22 Mar 2024 at 14:08, Cédric Le Goater wrote: > > On 3/20/24 16:00, Peter Maydell wrote: > > On Wed, 20 Mar 2024 at 14:10, Mark Burton wrote: > >> I’d broaden this to all ’signals’ (IRQ, Reset etc) - and I guess > >> similar statements apply, with the “bridge” between the function > >> an

Re: [PATCH v8] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-03-22 Thread Daniel P . Berrangé
On Tue, Mar 12, 2024 at 03:48:49AM -0400, Shaoqin Huang wrote: > The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide > which PMU events are provided to the guest. Add a new option > `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. > Without the filter, all P

Re: [PATCH] migration/postcopy: Fix high frequency sync

2024-03-22 Thread Peter Xu
On Thu, Mar 21, 2024 at 12:20:32PM -0400, Peter Xu wrote: > On Wed, Mar 20, 2024 at 05:44:53PM -0400, pet...@redhat.com wrote: > > From: Peter Xu > > > > On current code base I can observe extremely high sync count during > > precopy, as long as one enables postcopy-ram=on before switchover to >

RE: [PATCH v5 5/7] migration/multifd: implement initialization of qpl compression

2024-03-22 Thread Liu, Yuan1
> -Original Message- > From: Liu, Yuan1 > Sent: Friday, March 22, 2024 10:07 AM > To: Peter Xu > Cc: Daniel P. Berrangé ; faro...@suse.de; qemu- > de...@nongnu.org; hao.xi...@bytedance.com; bryan.zh...@bytedance.com; Zou, > Nanhai > Subject: RE: [PATCH v5 5/7] migration/multifd: implement

RE: [PATCH v2 1/2] Implement SSH commands in QEMU GA for Windows

2024-03-22 Thread Aidan Leuck
Thanks for the feedback, Daniel, I will get these issues resolved shortly. Thank you for your patience, this is my first time committing to QEMU. Aidan Leuck -Original Message- From: Daniel P. Berrangé Sent: Friday, March 22, 2024 4:32 AM To: Aidan Leuck Cc: qemu-devel@nongnu.org; kko

Re: [PATCH 1/3] qapi: Improve migration TLS documentation

2024-03-22 Thread Markus Armbruster
Fabiano Rosas writes: > Markus Armbruster writes: > >> MigrateSetParameters is about setting parameters, and >> MigrationParameters is about querying them. Their documentation of >> @tls-creds and @tls-hostname has residual damage from a failed attempt >> at de-duplicating them (see commit de63

Re: [PATCH 3/3] qapi: Fix bogus documentation of query-migrationthreads

2024-03-22 Thread Fabiano Rosas
Markus Armbruster writes: > The doc comment documents an argument that doesn't exist. Would > fail compilation if it was marked up correctly. Delete. > > The Returns: section fails to refer to the data type, leaving the user > to guess. Fix that. > > The command name violates QAPI naming rules

[PATCH 07/12] qapi: Fix abbreviation punctuation in doc comments

2024-03-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qapi/migration.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index aa1b39bce1..faeb7d1ca9 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1762,7 +1762,7 @@ #defaul

  1   2   >