Re: [PATCH v10 3/6] ui/console: Use qemu_dmabuf_get_..() helpers instead

2024-04-23 Thread Daniel P . Berrangé
On Mon, Apr 22, 2024 at 07:22:50PM -0700, dongwon@intel.com wrote: > From: Dongwon Kim > > This commit updates all instances where fields within the QemuDmaBuf > struct are directly accessed, replacing them with calls to these new > helper functions. > > v6: fix typos in helper names in

Re: hppa-firmware.img missing build-id

2024-04-23 Thread Cole Robinson
On 4/23/24 10:11 AM, Cole Robinson wrote: > Hi, > > hppa-firmware.img and hppa-firmware64.img in qemu.git are missing ELF > build-id annotations. rpm builds on Fedora will error if an ELF binary > doesn't have build-id: > > RPM build errors: > Missing build-id in >

Re: hppa-firmware.img missing build-id

2024-04-23 Thread Helge Deller
On 4/23/24 16:58, Cole Robinson wrote: On 4/23/24 10:11 AM, Cole Robinson wrote: Hi, hppa-firmware.img and hppa-firmware64.img in qemu.git are missing ELF build-id annotations. rpm builds on Fedora will error if an ELF binary doesn't have build-id: RPM build errors: Missing build-id in

[PULL 45/63] i386/sev: Add 'legacy-vm-type' parameter for SEV guest objects

2024-04-23 Thread Paolo Bonzini
From: Michael Roth QEMU will currently automatically make use of the KVM_SEV_INIT2 API for initializing SEV and SEV-ES guests verses the older KVM_SEV_INIT/KVM_SEV_ES_INIT interfaces. However, the older interfaces will silently avoid sync'ing FPU/XSAVE state to the VMSA prior to encryption,

Re: hppa-firmware.img missing build-id

2024-04-23 Thread Daniel P . Berrangé
On Tue, Apr 23, 2024 at 05:07:17PM +0200, Helge Deller wrote: > On 4/23/24 16:58, Cole Robinson wrote: > > On 4/23/24 10:11 AM, Cole Robinson wrote: > > > Hi, > > > > > > hppa-firmware.img and hppa-firmware64.img in qemu.git are missing ELF > > > build-id annotations. rpm builds on Fedora will

[PULL 14/63] memory-device: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the memory-device stubs are needed exactly when the Kconfig symbols are not needed, move them to hw/mem/. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-15-pbonz...@redhat.com> Signed-off-by: Paolo

[PULL 11/63] hw/virtio: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the virtio memory device stubs are needed exactly when the Kconfig symbol is not enabled, they can be placed in hw/virtio/ and conditionalized on CONFIG_VIRTIO_MD. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-12-pbonz...@redhat.com>

[PULL 60/63] target/i386/cpu: Merge the warning and error messages for AMD HT check

2024-04-23 Thread Paolo Bonzini
From: Zhao Liu Currently, the difference between warn_report_once() and error_report_once() is the former has the "warning:" prefix, while the latter does not have a similar level prefix. At the meantime, considering that there is no error handling logic here, and the purpose of

[PULL 58/63] target/i386/host-cpu: Consolidate the use of warn_report_once()

2024-04-23 Thread Paolo Bonzini
From: Zhao Liu Use warn_report_once() to get rid of the static local variable "warned". Signed-off-by: Zhao Liu Message-ID: <20240327103951.3853425-2-zhao1@linux.intel.com> Signed-off-by: Paolo Bonzini --- target/i386/host-cpu.c | 11 --- 1 file changed, 4 insertions(+), 7

[PULL 33/63] i386/sev: Switch to use confidential_guest_kvm_init()

2024-04-23 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

[PULL 28/63] target/i386: Export RFDS bit to guests

2024-04-23 Thread Paolo Bonzini
From: Pawan Gupta Register File Data Sampling (RFDS) is a CPU side-channel vulnerability that may expose stale register value. CPUs that set RFDS_NO bit in MSR IA32_ARCH_CAPABILITIES indicate that they are not vulnerable to RFDS. Similarly, RFDS_CLEAR indicates that CPU is affected by RFDS, and

[PULL 35/63] s390: Switch to use confidential_guest_kvm_init()

2024-04-23 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 --

[PULL 62/63] pythondeps.toml: warn about updates needed to docs/requirements.txt

2024-04-23 Thread Paolo Bonzini
docs/requirements.txt is expected by readthedocs and should be in sync with pythondeps.toml. Add a comment to both. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- docs/requirements.txt | 3 +++ pythondeps.toml | 1 + 2 files changed, 4

[PULL 18/63] stubs: move monitor_fdsets_cleanup with other fdset stubs

2024-04-23 Thread Paolo Bonzini
Even though monitor_get_fd() has to remain separate because it is mocked by tests/unit/test-util-sockets, monitor_fdsets_cleanup() is logically part of the stubs for monitor/fds.c, so move it there. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID:

[PULL 05/63] yank: only build if needed

2024-04-23 Thread Paolo Bonzini
The yank feature is not used in user emulation. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-6-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- util/meson.build |

Re: [PATCH RFC 00/26] Multifd  device state transfer support with VFIO consumer

2024-04-23 Thread Maciej S. Szmigiero
On 18.04.2024 22:02, Peter Xu wrote: On Thu, Apr 18, 2024 at 08:14:15PM +0200, Maciej S. Szmigiero wrote: On 18.04.2024 12:39, Daniel P. Berrangé wrote: On Thu, Apr 18, 2024 at 11:50:12AM +0200, Maciej S. Szmigiero wrote: On 17.04.2024 18:35, Daniel P. Berrangé wrote: On Wed, Apr 17, 2024 at

Problems (timeouts) when testing usb-ohci with qemu

2024-04-23 Thread Guenter Roeck
Hi, when testing usb-ohci with qemu's pci-ohci emulation, I keep getting random usb interface timeouts. Sometimes the usb_hub_wq times out. [9.555666] Waiting for root device /dev/sda... [ 62.452625] INFO: task kworker/0:2:42 blocked for more than 30 seconds. [ 62.453036] Tainted:

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

2024-04-23 Thread aidan_leuck
From: aidaleuc Signed-off-by: aidaleuc --- qga/commands-windows-ssh.c | 712 + qga/commands-windows-ssh.h | 26 ++ qga/meson.build| 5 +- qga/qapi-schema.json | 17 +- 4 files changed, 749 insertions(+), 11 deletions(-) create mode

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

2024-04-23 Thread aidan_leuck
From: aidaleuc Signed-off-by: aidaleuc --- qga/commands-common-ssh.c | 50 +++ qga/commands-common-ssh.h | 10 qga/commands-posix-ssh.c | 47 +--- qga/meson.build | 1 + 4 files changed, 62 insertions(+),

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

2024-04-23 Thread aidan_leuck
From: aidaleuc 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

[PULL 07/63] hw/core: Move system emulation files to system_ss

2024-04-23 Thread Paolo Bonzini
hotplug.c, qdev-hotplug.c and reset.c are not used by user emulation and need not be included in hwcore_ss. Move them to system_ss, where they belong, by letting the linker pull in the stubs when needed. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID:

[PULL 54/63] physmem: Introduce ram_block_discard_guest_memfd_range()

2024-04-23 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

[PULL 32/63] confidential guest support: Add kvm_init() and kvm_reset() in class

2024-04-23 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

[PULL 37/63] scripts/update-linux-headers: Add bits.h to file imports

2024-04-23 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 ---

[PULL 29/63] pci-host/q35: Move PAM initialization above SMRAM initialization

2024-04-23 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:

[PULL 59/63] target/i386/cpu: Consolidate the use of warn_report_once()

2024-04-23 Thread Paolo Bonzini
From: Zhao Liu The difference between error_printf() and error_report() is the latter may contain more information, such as the name of the program ("qemu-system-x86_64"). Thus its variant error_report_once() and warn_report()'s variant warn_report_once() can be used here to print the

[PULL 15/63] colo: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the colo stubs are needed exactly when the build options are not enabled, move them together with the code they stub. Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-16-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- stubs/colo.c => migration/colo-stubs.c | 0

[PULL 41/63] KVM: remove kvm_arch_cpu_check_are_resettable

2024-04-23 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini ---

Re: [PATCH RFC 00/26] Multifd  device state transfer support with VFIO consumer

2024-04-23 Thread Maciej S. Szmigiero
On 19.04.2024 17:31, Peter Xu wrote: On Fri, Apr 19, 2024 at 11:07:21AM +0100, Daniel P. Berrangé wrote: On Thu, Apr 18, 2024 at 04:02:49PM -0400, Peter Xu wrote: On Thu, Apr 18, 2024 at 08:14:15PM +0200, Maciej S. Szmigiero wrote: I think one of the reasons for these results is that mixed

Re: [PATCH 6.6.y] virtio_net: Do not send RSS key if it is not supported

2024-04-23 Thread Greg KH
On Mon, Apr 22, 2024 at 08:18:03AM -0700, Vlad Poenaru wrote: > From: Breno Leitao > > commit 059a49aa2e25c58f90b50151f109dd3c4cdb3a47 upstream. > Now queued up, thanks. greg k-h

Re: hppa-firmware.img missing build-id

2024-04-23 Thread Richard W.M. Jones
On Tue, Apr 23, 2024 at 10:11:50AM -0400, Cole Robinson wrote: > Hi, > > hppa-firmware.img and hppa-firmware64.img in qemu.git are missing ELF > build-id annotations. rpm builds on Fedora will error if an ELF binary > doesn't have build-id: > > RPM build errors: > Missing build-id in >

[PULL 04/63] tests/unit: match some unit tests to corresponding feature switches

2024-04-23 Thread Paolo Bonzini
Try not to test code that is not used by user mode emulation, or by the block layer, unless they are being compiled; and fix test-timed-average which was not compiled with --disable-system --enable-tools. This is by no means complete, it only touches the more blatantly wrong cases.

[PULL 21/63] kvm: use configs/ definition to conditionalize debug support

2024-04-23 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 ---

[PULL 50/63] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot

2024-04-23 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

[PULL 30/63] q35: Introduce smm_ranges property for q35-pci-host

2024-04-23 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

[PULL 00/63] First batch of i386 and build system patch for QEMU 9.1

2024-04-23 Thread Paolo Bonzini
The following changes since commit 62dbe54c24dbf77051bafe1039c31ddc8f37602d: Update version for v9.0.0-rc4 release (2024-04-16 18:06:15 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to

[PULL 02/63] tests: only build plugins if TCG is enabled

2024-04-23 Thread Paolo Bonzini
There is no way to use them for testing, if all the available accelerators use hardware virtualization. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-3-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini ---

[PULL 10/63] hw/usb: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the USB stubs are needed exactly when the Kconfig symbols are not enabled, they can be placed in hw/usb/ and conditionalized on CONFIG_USB. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID:

[PULL 17/63] stubs: include stubs only if needed

2024-04-23 Thread Paolo Bonzini
Currently it is not documented anywhere why some functions need to be stubbed. Group the files in stubs/meson.build according to who needs them, both to reduce the size of the compilation and to clarify the use of stubs. Signed-off-by: Paolo Bonzini Message-ID:

[PULL 01/63] meson: do not link pixman automatically into all targets

2024-04-23 Thread Paolo Bonzini
The dependency on pixman is listed manually in all sourcesets that need it. There is no need to bring into libqemuutil, since there is nothing in util/ that needs pixman either. Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID:

[PULL 26/63] target/i386: Introduce Icelake-Server-v7 to enable TSX

2024-04-23 Thread Paolo Bonzini
From: Zhenzhong Duan When start L2 guest with both L1/L2 using Icelake-Server-v3 or above, QEMU reports below warning: "warning: host doesn't support requested feature: MSR(10AH).taa-no [bit 8]" Reason is QEMU Icelake-Server-v3 has TSX feature disabled but enables taa-no bit. It's meaningless

[PULL 39/63] runstate: skip initial CPU reset if reset is not actually possible

2024-04-23 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)

[PULL 19/63] vga: optimize computation of dirty memory region

2024-04-23 Thread Paolo Bonzini
The depth == 0 and depth == 15 have to be special cased because width * depth / 8 does not provide the correct scanline length. However, thanks to the recent reorganization of vga_draw_graphic() the correct value of VRAM bits per pixel is available in "bits". Use it (via the same "bwidth"

[PULL 24/63] kvm: add support for guest physical bits

2024-04-23 Thread Paolo Bonzini
From: Gerd Hoffmann Query kvm for supported guest physical address bits, in cpuid function 8008, eax[23:16]. Usually this is identical to host physical address bits. With NPT or EPT being used this might be restricted to 48 (max 4-level paging address space size) even if the host cpu

[PULL 46/63] hw/i386/sev: Use legacy SEV VM types for older machine types

2024-04-23 Thread Paolo Bonzini
From: Michael Roth Newer 9.1 machine types will default to using the KVM_SEV_INIT2 API for creating SEV/SEV-ES going forward. However, this API results in guest measurement changes which are generally not expected for users of these older guest types and can cause disruption if they switch to a

[PULL 25/63] i386/kvm: Move architectural CPUID leaf generation to separate helper

2024-04-23 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.

[PULL 42/63] target/i386: introduce x86-confidential-guest

2024-04-23 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

[PULL 52/63] HostMem: Add mechanism to opt in kvm guest memfd via MachineState

2024-04-23 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.

Re: [PATCH v2 01/15] exec/memtxattr: add process identifier to the transaction attributes

2024-04-23 Thread Frank Chang
Reviewed-by: Frank Chang Daniel Henrique Barboza 於 2024年3月8日 週五 上午12:04寫道: > > From: Tomasz Jeznach > > Extend memory transaction attributes with process identifier to allow > per-request address translation logic to use requester_id / process_id > to identify memory mapping (e.g. enabling

[PULL 08/63] hw: Include minimal source set in user emulation build

2024-04-23 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Only the files in hwcore_ss[] are required to link a user emulation binary. Have meson process the hw/ sub-directories if system emulation is selected, otherwise directly process hw/core/ to get hwcore_ss[], which is the only set required by user emulation. This

[PULL 51/63] kvm/memory: Make memory type private by default if it has guest memfd backend

2024-04-23 Thread Paolo Bonzini
From: Xiaoyao Li KVM side leaves the memory to shared by default, which 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

[PULL 53/63] RAMBlock: make guest_memfd require uncoordinated discard

2024-04-23 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

[PULL 48/63] kvm: Introduce support for memory_attributes

2024-04-23 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

[PULL 12/63] semihosting: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the semihosting stubs are needed exactly when the Kconfig symbols are not needed, move them to semihosting/ and conditionalize them on CONFIG_SEMIHOSTING and/or CONFIG_SYSTEM_ONLY. Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-13-pbonz...@redhat.com> Signed-off-by: Paolo

[PULL 38/63] linux-headers: update to current kvm/next

2024-04-23 Thread Paolo Bonzini
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 | 83 +++ include/standard-headers/linux/ethtool.h | 48 ++ include/standard-headers/linux/fuse.h

[PULL 57/63] kvm/tdx: Ignore memory conversion to shared of unassigned region

2024-04-23 Thread Paolo Bonzini
From: Isaku Yamahata TDX requires vMMIO region to be shared. For KVM, MMIO region is the region which kvm memslot isn't assigned to (except in-kernel emulation). qemu has the memory region for vMMIO at each device level. While OVMF issues MapGPA(to-shared) conservatively on 32bit PCI MMIO

[PULL 34/63] ppc/pef: switch to use confidential_guest_kvm_init/reset()

2024-04-23 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:

[PULL 56/63] kvm/tdx: Don't complain when converting vMMIO region to shared

2024-04-23 Thread Paolo Bonzini
From: Isaku Yamahata Because vMMIO region needs to be shared region, guest TD may explicitly convert such region from private to shared. Don't complain such conversion. Signed-off-by: Isaku Yamahata Signed-off-by: Xiaoyao Li Message-ID: <20240229063726.610065-34-xiaoyao...@intel.com>

[PULL 27/63] target/i386: Add new CPU model SierraForest

2024-04-23 Thread Paolo Bonzini
From: Tao Su According to table 1-2 in Intel Architecture Instruction Set Extensions and Future Features (rev 051) [1], SierraForest has the following new features which have already been virtualized: - CMPCCXADD CPUID.(EAX=7,ECX=1):EAX[bit 7] - AVX-IFMA CPUID.(EAX=7,ECX=1):EAX[bit 23] -

[PULL 44/63] target/i386: SEV: use KVM_SEV_INIT2 if possible

2024-04-23 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 -

[PULL 13/63] ramfb: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the ramfb stubs are needed exactly when the Kconfig symbols are not needed, move them to hw/display/ and compile them when ramfb.c is absent. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID:

[PULL 22/63] hw: Add compat machines for 9.1

2024-04-23 Thread Paolo Bonzini
Add 9.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Reviewed-by: Cornelia Huck Acked-by: Thomas Huth Reviewed-by: Harsh Prateek Bora Reviewed-by: Zhao Liu Cc: Gavin Shan Signed-off-by: Paolo Bonzini --- include/hw/boards.h| 3 +++ include/hw/i386/pc.h | 3 +++

Re: [PULL 25/63] i386/kvm: Move architectural CPUID leaf generation to separate helper

2024-04-23 Thread Xiaoyao Li
On 4/23/2024 11:09 PM, Paolo Bonzini wrote: 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

Re: [PATCH 0/6] Add ivshmem-flat device

2024-04-23 Thread Bill Mills
Hi Markus, On 4/23/24 6:39 AM, Markus Armbruster wrote: Gustavo Romero writes: Hi Markus, Thanks for interesting in the ivshmem-flat device. Bill Mills (cc:ed) is the best person to answer your question, so please find his answer below. On 2/28/24 3:29 AM, Markus Armbruster wrote:

[PULL 16/63] stubs: split record/replay stubs further

2024-04-23 Thread Paolo Bonzini
replay.c symbols are only needed by user mode emulation, with the exception of replay_mode that is needed by both user mode emulation (by way of qemu_guest_getrandom) and block layer tools (by way of util/qemu-timer.c). Since it is needed by libqemuutil rather than specific files that are part of

[PULL 47/63] trace/kvm: Split address space and slot id in trace_kvm_set_user_memory()

2024-04-23 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

[PULL 55/63] kvm: handle KVM_EXIT_MEMORY_FAULT

2024-04-23 Thread Paolo Bonzini
From: Chao Peng Upon an KVM_EXIT_MEMORY_FAULT exit, userspace needs to do the memory conversion on the RAMBlock to turn the memory into desired attribute, switching between private and shared. Currently only KVM_MEMORY_EXIT_FLAG_PRIVATE in flags is valid when KVM_EXIT_MEMORY_FAULT happens.

[PULL 20/63] vga: move dirty memory region code together

2024-04-23 Thread Paolo Bonzini
Take into account split screen mode close to wrap around, which is the other special case for dirty memory region computation. Signed-off-by: Paolo Bonzini --- hw/display/vga.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index

[PULL 06/63] util/qemu-config: Extract QMP commands to qemu-config-qmp.c

2024-04-23 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé QMP is irrelevant for user emulation. Extract the code related to QMP in a different source file, which won't be build for user emulation binaries. This avoid pulling pointless code. Signed-off-by: Philippe Mathieu-Daudé Message-ID:

[PULL 31/63] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled

2024-04-23 Thread Paolo Bonzini
From: Xiaoyao Li A value 1 of PCAT_COMPAT (bit 0) of MADT.Flags indicates that the system also has a PC-AT-compatible dual-8259 setup, i.e., the PIC. When PIC is not enabled (pic=off) for x86 machine, the PCAT_COMPAT bit needs to be cleared. The PIC probe should then print: [0.155970]

[PULL 23/63] target/i386: add guest-phys-bits cpu property

2024-04-23 Thread Paolo Bonzini
From: Gerd Hoffmann Allows to set guest-phys-bits (cpuid leaf 8008, eax[23:16]) via -cpu $model,guest-phys-bits=$nr. Signed-off-by: Gerd Hoffmann Message-ID: <20240318155336.156197-3-kra...@redhat.com> Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 8

[PULL 63/63] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-23 Thread Paolo Bonzini
From: Mark Cave-Ayland The various Intel CPU manuals claim that SGDT and SIDT can write either 24-bits or 32-bits depending upon the operand size, but this is incorrect. Not only do the Intel CPU manuals give contradictory information between processor revisions, but this information doesn't

Re: [PATCH intel_iommu 3/7] intel_iommu: make types match

2024-04-23 Thread CLEMENT MATHIEU--DRIF
On 23/04/2024 10:19, Philippe Mathieu-Daudé wrote: > > On 23/4/24 07:05, CLEMENT MATHIEU--DRIF wrote: >> >> On 22/04/2024 19:03, Philippe Mathieu-Daudé wrote: >>> On 22/4/24 17:52, CLEMENT MATHIEU--DRIF wrote: The 'level' field in vtd_iotlb_key is an uint8_t. We don't need to store

[PULL 09/63] stubs: remove obsolete stubs

2024-04-23 Thread Paolo Bonzini
These file define functions are are not called from common code anymore. Delete those functions and, if applicable, the entire files. Signed-off-by: Paolo Bonzini Acked-by: Richard Henderson Message-ID: <20240408155330.522792-10-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini ---

[PATCH] linux-user: Add ioctl for BLKBSZSET

2024-04-23 Thread Michael Vogt
Tiny patch to add the ioctl wrapper definition for BLKBSZSET. Signed-off-by: Michael Vogt --- linux-user/ioctls.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index d508d0c04a..3b41128fd7 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h

[PULL 61/63] accel/tcg/icount-common: Consolidate the use of warn_report_once()

2024-04-23 Thread Paolo Bonzini
From: Zhao Liu Use warn_report_once() to get rid of the static local variable "notified". Signed-off-by: Zhao Liu Message-ID: <20240418100716.1085491-1-zhao1@linux.intel.com> Signed-off-by: Paolo Bonzini --- accel/tcg/icount-common.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PULL 43/63] target/i386: Implement mc->kvm_type() to get VM type

2024-04-23 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

[PULL 49/63] RAMBlock: Add support of KVM private guest memfd

2024-04-23 Thread Paolo Bonzini
From: Xiaoyao Li 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.

[PULL 40/63] KVM: track whether guest state is encrypted

2024-04-23 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,

[PULL 36/63] scripts/update-linux-headers: Add setup_data.h to import list

2024-04-23 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

[PULL 03/63] ebpf: Restrict to system emulation

2024-04-23 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé eBPF is not used in user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240404194757.9343-2-phi...@linaro.org> Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-4-pbonz...@redhat.com> Signed-off-by:

Patch "virtio_net: Do not send RSS key if it is not supported" has been added to the 6.6-stable tree

2024-04-23 Thread gregkh
This is a note to let you know that I've just added the patch titled virtio_net: Do not send RSS key if it is not supported to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Re: [PATCH V8 1/8] accel/kvm: Extract common KVM vCPU {creation, parking} code

2024-04-23 Thread Harsh Prateek Bora
+ Nick Hi Salil, I have posted a patch [1] for ppc which based on this refactoring patch. I see there were some comments from Vishnu on this patch. Are we expecting any further updates on this patch before merge? Thanks Harsh [1]

Re: [PATCH 0/3] target/arm: Make the counter frequency default 1GHz for new CPUs, machines

2024-04-23 Thread Marcin Juszkiewicz
W dniu 22.04.2024 o 17:37, Marcin Juszkiewicz pisze: It also seems to be hardcoded in TF-A's support for the virt board too, annoyingly. I looked at it and it seems that TF-A can just read what is in CNTFRQ_EL0 instead of hardcoding the value. Submitted patch:

[PATCH v2 5/8] target/ppc: Move multiply fixed-point insns (64-bit operands) to decodetree.

2024-04-23 Thread Chinmay Rath
Moving the following instructions to decodetree : mul{ld, ldo, hd, hdu}[.]: XO-form madd{hd, hdu, ld} : VA-form The changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the '-d

[PATCH v2 2/8] target/ppc: Make divw[u] handler method decodetree compatible.

2024-04-23 Thread Chinmay Rath
The handler methods for divw[u] instructions internally use Rc(ctx->opcode), for extraction of Rc field of instructions, which poses a problem if we move the above said instructions to decodetree, as the ctx->opcode field is not popluated in decodetree. Hence, making it decodetree compatible, so

[PATCH v2 1/8] target/ppc: Move mul{li, lw, lwo, hw, hwu} instructions to decodetree.

2024-04-23 Thread Chinmay Rath
Moving the following instructions to decodetree specification : mulli : D-form mul{lw, lwo, hw, hwu}[.]: XO-form The changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the

[PATCH v2 7/8] target/ppc: Move cmp{rb, eqb}, tw[i], td[i], isel instructions to decodetree.

2024-04-23 Thread Chinmay Rath
Moving the following instructions to decodetree specification : cmp{rb, eqb}, t{w, d} : X-form t{w, d}i: D-form isel: A-form The changes were verified by validating that the tcg ops generated by those instructions remain the same,

Re: Missing features in QEMU SapphireRapid definition

2024-04-23 Thread Manish Mishra
Hi Everyone, We see few features like movdiri, movdiri64b, cldemote are present on SapphireRapid nodes and are also mentioned as supported in intel manual. But these are missing from the QEMU definition of SapphireRapid CPUs

Re: Missing features in QEMU SapphireRapid definition

2024-04-23 Thread Manish Mishra
Thanks Wang Lie. Yes sure will do same until we have new version. Thanks Manish Mishra From: Wang, Lei Date: Tuesday, 23 April 2024 at 12:50 PM To: Manish Mishra , qemu-devel@nongnu.org Cc: christopher.r.blev...@intel.com , robert...@linux.intel.com Subject: Re: Missing features in QEMU

Re: [PATCH v7 2/2] Implement SSH commands in QEMU GA for Windows

2024-04-23 Thread Konstantin Kostiuk
On Mon, Apr 22, 2024 at 9:25 PM wrote: > From: aidaleuc > > Signed-off-by: aidaleuc > --- > qga/commands-windows-ssh.c | 712 + > qga/commands-windows-ssh.h | 26 ++ > qga/meson.build| 7 +- > qga/qapi-schema.json | 17 +- > 4 files

Re: [PATCH] migration/dirtyrate: Fix segmentation fault

2024-04-23 Thread Yong Huang
On Tue, Apr 23, 2024 at 2:19 PM Masato Imai wrote: > When the KVM acceleration parameter is not set, executing calc_dirty_rate > with the -r option results in a segmentation fault due to accessing a > null kvm_state pointer in the kvm_dirty_rate_enabled function. >

Re: Missing features in QEMU SapphireRapid definition

2024-04-23 Thread Wang, Lei
Hi Manish, Thanks for the information. It seems those 3 features are missing in the SPR CPU Model definition, we are currently polishing our new SPR CPU Model version, you can launch the SPR CPU Model using: -cpu SapphireRapids,+cldemote,+movdiri,+movdir64b as a workaround and sorry for

[PATCH v2 0/8] target/ppc: Move fixed-point insns to

2024-04-23 Thread Chinmay Rath
Moving all fixed-point instructions of the following type to decodetree specification : arithmetic, compare, trap, select and logical. Change log : v2 : Implemented code clean-ups as per comments by Richard in patches 1/8, 5/8 and 7/8 of v1. v1 :

[PATCH v2 8/8] target/ppc: Move logical fixed-point instructions to decodetree.

2024-04-23 Thread Chinmay Rath
Moving the below instructions to decodetree specification : andi[s]., {ori, xori}[s]: D-form {and, andc, nand, or, orc, nor, xor, eqv}[.], exts{b, h, w}[.], cnt{l, t}z{w, d}[.], popcnt{b, w, d}, prty{w, d}, cmp, bpermd : X-form

[PATCH v2 3/8] target/ppc: Move divw[u, e, eu] instructions to decodetree.

2024-04-23 Thread Chinmay Rath
Moving the following instructions to decodetree specification : divw[u, e, eu][o][.] : XO-form The changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the '-d in_asm,op' flag. Signed-off-by: Chinmay Rath

[PATCH v2 4/8] target/ppc: Move neg, darn, mod{sw, uw} to decodetree.

2024-04-23 Thread Chinmay Rath
Moving the below instructions to decodetree specification : neg[o][.] : XO-form mod{sw, uw}, darn : X-form The changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the '-d in_asm,op'

[PATCH v2 6/8] target/ppc: Move div/mod fixed-point insns (64 bits operands) to decodetree.

2024-04-23 Thread Chinmay Rath
Moving the below instructions to decodetree specification : divd[u, e, eu][o][.]: XO-form mod{sd, ud} : X-form With this patch, all the fixed-point arithmetic instructions have been moved to decodetree. The changes were verified by validating that the tcg ops

Re: [PATCH 00/27] Add qapi-domain Sphinx extension

2024-04-23 Thread Markus Armbruster
John Snow writes: > On Mon, Apr 22, 2024 at 5:20 AM Markus Armbruster wrote: >> >> John Snow writes: >> >> > On Fri, Apr 19, 2024, 10:45 AM Markus Armbruster wrote: >> > >> >> John Snow writes: >> >> >> >> > This series adds a new qapi-domain extension for Sphinx, which adds a >> >> > series

Re: [PATCH] hw/intc/riscv_aplic: APLICs should add child earlier than realize

2024-04-23 Thread Alistair Francis
On Tue, Apr 9, 2024 at 11:46 AM yang.zhang wrote: > > From: "yang.zhang" > > Since only root APLICs can have hw IRQ lines, aplic->parent should > be initialized first. > > Fixes: e8f79343cf ("hw/intc: Add RISC-V AIA APLIC device emulation") > Reviewed-by: Daniel Henrique Barboza >

  1   2   3   >