[PULL 06/39] linux-user: Remove qemu_host_page_{size, mask} in probe_guest_base

2024-02-22 Thread Richard Henderson
The host SHMLBA is by definition a multiple of the host page size. Thus the remaining component of qemu_host_page_size is the target page size. Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Reviewed-by: Pierrick Bouvier Acked-by: Helge Deller Message-Id: <20240102015808.132373

[PULL 37/39] target/ppc: Enable TARGET_PAGE_BITS_VARY for user-only

2024-02-22 Thread Richard Henderson
Since ppc binaries are generally built for multiple page sizes, it is trivial to allow the page size to vary. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <20240102015808.132373-33-richard.hender...@linaro

[PULL 24/39] linux-user: Split out do_munmap

2024-02-22 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/mmap.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 1bbfeb25b1..8ebcca 100644 --- a/linux-user/mmap.c +++ b/linux-us

[PULL 35/39] target/arm: Enable TARGET_PAGE_BITS_VARY for AArch64 user-only

2024-02-22 Thread Richard Henderson
Since aarch64 binaries are generally built for multiple page sizes, it is trivial to allow the page size to vary. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Acked-by: Helge Deller Message-Id: <20240102015808.132373-31-richard.hender...@linaro.org> --- target/arm/cpu-param.h

[PULL 32/39] cpu: Remove page_size_init

2024-02-22 Thread Richard Henderson
Move qemu_host_page_{size,mask} and HOST_PAGE_ALIGN into bsd-user. It should be removed from bsd-user as well, but defer that cleanup. Reviewed-by: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Tested-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <

[PULL 17/39] softmmu/physmem: Remove HOST_PAGE_ALIGN

2024-02-22 Thread Richard Henderson
Align allocation sizes to the maximum of host and target page sizes. Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Reviewed-by: Pierrick Bouvier Acked-by: Helge Deller Message-Id: <20240102015808.132373-15-richard.hender...@linaro.org> --- system/physmem.c | 15 +++---

[PULL 19/39] linux-user: Split out target_mmap__locked

2024-02-22 Thread Richard Henderson
All "goto fail" may be transformed to "return -1". Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Reviewed-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <20240102015808.132373-17-richard.hender...@linaro.org> --- linux-user/mmap.c

[PULL 10/39] linux-user/arm: Remove qemu_host_page_size from init_guest_commpage

2024-02-22 Thread Richard Henderson
Use qemu_real_host_page_size. If the commpage is not within reserved_va, use MAP_FIXED_NOREPLACE. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Acked-by: Helge Deller Message-Id: <20240102015808.132373-8-richard.hender...@linaro.org> --- linux-user/elfload.c | 13 -

[PULL 14/39] migration: Remove qemu_host_page_size

2024-02-22 Thread Richard Henderson
Replace with the maximum of the real host page size and the target page size. This is an exact replacement. Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Reviewed-by: Pierrick Bouvier Acked-by: Helge Deller Message-Id: <20240102015808.132373-12-richard.hender...@linaro.org> -

[PULL 11/39] linux-user: Remove qemu_host_page_{size, mask} from mmap.c

2024-02-22 Thread Richard Henderson
Use qemu_real_host_page_size instead. Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Reviewed-by: Pierrick Bouvier Acked-by: Helge Deller Message-Id: <20240102015808.132373-9-richard.hender...@linaro.org> --- linux-user/mmap.c | 66 +++--

[PULL 12/39] linux-user: Remove REAL_HOST_PAGE_ALIGN from mmap.c

2024-02-22 Thread Richard Henderson
We already have qemu_real_host_page_size() in a local variable. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <20240102015808.132373-10-richard.hender...@linaro.org> --- linux-user/mmap.c | 2 +- 1 file ch

[PULL 18/39] linux-user: Remove qemu_host_page_size from main

2024-02-22 Thread Richard Henderson
Use qemu_real_host_page_size() instead. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <20240102015808.132373-16-richard.hender...@linaro.org> --- linux-user/main.c | 10 ++ 1 file changed, 6 insert

[PULL 05/39] linux-user: Adjust SVr4 NULL page mapping

2024-02-22 Thread Richard Henderson
Use TARGET_PAGE_SIZE and MAP_FIXED_NOREPLACE. We really should be attending to this earlier during probe_guest_base, as well as better detection and emulation of various Linux personalities. Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Reviewed-by: Pierrick Bouvier Acked-by:

[PULL 39/39] linux-user: Remove pgb_dynamic alignment assertion

2024-02-22 Thread Richard Henderson
The assertion was never correct, because the alignment is a composite of the image alignment and SHMLBA. Even if the image alignment didn't match the image address, an assertion would not be correct -- more appropriate would be an error message about an ill formed image. But the image cannot be h

[PULL 36/39] linux-user: Bound mmap_min_addr by host page size

2024-02-22 Thread Richard Henderson
Bizzarely, it is possible to set /proc/sys/vm/mmap_min_addr to a value below the host page size. Fix that. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <20240102015808.132373-32-richard.hender...@linaro.o

[PULL 26/39] linux-user: Split out mmap_h_eq_g

2024-02-22 Thread Richard Henderson
Move the MAX_FIXED_NOREPLACE check for reserved_va earlier. Move the computation of host_prot earlier. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Acked-by: Helge Deller Message-Id: <20240102015808.132373-22-richard.hender...@linaro.org> --- linux-user/mmap.c | 68 ++

[PULL 16/39] softmmu/physmem: Remove qemu_host_page_size

2024-02-22 Thread Richard Henderson
Use qemu_real_host_page_size() instead. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <20240102015808.132373-14-richard.hender...@linaro.org> --- system/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1

[PULL 04/39] accel/tcg: Remove qemu_host_page_size from page_protect/page_unprotect

2024-02-22 Thread Richard Henderson
Use qemu_real_host_page_size instead. Except for the final mprotect within page_protect, we already handled host < target page size. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <20240102015808.132373-2-r

[PULL 02/39] accel/tcg: Set can_do_io at at start of lookup_tb_ptr helper

2024-02-22 Thread Richard Henderson
From: Peter Maydell If a page table is in IO memory and lookup_tb_ptr probes the TLB it can result in a page table walk for the instruction fetch. If this hits IO memory and io_prepare falsely assumes it needs to do a TLB recompile. Avoid that by setting can_do_io at the start of lookup_tb_ptr.

[PULL 08/39] linux-user/hppa: Simplify init_guest_commpage

2024-02-22 Thread Richard Henderson
If reserved_va, then we have already reserved the entire guest virtual address space; no need to remap page. If !reserved_va, then use MAP_FIXED_NOREPLACE. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Reviewed-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <202401020

Re: [PATCH] target/i386: do not filter processor tracing features except on KVM

2024-02-22 Thread Thomas Huth
On 21/02/2024 17.29, Paolo Bonzini wrote: The processor tracing features in cpu_x86_cpuid() are hardcoded to a set that should be safe on all processor that support PT virtualization. But as an additional check, x86_cpu_filter_features() also checks that the accelerator supports that safe subset,

Re: [PATCH V4 1/5] util: strList_from_string

2024-02-22 Thread Steven Sistare
On 2/21/2024 12:01 PM, Steven Sistare wrote: > On 2/21/2024 8:29 AM, Markus Armbruster wrote: >> I apologize for the lateness of my review. > > No problem. Thanks for the review. > >> Steve Sistare writes: >> >>> Generalize hmp_split_at_comma() to take any delimiter string, rename >>> as strLis

Re: [RFC PATCH v2 04/22] target/arm: Implement ALLINT MSR (immediate)

2024-02-22 Thread Richard Henderson
On 2/21/24 10:41, Richard Henderson wrote: Ho hum..  I just noticed that TALLINT only traps immediate write of 1, not also immediate write of 0.  So one helper for both MSR Xt and MSR imm is not practical. Quick follow up to say that means you can do static bool trans_MSR_i_ALLINT(DisasContext

Re: [RFC PATCH v2 03/22] target/arm: Add PSTATE.ALLINT

2024-02-22 Thread Richard Henderson
On 2/21/24 15:48, Jinjie Ruan wrote: Why is this split out from env->pstate? The allint bit matches the documentation for SPSR_EL1, which is how env->pstate is documented.  The other exclusions have some performance imperative which I don't see for allint. It seems to me that allint is a bit l

Re: [PATCH v2 0/3 qemu] tcg/i386: Page tables in MMIO memory fixes (CXL)

2024-02-22 Thread Richard Henderson
On 2/19/24 07:31, Jonathan Cameron wrote: v2: Changes documented in patch 3. - I have not addressed Richard's comment on recursive locks as that seems to be a more general issue not specific to this patch set. CXL memory is interleaved at granularities as fine as 64 bytes. To emulate t

Re: [RFC PATCH v2 07/22] target/arm: Add support for NMI event state

2024-02-22 Thread Richard Henderson
On 2/22/24 01:52, Jinjie Ruan wrote: On 2024/2/22 5:25, Richard Henderson wrote: On 2/21/24 10:10, Richard Henderson wrote: On 2/21/24 03:08, Jinjie Ruan via wrote: The NMI exception state include whether the interrupt with super priority is IRQ or FIQ, so add a nmi_is_irq flag in CPUARMStat

Re: [PATCH v5 00/41] Raspberry Pi 4B machine

2024-02-22 Thread Kambalin, Sergey
Hi Peter! Sorry, it wasn't intentional. How can I keep the tags from v4? Thanks, Sergey Kambalin Software Developer, Auriga Inc. От: Peter Maydell Отправлено: 22 февраля 2024 г. 11:17:07 Кому: Sergey Kambalin Копия: qemu-...@nongnu.org; qemu-devel@nongnu.org

Re: [PATCH v3 0/3] Add support for I2C in BCM2835 boards

2024-02-22 Thread Peter Maydell
On Tue, 20 Feb 2024 at 13:42, Rayhan Faizel wrote: > > This patch series implements support for the Broadcom Serial Controller used > by BCM2835 based boards for I2C. > > [Changes in v3] > > - Add SPDX license identifiers. > - Fix a few minor whitespace issues. > > [Changes in v2] > > - Fixed and

Re: [PATCH v2 0/2] OSPI updates

2024-02-22 Thread Peter Maydell
On Tue, 20 Feb 2024 at 09:17, Sai Pavan Boddu wrote: > > Add a new 2Gib octal flash mt35xu02gbba. Add an interface for versal > virt board to swap the default flash. > > Changes for V2: > Added type checks for provided flash part name. > > Sai Pavan Boddu (2): > block: m25p80: Add support of m

[PATCH v2] hw/nvme/ns: Add NVMe NGUID property

2024-02-22 Thread Nabih Estefan
From: Roque Arcudia Hernandez This patch adds a way to specify an NGUID for a given NVMe Namespace using a string of hexadecimal digits with an optional '-' separator to group bytes. For instance: -device nvme-ns,nguid="e9accd3b83904e13167cf0593437f57d" If provided, the NGUID will be part of th

Re: [PATCH v2 3/3] tcg: Avoid double lock if page tables happen to be in mmio memory.

2024-02-22 Thread Peter Maydell
On Mon, 19 Feb 2024 at 17:33, Jonathan Cameron wrote: > > On i386, after fixing the page walking code to work with pages in > MMIO memory (specifically CXL emulated interleaved memory), > a crash was seen in an interrupt handling path. > > Suggested-by: Peter Maydell > Signed-off-by: Jonathan C

Re: [PATCH V4 00/14] allow cpr-reboot for vfio

2024-02-22 Thread Steven Sistare
Peter (and David if interested): these patches still need RB: migration: notifier error checking migration: stop vm for cpr migration: update cpr-reboot description migration: options incompatible with cpr Alex, these patches still need RB: vfio: register container for cpr vfio: allow

[PATCH V4 11/14] vfio: register container for cpr

2024-02-22 Thread Steve Sistare
Define entry points to perform per-container cpr-specific initialization and teardown. Signed-off-by: Steve Sistare --- hw/vfio/container.c | 11 ++- hw/vfio/cpr.c | 19 +++ hw/vfio/iommufd.c | 6 ++ hw/vfio/meson.build

[PATCH V4 08/14] migration: refactor migrate_fd_connect failures

2024-02-22 Thread Steve Sistare
Move common code for the error path in migrate_fd_connect to a shared fail label. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Reviewed-by: David Hildenbrand --- migration/migration.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a

[PATCH V4 00/14] allow cpr-reboot for vfio

2024-02-22 Thread Steve Sistare
Allow cpr-reboot for vfio if the guest is in the suspended runstate. The guest drivers' suspend methods flush outstanding requests and re-initialize the devices, and thus there is no device state to save and restore. The user is responsible for suspending the guest before initiating cpr, such as

[PATCH V4 02/14] migration: remove error from notifier data

2024-02-22 Thread Steve Sistare
Remove the error object from opaque data passed to notifiers. Use the new error parameter passed to the notifier instead. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Reviewed-by: David Hildenbrand --- hw/virtio/vhost-user.c | 8 include/migration/misc.h | 1 - migration/postc

[PATCH V4 06/14] migration: MigrationNotifyFunc

2024-02-22 Thread Steve Sistare
Define MigrationNotifyFunc to improve type safety and simplify migration notifiers. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Reviewed-by: David Hildenbrand --- hw/net/virtio-net.c | 4 +--- hw/vfio/migration.c | 3 +-- include/migration/misc.h | 5 - migration/migration

[PATCH V4 09/14] migration: notifier error checking

2024-02-22 Thread Steve Sistare
Check the status returned by migration notifiers for event type MIG_EVENT_PRECOPY_SETUP, and report errors. None of the notifiers return an error status at this time. Signed-off-by: Steve Sistare --- include/migration/misc.h | 8 +++- migration/migration.c| 25 -

[PATCH V4 10/14] migration: stop vm for cpr

2024-02-22 Thread Steve Sistare
When migration for cpr is initiated, stop the vm and set state RUN_STATE_FINISH_MIGRATE before ram is saved. This eliminates the possibility of ram and device state being out of sync, and guarantees that a guest in the suspended state remains suspended, because qmp_cont rejects a cont command in t

[PATCH V4 13/14] migration: update cpr-reboot description

2024-02-22 Thread Steve Sistare
Clarify qapi for cpr-reboot migration mode, and add vfio support. Signed-off-by: Steve Sistare --- qapi/migration.json | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 5a565d9..0990297 100644

[PATCH V4 14/14] migration: options incompatible with cpr

2024-02-22 Thread Steve Sistare
Fail the migration request if options are set that are incompatible with cpr. Signed-off-by: Steve Sistare --- migration/migration.c | 17 + qapi/migration.json | 2 ++ 2 files changed, 19 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 90a9094.

[PATCH V4 12/14] vfio: allow cpr-reboot migration if suspended

2024-02-22 Thread Steve Sistare
Allow cpr-reboot for vfio if the guest is in the suspended runstate. The guest drivers' suspend methods flush outstanding requests and re-initialize the devices, and thus there is no device state to save and restore. The user is responsible for suspending the guest before initiating cpr, such as

[PATCH V4 07/14] migration: per-mode notifiers

2024-02-22 Thread Steve Sistare
Keep a separate list of migration notifiers for each migration mode. Suggested-by: Peter Xu Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Reviewed-by: David Hildenbrand --- include/migration/misc.h | 6 ++ migration/migration.c| 22 +- 2 files changed, 23 ins

[PATCH V4 05/14] migration: remove postcopy_after_devices

2024-02-22 Thread Steve Sistare
postcopy_after_devices and migration_in_postcopy_after_devices are no longer used, so delete them. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- include/migration/misc.h | 1 - migration/migration.c| 7 --- migration/migration.h| 2 -- 3 files changed, 10 deletions(-) diff

[PATCH V4 01/14] notify: pass error to notifier with return

2024-02-22 Thread Steve Sistare
Pass an error object as the third parameter to "notifier with return" notifiers, so clients no longer need to bundle an error object in the opaque data. The new parameter is used in a later patch. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Reviewed-by: David Hildenbrand --- hw/virtio/

[PATCH V4 03/14] migration: convert to NotifierWithReturn

2024-02-22 Thread Steve Sistare
Change all migration notifiers to type NotifierWithReturn, so notifiers can return an error status in a future patch. For now, pass NULL for the notifier error parameter, and do not check the return value. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Reviewed-by: David Hildenbrand --- h

[PATCH V4 04/14] migration: MigrationEvent for notifiers

2024-02-22 Thread Steve Sistare
Passing MigrationState to notifiers is unsound because they could access unstable migration state internals or even modify the state. Instead, pass the minimal info needed in a new MigrationEvent struct, which could be extended in the future if needed. Suggested-by: Peter Xu Signed-off-by: Steve

Re: [PATCH 18/23] plugins: add an API to read registers

2024-02-22 Thread Alex Bennée
Akihiko Odaki writes: > On 2024/02/22 19:20, Alex Bennée wrote: >> Akihiko Odaki writes: >> >>> On 2024/02/21 23:14, Alex Bennée wrote: Akihiko Odaki writes: > On 2024/02/21 19:02, Alex Bennée wrote: >> Akihiko Odaki writes: >> >>> On 2024/02/20 23:14, Alex Bennée wr

Re: [PATCH v5 00/41] Raspberry Pi 4B machine

2024-02-22 Thread Peter Maydell
On Mon, 19 Feb 2024 at 01:19, Sergey Kambalin wrote: > > Introducing Raspberry Pi 4B model. > It contains new BCM2838 SoC, PCIE subsystem, > RNG200, Thermal sensor and Genet network controller. > > It can work with recent linux kernels 6.x.x. > Two avocado tests was added to check that. > > Unit t

Re: [PATCH] ui/cocoa: Fix incorrect window clipping on macOS Sonoma

2024-02-22 Thread Peter Maydell
On Thu, 22 Feb 2024 at 06:08, Michael Tokarev wrote: > > [Adding a few more Ccs] > > 17.02.2024 18:58, David Parsons : > > macOS Sonoma changes the NSView.clipsToBounds to false by default where it > > was true in > > earlier version of macOS. This causes the window contents to be obscured by >

Re: [PATCH v11 3/6] ui/cocoa: Let the platform toggle fullscreen

2024-02-22 Thread Peter Maydell
On Sat, 17 Feb 2024 at 11:19, Akihiko Odaki wrote: > > It allows making the window full screen by clicking full screen button > provided by the platform (the left-top green button) and save some code. > > Signed-off-by: Akihiko Odaki > --- > ui/cocoa.m | 423 > ++

Re: [PATCH v4 06/10] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-02-22 Thread fan
On Thu, Feb 22, 2024 at 06:22:52PM +0900, Wonjae Lee wrote: > On Wed, Feb 21, 2024 at 10:15:59AM -0800, nifan@gmail.com wrote: > > From: Fan Ni > > > > Add (file/memory backed) host backend, all the dynamic capacity regions > > will share a single, large enough host backend. Set up address spa

Re: [PATCH v4 02/10] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2024-02-22 Thread fan
On Thu, Feb 22, 2024 at 04:45:25PM +0900, Wonjae Lee wrote: > On Wed, Feb 21, 2024 at 10:15:55AM -0800, nifan@gmail.com wrote: > > From: Fan Ni > > > > Per cxl spec r3.1, add dynamic capacity region representative based on > > Table 8-165 and extend the cxl type3 device definition to include d

Re: [PATCH v11 6/6] ui/cocoa: Remove stretch_video flag

2024-02-22 Thread Peter Maydell
On Sat, 17 Feb 2024 at 11:19, Akihiko Odaki wrote: > > Evaluate [normalWindow styleMask] & NSWindowStyleMaskResizable instead. > > Signed-off-by: Akihiko Odaki > --- > ui/cocoa.m | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/ui/cocoa.m b/ui/cocoa.m > index

Re: [PATCH v11 5/6] ui/cocoa: Call console_select() with the BQL

2024-02-22 Thread Peter Maydell
On Sat, 17 Feb 2024 at 11:19, Akihiko Odaki wrote: > > console_select() can be called anytime so explicitly take the BQL. I think you mean "displayConsole" here ? > > Signed-off-by: Akihiko Odaki > --- > ui/cocoa.m | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/ui/

Re: [PATCH v11 4/6] ui/cocoa: Make window resizable

2024-02-22 Thread Peter Maydell
On Sat, 17 Feb 2024 at 11:19, Akihiko Odaki wrote: > > The window will be resizable when zoom-to-fit is on. > > Signed-off-by: Akihiko Odaki > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v11 2/6] ui/cocoa: Scale with NSView instead of Core Graphics

2024-02-22 Thread Peter Maydell
On Sat, 17 Feb 2024 at 11:19, Akihiko Odaki wrote: > > Core Graphics is not accelerated and slow. > > Signed-off-by: Akihiko Odaki > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v11 1/6] ui/cocoa: Release specific mouse buttons

2024-02-22 Thread Peter Maydell
On Sat, 17 Feb 2024 at 11:18, Akihiko Odaki wrote: > > ui/cocoa used to release all mouse buttons when it sees > NSEventTypeLeftMouseUp, NSEventTypeRightMouseUp, or > NSEventTypeOtherMouseUp, but it can instead release specific one > according to the delivered event. > > Signed-off-by: Akihiko Oda

Re: [PATCH v4 50/66] i386/tdx: handle TDG.VP.VMCALL

2024-02-22 Thread Daniel P . Berrangé
On Wed, Jan 24, 2024 at 10:23:12PM -0500, Xiaoyao Li wrote: > From: Isaku Yamahata > > Add property "quote-generation-socket" to tdx-guest, which is a property > of type SocketAddress to specify Quote Generation Service(QGS). > > On request of GetQuote, it connects to the QGS socket, read reques

Re: [PATCH] pl031: Update last RTCLR value on write in case it's read back

2024-02-22 Thread Peter Maydell
On Thu, 22 Feb 2024 at 00:04, Jessica Clarke wrote: > > The PL031 allows you to read RTCLR, which is meant to give you the last > value written. PL031State has an lr field which is used when reading > from RTCLR, and is present in the VM migration state, but we never > actually update it, so it al

Re: [PATCH v2 0/2] hw/arm: Fix STM32L4x5 EXTI to CPU irq fan-in connections

2024-02-22 Thread Peter Maydell
On Tue, 20 Feb 2024 at 18:41, Inès Varhol wrote: > > The original code was connecting several outbounds qemu_irqs to the > same qemu_irq without using a TYPE_OR_IRQ. > > This patch fixes the issue by using OR gates when necessary (1st commit). > > I attempted to check that the problem is fixed by

[PATCH] migration: Don't serialize migration while can't switchover

2024-02-22 Thread Avihai Horon
Currently, migration code serializes device data sending during pre-copy iterative phase. As noted in the code comment, this is done to prevent faster changing device from sending its data over and over. However, with switchover-ack capability enabled, this behavior can be problematic and may prev

Re: [PATCH v2 2/2] system/vl: Update description for input grab key

2024-02-22 Thread Michael Tokarev
22.02.2024 15:50, Tianlan Zhou wrote: Cc qemu-stable, as this will fix the `qemu-system-xxx -h` help message. Yes, I already picked up both of them. /mjt

Re: [PATCH V2 1/1] loongarch: Change the UEFI loading mode to loongarch

2024-02-22 Thread Andrea Bolognani
On Thu, Feb 22, 2024 at 04:10:20PM +0100, Philippe Mathieu-Daudé wrote: > On 19/2/24 11:34, Xianglai Li wrote: > > The UEFI loading mode in loongarch is very different > > from that in other architectures:loongarch's UEFI code > > is in rom, while other architectures' UEFI code is in flash. > > > >

[PATCH v9 1/4] qom: add default value

2024-02-22 Thread Maksim Davydov
qmp_qom_list_properties can print default values if they are available as qmp_device_list_properties does, because both of them use the ObjectPropertyInfo structure with default_value field. This can be useful when working with "not device" types (e.g. memory-backend). Signed-off-by: Maksim Davydo

[PATCH v9 2/4] qmp: add dump machine type compatibility properties

2024-02-22 Thread Maksim Davydov
To control that creating new machine type doesn't affect the previous types (their compat_props) and to check complex compat_props inheritance we need qmp command to print machine type compatibility properties. This patch adds the ability to get list of all the compat_props of the corresponding sup

[PATCH v9 4/4] scripts: add script to compare compatibility properties

2024-02-22 Thread Maksim Davydov
This script runs QEMU to obtain compat_props of machines and default values of different types of drivers to produce comparison table. This table can be used to compare machine types to choose the most suitable machine or compare binaries to be sure that migration to the newer version will save all

[PATCH v9 0/4] compare machine type compat_props

2024-02-22 Thread Maksim Davydov
This script can be used to choose the best machine type in the appropriate cases. Also we have to check compat_props of the old MT after changes to be sure that they haven't broken old the MT. For example, pc_compat_3_1 of pc-q35-3.1 has Icelake-Client which was removed. v9 -> v8: * qapi minor fix

[PATCH v9 3/4] python/qemu/machine: add method to retrieve QEMUMachine::binary field

2024-02-22 Thread Maksim Davydov
Add a supportive property to access the path to the QEMU binary Signed-off-by: Maksim Davydov Reviewed-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/machine/machine.py | 5 + 1 file changed, 5 insertions(+) diff --git a/python/qemu/machine/machine.py b/python/qemu/mach

Re: [PULL 00/34] Trivial patches for 2024-02-22

2024-02-22 Thread Peter Maydell
On Thu, 22 Feb 2024 at 11:29, Michael Tokarev wrote: > > The following changes since commit 760b4dcdddba4a40b9fa0eb78fdfc7eda7cb83d0: > > Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging > (2024-02-20 10:11:08 +) > > are available in the Git repository at: > > http

[PATCH v3 3/3] qga-win: Add support of Windows Server 2025 in get-osinfo command

2024-02-22 Thread Philippe Mathieu-Daudé
From: Dehan Meng Add support of Windows Server 2025 in get-osinfo command Signed-off-by: Dehan Meng Message-ID: <20240222025352.58859-2-dem...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- qga/commands-win32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qga/commands-win32.c b/

[PATCH v3 1/3] qga/commands-win32: Declare const qualifier before type

2024-02-22 Thread Philippe Mathieu-Daudé
Most of the code base use the 'const' qualifier *before* the type being qualified. Use the same style to unify. Signed-off-by: Philippe Mathieu-Daudé --- qga/commands-win32.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/qga/commands-win32.c b/qga/c

[PATCH v3 0/3] qga/commands-win32: Style cleanups before adding Windows Server 2025

2024-02-22 Thread Philippe Mathieu-Daudé
Respin of Dehan's v2 since I had the changes stashed. Supersedes: <20240222025437.58996-1-dem...@redhat.com> Dehan Meng (1): qga-win: Add support of Windows Server 2025 in get-osinfo command Philippe Mathieu-Daudé (2): qga/commands-win32: Declare const qualifier before type qga/commands-wi

[PATCH v3 2/3] qga/commands-win32: Do not set matrix_lookup_t/win_10_0_t arrays size

2024-02-22 Thread Philippe Mathieu-Daudé
ga_get_win_name() iterates over all elements in the arrays by checking the 'version' field is non-NULL. Since the arrays are guarded by a NULL terminating element, we don't need to specify their size: static char *ga_get_win_name(...) { ... const ga_matrix_lookup_t *table = WIN_VER

Re: [PATCH 0/9] Simplify initialization of PC machines

2024-02-22 Thread Michael S. Tsirkin
On Thu, Feb 08, 2024 at 11:03:40PM +0100, Bernhard Beschow wrote: > The series aims to simplify the initialization process of all PC-based > machines. > > It consists of streamlining redundant code, as well as consolidating the setup > of system flash and generation of smbios data which are curre

Re: [PATCH V2 1/1] loongarch: Change the UEFI loading mode to loongarch

2024-02-22 Thread Philippe Mathieu-Daudé
On 19/2/24 11:34, Xianglai Li wrote: The UEFI loading mode in loongarch is very different from that in other architectures:loongarch's UEFI code is in rom, while other architectures' UEFI code is in flash. loongarch UEFI can be loaded as follows: -machine virt,pflash=pflash0-format -bios ./QEMU_

Re: [PATCH v2 2/2] tests/qtest: Check that EXTI fan-in irqs are correctly connected

2024-02-22 Thread Peter Maydell
On Thu, 22 Feb 2024 at 15:09, Peter Maydell wrote: > > On Tue, 20 Feb 2024 at 18:41, Inès Varhol > wrote: > > > > This commit adds a QTest that verifies each input line of a specific > > EXTI OR gate can influence the output line. > > > > Signed-off-by: Inès Varhol > > Reviewed-by: Peter Maydel

Re: [PATCH v2 2/2] tests/qtest: Check that EXTI fan-in irqs are correctly connected

2024-02-22 Thread Peter Maydell
On Tue, 20 Feb 2024 at 18:41, Inès Varhol wrote: > > This commit adds a QTest that verifies each input line of a specific > EXTI OR gate can influence the output line. > > Signed-off-by: Inès Varhol > Reviewed-by: Peter Maydell > --- > > Hello, > > I expected this test to fail after switching th

Re: [PATCH] target/m68k: Fix exception frame format for 68010

2024-02-22 Thread Peter Maydell
On Thu, 22 Feb 2024 at 13:50, Mark Cave-Ayland wrote: > > On 22/02/2024 13:37, Peter Maydell wrote: > > > On Thu, 22 Feb 2024 at 13:34, Mark Cave-Ayland > > wrote: > > > >> This is also: > >> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2164 > > > > "Resolves:" for gitlab bug URLs; "Fixes

Re: spapr watchdog vs watchdog_perform_action() / QMP watchdog-set-action

2024-02-22 Thread Peter Maydell
On Mon, 29 Jan 2024 at 04:02, David Gibson wrote: > > On Sat, Jan 27, 2024 at 01:08:02PM +, Peter Maydell wrote: > > On Fri, 26 Jan 2024 at 20:49, Markus Armbruster wrote: > > > > > > Peter Maydell writes: > > > > > > > Hi; one of the "bitesized tasks" we have listed is to convert > > > > wa

Re: [PATCH v4 0/3] hw/i2c: smbus: Reset fixes

2024-02-22 Thread Philippe Mathieu-Daudé
Hi Joe, On 20/2/24 22:11, Joe Komlodi wrote: Changelog: This series adds some resets for SMBus and for the I2C core. Along with it, we make SMBus slave error printing a little more helpful. These reset issues were very infrequent, they would maybe occur in 1 out of hundreds of resets in our

Re: [PATCH v4 32/34] monitor: fdset: Match against O_DIRECT

2024-02-22 Thread Markus Armbruster
Fabiano Rosas writes: > Markus Armbruster writes: [...] >> Or am I stull suffering from code review brain? > > Yes, stull suffering. =) %-} /me hoists white flag

Re: [PATCH] net/slirp: Use newer slirp_*_hostxfwd API

2024-02-22 Thread Thomas Weißschuh
Hi Nicholas, On Tue, Mar 22, 2022 at 06:58:36PM -0700, Nicholas Ngai wrote: > Pinging this. It’s a bit old, though the patch still applies cleanly to > master as far as I can tell. > > Link to patchew is > https://patchew.org/QEMU/20210925214820.18078-1-nicho...@ngai.me/. > > I’d love to get htt

RE: [PATCH v4 06/10] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-02-22 Thread Wonjae Lee
On Wed, Feb 21, 2024 at 10:15:59AM -0800, nifan@gmail.com wrote: > From: Fan Ni > > Add (file/memory backed) host backend, all the dynamic capacity regions > will share a single, large enough host backend. Set up address space for > DC regions to support read/write operations to dynamic capaci

RE: [PATCH v4 02/10] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2024-02-22 Thread Wonjae Lee
On Wed, Feb 21, 2024 at 10:15:55AM -0800, nifan@gmail.com wrote: > From: Fan Ni > > Per cxl spec r3.1, add dynamic capacity region representative based on > Table 8-165 and extend the cxl type3 device definition to include dc region > information. Also, based on info in 8.2.9.9.9.1, add 'Get D

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

2024-02-22 Thread Peter Maydell
On Wed, 21 Feb 2024 at 06:34, 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 PMU events

Re: [PATCH 0/9] Simplify initialization of PC machines

2024-02-22 Thread Philippe Mathieu-Daudé
On 8/2/24 23:03, Bernhard Beschow wrote: The series aims to simplify the initialization process of all PC-based machines. It consists of streamlining redundant code, as well as consolidating the setup of system flash and generation of smbios data which are currently fairly distributed. These ch

Re: [PATCH v2] xlnx-versal-ospi: disable reentrancy detection for iomem_dac

2024-02-22 Thread Peter Maydell
On Mon, 19 Feb 2024 at 10:56, Sai Pavan Boddu wrote: > > The OSPI DMA reads flash data through the OSPI linear address space (the > iomem_dac region), because of this the reentrancy guard introduced in > commit a2e1753b ("memory: prevent dma-reentracy issues") is disabled for > the memory region.

Re: [PATCH v2 0/2] Misc: Make watchdog devices using qemu_system_reset_request() use watchdog_perfom_action()

2024-02-22 Thread Peter Maydell
On Fri, 16 Feb 2024 at 19:27, Abhiram Tilak wrote: > > A few watchdog devices use qemu_system_reset_request(). This is not ideal > since > behaviour of watchdog-expiry can't be changed by QMP using `watchdog_action`. > As stated in BiteSizedTasks wiki page, instead of using > qemu_system_reset_r

Re: [PATCH v2 5/5] migration/multifd: Drop unnecessary helper to destroy IOC

2024-02-22 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Both socket_send_channel_destroy() and multifd_send_channel_destroy() are > unnecessary wrappers to destroy an IOC, as the only thing to do is to > release the final IOC reference. We have plenty of code that destroys an > IOC using direct unref() a

Re: [PATCH] MAINTAINERS: Cover hw/ide/ahci-allwinner.c with AllWinner A10 machine

2024-02-22 Thread Peter Maydell
On Thu, 15 Feb 2024 at 16:09, Philippe Mathieu-Daudé wrote: > > This code -- which was moved many times around -- was added in > commit 377e214539 ("ahci: Add allwinner AHCI") and belong to the > AllWinner machines. See also commit dca625768a ("arm: allwinner-a10: > Add SATA"). > > Signed-off-by:

Re: [PATCH] target/arm: Advertise Cortex-A53 erratum #843419 fix via REVIDR

2024-02-22 Thread Peter Maydell
On Thu, 15 Feb 2024 at 16:02, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > The Cortex-A53 r0p4 revision that QEMU emulates is affected by a CatA > erratum #843419 (i.e., the most severe), which requires workarounds in > the toolchain as well as the OS. > > Since the emulation is obviously n

Re: [PATCH 1/1] hw/arm/sbsa-ref: Simplify init since PCIe is always enabled

2024-02-22 Thread Peter Maydell
On Thu, 15 Feb 2024 at 15:33, Marcin Juszkiewicz wrote: > > There is no point in checking do we have PCIe if first thing after check > is adding PCIe card without checking. > > Signed-off-by: Marcin Juszkiewicz > --- > hw/arm/sbsa-ref.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-

Re: [PATCH v2 4/5] migration/multifd: Cleanup outgoing_args in state destroy

2024-02-22 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > outgoing_args is a global cache of socket address to be reused in multifd. > Freeing the cache in per-channel destructor is more or less a hack. Move > it to multifd_send_cleanup_state() so it only get checked once. Use a > small helper to do so be

Re: [PATCH v2 3/5] migration/multifd: Make multifd_channel_connect() return void

2024-02-22 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > It never fails, drop the retval and also the Error**. > > Suggested-by: Avihai Horon > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v2 1/5] migration/multifd: Cleanup TLS iochannel referencing

2024-02-22 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Commit a1af605bd5 ("migration/multifd: fix hangup with TLS-Multifd due to > blocking handshake") introduced a thread for TLS channels, which will > resolve the issue on blocking the main thread. However in the same commit > p->c is slightly abused j

Re: [PATCH] target/m68k: Fix exception frame format for 68010

2024-02-22 Thread Mark Cave-Ayland
On 22/02/2024 13:37, Peter Maydell wrote: On Thu, 22 Feb 2024 at 13:34, Mark Cave-Ayland wrote: This is also: Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2164 "Resolves:" for gitlab bug URLs; "Fixes:" is for git commits. I think GitLab will happily accept either form (see https:

Re: [PATCH] migration: Fix qmp_query_migrate mbps value

2024-02-22 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Feb 22, 2024 at 05:40:41PM +0800, Peter Xu wrote: >> On Wed, Feb 21, 2024 at 09:56:36AM -0300, Fabiano Rosas wrote: >> > Peter Xu writes: >> > >> > > On Mon, Feb 19, 2024 at 04:44:57PM -0300, Fabiano Rosas wrote: >> > >> The QMP command query_migrate might see incorre

Re: [PATCH] target/m68k: Fix exception frame format for 68010

2024-02-22 Thread Peter Maydell
On Thu, 22 Feb 2024 at 13:34, Mark Cave-Ayland wrote: > This is also: > Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2164 "Resolves:" for gitlab bug URLs; "Fixes:" is for git commits. -- PMM

Re: [PATCH] target/m68k: Fix exception frame format for 68010

2024-02-22 Thread Mark Cave-Ayland
On 22/02/2024 09:57, Thomas Huth wrote: On 15/01/2024 11.16, Daniel Palmer wrote:  From the 68010 a word with the frame format and exception vector are placed on the stack before the PC and SR. M68K_FEATURE_QUAD_MULDIV is currently checked to workout if to do this or not for the configured CPU

<    1   2   3   4   >