Re: [PATCH v15 3/8] net/vmnet: implement shared mode (vmnet-shared)

2022-02-26 Thread Vladislav Yaroshchuk
Hi Akihiko, On Fri, Feb 25, 2022 at 8:46 PM Akihiko Odaki wrote: > On 2022/02/26 2:13, Vladislav Yaroshchuk wrote: > > Interaction with vmnet.framework in different modes > > differs only on configuration stage, so we can create > > common `send`, `receive`, etc. procedures and reuse them. > > >

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

2022-02-26 Thread David Hildenbrand
On 17.02.22 23:53, 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 > --- > hw/virtio/virtio-ballo

Re: [PATCH v15 3/8] net/vmnet: implement shared mode (vmnet-shared)

2022-02-26 Thread Akihiko Odaki
On 2022/02/26 17:37, Vladislav Yaroshchuk wrote: Hi Akihiko, On Fri, Feb 25, 2022 at 8:46 PM Akihiko Odaki > wrote: On 2022/02/26 2:13, Vladislav Yaroshchuk wrote: > Interaction with vmnet.framework in different modes > differs only on configurati

答复: [PATCH] i386: Set MCG_STATUS_RIPV bit for mce SRAR error

2022-02-26 Thread 罗飞
ping https://patchew.org/QEMU/20220120084634.131450-1-luo...@unicloud.com/ 发件人: 罗飞 发送时间: 2022年1月20日 16:46:34 收件人: qemu-devel 抄送: Paolo Bonzini; Marcelo Tosatti; k...@vger.kernel.org; 罗飞 主题: [PATCH] i386: Set MCG_STATUS_RIPV bit for mce SRAR error In the physical

[PATCH] coreaudio: Notify error in coreaudio_init_out

2022-02-26 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- audio/coreaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index d8a21d3e507..d7cfdcc4fc4 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c @@ -604,6 +604,8 @@ static int coreaudio_init_out(HWVoiceOut *hw, st

Re: [PATCH] coreaudio: Notify error in coreaudio_init_out

2022-02-26 Thread Christian Schoenebeck
On Samstag, 26. Februar 2022 11:02:48 CET Akihiko Odaki wrote: > Signed-off-by: Akihiko Odaki > --- > audio/coreaudio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/audio/coreaudio.c b/audio/coreaudio.c > index d8a21d3e507..d7cfdcc4fc4 100644 > --- a/audio/coreaudio.c > +++ b/audio

Re: [PATCH] coreaudio: Notify error in coreaudio_init_out

2022-02-26 Thread Akihiko Odaki
On 2022/02/26 19:16, Christian Schoenebeck wrote: On Samstag, 26. Februar 2022 11:02:48 CET Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki --- audio/coreaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index d8a21d3e507..d7cfdcc4fc4 10064

[PATCH v4] ui/cocoa: Use NSWindow's ability to resize

2022-02-26 Thread Akihiko Odaki
This change brings two new features: - The window will be resizable if "Zoom To Fit" is eanbled - The window can be made full screen by clicking full screen button provided by the platform. (The left-top green button.) Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 543 +

Re: [PATCH 11/31] vhost: Add vhost_svq_valid_device_features to shadow vq

2022-02-26 Thread Eugenio Perez Martin
On Sat, Feb 26, 2022 at 10:31 AM Liuxiangdong wrote: > > Hi, Eugenio. > > diff --git a/hw/virtio/vhost-shadow-virtqueue.c > b/hw/virtio/vhost-shadow-virtqueue.c > index 9619c8082c..51442b3dbf 100644 > --- a/hw/virtio/vhost-shadow-virtqueue.c > +++ b/hw/virtio/vhost-shadow-virtqueue.c > @@ -45,6 +4

Re: [PATCH v2 05/22] hw/ppc/pnv: Determine ns16550's IRQ number from QOM property

2022-02-26 Thread Cédric Le Goater
Hello, On 2/22/22 20:34, Bernhard Beschow wrote: Determine the IRQ number in the same way as for isa-ipmi-bt. This resolves the last usage of ISADevice::isairq[] which allows it to be removed. Signed-off-by: Bernhard Beschow I can take this patch in the ppc stream if you prefer. Anyhow, Rev

Re: [PATCH v2 05/22] hw/ppc/pnv: Determine ns16550's IRQ number from QOM property

2022-02-26 Thread BB
Hi Cédric, Am 26. Februar 2022 11:24:03 UTC schrieb "Cédric Le Goater" : >Hello, > >On 2/22/22 20:34, Bernhard Beschow wrote: >> Determine the IRQ number in the same way as for isa-ipmi-bt. This resolves >> the last usage of ISADevice::isairq[] which allows it to be removed. >> >> Signed-off-by:

Re: [PATCH] coreaudio: Notify error in coreaudio_init_out

2022-02-26 Thread Christian Schoenebeck
On Samstag, 26. Februar 2022 11:18:44 CET Akihiko Odaki wrote: > On 2022/02/26 19:16, Christian Schoenebeck wrote: > > On Samstag, 26. Februar 2022 11:02:48 CET Akihiko Odaki wrote: > >> Signed-off-by: Akihiko Odaki > >> --- > >> > >> audio/coreaudio.c | 2 ++ > >> 1 file changed, 2 insertions

Re: [PATCH v15 3/8] net/vmnet: implement shared mode (vmnet-shared)

2022-02-26 Thread Vladislav Yaroshchuk
On Sat, Feb 26, 2022 at 12:16 PM Akihiko Odaki wrote: > On 2022/02/26 17:37, Vladislav Yaroshchuk wrote: > > > > Hi Akihiko, > > > > On Fri, Feb 25, 2022 at 8:46 PM Akihiko Odaki > > wrote: > > > > On 2022/02/26 2:13, Vladislav Yaroshchuk wrote: > > > Int

[PATCH v3 1/3] ui/console: Do not return a value with ui_info

2022-02-26 Thread Akihiko Odaki
The returned value is not used and misleading. Signed-off-by: Akihiko Odaki --- hw/display/virtio-gpu-base.c | 6 +++--- hw/display/virtio-vga.c | 5 ++--- hw/vfio/display.c| 8 +++- include/ui/console.h | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff

[PATCH v3 0/3] virtio-gpu: Respect UI refresh rate for EDID

2022-02-26 Thread Akihiko Odaki
Let virtio-gpu be aware of the refresh rate. The EDID change is delivered with display hotplugging, which should not happen too frequently. Because of that, this moves the refresh rate to QemuUIInfo, whose change delivery is throttled. The delivery throttling also affects xenfb and this change doe

[PATCH v3 2/3] ui: Deliver refresh rate via QemuUIInfo

2022-02-26 Thread Akihiko Odaki
This change adds a new member, refresh_rate to QemuUIInfo in include/ui/console.h. It represents the refresh rate of the physical display backend, and it is more appropriate than GUI update interval as the refresh rate which the emulated device reports: - sdl may set GUI update interval shorter tha

[PATCH v3 3/3] virtio-gpu: Respect UI refresh rate for EDID

2022-02-26 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/display/virtio-gpu-base.c | 1 + hw/display/virtio-gpu.c| 1 + include/hw/virtio/virtio-gpu.h | 1 + 3 files changed, 3 insertions(+) diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index c73b3aa06b8..ee2587a8c36 100644 --- a

[PATCH v2] coreaudio: Notify error in coreaudio_init_out

2022-02-26 Thread Akihiko Odaki
Otherwise, the audio subsystem tries to use the voice and eventually aborts due to the maximum number of samples in the buffer is not set. Signed-off-by: Akihiko Odaki Reviewed-by: Christian Schoenebeck --- audio/coreaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/coreaudio.

Re: [PATCH v15 3/8] net/vmnet: implement shared mode (vmnet-shared)

2022-02-26 Thread Akihiko Odaki
On Sat, Feb 26, 2022 at 8:33 PM Vladislav Yaroshchuk wrote: > > > > On Sat, Feb 26, 2022 at 12:16 PM Akihiko Odaki > wrote: >> >> On 2022/02/26 17:37, Vladislav Yaroshchuk wrote: >> > >> > Hi Akihiko, >> > >> > On Fri, Feb 25, 2022 at 8:46 PM Akihiko Odaki > > > w

[PATCH v2 0/4] cutils: Introduce bundle mechanism

2022-02-26 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. v2: Rebased to the latest QEMU. Akihiko Odaki (4): cutils: Introduce bundle mechanism datadir: Use bundle mechanism ui/icons: Use bund

[PATCH v2 1/4] cutils: Introduce bundle mechanism

2022-02-26 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. Signed-off-by: Akihiko Odaki --- include/qemu/cutils.h | 19 +++ util/cutils.c | 33 +++

[PATCH v2 2/4] datadir: Use bundle mechanism

2022-02-26 Thread Akihiko Odaki
bundle mechanism and softmmu/datadir.c provides some overlapped functionality. Use bundle mechanism in softmmu/datadir.c to remove the redundancy. Signed-off-by: Akihiko Odaki --- configure | 2 ++ meson.build | 2 +- softmmu/datadir.c | 35 --- 3

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

2022-02-26 Thread Akihiko Odaki
This provides standard look and feel for the about panel and reduces code. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 112 +++-- 1 file changed, 23 insertions(+), 89 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index a8f1cdaf926..9c27b9f5a

[PATCH v2 3/4] ui/icons: Use bundle mechanism

2022-02-26 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- configure | 10 ++ meson.build | 3 +-- ui/cocoa.m | 20 +++- ui/gtk.c| 8 +--- ui/sdl2.c | 18 +++--- 5 files changed, 38 insertions(+), 21 deletions(-) diff --git a/configure b/configure index fda1a35cbc0..80d3

[PATCH v2 4/4] net: Use bundle mechanism

2022-02-26 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- configure | 1 + include/net/net.h | 2 +- meson.build | 1 + net/tap.c | 6 +- qemu-options.hx | 4 ++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 80d36a85bc5..63df8f5886e 100755 --- a/

Re: [PATCH v2 0/4] cutils: Introduce bundle mechanism

2022-02-26 Thread Peter Maydell
On Sat, 26 Feb 2022 at 12:45, Akihiko Odaki wrote: > > Developers often run QEMU without installing. The bundle mechanism > allows to look up files which should be present in installation even in > such a situation. This is supposed to work already -- it is why find_datadir() looks at a path base

Re: [PATCH v2 0/4] cutils: Introduce bundle mechanism

2022-02-26 Thread Akihiko Odaki
On 2022/02/26 22:02, Peter Maydell wrote: On Sat, 26 Feb 2022 at 12:45, Akihiko Odaki wrote: Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. This is supposed to work already -- it is

Re: [PATCH] ppc/pnv: fix default PHB4 QOM hierarchy

2022-02-26 Thread Cédric Le Goater
On 2/18/22 21:28, Daniel Henrique Barboza wrote: Commit 3f4c369ea63e ("ppc/pnv: make PECs create and realize PHB4s") changed phb4_pec code to create the default PHB4 objects in pnv_pec_default_phb_realize(). In this process the stacks[] PEC array was removed and each PHB4 object is tied together

Re: [PATCH 11/31] vhost: Add vhost_svq_valid_device_features to shadow vq

2022-02-26 Thread Liuxiangdong via
Hi, Eugenio. diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-virtqueue.c index 9619c8082c..51442b3dbf 100644 --- a/hw/virtio/vhost-shadow-virtqueue.c +++ b/hw/virtio/vhost-shadow-virtqueue.c @@ -45,6 +45,50 @@ const EventNotifier *vhost_svq_get_dev_kick_notifier( r

Re: [PATCH 13/22] bsd-user/bsd-file.h: Implementation details for the filesystem calls

2022-02-26 Thread Warner Losh
On Tue, Feb 1, 2022 at 10:43 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 2/1/22 22:14, Warner Losh wrote: > > +#ifndef BSD_FILE_H_ > > +#define BSD_FILE_H_ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#incl

[PATCH v2 01/16] bsd-user/main.c: Drop syscall flavor arg -bsd

2022-02-26 Thread Warner Losh
We've not realistically been able to actually run any bsd program on any other bsd program. They are too diverged to do this easily. The current code is setup to do it, but implementing it is hard. Stop pretending that we can do this. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson ---

[PATCH v2 05/16] bsd-user/arm/target_arch_cpu.h: Only support FreeBSD sys calls

2022-02-26 Thread Warner Losh
Since we don't build on OpenBSD, only do FreeBSD system calls here. In the future, we'll need to move this to some place like bsd-user/freebsd/arm/mumble.h, but until then just leave this inline. This reflects changes to the upstream. Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-b

[PATCH v2 06/16] bsd-user/arm/target_arch_thread.h: Assume a FreeBSD target

2022-02-26 Thread Warner Losh
Since we can't run on anything else, assume for the moment that this is a FreeBSD target. In the future, we'll need to handle this properly via some include file in bsd-user/*bsd/arm/mumble.h. There's a number of other diffs that would be needed to make things work on OtherBSD, so it doesn't make s

[PATCH v2 03/16] bsd-user/x86_64/target_arch_cpu.h: Remove openbsd syscall

2022-02-26 Thread Warner Losh
This doesn't build on openbsd at the moment, and this could should arguably be in bsd-user/*bsd/x86_64 somewhere. Until we refactor to support OpenBSD/NetBSD again, drop it here. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/x86_64/target_arch_c

[PATCH v2 09/16] bsd-user/freebsd/os-syscall.c: Move syscall processing here

2022-02-26 Thread Warner Losh
While there is some commonality between *BSD syscall processing, there's a number of differences and the system call numbers and ABIs have been independent since the late 90s. Move FreeBSD's proessing here and delete it. The upstream implementation is somewhat different than the current implementa

[PATCH v2 11/16] bsd-user/sycall.c: Now obsolete, remove

2022-02-26 Thread Warner Losh
Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/syscall.c | 516 - 1 file changed, 516 deletions(-) delete mode 100644 bsd-user/syscall.c diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c deleted fil

[PATCH v2 02/16] bsd-user/x86_64/target_arch_cpu.h: int $80 never was a BSD system call on amd64

2022-02-26 Thread Warner Losh
Although initial versions of NetBSD did use int $80, it was replaced by syscall before any releases. OpenBSD and FreeBSD always did syscall. Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/x86_64/target_arch_cpu.h | 58

[PATCH v2 12/16] bsd-user/freebsd/os-syscall.c: Add get_errno and host_to_target_errno

2022-02-26 Thread Warner Losh
Add the helper functions get_errno and host_to_target_errno. get_errno returns either the system call results, or the -errno when system call indicates failure by returning -1. Host_to_target_errno returns errno (since on FreeBSD they are the same on all architectures) along with a comment about wh

[PATCH v2 00/16] bsd-user: Start upstreaming the system calls.

2022-02-26 Thread Warner Losh
This series of patches does two things. First, it starts to give up on the idea that you can run FooBSD binaries on BarBSD. They are too different to make that happen any time soon, though I've kept the support for Net/OpenBSD, even though they haven't built. We'll need a lot of work to make that h

[PATCH v2 08/16] bsd-user: Remove bsd_type

2022-02-26 Thread Warner Losh
Remove keeping track of which type of bsd we're running on. It's no longer referenced in the code. Building bsd-user on NetBSD or OpenBSD isn't possible, let alone running that code. Stop pretending that we can do the cross BSD thing since there's been a large divergence since 2000 that makes this

[PATCH v2 16/16] bsd-user: Add safe system call macros

2022-02-26 Thread Warner Losh
Add a series of macros to create system call macros that go via the safe_syscall path. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/syscall_defs.h | 47 + 1 file changed, 47 insertions(+) diff --git a/

[PATCH v2 15/16] bsd-user: Define target_arg64

2022-02-26 Thread Warner Losh
target_arg64 is a generic way to extract 64-bits from a pair of arguments. On 32-bit platforms, it returns them joined together as appropriate. On 64-bit platforms, it returns the first arg because it's already 64-bits. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans

[PATCH v2 04/16] bsd-user/i386/target_arch_cpu.h: Remove openbsd syscall

2022-02-26 Thread Warner Losh
This doesn't build on openbsd at the moment, and this could should arguably be in bsd-user/*bsd/i386 somewhere. Until we refactor to support OpenBSD/NetBSD again, drop it here. Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/i386/target_arch_cpu.h

[PATCH v2 13/16] bsd-user/bsd-file.h: Implementation details for the filesystem calls

2022-02-26 Thread Warner Losh
An include file that pulls in all the definitions needed for the file related system calls. This also includes the host definitions to implement the system calls and some helper routines to lock/unlock different aspects of the system call arguments. Signed-off-by: Warner Losh --- bsd-user/bsd-fi

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

2022-02-26 Thread BALATON Zoltan
On Sat, 26 Feb 2022, Akihiko Odaki wrote: This provides standard look and feel for the about panel and reduces code. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 112 +++-- 1 file changed, 23 insertions(+), 89 deletions(-) diff --git a/ui/cocoa.m

[PATCH v2 07/16] bsd-user/x86_64/target_arch_thread.h: Assume a FreeBSD target

2022-02-26 Thread Warner Losh
Since we can't run on anything else, assume for the moment that this is a FreeBSD target. In the future, we'll need to handle this properly via some include file in bsd-user/*bsd/x86_64/mumble.h. There's a number of other diffs that would be needed to make things work on OtherBSD, so it doesn't mak

[PATCH v2 10/16] bsd-user: Move system call building to os-syscall.c

2022-02-26 Thread Warner Losh
Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/meson.build | 1 + bsd-user/meson.build | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/freebsd/meson.build b/bsd-user/freebsd/meson.build index 4b69cca7b90..f87c788e846 100644 ---

[PATCH v2 14/16] bsd-user: introduce target.h

2022-02-26 Thread Warner Losh
Create target.h. This file is intended to be simple and describe basic things about the architecture. If something is a basic feature of the architecture, it belongs here. Should we need something that's per-BSD there will be a target-os.h that will live in the per-bsd directories. Define regpairs

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

2022-02-26 Thread Peter Maydell
Currently if qemu_try_memalign() is asked to allocate 0 bytes, we assert. Instead return NULL; this is in line with the posix_memalign() API, and is valid to pass to _aligned_free() (which will do nothing). This change is a preparation for sharing the qemu_try_memalign() code between Windows and P

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

2022-02-26 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 --- include/qemu-common.h | 2 -- util/oslib-posix.c| 2 +- util/oslib-win32.c| 2 +- 3 files changed, 2 insertions(

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

2022-02-26 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 5/9] meson.build: Don't misdetect posix_memalign() on Windows

2022-02-26 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 3/9] util: Unify implementations of qemu_memalign()

2022-02-26 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 7/9] util: Use meson checks for valloc() and memalign() presence

2022-02-26 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 9/9] osdep: Move memalign-related functions to their own header

2022-02-26 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 --- include/qemu/memalign.h| 61 ++

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

2022-02-26 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 6/9] util: Share qemu_try_memalign() implementation between POSIX and Windows

2022-02-26 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 8/9] util: Put qemu_vfree() in memalign.c

2022-02-26 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 --- util/memalign.c| 11 +++ util/oslib-posix.c | 6 -- util/oslib-win32.c | 6 -- 3 files changed, 11 insert

[Bug 1735049] Re: Need MTTCG support for x86 guests

2022-02-26 Thread Jim Kleckner
See the discussion linked below that says that strong on weak is not actually fully supported yet. Is that discussion correct? === In short they explained to me that since the host arm64 is a weaker memory order than the guest x86 they disabled mttcg because if they would implement it would slow

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

2022-02-26 Thread Peter Maydell
On Sat, 26 Feb 2022 at 18:07, Peter Maydell wrote: Forgot to cc Gerd on this one as USB maintainer. Sorry.. > 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 Wi

Re: [PATCH v2 15/22] hw/ipmi/isa_ipmi_bt: Disuse isa_init_irq()

2022-02-26 Thread Corey Minyard
On Tue, Feb 22, 2022 at 08:34:39PM +0100, Bernhard Beschow wrote: > isa_init_irq() has become a trivial one-line wrapper for isa_get_irq(). > Use the original instead such that isa_init_irq() can be removed > eventually. Looking at the rest of the patch series, this looks lik a good idea. This is

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: 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. Oth

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: 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 --- include/qemu-common.h | 2 -- util/oslib-posix.c| 2 +- util/oslib-win32.

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: 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

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: Currently if qemu_try_memalign() is asked to allocate 0 bytes, we assert. Instead return NULL; this is in line with the posix_memalign() API, and is valid to pass to _aligned_free() (which will do nothing). This change is a preparation for sharing the qemu_

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: 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

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: Currently if qemu_try_memalign() is asked to allocate 0 bytes, we assert. Instead return NULL; this is in line with the posix_memalign() API, and is valid to pass to _aligned_free() (which will do nothing). This change is a preparation for sharing the qemu_

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: 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 funct

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: 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 a

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: 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 --- util/memalign.c| 11 +++ util/oslib-posix.c | 6 -- util/oslib-win3

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

2022-02-26 Thread Richard Henderson
On 2/26/22 08:07, Peter Maydell wrote: 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

[PATCH v2 0/9] tcg: support 32-bit guest addresses as signed

2022-02-26 Thread Richard Henderson
We have 3 hosts that naturally produce sign-extended values, and have to work extra hard (with 1 or 2 insns) to produce the zero-extended address that we expect today. However, it's a simple matter of arithmetic for the middle-end to require sign-extended addresses instead. For user-only, we do

[PATCH v2 3/9] accel/tcg: Support TCG_TARGET_SIGNED_ADDR32 for softmmu

2022-02-26 Thread Richard Henderson
When TCG_TARGET_SIGNED_ADDR32 is set, adjust the tlb addend to allow the 32-bit guest address to be sign extended within the 64-bit host register instead of zero extended. This will simplify tcg hosts like MIPS, RISC-V, and LoongArch, which naturally sign-extend 32-bit values, in contrast to x86_6

[PATCH v2 4/9] accel/tcg: Add guest_base_signed_addr32 for user-only

2022-02-26 Thread Richard Henderson
While the host may prefer to treat 32-bit addresses as signed, there are edge cases of guests that cannot be implemented with addresses 0x7fff_ and 0x8000_ being non-consecutive. Therefore, default to guest_base_signed_addr32 false, and allow probe_guest_base to determine whether it is pos

[PATCH v2 1/9] tcg: Add TCG_TARGET_SIGNED_ADDR32

2022-02-26 Thread Richard Henderson
Define as 0 for all tcg hosts. Put this in a separate header, because we'll want this in places that do not ordinarily have access to all of tcg/tcg.h. Reviewed-by: WANG Xuerui Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-by: Richard He

[PATCH v2 2/9] accel/tcg: Split out g2h_tlbe

2022-02-26 Thread Richard Henderson
Create a new function to combine a CPUTLBEntry addend with the guest address to form a host address. Reviewed-by: WANG Xuerui Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 24 ++

[PATCH v2 8/9] tcg/riscv: Support TCG_TARGET_SIGNED_ADDR32

2022-02-26 Thread Richard Henderson
All RV64 32-bit operations sign-extend the output, so we are easily able to keep TCG_TYPE_I32 values sign-extended in host registers. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-sa32.h | 6 +- tcg/riscv/tcg-tar

[PATCH v2 6/9] tcg/aarch64: Support TCG_TARGET_SIGNED_ADDR32

2022-02-26 Thread Richard Henderson
AArch64 has both sign and zero-extending addressing modes, which means that either treatment of guest addresses is equally efficient. Enabling this for AArch64 gives us testing of the feature in CI. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target-sa32.h | 8 +++- tcg/aarch64/tcg-tar

[PATCH v2 5/9] linux-user: Support TCG_TARGET_SIGNED_ADDR32

2022-02-26 Thread Richard Henderson
When using reserved_va, which is the default for a 64-bit host and a 32-bit guest, set guest_base_signed_addr32 if requested by TCG_TARGET_SIGNED_ADDR32, and the executable layout allows. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 4 --- linux-user/e

[PATCH v2 7/9] tcg/mips: Support TCG_TARGET_SIGNED_ADDR32

2022-02-26 Thread Richard Henderson
All 32-bit mips operations sign-extend the output, so we are easily able to keep TCG_TYPE_I32 values sign-extended in host registers. Cc: Philippe Mathieu-Daudé Cc: Aurelien Jarno Cc: Huacai Chen Cc: Jiaxun Yang Cc: Aleksandar Rikalo Signed-off-by: Richard Henderson --- tcg/mips/tcg-target-

[PATCH v2 9/9] tcg/loongarch64: Support TCG_TARGET_SIGNED_ADDR32

2022-02-26 Thread Richard Henderson
All 32-bit LoongArch operations sign-extend the output, so we are easily able to keep TCG_TYPE_I32 values sign-extended in host registers. Cc: WANG Xuerui Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-sa32.h | 2 +- tcg/loongarch64/tcg-target.c.inc | 15 ++- 2 fi

Re: [PATCH v2 13/16] bsd-user/bsd-file.h: Implementation details for the filesystem calls

2022-02-26 Thread Richard Henderson
On 2/26/22 07:07, Warner Losh wrote: An include file that pulls in all the definitions needed for the file related system calls. This also includes the host definitions to implement the system calls and some helper routines to lock/unlock different aspects of the system call arguments. Signed-of

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

2022-02-26 Thread Akihiko Odaki
On Sun, Feb 27, 2022 at 2:18 AM BALATON Zoltan wrote: > > On Sat, 26 Feb 2022, Akihiko Odaki wrote: > > This provides standard look and feel for the about panel and reduces > > code. > > > > Signed-off-by: Akihiko Odaki > > --- > > ui/cocoa.m | 112 +++-

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

2022-02-26 Thread Akihiko Odaki
This provides standard look and feel for the about panel and reduces code. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 112 +++-- 1 file changed, 23 insertions(+), 89 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index a8f1cdaf926..59672fee7

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

2022-02-26 Thread Ani Sinha
On Sat, 26 Feb 2022, 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 namespace. > > Signed

Re: [PATCH v3 2/4] tests/acpi: i386: allow FACP acpi table changes

2022-02-26 Thread Ani Sinha
On Sat, 26 Feb 2022, Liav Albani wrote: > 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 Al

Re: [PATCH v3 4/4] tests/acpi: i386: update FACP table differences

2022-02-26 Thread Ani Sinha
On Sat, 26 Feb 2022, Liav Albani wrote: > 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. > > @@ -1,32 +1,32 @@ > /* > *

Re: [PATCH v3 1/4] hw/isa: add function to check for existence of device by its type

2022-02-26 Thread Ani Sinha
On Sat, 26 Feb 2022, Liav Albani wrote: > This function enumerates all attached ISA devices in the machine, and > tries to compare a given device type name to the enumerated devices. > For example, this can help other code to determine if a i8042 controller > exists in the machine. > > Signed-o