Re: [PATCH v2 09/14] vhost: Add VhostIOVATree

2022-03-04 Thread Eugenio Perez Martin
On Fri, Mar 4, 2022 at 3:04 AM Jason Wang wrote: > > On Fri, Mar 4, 2022 at 12:33 AM Eugenio Perez Martin > wrote: > > > > On Mon, Feb 28, 2022 at 8:06 AM Jason Wang wrote: > > > > > > > > > 在 2022/2/27 下午9:41, Eugenio Pérez 写道: > > > > This tree is able to look for a translated address from an

Re: [PATCH 1/1] virtio: fix feature negotiation for ACCESS_PLATFORM

2022-03-04 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 02:29:29PM +0100, Halil Pasic wrote: > On Thu, 10 Feb 2022 12:19:25 +0100 > Cornelia Huck wrote: > > [..] > > > > Nope, that's not my problem. We make sure that the bit is persistent, we > > fail realization if the bit got removed by the callback when required, > > and we

Re: [PATCH v4 08/14] util: Add iova_tree_alloc_map

2022-03-04 Thread Eugenio Perez Martin
On Fri, Mar 4, 2022 at 3:11 AM Liuxiangdong wrote: > > > > On 2022/3/4 2:51, Eugenio Pérez wrote: > > This iova tree function allows it to look for a hole in allocated > > regions and return a totally new translation for a given translated > > address. > > > > It's usage is mainly to allow devices

Re: [PATCH] hw/arm/virt: Validate memory size on the first NUMA node

2022-03-04 Thread Gerd Hoffmann
Hi, > because 128MB node memory size isn't used in practice. If the EDK2 error > message can be improved, we might have something like below: > > ASSERT [MemoryInit] > /home/lacos/src/upstream/qemu/roms/edk2/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibConstructor.c(93): > NewSi

Re: [PATCH v3 14/14] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-03-04 Thread Eugenio Perez Martin
On Fri, Mar 4, 2022 at 7:30 AM Markus Armbruster wrote: > > Eugenio Perez Martin writes: > > > Yes, that's right. I expressed my point poorly actually, I'll go the > > reverse. > > > > qapi-gen.py forces me to write a comment in the doc: > > qapi/block-core.json:2971: feature 'unstable' lacks do

[PATCH] qga: Introduce disk smart

2022-03-04 Thread zhenwei pi
After assigning a NVMe/SCSI controller to guest by VFIO, we lose everything on the host side. A guest uses these devices exclusively, we usually don't care the actions on these devices. But there is a low probability that hitting physical hardware warning, we need a chance to get the basic smart lo

Re: [PATCH v2 1/4] os-posix: Add os_set_daemonize()

2022-03-04 Thread Daniel P . Berrangé
On Thu, Mar 03, 2022 at 05:48:11PM +0100, Hanna Reitz wrote: > The daemonizing functions in os-posix (os_daemonize() and > os_setup_post()) only daemonize the process if the static `daemonize` > variable is set. Right now, it can only be set by os_parse_cmd_args(). > > In order to use os_daemoniz

Re: [PATCH v4 14/14] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-03-04 Thread Eugenio Perez Martin
On Fri, Mar 4, 2022 at 7:35 AM Markus Armbruster wrote: > > Eugenio Pérez writes: > > > Finally offering the possibility to enable SVQ from the command line. > > > > Signed-off-by: Eugenio Pérez > > --- > > qapi/net.json| 8 +++- > > net/vhost-vdpa.c | 48 ++

Re: [PATCH v2 3/4] qsd: Add --daemonize

2022-03-04 Thread Kevin Wolf
Am 03.03.2022 um 17:48 hat Hanna Reitz geschrieben: > To implement this, we reuse the existing daemonizing functions from the > system emulator, which mainly do the following: > - Fork off a child process, and set up a pipe between parent and child > - The parent process waits until the child sends

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-03-04 Thread Eric Auger
Hi Marc-André, On 3/3/22 5:16 PM, Marc-André Lureau wrote: > Hi > > On Thu, Mar 3, 2022 at 6:41 PM Eric Auger > wrote: > > Hi Stefan, > > On 2/8/22 6:58 PM, Eric Auger wrote: > > Hi Stefan, > > > > On 2/8/22 6:16 PM, Stefan Berger wrote: > >> >

[PATCH v4 0/4] Enable vhost-user to be used on BSD systems

2022-03-04 Thread Sergio Lopez
Since QEMU is already able to emulate ioeventfd using pipefd, we're already pretty close to supporting vhost-user on non-Linux systems. This two patches bridge the gap by: 1. Adding a new event_notifier_get_wfd() to return wfd on the places where the peer is expected to write to the notifier.

[PATCH v4 1/4] event_notifier: add event_notifier_get_wfd()

2022-03-04 Thread Sergio Lopez
event_notifier_get_fd(const EventNotifier *e) always returns EventNotifier's read file descriptor (rfd). This is not a problem when the EventNotifier is backed by a an eventfd, as a single file descriptor is used both for reading and triggering events (rfd == wfd). But, when EventNotifier is backe

[PATCH v4 2/4] vhost: use wfd on functions setting vring call fd

2022-03-04 Thread Sergio Lopez
When ioeventfd is emulated using qemu_pipe(), only EventNotifier's wfd can be used for writing. Use the recently introduced event_notifier_get_wfd() function to obtain the fd that our peer must use to signal the vring. Signed-off-by: Sergio Lopez Reviewed-by: Stefan Hajnoczi --- hw/virtio/vhos

[PATCH v4 3/4] configure, meson: allow enabling vhost-user on all POSIX systems

2022-03-04 Thread Sergio Lopez
With the possibility of using a pipe pair via qemu_pipe() as a replacement on operating systems that doesn't support eventfd, vhost-user can also work on all POSIX systems. This change allows enabling vhost-user on all non-Windows platforms and makes libvhost_user (which still depends on eventfd)

[PATCH v4 4/4] docs: vhost-user: add subsection for non-Linux platforms

2022-03-04 Thread Sergio Lopez
Add a section explaining how vhost-user is supported on platforms other than Linux. Signed-off-by: Sergio Lopez Reviewed-by: Stefan Hajnoczi --- docs/interop/vhost-user.rst | 20 1 file changed, 20 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost

Re: [PATCH v2 01/10] macfb: add VMStateDescription for MacfbNubusState and MacfbSysBusState

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : Currently when QEMU tries to migrate the macfb framebuffer it crashes randomly because the opaque provided by the DeviceClass vmsd property for both devices is set to MacfbState rather than MacfbNubusState or MacfbSysBusState as appropriate. Reso

Re: [PATCH v2 1/4] os-posix: Add os_set_daemonize()

2022-03-04 Thread Kevin Wolf
Am 04.03.2022 um 10:19 hat Daniel P. Berrangé geschrieben: > On Thu, Mar 03, 2022 at 05:48:11PM +0100, Hanna Reitz wrote: > > The daemonizing functions in os-posix (os_daemonize() and > > os_setup_post()) only daemonize the process if the static `daemonize` > > variable is set. Right now, it can o

Re: [PATCH v6 00/16] Make image fleecing more usable

2022-03-04 Thread Hanna Reitz
On 03.03.22 20:43, Vladimir Sementsov-Ogievskiy wrote: v6: 11: add comment 15: limit to qcow2 with unsupported compat fix style 16: fix style change log('Backup finished ...') to assertion and comment Thanks a lot! Applied to my block branch: https://gitlab.com/hreitz/qemu/-/commits

Re: [PATCH vRESEND] virtio/virtio-balloon: Prefer Object* over void* parameter

2022-03-04 Thread Michael S. Tsirkin
On Tue, Mar 01, 2022 at 11:23:01PM +0100, Bernhard Beschow wrote: > *opaque is an alias to *obj. Using the ladder makes the code consistent with > with other devices, e.g. accel/kvm/kvm-all and accel/tcg/tcg-all. It also > makes the cast more typesafe. > > Signed-off-by: Bernhard Beschow > Review

Re: [PATCH v2 03/10] macfb: increase number of registers saved in MacfbState

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : The MacOS toolbox ROM accesses a number of addresses between 0x0 and 0x200 during initialisation and resolution changes. Whilst the function of many of these registers is unknown, it is worth the minimal cost of saving these extra values as part

Re: [PATCH 4/9] util/oslib-win32: Return NULL on qemu_try_memalign() with zero size

2022-03-04 Thread Peter Maydell
On Thu, 3 Mar 2022 at 23:02, Richard Henderson wrote: > > On 3/3/22 06:55, Peter Maydell wrote: > >> Alternately, force size == 1, so that we always get a non-NULL value that > >> can be freed. > >> That's a change on the POSIX side as well, of course. > > > > Yes, I had a look at what actual mal

Re: [PATCH v4 0/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-04 Thread Michael S. Tsirkin
On Mon, Feb 28, 2022 at 10:17:30PM +0200, Liav Albani wrote: > This can allow the guest OS to determine more easily if i8042 controller > is present in the system or not, so it doesn't need to do probing of the > controller, but just initialize it immediately, before enumerating the > ACPI AML name

Re: [PATCH v2 04/10] macfb: add VMStateDescription fields for display type and VBL timer

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : These fields are required in the migration stream to restore macfb state correctly. Signed-off-by: Mark Cave-Ayland --- hw/display/macfb.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Laurent Vivier

Re: [PATCH v2 02/10] macfb: don't use special irq_state and irq_mask variables in MacfbState

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : The current IRQ state and IRQ mask are handled exactly the same as standard register accesses, so store these values directly in the regs array rather than having separate variables for them. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe

Re: [PATCH v2 05/10] macfb: set initial value of mode control registers in macfb_common_realize()

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : If booting Linux directly in the q800 machine using -kernel rather than using a MacOS toolbox ROM, the mode control registers are never initialised, causing macfb_mode_write() to fail to determine the current resolution after migration. Resolve th

Re: [PATCH v2 07/10] esp: introduce esp_pdma_cb() function

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : This function is to be used to execute the current PDMA callback rather than dereferencing the ESPState pdma_cb function pointer directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/scsi/esp.c | 9 +++-- 1

Re: [PATCH v2 08/10] esp: convert ESPState pdma_cb from a function pointer to an integer

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : This prepares for the inclusion of the current PDMA callback in the migration stream since the callback is referenced by an integer instead of a function pointer. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/scsi

Re: [PATCH v2 06/10] esp: introduce esp_set_pdma_cb() function

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : This function is to be used to set the current PDMA callback rather than accessing the ESPState pdma_cb function pointer directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/scsi/esp.c | 19 ---

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

2022-03-04 Thread Peter Maydell
On Thu, 3 Mar 2022 at 05:31, Alistair Francis wrote: > > From: Alistair Francis > > The following changes since commit 64ada298b98a51eb2512607f6e6180cb330c47b1: > > Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220302' into > staging (2022-03-02 12:38:46 +) > > are availab

Re: [PATCH v2 10/10] esp: recreate ESPState current_req after migration

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : Since PDMA reads/writes are driven by the guest, it is possible that migration can occur whilst a SCSIRequest is still active. Fortunately active SCSIRequests are already included in the migration stream and restarted post migration but this still

Re: [PATCH v2 09/10] esp: include the current PDMA callback in the migration stream

2022-03-04 Thread Laurent Vivier
Le 02/03/2022 à 22:27, Mark Cave-Ayland a écrit : This involves (re)adding a PDMA-specific subsection to hold the reference to the current PDMA callback. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 23 +++ 1 file changed, 23 insertions(+) Reviewed-by: Laurent V

Re: [PATCH v4 0/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-04 Thread Ani Sinha
On Fri, Mar 4, 2022 at 3:56 PM Michael S. Tsirkin wrote: > > On Mon, Feb 28, 2022 at 10:17:30PM +0200, Liav Albani wrote: > > This can allow the guest OS to determine more easily if i8042 controller > > is present in the system or not, so it doesn't need to do probing of the > > controller, but ju

Re: [PATCH v3 4/4] docs: vhost-user: add subsection for non-Linux platforms

2022-03-04 Thread Michael S. Tsirkin
On Thu, Mar 03, 2022 at 12:59:11PM +0100, Sergio Lopez wrote: > Add a section explaining how vhost-user is supported on platforms > other than Linux. > > Signed-off-by: Sergio Lopez > --- > docs/interop/vhost-user.rst | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/

Re: [PATCH v4 0/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-04 Thread Michael S. Tsirkin
On Fri, Mar 04, 2022 at 04:04:13PM +0530, Ani Sinha wrote: > On Fri, Mar 4, 2022 at 3:56 PM Michael S. Tsirkin wrote: > > > > On Mon, Feb 28, 2022 at 10:17:30PM +0200, Liav Albani wrote: > > > This can allow the guest OS to determine more easily if i8042 controller > > > is present in the system o

Re: [PATCH V7 10/29] machine: memfd-alloc option

2022-03-04 Thread Igor Mammedov
On Thu, 3 Mar 2022 12:21:15 -0500 "Michael S. Tsirkin" wrote: > On Wed, Dec 22, 2021 at 11:05:15AM -0800, Steve Sistare wrote: > > Allocate anonymous memory using memfd_create if the memfd-alloc machine > > option is set. > > > > Signed-off-by: Steve Sistare > > --- > > hw/core/machine.c | 1

Re: [PATCH 0/6] 9pfs: convert Doxygen -> kerneldoc format

2022-03-04 Thread Christian Schoenebeck
On Freitag, 4. März 2022 08:39:36 CET Greg Kurz wrote: > On Thu, 3 Mar 2022 14:40:56 +0100 > > Christian Schoenebeck wrote: > > This patch set converts occurrences of API doc comments from Doxygen > > format > > into kerneldoc format. No behaviour change whatsoever. > > > > Christian Schoenebeck

Re: any opinion on the patch "[RFC PATCH] hw/i386/e820: remove legacy reserved entries for e820"? EOM

2022-03-04 Thread Ani Sinha
On Fri, Mar 4, 2022 at 3:48 PM Gerd Hoffmann wrote: > > On Thu, Mar 03, 2022 at 03:12:51PM +0530, Ani Sinha wrote: > > On Thu, Mar 3, 2022 at 15:11 Gerd Hoffmann wrote: > > > > > Sorry, no. Noticed the discussions but don't remember the details and > > > didn't took the time to wade through the

Re: [PATCH v4 12/14] add sysbus-mmio-map qapi command

2022-03-04 Thread Damien Hedde
On 3/3/22 15:59, Philippe Mathieu-Daudé wrote: On 23/2/22 10:07, Damien Hedde wrote: This command allows to map an mmio region of sysbus device onto the system memory. Its behavior mimics the sysbus_mmio_map() function apart from the automatic unmap (the C function unmaps the region if it is

Re: [PATCH v3 0/4] Enable vhost-user to be used on BSD systems

2022-03-04 Thread Michael S. Tsirkin
On Thu, Mar 03, 2022 at 12:59:07PM +0100, Sergio Lopez wrote: > Since QEMU is already able to emulate ioeventfd using pipefd, we're already > pretty close to supporting vhost-user on non-Linux systems. > > This two patches bridge the gap by: > > 1. Adding a new event_notifier_get_wfd() to return

Re: [PATCH v2 0/4] qsd: Add --daemonize; and add job quit tests

2022-03-04 Thread Kevin Wolf
Am 03.03.2022 um 17:48 hat Hanna Reitz geschrieben: > Hi, > > v1 cover letter: > > https://lists.nongnu.org/archive/html/qemu-block/2021-12/msg00499.html > > > In v2, I followed Vladimir’s suggestion to look into whether we could > reuse os_daemonize(). Indeed we can, and it makes patch 3 (for

Re: [PATCH v3 4/4] docs: vhost-user: add subsection for non-Linux platforms

2022-03-04 Thread Sergio Lopez
On Fri, Mar 04, 2022 at 05:35:01AM -0500, Michael S. Tsirkin wrote: > On Thu, Mar 03, 2022 at 12:59:11PM +0100, Sergio Lopez wrote: > > Add a section explaining how vhost-user is supported on platforms > > other than Linux. > > > > Signed-off-by: Sergio Lopez > > --- > > docs/interop/vhost-user.

Re: any opinion on the patch "[RFC PATCH] hw/i386/e820: remove legacy reserved entries for e820"? EOM

2022-03-04 Thread Ani Sinha
On Fri, Mar 4, 2022 at 4:11 PM Ani Sinha wrote: > > On Fri, Mar 4, 2022 at 3:48 PM Gerd Hoffmann wrote: > > > > On Thu, Mar 03, 2022 at 03:12:51PM +0530, Ani Sinha wrote: > > > On Thu, Mar 3, 2022 at 15:11 Gerd Hoffmann wrote: > > > > > > > Sorry, no. Noticed the discussions but don't remember

Re: [PATCH v8 00/31] block layer: split block APIs in global state and I/O

2022-03-04 Thread Kevin Wolf
Am 03.03.2022 um 16:15 hat Emanuele Giuseppe Esposito geschrieben: > Currently, block layer APIs like block.h contain a mix of > functions that are either running in the main loop and under the > BQL, or are thread-safe functions and run in iothreads performing I/O. > The functions running under BQ

Re: [PATCH v4 0/6] Introduce CanoKey QEMU

2022-03-04 Thread Gerd Hoffmann
On Sat, Feb 12, 2022 at 09:29:47PM +0800, Hongren (Zenithal) Zheng wrote: > Hi, > > Is there any further feedback on this patch set. Sorry for the looong delay, I'm rather busy with edk2. Tried to queue up this, noticed it breaks the build in case the canokey library is not installed. I'd sugge

Re: [PATCH] hw/arm/virt: Validate memory size on the first NUMA node

2022-03-04 Thread Igor Mammedov
On Thu, 3 Mar 2022 11:25:25 +0800 Gavin Shan wrote: > Hi Gerd, > > On 3/1/22 7:42 PM, Gerd Hoffmann wrote: > >>> Unless it architecturally wrong thing i.e. (node size less than 128Mb) > >>> ,in which case limiting it in QEMU would be justified, I'd prefer > >>> firmware being fixed or it reporti

Re: [PATCH v4 2/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-04 Thread Igor Mammedov
On Wed, 2 Mar 2022 17:45:58 +0200 Liav Albani wrote: > >>> but I feel quoting spec > >>> and including table name is a good idea actually, but pls quote verbatim: > >>> > >> I don't do that and don't ask it from others. > >> > >> The reason being that pointing where to look in spec and having

Re: [PATCH v4 11/14] softmmu/memory: add memory_region_try_add_subregion function

2022-03-04 Thread Damien Hedde
On 3/3/22 14:32, Philippe Mathieu-Daudé wrote: On 23/2/22 10:12, Damien Hedde wrote: Hi Philippe, I suppose it is ok if I change your mail in the reviewed by ? No, the email is fine (git tools should take care of using the correct email via the .mailmap entry, see commit 90f285fd83). Th

Re: [PATCH] hw/arm/virt: Validate memory size on the first NUMA node

2022-03-04 Thread Peter Maydell
On Fri, 4 Mar 2022 at 10:52, Igor Mammedov wrote: > if firmware is not an option, I wouldn't opposed to printing warning > message from QEMU if you can detect that you are running broken edk2 > and under condition that no new infa/hooks are invented for this. > (assuming it's worth all the effort

Re: [PATCH 1/1] virtio: fix feature negotiation for ACCESS_PLATFORM

2022-03-04 Thread Halil Pasic
On Fri, 4 Mar 2022 03:12:03 -0500 "Michael S. Tsirkin" wrote: > On Thu, Feb 10, 2022 at 02:29:29PM +0100, Halil Pasic wrote: > > On Thu, 10 Feb 2022 12:19:25 +0100 > > Cornelia Huck wrote: > > > > [..] > > > > > > Nope, that's not my problem. We make sure that the bit is persistent, we > > >

[PATCH v2 1/9] hw/usb/redirect.c: Stop using qemu_oom_check()

2022-03-04 Thread Peter Maydell
qemu_oom_check() is a function which essentially says "if you pass me a NULL pointer then print a message then abort()". On POSIX systems the message includes strerror(errno); on Windows it includes the GetLastError() error value printed as an integer. Other than in the implementation of qemu_mem

[PATCH v2 6/9] util: Share qemu_try_memalign() implementation between POSIX and Windows

2022-03-04 Thread Peter Maydell
The qemu_try_memalign() functions for POSIX and Windows used to be significantly different, but these days they are identical except for the actual allocation function called, and the POSIX version already has to have ifdeffery for different allocation functions. Move to a single implementation in

[PATCH v2 4/9] util: Return valid allocation for qemu_try_memalign() with zero size

2022-03-04 Thread Peter Maydell
Currently qemu_try_memalign()'s behaviour if asked to allocate 0 bytes is rather variable: * on Windows, we will assert * on POSIX platforms, we get the underlying behaviour of the posix_memalign() or equivalent function, which may be either "return a valid non-NULL pointer" or "return NULL

[PATCH v2 2/9] util: Make qemu_oom_check() a static function

2022-03-04 Thread Peter Maydell
The qemu_oom_check() function, which we define in both oslib-posix.c and oslib-win32.c, is now used only locally in that file; make it static. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20220226180723.1706285-3-peter.mayd...@linar

[PATCH v2 3/9] util: Unify implementations of qemu_memalign()

2022-03-04 Thread Peter Maydell
We implement qemu_memalign() in both oslib-posix.c and oslib-win32.c, but the two versions are essentially the same: they call qemu_try_memalign(), and abort() after printing an error message if it fails. The only difference is that the win32 version prints the GetLastError() value whereas the POS

[PATCH v2 7/9] util: Use meson checks for valloc() and memalign() presence

2022-03-04 Thread Peter Maydell
Instead of assuming that all CONFIG_BSD have valloc() and anything else is memalign(), explicitly check for those functions in meson.build and use the "is the function present" define. Tests for specific functionality are better than which-OS checks; this also lets us give a helpful error message

[PATCH v2 0/9] Cleanup of qemu_oom_check() and qemu_memalign()

2022-03-04 Thread Peter Maydell
This series does some cleanup of the qemu_oom_check() and qemu_memalign() functions; I started looking at the first of these and found myself wanting to tidy some stuff relating to the second in the process. The TLDR is that this series removes qemu_oom_check() (which was mostly being misused), uni

[PATCH v2 5/9] meson.build: Don't misdetect posix_memalign() on Windows

2022-03-04 Thread Peter Maydell
Currently we incorrectly think that posix_memalign() exists on Windows. This is because of a combination of: * the msys2/mingw toolchain/libc claim to have a __builtin_posix_memalign when there isn't a builtin of that name * meson will assume that if you have a __builtin_foo that counts f

[PATCH v2 8/9] util: Put qemu_vfree() in memalign.c

2022-03-04 Thread Peter Maydell
qemu_vfree() is the companion free function to qemu_memalign(); put it in memalign.c so the allocation and free functions are together. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220226180723.1706285-9-peter.mayd...@linaro.org --- util/memalign.c| 11 +

Re: Issue with qemu-system-ppc running OSX guests

2022-03-04 Thread Lucas Mateus Martins Araujo e Castro
On 02/03/2022 20:55, Fabiano Rosas wrote: Howard Spoelstra writes: On Wed, Mar 2, 2022 at 9:11 PM BALATON Zoltan wrote: On Wed, 2 Mar 2022, Howard Spoelstra wrote: Hi all, I noticed qemu-system-ppc running OSX guests does not get to the desktop or does not display the menu bars. Cc-in

[PATCH v2 9/9] osdep: Move memalign-related functions to their own header

2022-03-04 Thread Peter Maydell
Move the various memalign-related functions out of osdep.h and into their own header, which we include only where they are used. While we're doing this, add some brief documentation comments. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message

Re: [PATCH] target/arm: Fix sve2 ldnt1 (64-bit unscaled offset)

2022-03-04 Thread Peter Maydell
On Fri, 4 Mar 2022 at 00:17, Richard Henderson wrote: > > We were mapping this to ld1 (32-bit unpacked unscaled offset), > which discarded the upper 32 bits of the address coming from > the vector argument. > > Fixed by setting XS=2, which is the existing translator internal > value for no extensi

Re: [PATCH v4 18/18] hw/arm/virt: Disable LPA2 for -machine virt-6.2

2022-03-04 Thread Peter Maydell
On Tue, 1 Mar 2022 at 22:00, Richard Henderson wrote: > > There is a Linux kernel bug present until v5.12 that prevents > booting with FEAT_LPA2 enabled. As a workaround for TCG, > disable this feature for machine versions prior to 7.0. > > Cc: Daniel P. Berrangé > Signed-off-by: Richard Henders

[PATCH v5 0/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-04 Thread Ani Sinha
This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. To allow "flexible" indication, I don't hardcode the bit at l

[PATCH v5 2/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-03-04 Thread Ani Sinha
From: Liav Albani This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. This change only applies to the x86/q35 m

Re: [PATCH v4 17/18] target/arm: Provide cpu property for controling FEAT_LPA2

2022-03-04 Thread Peter Maydell
On Tue, 1 Mar 2022 at 22:00, Richard Henderson wrote: > > There is a Linux kernel bug present until v5.12 that prevents > booting with FEAT_LPA2 enabled. As a workaround for TCG, allow > the feature to be disabled from -cpu max. > > Since this kernel bug is present in the Fedora 31 image that > w

[PATCH v5 3/3] tests/acpi: i386: update FACP table differences

2022-03-04 Thread Ani Sinha
From: Liav Albani After changing the IAPC boot flags register to indicate support of i8042 in the machine chipset to help the guest OS to determine its existence "faster", we need to have the updated FACP ACPI binary images in tree. The ASL changes introduced are shown by the following diff: @@

[PATCH v5 1/3] tests/acpi: i386: allow FACP acpi table changes

2022-03-04 Thread Ani Sinha
From: Liav Albani The FACP table is going to be changed for x86/q35 machines. To be sure the following changes are not breaking any QEMU test this change follows step 2 from the bios-tables-test.c guide on changes that affect ACPI tables. Signed-off-by: Liav Albani Acked-by: Ani Sinha --- tes

[PATCH 0/4] softmmu: move and refactor -runas, -chroot and -daemonize

2022-03-04 Thread Daniel P . Berrangé
This small series was motivated by my thoughts on the proposals in https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg01135.html It demostrates the approach I mention there, and has the further benefit of untangling and isolating the implementation of UID changing, chrooting and daemonize

[PATCH 2/4] os-posix: refactor code handling the -runas argument

2022-03-04 Thread Daniel P . Berrangé
Change the change_process_uid() function so that it takes its input as parameters instead of relying on static global variables. Signed-off-by: Daniel P. Berrangé --- os-posix.c | 83 +- 1 file changed, 39 insertions(+), 44 deletions(-) diff -

[PATCH 4/4] softmmu: move parsing of -runas, -chroot and -daemonize code

2022-03-04 Thread Daniel P . Berrangé
With the future intent to try to move to a fully QAPI driven configuration system, we want to have any current command parsing well isolated from logic that applies the resulting configuration. We also don't want os-posix.c to contain code that is specific to the system emulators, as this file is

[PATCH 1/4] softmmu: remove deprecated --enable-fips option

2022-03-04 Thread Daniel P . Berrangé
Users requiring FIPS support must build QEMU with either the libgcrypt or gnutls libraries for as the crytography backend. Signed-off-by: Daniel P. Berrangé --- docs/about/deprecated.rst | 12 docs/about/removed-features.rst | 11 +++ include/qemu/osdep.h|

[PATCH 3/4] os-posix: refactor code handling the -chroot argument

2022-03-04 Thread Daniel P . Berrangé
Change the change_root() function so that it takes its input as parameters instead of relying on static global variables. Signed-off-by: Daniel P. Berrangé --- os-posix.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/os-posix.c b/os-posix.c index 5

Re: [PATCH v2 1/4] os-posix: Add os_set_daemonize()

2022-03-04 Thread Daniel P . Berrangé
On Fri, Mar 04, 2022 at 11:20:39AM +0100, Kevin Wolf wrote: > Am 04.03.2022 um 10:19 hat Daniel P. Berrangé geschrieben: > > On Thu, Mar 03, 2022 at 05:48:11PM +0100, Hanna Reitz wrote: > > > The daemonizing functions in os-posix (os_daemonize() and > > > os_setup_post()) only daemonize the process

Re: [PATCH 0/2] virtiofsd: Support FUSE_SYNCFS on unannounced submounts

2022-03-04 Thread Vivek Goyal
On Thu, Mar 03, 2022 at 06:13:21PM +0100, Greg Kurz wrote: > This is the current patches I have : one to track submounts > and the other to call syncfs() on them. Tested on simple > cases only. > > I won't be able to work on this anymore, so I'm posting for the > records. Anyone is welcome to pick

Re: [PATCH v2 1/3] block: Make bdrv_refresh_limits() non-recursive

2022-03-04 Thread Hanna Reitz
On 03.03.22 17:56, Kevin Wolf wrote: Am 16.02.2022 um 11:53 hat Hanna Reitz geschrieben: bdrv_refresh_limits() recurses down to the node's children. That does not seem necessary: When we refresh limits on some node, and then recurse down and were to change one of its children's BlockLimits, the

Re: [PATCH v3 4/5] hw/intc: Vectored Interrupt Controller (VIC)

2022-03-04 Thread Peter Maydell
On Thu, 3 Mar 2022 at 15:39, Amir Gonnen wrote: > > Implement nios2 Vectored Interrupt Controller (VIC). > VIC is connected to EIC. It needs to update rha, ril, rrs and rnmi > fields on Nios2CPU before raising an IRQ. > For that purpose, VIC has a "cpu" property which should refer to the > nios2 c

Re: [PATCH v3 1/5] target/nios2: Check supervisor on eret

2022-03-04 Thread Peter Maydell
On Thu, 3 Mar 2022 at 15:39, Amir Gonnen wrote: > > eret instruction is only allowed in supervisor mode. > > Signed-off-by: Amir Gonnen > --- > target/nios2/translate.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/target/nios2/translate.c b/target/nios2/translate.c > index ce3aacf5

Re: [PATCH v3 5/5] hw/nios2: Machine with a Vectored Interrupt Controller

2022-03-04 Thread Peter Maydell
On Thu, 3 Mar 2022 at 15:39, Amir Gonnen wrote: > > Demonstrate how to use nios2 VIC on a machine. > Introduce a new machine "10m50-ghrd-vic" which is based on "10m50-ghrd" > with a VIC attached and internal interrupt controller removed. > > When VIC is present, irq0 connects the VIC to the cpu, i

Re: [PATCH 3/5] avocado/boot_linux_console.py: check for tcg in test_ppc_powernv8/9

2022-03-04 Thread Philippe Mathieu-Daudé
On 3/3/22 16:35, Daniel Henrique Barboza wrote: The PowerNV8/9 machines does not work with KVM acceleration, meaning that boot_linux_console.py:BootLinuxConsole.test_ppc_powernv8/9 tests will always fail when QEMU is compiled with --disable-tcg: ERROR 1-tests/avocado/boot_linux_console.py:BootLi

Re: [PATCH V7 01/29] memory: qemu_check_ram_volatile

2022-03-04 Thread Philippe Mathieu-Daudé
On 22/12/21 20:05, Steve Sistare wrote: Add a function that returns an error if any ram_list block represents volatile memory. Signed-off-by: Steve Sistare --- include/exec/memory.h | 8 softmmu/memory.c | 26 ++ 2 files changed, 34 insertions(+) diff

Re: [PATCH] gdbstub.c: add support for info proc mappings

2022-03-04 Thread Dominik Czarnota
Hey, I may work on this next week but I will probably not make it until the 8th :(. On Thu, 3 Mar 2022 at 13:34, Alex Bennée wrote: > > > Disconnect3d writes: > > > This commit adds support for `info proc mappings` and a few other commands > > into > > the QEMU user-mode emulation gdbstub. > >

[PULL 13/19] 9pfs: drop Doxygen format from qemu_dirent_dup() API comment

2022-03-04 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so drop occurrences of "@c" which is Doxygen format for fixed-width text. Link: https://lore.kernel.org/qemu-devel/cafeaca89+enom6x19oef53kd2dwkhn5sn21va0d7yepjsa3...@mail.gmail.com/ Based-on: Signed-off-by: Christian Schoenebeck

[PULL 07/19] 9p: darwin: *xattr_nofollow implementations

2022-03-04 Thread Christian Schoenebeck
From: Keno Fischer This implements the darwin equivalent of the functions that were moved to 9p-util(-linux) earlier in this series in the new 9p-util-darwin file. Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed-off-by: Michael Roitzsch Signed-off-by: Will Cohen Mess

[PULL 15/19] 9pfs/codir.c: convert Doxygen -> kerneldoc format

2022-03-04 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so convert API doc comments from Doxygen format to kerneldoc format. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Message-Id: --- hw/9pfs/codir.c | 30 +++--- 1 file changed, 15 insertions(

Re: [PATCH v3] ui/cocoa: Use the standard about panel

2022-03-04 Thread Peter Maydell
On Sun, 27 Feb 2022 at 04:22, Akihiko Odaki wrote: > > This provides standard look and feel for the about panel and reduces > code. > > Signed-off-by: Akihiko Odaki > --- Applied to target-arm.next, thanks. -- PMM

[PULL 01/19] 9p: linux: Fix a couple Linux assumptions

2022-03-04 Thread Christian Schoenebeck
From: Keno Fischer - Guard Linux only headers. - Add qemu/statfs.h header to abstract over the which headers are needed for struct statfs - Define `ENOATTR` only if not only defined (it's defined in system headers on Darwin). Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for

[PULL 17/19] 9pfs/9p-util.h: convert Doxygen -> kerneldoc format

2022-03-04 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so convert API doc comments from Doxygen format to kerneldoc format. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Message-Id: --- hw/9pfs/9p-util.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PULL 19/19] fsdev/p9array.h: convert Doxygen -> kerneldoc format

2022-03-04 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so convert API doc comments from Doxygen format to kerneldoc format. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Message-Id: <2e2d46a402560f155de322d95789ba107d728885.1646314856.git.qemu_...@crudebyte.com> --- fsd

[PULL 16/19] 9pfs/9p.c: convert Doxygen -> kerneldoc format

2022-03-04 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so convert API doc comments from Doxygen format to kerneldoc format. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Message-Id: <4ece6ffa4465c271c6a7c42a3040f42780fcce87.1646314856.git.qemu_...@crudebyte.com> --- hw/

[PULL 11/19] 9p: darwin: meson: Allow VirtFS on Darwin

2022-03-04 Thread Christian Schoenebeck
From: Keno Fischer To allow VirtFS on darwin, we need to check that pthread_fchdir_np is available, which has only been available since macOS 10.12. Additionally, virtfs_proxy_helper is disabled on Darwin. This patch series does not currently provide an implementation of the proxy-helper, but th

Re: [PATCH v5 3/3] tests/acpi: i386: update FACP table differences

2022-03-04 Thread Michael S. Tsirkin
On Fri, Mar 04, 2022 at 05:22:57PM +0530, Ani Sinha wrote: > From: Liav Albani > > After changing the IAPC boot flags register to indicate support of i8042 > in the machine chipset to help the guest OS to determine its existence > "faster", we need to have the updated FACP ACPI binary images in t

Re: [PATCH v6 20/43] hw/cxl/device: Add some trivial commands

2022-03-04 Thread Jonathan Cameron via
On Tue, 01 Mar 2022 18:46:30 + Alex Bennée wrote: > Jonathan Cameron writes: > > > From: Ben Widawsky > > > > GET_FW_INFO and GET_PARTITION_INFO, for this emulation, is equivalent to > > info already returned in the IDENTIFY command. To have a more robust > > implementation, add those. > >

Re: [PULL 0/7] target/nios2: Rewrite interrupt handling

2022-03-04 Thread Peter Maydell
On Thu, 3 Mar 2022 at 20:46, Richard Henderson wrote: > > The following changes since commit 36eae3a732a1f2aa81391e871ac0e9bb3233e7d7: > > Merge remote-tracking branch > 'remotes/dgilbert-gitlab/tags/pull-migration-20220302b' into staging > (2022-03-02 20:55:48 +) > > are available in the

[PULL 08/19] 9p: darwin: Compatibility for f/l*xattr

2022-03-04 Thread Christian Schoenebeck
From: Keno Fischer On darwin `fgetxattr` takes two extra optional arguments, and the l* variants are not defined (in favor of an extra flag to the regular variants. Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed-off-by: Michael Roitzsch Signed-off-by: Will Cohen Mes

[PULL 18/19] 9pfs/coth.h: drop Doxygen format on v9fs_co_run_in_worker()

2022-03-04 Thread Christian Schoenebeck
API doc comments in QEMU are supposed to be in kerneldoc format, so drop Doxygen format used on v9fs_co_run_in_worker() macro. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Message-Id: --- hw/9pfs/coth.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/

[PATCH] hw/acpi/microvm: turn on 8042 bit in FADT boot architecture flags if present

2022-03-04 Thread Ani Sinha
The second bit of IAPC_BOOT_ARCH in FADT table indicates the presence of keyboard controller implemented as 8042 or equivalent micro controller. This change enables this flag for microvms if such a device exists (for example, when added explicitly from the QEMU commandline). Change 1f810294bb31bf6a

Re: [PATCH] hw/acpi/microvm: turn on 8042 bit in FADT boot architecture flags if present

2022-03-04 Thread Michael S. Tsirkin
On Fri, Mar 04, 2022 at 06:47:41PM +0530, Ani Sinha wrote: > The second bit of IAPC_BOOT_ARCH in FADT table indicates the presence of > keyboard controller implemented as 8042 or equivalent micro controller. This > change enables this flag for microvms if such a device exists (for example, > when a

[PULL 04/19] 9p: darwin: Handle struct dirent differences

2022-03-04 Thread Christian Schoenebeck
From: Keno Fischer On darwin d_seekoff exists, but is optional and does not seem to be commonly used by file systems. Use `telldir` instead to obtain the seek offset and inject it into d_seekoff, and create a qemu_dirent_off helper to call it appropriately when appropriate. Signed-off-by: Keno F

[PULL 09/19] 9p: darwin: Implement compatibility for mknodat

2022-03-04 Thread Christian Schoenebeck
From: Keno Fischer Darwin does not support mknodat. However, to avoid race conditions with later setting the permissions, we must avoid using mknod on the full path instead. We could try to fchdir, but that would cause problems if multiple threads try to call mknodat at the same time. However, lu

Re: [PATCH v3 1/3] linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP

2022-03-04 Thread Laurent Vivier
Le 13/01/2022 à 18:04, matheus.fe...@eldorado.org.br a écrit : From: Matheus Ferst Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. The si_code comes from do_program_check in the kernel source file arch/powerpc/kernel/traps.c Reviewed-by: Richard Henderson Signed-off-by

  1   2   3   4   5   >