[PATCH qemu] spapr: Use address from elf parser for kernel address

2022-05-03 Thread Alexey Kardashevskiy
tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. QEMU loads the kernel at 0x40 by default which works most of the time as Linux kernels are relocatable, 64bit and compiled with "-pie" (position independent code). This works for a little endian zImage too. However a big end

Re: [PATCH 2/9] replay: notify vCPU when BH is scheduled

2022-05-03 Thread Pavel Dovgalyuk
On 26.04.2022 21:45, Richard Henderson wrote: On 4/22/22 04:53, Pavel Dovgalyuk wrote: +void icount_notify_exit(void) +{ +    if (icount_enabled() && first_cpu) { +    cpu_exit(first_cpu); +    qemu_clock_notify(QEMU_CLOCK_VIRTUAL); +    } +} Why first_cpu?  Did you really want to cont

Re: [qemu-web PATCH] Add public key for tarball-signing to download page

2022-05-03 Thread Thomas Huth
On 04/05/2022 02.21, Michael Roth wrote: We used to have public keys listed on the SecurityProcess page back when it was still part of the wiki, but they are no longer available there and some users have asked where to obtain them so they can verify the tarball signatures. That was probably not

[PATCH] linux-user: Expose risc-v V and H isa bit in get_elf_hwcap()

2022-05-03 Thread nihui
This patch brings the optional risc-v vector and hypervisor bits in hwcap so that application could detect these isa support from /proc/self/auxv correctly in qemu userspace mode. Signed-off-by: Ni Hui --- linux-user/elfload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[PATCH] target/mips: Fix store adress of high 64bit in helper_msa_st_b()

2022-05-03 Thread nihui
This patch fix the issue that helper_msa_st_b() write high 64bit data to where the low 64bit resides, leaving high 64bit undefined. Signed-off-by: Ni Hui --- target/mips/tcg/msa_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/tcg/msa_helper.c b/target/mip

Re: [PATCH v3 17/21] target/ppc: Remove msr_fe0 and msr_fe1 macros

2022-05-03 Thread Richard Henderson
On 5/3/22 13:24, Víctor Colombo wrote: msr_fe0 and msr_fe1 macros hide the usage of env->msr, which is a bad behavior. Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Added a combined macro f

Re: [PATCH v3 21/21] target/ppc: Change MSR_* to follow POWER ISA numbering convention

2022-05-03 Thread Richard Henderson
On 5/3/22 13:24, Víctor Colombo wrote: Today we have the issue where MSR_* values are the 'inverted order' bit numbers from what the ISA specifies. e.g. MSR_LE is bit 63 but is defined as 0 in QEMU. Add a macro to be used to convert from QEMU order to ISA order. This solution requires less chan

Re: [PATCH v3 16/21] target/ppc: Remove msr_ep macro

2022-05-03 Thread Richard Henderson
On 5/3/22 13:24, Víctor Colombo wrote: msr_ep macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Fix the difference check to use a xor

Re: [PATCH v3 15/21] target/ppc: Remove msr_dr macro

2022-05-03 Thread Richard Henderson
On 5/3/22 13:24, Víctor Colombo wrote: msr_dr macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Fix the difference check to use a xor

Re: [PATCH v3 14/21] target/ppc: Remove msr_ir macro

2022-05-03 Thread Richard Henderson
On 5/3/22 13:24, Víctor Colombo wrote: msr_ir macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Fix the difference check to use a xor

Re: [PATCH v3 11/21] target/ppc: Remove msr_gs macro

2022-05-03 Thread Richard Henderson
On 5/3/22 13:24, Víctor Colombo wrote: msr_gs macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Fix !(value & env->msr & R_MSR_GS

[qemu-web PATCH] Add public key for tarball-signing to download page

2022-05-03 Thread Michael Roth
We used to have public keys listed on the SecurityProcess page back when it was still part of the wiki, but they are no longer available there and some users have asked where to obtain them so they can verify the tarball signatures. That was probably not a great place for them anyway, so address t

Re: [PATCH 1/3] ui/gtk: new param monitor to specify target monitor for launching QEMU

2022-05-03 Thread Dongwon Kim
On Tue, May 03, 2022 at 10:15:13AM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 28, 2022 at 04:13:02PM -0700, Dongwon Kim wrote: > > Introducing a new integer parameter to specify the monitor where the > > Qemu window is placed upon launching. > > > > Monitor can be any number between 0 and (tot

Re: [PATCH 3/3] ui/gtk: specify detached window's size and location

2022-05-03 Thread Dongwon Kim
I saw windows, especially, third and fourth ones are 1/4 size of the first when detached regardless of resolutions. And the position is also pretty random and detached windows are usually placed somewhere on the previous window. This patch is to make the sizes same as the original window's and ma

Re: [PATCH 0/1] hw/arm/aspeed: Add fby35 machine type

2022-05-03 Thread Peter Delevoryas
> On May 3, 2022, at 2:35 PM, Cédric Le Goater wrote: > > On 5/3/22 22:44, Peter Delevoryas wrote: >> Hey everyone, >> I'm submitting another Facebook (Meta Platforms) machine type: this time I'm >> including an acceptance test too. >> Unfortunately, this machine boots _very_ slowly. 300+ secon

[PATCH 1/2] linux-user/s390x: Fix unwinding from signal handlers

2022-05-03 Thread Ilya Leoshkevich
Commit 31330e6cecfd ("linux-user/s390x: Implement setup_sigtramp") removed an unused field from rt_sigframe, disturbing offsets of other fields and breaking unwinding from signal handlers (e.g. libgcc's s390_fallback_frame() relies on this struct having a specific layout). Restore the field and add

Re: [PATCH] tests/tcg/s390x: Use a different PCRel32 notation in branch-relative-long.c

2022-05-03 Thread Ilya Leoshkevich
On Tue, 2022-05-03 at 21:26 +0200, Thomas Huth wrote: > On 03/05/2022 11.02, Thomas Huth wrote: > > On 02/05/2022 18.48, Ilya Leoshkevich wrote: > > > Binutils >=2.37 and Clang do not accept (. - 0x1) PCRel32 > > > constants. While this looks like a bug that needs fixing, use a > > > differ

[PATCH 0/2] linux-user/s390x: Fix unwinding from signal handlers

2022-05-03 Thread Ilya Leoshkevich
Hi, This is the fix for the issue discussed in [1]. Patch 1 fixes the issue itself, patch 2 adds a test. [1] https://lists.nongnu.org/archive/html/qemu-devel/2022-04/msg05127.html Best regards, Ilya Ilya Leoshkevich (2): linux-user/s390x: Fix unwinding from signal handlers tests/tcg/s390x:

Re: [PATCH 2/3] ui/gtk: detach_all option for making all VCs detached upon starting

2022-05-03 Thread Dongwon Kim
On Tue, May 03, 2022 at 10:12:43AM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 28, 2022 at 04:13:03PM -0700, Dongwon Kim wrote: > > With "detach-all=on" for display, QEMU starts with all VC windows > > detached automatically. > > > > If used with "full-screen=on", it places individual windows (

[PATCH v9 0/6] hw/arm/virt: Fix CPU's default NUMA node ID

2022-05-03 Thread Gavin Shan
When the CPU-to-NUMA association isn't provided by user, the default NUMA node ID for the specific CPU is returned from virt_get_default_cpu_node_id(). Unfortunately, the default NUMA node ID breaks socket boundary and leads to the broken CPU topology warning message in Linux guest. This series int

[PULL 11/23] os-posix: replace pipe()+cloexec with g_unix_open_pipe(CLOEXEC)

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- os-posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/os-posix.c b/os-posix.c index 1b746dba97a7..321fc4bd13b8 100644 --- a/os-posix.c +++ b/

Re: [PATCH 0/1] hw/arm/aspeed: Add fby35 machine type

2022-05-03 Thread Cédric Le Goater
On 5/3/22 22:44, Peter Delevoryas wrote: Hey everyone, I'm submitting another Facebook (Meta Platforms) machine type: this time I'm including an acceptance test too. Unfortunately, this machine boots _very_ slowly. 300+ seconds. This is too much for avocado tests. I'm not sure why this is

[PULL 15/23] io: make qio_channel_command_new_pid() static

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The function isn't used outside of qio_channel_command_new_spawn(), which is !win32-specific. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- include/io/channel-command.h | 25 - io/channel-command.c | 26

[PATCH v2 1/1] hw/arm/aspeed: Add fby35 machine type

2022-05-03 Thread Peter Delevoryas
Add the 'fby35-bmc' machine type based on the kernel DTS[1] and userspace i2c setup scripts[2]. Undefined values are inherited from the AST2600-EVB. Reference images can be found in Facebook OpenBMC Github Release assets as "fby35.mtd". [3] You can boot the reference images as follows (fby35 uses

[PATCH 0/1] hw/arm/aspeed: Add fby35 machine type

2022-05-03 Thread Peter Delevoryas
Hey everyone, I'm submitting another Facebook (Meta Platforms) machine type: this time I'm including an acceptance test too. Unfortunately, this machine boots _very_ slowly. 300+ seconds. I'm not sure why this is (so I don't know how to fix it easily) and I don't know how to override the avocado

[PATCH 2/2] tests/tcg/s390x: Test unwinding from signal handlers

2022-05-03 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/signals-s390x.c | 69 ++--- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/tests/tcg/s390x/signals-s390x.c b/tests/tcg/s390x/signals-s390x.c index dc2f8ee59a.

[PATCH 1/1] hw/arm/aspeed: Add fby35 machine type

2022-05-03 Thread Peter Delevoryas
Add the 'fby35-bmc' machine type based on the kernel DTS[1] and userspace i2c setup scripts[2]. Undefined values are inherited from the AST2600-EVB. I also added an avocado test that uses a reference image I built and uploaded to the FB Github Releases. [1] https://github.com/facebook/openbmc-li

Re: [PATCH 0/1] hw/arm/aspeed: Add fby35 machine type

2022-05-03 Thread Peter Delevoryas
> On May 3, 2022, at 3:47 PM, Peter Delevoryas wrote: > > > >> On May 3, 2022, at 2:35 PM, Cédric Le Goater wrote: >> >> On 5/3/22 22:44, Peter Delevoryas wrote: >>> Hey everyone, >>> I'm submitting another Facebook (Meta Platforms) machine type: this time I'm >>> including an acceptance te

[RFC PATCH] gitlab-ci: Switch the 'check-patch' & 'check-dco' jobs to use python-container

2022-05-03 Thread Thomas Huth
The 'check-patch' and 'check-dco' jobs only need Python and git for checking the patches, so it's not really necessary to use a container here that has all the other build dependencies installed. By installing "git" in the python container, we can use this light-weight container for these jobs inst

[python-qemu-qmp MR] Add Sphinx documentation

2022-05-03 Thread John Snow
I'm continuing to mail these manually for now, until I settle on an automated solution or feel like there's enough buy-in on the GitLab instance to not warrant the advertisement. Please consider starring/watching the repo if you're interested in QMP lib updates as I try to angle for an initial publ

[PATCH v2 0/1] hw/arm/aspeed: Add fby35 machine type

2022-05-03 Thread Peter Delevoryas
Resubmitting this patch without an avocado test since it takes too long. A big part of the boot time is just due to the design of the Facebook OpenBMC machines, but it might improve in the future, and I'll consider resubmitting the acceptance test at that time. I added a link to the releases page

[PULL 21/23] net: replace qemu_set_nonblock()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Those calls are POSIX-specific. Use the dedicated GLib API. (qemu_set_nonblock() is for socket-like) (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- net/tap.c | 33 +

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-03 Thread Stefan Hajnoczi
On Mon, May 02, 2022 at 10:02:14AM +0200, Emanuele Giuseppe Esposito wrote: > > > Am 30/04/2022 um 07:17 schrieb Stefan Hajnoczi: > > On Thu, Apr 28, 2022 at 11:56:09PM +0200, Emanuele Giuseppe Esposito wrote: > >> > >> > >> Am 28/04/2022 um 12:45 schrieb Stefan Hajnoczi: > >>> On Wed, Apr 27, 20

[PATCH v9 4/6] qtest/numa-test: Correct CPU and NUMA association in aarch64_numa_cpu()

2022-05-03 Thread Gavin Shan
In aarch64_numa_cpu(), the CPU and NUMA association is something like below. Two threads in the same core/cluster/socket are associated with two individual NUMA nodes, which is unreal as Igor Mammedov mentioned. We don't expect the association to break NUMA-to-socket boundary, which matches with th

[PATCH v3 21/21] target/ppc: Change MSR_* to follow POWER ISA numbering convention

2022-05-03 Thread Víctor Colombo
Today we have the issue where MSR_* values are the 'inverted order' bit numbers from what the ISA specifies. e.g. MSR_LE is bit 63 but is defined as 0 in QEMU. Add a macro to be used to convert from QEMU order to ISA order. This solution requires less changes than to use the already defined PPC_B

[PULL 18/23] qga: replace qemu_set_nonblock()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The call is POSIX-specific. Use the dedicated GLib API. (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- qga/commands-posix.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(

[PATCH v3 17/21] target/ppc: Remove msr_fe0 and msr_fe1 macros

2022-05-03 Thread Víctor Colombo
msr_fe0 and msr_fe1 macros hide the usage of env->msr, which is a bad behavior. Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Added a combined macro for FE0 and FE1. Use it to simplify

[PATCH 4/4] block/file: Add file-specific image info

2022-05-03 Thread Hanna Reitz
Add some (optional) information that the file driver can provide for image files, namely the extent size. Signed-off-by: Hanna Reitz --- qapi/block-core.json | 26 -- block/file-posix.c | 30 ++ 2 files changed, 54 insertions(+), 2 deletions(

[PULL 00/23] Misc patches

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit f5643914a9e8f79c606a76e6a9d7ea82a3fc3e65: Merge tag 'pull-9p-20220501' of https://github.com/cschoenebeck/qemu into staging (2022-05-01 07:48:11 -0700) are available in the Git repository at: g...@gitlab.com:marcandre.lureau/qemu.

[PATCH v3 15/21] target/ppc: Remove msr_dr macro

2022-05-03 Thread Víctor Colombo
msr_dr macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Fix the difference check to use a xor Signed-off-by: Víctor Colombo --- tar

[PATCH v3 20/21] target/ppc: Add unused msr bits FIELDs

2022-05-03 Thread Víctor Colombo
Add FIELDs macros for msr bits that had an unused msr_* before. Signed-off-by: Víctor Colombo Acked-by: Richard Henderson --- target/ppc/cpu.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index f16a56fc55..1c40c7f0c6 100644

[PULL 17/23] io: replace qemu_set{_non}block()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Those calls are non-socket fd, or are POSIX-specific. Use the dedicated GLib API. (qemu_set_nonblock() is for socket-like) (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- io/channel

[PATCH v3 14/21] target/ppc: Remove msr_ir macro

2022-05-03 Thread Víctor Colombo
msr_ir macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Fix the difference check to use a xor Signed-off-by: Víctor Colombo --- tar

[PATCH v3 19/21] target/ppc: Remove msr_hv macro

2022-05-03 Thread Víctor Colombo
msr_hv macro hides the usage of env->msr, which is a bad behavior. Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 12 ++-- targe

[PATCH v3 13/21] target/ppc: Remove msr_cm macro

2022-05-03 Thread Víctor Colombo
msr_cm macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- v3: fix this patch's name (msr_ce --> msr_cm) Sig

[PATCH 2/4] block: Add protocol-specific image info

2022-05-03 Thread Hanna Reitz
The ImageInfo object currently only contains (optional) format-specific image information. However, perhaps the protocol node can provide some additional information, so add a new field presenting it. Signed-off-by: Hanna Reitz --- qapi/block-core.json | 6 +- block/qapi.c | 19 +++

[PATCH v3 10/21] target/ppc: Remove msr_me macro

2022-05-03 Thread Víctor Colombo
msr_me macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/excp_

[PATCH v3 11/21] target/ppc: Remove msr_gs macro

2022-05-03 Thread Víctor Colombo
msr_gs macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Fix !(value & env->msr & R_MSR_GS_MASK) -> (value ^ env->msr) & R_MSR_GS_

[PATCH v3 18/21] target/ppc: Remove msr_ts macro

2022-05-03 Thread Víctor Colombo
msr_ts macro hides the usage of env->msr, which is a bad behavior. Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/kvm.c

[PATCH v3 08/21] target/ppc: Remove msr_ce macro

2022-05-03 Thread Víctor Colombo
msr_ce macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/excp_h

[PATCH v3 09/21] target/ppc: Remove msr_pow macro

2022-05-03 Thread Víctor Colombo
msr_pow macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/excp

[PATCH v3 16/21] target/ppc: Remove msr_ep macro

2022-05-03 Thread Víctor Colombo
msr_ep macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v3: Fix the difference check to use a xor fix incorrect "FIELD_EX64(env->msr,

[PULL 20/23] ui: replace qemu_set_nonblock()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The call is POSIX-specific. Use the dedicated GLib API. (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/input-linux.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) d

[PULL 13/23] io: replace pipe() with g_unix_open_pipe(CLOEXEC)

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- io/channel-command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io/channel-command.c b/io/channel-command.c index 338da73ade56..539685ea83

[PATCH v3 05/21] target/ppc: Remove msr_ds macro

2022-05-03 Thread Víctor Colombo
msr_ds macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h| 2 +- target/ppc/mmu_com

[PATCH v3 04/21] target/ppc: Remove msr_le macro

2022-05-03 Thread Víctor Colombo
msr_le macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h| 2 +- target/ppc/cpu_in

[PULL 00/23] Misc patches

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit f5643914a9e8f79c606a76e6a9d7ea82a3fc3e65: Merge tag 'pull-9p-20220501' of https://github.com/cschoenebeck/qemu into staging (2022-05-01 07:48:11 -0700) are available in the Git repository at: g...@gitlab.com:marcandre.lureau/qemu.

[PATCH v3 01/21] target/ppc: Remove fpscr_* macros from cpu.h

2022-05-03 Thread Víctor Colombo
fpscr_* defined macros are hiding the usage of *env behind them. Substitute the usage of these macros with `env->fpscr & FP_*` to make the code cleaner. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Víctor Colombo --- target/ppc/cpu.c| 2 +- target/ppc/

[PATCH v3 07/21] target/ppc: Remove msr_ee macro

2022-05-03 Thread Víctor Colombo
msr_ee macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/cpu_i

[PATCH v3 03/21] target/ppc: Remove msr_pr macro

2022-05-03 Thread Víctor Colombo
msr_pr macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- hw/ppc/pegasos2.c| 2 +- hw/ppc/spapr.c

[PULL 08/23] util: replace pipe()+cloexec with g_unix_open_pipe()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- util/compatfd.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/util/compatfd.c b/util/compatfd.c index 55b6e0b7fb27..147e39e2c62b 100644 --- a/

[PULL 23/23] util: rename qemu_*block() socket functions

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The qemu_*block() functions are meant to be be used with sockets (the win32 implementation expects SOCKET) Over time, those functions where used with Win32 SOCKET or file-descriptors interchangeably. But for portability, they must only be used with socket-like file-descri

[PULL 17/23] io: replace qemu_set{_non}block()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Those calls are non-socket fd, or are POSIX-specific. Use the dedicated GLib API. (qemu_set_nonblock() is for socket-like) (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- io/channel

[PULL 22/23] tests: replace qemu_set_nonblock()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The call is POSIX-specific. Use the dedicated GLib API. (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth --- tests/qtest/vhost-user-test.c | 4 +++- 1 file chan

[PATCH v3 02/21] target/ppc: Remove unused msr_* macros

2022-05-03 Thread Víctor Colombo
Some msr_* macros are not used anywhere. Remove them as part of the work to remove all hidden usage of *env. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Víctor Colombo --- target/ppc/cpu.h | 21 - 1 file changed, 21 deletions(-) diff --git

[PULL 03/23] tests: move libqtest.h back under qtest/

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Since commit a2ce7dbd917 ("meson: convert tests/qtest to meson"), libqtest.h is under libqos/ directory, while libqtest.c is still in qtest/. Move back to its original location to avoid mixing with libqos/. Suggested-by: Thomas Huth Signed-off-by: Marc-André Lureau Revi

[PULL 04/23] libqtest: split QMP part in libqmp

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau This will help moving QAPI/QMP in a common subproject. Signed-off-by: Marc-André Lureau Acked-by: Thomas Huth --- tests/qtest/libqmp.h | 50 +++ tests/qtest/libqtest.h | 29 +--- tests/qtest/libqmp.c | 233 +

[PATCH v3 00/21] target/ppc: Remove hidden usages of *env

2022-05-03 Thread Víctor Colombo
By running the grep command `git grep -nr 'define \(fpscr\|msr\)_[a-z0-9]\+\>'` we can find multiple macros that use `env->fpscr` and `env->msr` but doesn't take *env as a parameter. Richard Henderson said [1] that these macros hiding the usage of *env "are evil". This patch series remove them an

[PULL 06/23] block: move fcntl_setfl()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau It is only used by block/file-posix.c, move it there. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- include/sysemu/os-posix.h | 2 -- block/file-posix.c| 15 +++ util/oslib-posix.c| 15 --- 3 files changed,

[PATCH v9 1/6] qapi/machine.json: Add cluster-id

2022-05-03 Thread Gavin Shan
This adds cluster-id in CPU instance properties, which will be used by arm/virt machine. Besides, the cluster-id is also verified or dumped in various spots: * hw/core/machine.c::machine_set_cpu_numa_node() to associate CPU with its NUMA node. * hw/core/machine.c::machine_numa_finish_cpu_

[PULL 06/23] block: move fcntl_setfl()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau It is only used by block/file-posix.c, move it there. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- include/sysemu/os-posix.h | 2 -- block/file-posix.c| 15 +++ util/oslib-posix.c| 15 --- 3 files changed,

[PULL 21/23] net: replace qemu_set_nonblock()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Those calls are POSIX-specific. Use the dedicated GLib API. (qemu_set_nonblock() is for socket-like) (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- net/tap.c | 33 +

[PULL 12/23] virtiofsd: replace pipe() with g_unix_open_pipe(CLOEXEC)

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- tools/virtiofsd/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c index f8981e5bdf1a..f5

[PULL 16/23] chardev: replace qemu_set_nonblock()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Those calls are either for non-socket fd, or are POSIX-specific. Use the dedicated GLib API. (qemu_set_nonblock() is for socket-like) (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé ---

[PULL 14/23] Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- net/tap-bsd.c | 4 ++-- net/tap-linux.c| 2 +- net/tap-solaris.c | 2 +- tests/qtest/fuzz/virtio_net_fuzz.c

[PULL 05/23] Use g_unix_set_fd_nonblocking()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau API available since glib 2.30. It also preserves errno. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- hw/misc/ivshmem.c | 2 +- util/event_notifier-posix.c | 6 ++ util/main-loop.c| 2 +- 3 files changed, 4 insertions(+),

[PULL 15/23] io: make qio_channel_command_new_pid() static

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The function isn't used outside of qio_channel_command_new_spawn(), which is !win32-specific. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- include/io/channel-command.h | 25 - io/channel-command.c | 26

Re: [PATCH v2] hw/openrisc: use right OMPIC size variable

2022-05-03 Thread Stafford Horne
On Tue, May 03, 2022 at 11:45:33AM +0200, Jason A. Donenfeld wrote: > This appears to be a copy and paste error. The UART size was used > instead of the much smaller OMPIC size. But actually that smaller OMPIC > size is wrong too and doesn't allow the IPI to work in Linux. So set it > to the old va

[PULL 20/23] ui: replace qemu_set_nonblock()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The call is POSIX-specific. Use the dedicated GLib API. (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/input-linux.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) d

[PULL 19/23] hw: replace qemu_set_nonblock()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Those calls are non-socket fd, or are POSIX-specific. Use the dedicated GLib API. (qemu_set_nonblock() is for socket-like) (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- hw/input/v

[PULL 02/23] Use QEMU_SANITIZE_ADDRESS

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- tests/qtest/fdc-test.c| 2 +- util/coroutine-ucontext.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/fdc-test.c b/tests/qtest/fdc-test

[PULL 18/23] qga: replace qemu_set_nonblock()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The call is POSIX-specific. Use the dedicated GLib API. (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- qga/commands-posix.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(

[PATCH v3 12/21] target/ppc: Remove msr_fp macro

2022-05-03 Thread Víctor Colombo
msr_fp macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/excp_

[PULL 03/23] tests: move libqtest.h back under qtest/

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Since commit a2ce7dbd917 ("meson: convert tests/qtest to meson"), libqtest.h is under libqos/ directory, while libqtest.c is still in qtest/. Move back to its original location to avoid mixing with libqos/. Suggested-by: Thomas Huth Signed-off-by: Marc-André Lureau Revi

[PULL 07/23] Replace qemu_pipe() with g_unix_open_pipe()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau GLib g_unix_open_pipe() is essentially like qemu_pipe(), available since 2.30. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- include/qemu/osdep.h| 4 qemu-nbd.c | 5 +++-- util/event_notifier-posix.c | 2 +- util/o

[PULL 07/23] Replace qemu_pipe() with g_unix_open_pipe()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau GLib g_unix_open_pipe() is essentially like qemu_pipe(), available since 2.30. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- include/qemu/osdep.h| 4 qemu-nbd.c | 5 +++-- util/event_notifier-posix.c | 2 +- util/o

[PATCH v9 5/6] hw/arm/virt: Fix CPU's default NUMA node ID

2022-05-03 Thread Gavin Shan
When CPU-to-NUMA association isn't explicitly provided by users, the default one is given by mc->get_default_cpu_node_id(). However, the CPU topology isn't fully considered in the default association and this causes CPU topology broken warnings on booting Linux guest. For example, the following wa

[PATCH v3 06/21] target/ppc: Remove msr_ile macro

2022-05-03 Thread Víctor Colombo
msr_ile macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 4 ++-- 1 file changed, 2 inse

[PULL 09/23] qga: replace pipe() with g_unix_open_pipe(CLOEXEC)

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 77f4672ca2c9..094487c2c395 1

[PULL 05/23] Use g_unix_set_fd_nonblocking()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau API available since glib 2.30. It also preserves errno. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- hw/misc/ivshmem.c | 2 +- util/event_notifier-posix.c | 6 ++ util/main-loop.c| 2 +- 3 files changed, 4 insertions(+),

Re: [PATCH v9 6/6] hw/acpi/aml-build: Use existing CPU topology to build PPTT table

2022-05-03 Thread Michael S. Tsirkin
On Tue, May 03, 2022 at 10:03:04PM +0800, Gavin Shan wrote: > When the PPTT table is built, the CPU topology is re-calculated, but > it's unecessary because the CPU topology has been populated in > virt_possible_cpu_arch_ids() on arm/virt machine. > > This reworks build_pptt() to avoid by reusing

[PULL 10/23] tests: replace pipe() with g_unix_open_pipe(CLOEXEC)

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- tests/qtest/ivshmem-test.c| 5 +++-- tests/unit/test-io-channel-file.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/qtest/ivshm

[PULL 23/23] util: rename qemu_*block() socket functions

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau The qemu_*block() functions are meant to be be used with sockets (the win32 implementation expects SOCKET) Over time, those functions where used with Win32 SOCKET or file-descriptors interchangeably. But for portability, they must only be used with socket-like file-descri

[PULL 12/23] virtiofsd: replace pipe() with g_unix_open_pipe(CLOEXEC)

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- tools/virtiofsd/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c index f8981e5bdf1a..f5

[PULL 01/23] Use QEMU_SANITIZE_THREAD

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Reviewed-by: Richard Henderson --- include/qemu/atomic.h| 8 +--- subprojects/libvhost-user/include/compiler.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) create m

[PATCH 0/4] block/file: Show extent size in qemu-img info

2022-05-03 Thread Hanna Reitz
Hi, This series makes qemu-img info print the extent size of an image file (if available). To do so, we have to do a couple of things: 1. Add a .bdrv_get_specific_info handler to the file-posix driver (patch 4) 2. Have bdrv_query_image_info() collect this driver-specific info not only on th

[PULL 01/23] Use QEMU_SANITIZE_THREAD

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Reviewed-by: Richard Henderson --- include/qemu/atomic.h| 8 +--- subprojects/libvhost-user/include/compiler.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) create m

[PATCH v9 6/6] hw/acpi/aml-build: Use existing CPU topology to build PPTT table

2022-05-03 Thread Gavin Shan
When the PPTT table is built, the CPU topology is re-calculated, but it's unecessary because the CPU topology has been populated in virt_possible_cpu_arch_ids() on arm/virt machine. This reworks build_pptt() to avoid by reusing the existing IDs in ms->possible_cpus. Currently, the only user of bui

[PULL 08/23] util: replace pipe()+cloexec with g_unix_open_pipe()

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson --- util/compatfd.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/util/compatfd.c b/util/compatfd.c index 55b6e0b7fb27..147e39e2c62b 100644 --- a/

[PULL 13/23] io: replace pipe() with g_unix_open_pipe(CLOEXEC)

2022-05-03 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- io/channel-command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io/channel-command.c b/io/channel-command.c index 338da73ade56..539685ea83

  1   2   3   4   >