Re: [PATCH RFC 1/1] msix: add hmp interface to dump MSI-X info

2021-04-25 Thread Dongli Zhang
On 4/24/21 8:36 PM, Jason Wang wrote: > > 在 2021/4/24 上午1:32, Dongli Zhang 写道: >> >> On 4/23/21 12:59 AM, Jason Wang wrote: >>> 在 2021/4/23 下午12:47, Dongli Zhang 写道: This patch is to add the HMP interface to dump MSI-X table and PBA, in order to help diagnose the loss of IRQ issue in

Re: [PATCH v3 08/10] target/riscv: Consolidate RV32/64 32-bit instructions

2021-04-25 Thread Alistair Francis
On Mon, Apr 26, 2021 at 9:53 AM Richard Henderson wrote: > > On 4/25/21 3:58 PM, Alistair Francis wrote: > > On Sun, Apr 25, 2021 at 3:08 AM Richard Henderson > > wrote: > >> > >> On 4/23/21 8:34 PM, Alistair Francis wrote: > >>> --- a/target/riscv/translate.c > >>> +++ b/target/riscv/translate.c

Re: Resetting non-qdev children in a 3-phase reset device

2021-04-25 Thread Markus Armbruster
Peter Maydell writes: > On Sat, 24 Apr 2021 at 14:04, Philippe Mathieu-Daudé wrote: >> I now understand better the diag288 case, but I still don't understand >> the TYPE_APIC one. It has no DeviceClass::reset(), its abstract parent >> TYPE_APIC_COMMON register apic_reset_common() but being TYPE_

Re: [PATCH for-6.0 v2 1/2] hw/block/nvme: fix invalid msix exclusive uninit

2021-04-25 Thread Klaus Jensen
On Apr 23 07:21, Klaus Jensen wrote: From: Klaus Jensen Commit 1901b4967c3f changed the nvme device from using a bar exclusive for MSI-x to sharing it on bar0. Unfortunately, the msix_uninit_exclusive_bar() call remains in nvme_exit() which causes havoc when the device is removed with, say, de

[PATCH] i386: load kernel on xen using DMA

2021-04-25 Thread Marek Marczykowski-Górecki
Kernel on Xen is loaded via fw_cfg. Previously it used non-DMA version, which loaded the kernel (and initramfs) byte by byte. Change this to DMA, to load in bigger chunks. This change alone reduces load time of a (big) kernel+initramfs from ~10s down to below 1s. This change was suggested initiall

[Bug 1926111] [NEW] Assertion `tx_queue_idx <= s->txq_num' failed in vmxnet3_io_bar0_write

2021-04-25 Thread Alexander Bulekov
Public bug reported: === Stacktrace === qemu-fuzz-i386: ../hw/net/vmxnet3.c:1096: void vmxnet3_io_bar0_write(void *, hwaddr, uint64_t, unsigned int): Assertion `tx_queue_idx <= s->txq_num' failed. ==602353== ERROR: libFuzzer: deadly signal #5 0x7fe4b93a7ce0 in raise signal/../sysdeps/unix/sysv/l

[PATCH v2 21/25] linux-user/sparc: Minor corrections to do_sigreturn

2021-04-25 Thread Richard Henderson
Check that the input sp is 16 byte aligned, not 4. Do that before the lock_user_struct check. Validate the saved sp is 8 byte aligned. Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/linux-us

[PATCH v2 22/25] linux-user/sparc: Add 64-bit support to fpu save/restore

2021-04-25 Thread Richard Henderson
The shape of the kernel's __siginfo_fpu_t is dependent on the cpu type, not the abi. Which is weird, but there ya go. Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 36 1 file changed, 36 insertions(+) diff --git a/linux-user/sparc/signal.

[PATCH v2 20/25] linux-user/sparc: Clean up setup_frame

2021-04-25 Thread Richard Henderson
Clean up a goto label with a single use. Remove #if 0. Remove useless parentheses. Fold constants into __put_user. Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/linux-user/sparc/sign

Re: [PATCH v2 00/25] linux-user/sparc: Implement rt signals

2021-04-25 Thread Richard Henderson
On 4/25/21 7:53 PM, Richard Henderson wrote: Supercedes:20210425155749.896330-1-richard.hender...@linaro.org ("linux-user/sparc64: Implement signals") This time, in the lead-up, merge the sparc and sparc64 directories. Implement rt signals for sparc32 as well, since there are only a few differen

[PATCH v2 18/25] linux-user/sparc: Save and restore fpu in signal frame

2021-04-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 84 --- 1 file changed, 51 insertions(+), 33 deletions(-) diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 57dbc72c99..59bb449512 100644 --- a/linux-user/sparc/signal.c ++

[PATCH v2 24/25] linux-user/sparc: Implement sparc64 rt signals

2021-04-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/sparc/target_signal.h | 2 ++ linux-user/sparc/signal.c| 27 ++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/linux-user/sparc/target_signal.h b/linux-user/sparc/target_signal.h index 911a3f5af5..34

[PATCH v2 23/25] linux-user/sparc: Implement sparc32 rt signals

2021-04-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 126 -- 1 file changed, 122 insertions(+), 4 deletions(-) diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 41a8b33bac..362993da02 100644 --- a/linux-user/sparc/signal.c ++

[PATCH v2 13/25] linux-user/sparc: Remove target_rt_signal_frame as unused

2021-04-25 Thread Richard Henderson
It's wrong anyway. Remove it for now. Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 3d068e0955..29c5e3b0c0 100644 --- a/linux-user/sparc/signal.c +++ b/li

[PATCH v2 14/25] linux-user/sparc: Fix the stackframe structure

2021-04-25 Thread Richard Henderson
Move target_reg_window up and use it. Fold structptr and xxargs into xargs -- the use of a host pointer was incorrect anyway. Rename the structure to target_stackf for consistency. Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 38 +- 1 file

[PATCH v2 11/25] linux-user/sparc: Merge sparc64/ into sparc/

2021-04-25 Thread Richard Henderson
All of the source and header files already defer to sparc via #include. The syscall.tbl and syscallhdr.sh files could not do the same, but are identical. Signed-off-by: Richard Henderson --- .../targets/sparc64-linux-user.mak| 1 + linux-user/sparc64/sockbits.h |

[PATCH v2 25/25] tests/tcg/sparc64: Re-enable linux-test

2021-04-25 Thread Richard Henderson
It passes now that we support signals properly. Signed-off-by: Richard Henderson --- tests/tcg/sparc64/Makefile.target | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/tcg/sparc64/Makefile.target b/tests/tcg/sparc64/Makefile.target index 5bd7f90583..408dace783 100

[PATCH v2 10/25] linux-user/sparc: Merge sparc64 termbits.h

2021-04-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/sparc64/termbits.h | 292 +- 1 file changed, 1 insertion(+), 291 deletions(-) diff --git a/linux-user/sparc64/termbits.h b/linux-user/sparc64/termbits.h index 1ab1e80db5..54ddfee3ba 100644 --- a/linux-user/sparc64/te

[PATCH v2 05/25] linux-user/sparc: Include TARGET_STACK_BIAS in get_sp_from_cpustate

2021-04-25 Thread Richard Henderson
Move TARGET_STACK_BIAS from signal.c. Generic code cares about the logical stack pointer, not the physical one that has a bias applied for sparc64. Signed-off-by: Richard Henderson --- linux-user/sparc/target_cpu.h | 9 - linux-user/sparc/signal.c | 2 -- 2 files changed, 8 insertio

[PATCH v2 12/25] linux-user/sparc: Remove target_sigcontext as unused

2021-04-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 28 1 file changed, 28 deletions(-) diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 76579093a8..3d068e0955 100644 --- a/linux-user/sparc/signal.c +++ b/linux-user/sparc/signal.c

[PATCH v2 19/25] linux-user/sparc: Add rwin_save to signal frame

2021-04-25 Thread Richard Henderson
Stub it out to zero, but at least include it. Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 8 1 file changed, 8 insertions(+) diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 59bb449512..4a0578ebf3 100644 --- a/linux-user/sparc/signal.c +++ b

[PATCH v2 15/25] linux-user/sparc: Use target_pt_regs

2021-04-25 Thread Richard Henderson
Replace __siginfo_t with target_pt_regs, and move si_mask into target_signal_frame directly. Extract save/restore functions for target_pt_regs. Adjust for sparc64 tstate. Use proper get/put functions for psr. Turns out we were already writing to si_mask twice, so no need to handle that in the ne

[PATCH v2 00/25] linux-user/sparc: Implement rt signals

2021-04-25 Thread Richard Henderson
Supercedes: 20210425155749.896330-1-richard.hender...@linaro.org ("linux-user/sparc64: Implement signals") This time, in the lead-up, merge the sparc and sparc64 directories. Implement rt signals for sparc32 as well, since there are only a few differences between the two. r~ Richard Henderson

[PATCH v2 09/25] linux-user/sparc: Merge sparc64 target_structs.h

2021-04-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/sparc/target_structs.h | 36 +++--- linux-user/sparc64/target_structs.h | 59 + 2 files changed, 15 insertions(+), 80 deletions(-) diff --git a/linux-user/sparc/target_structs.h b/linux-user/sparc/target_s

[PATCH v2 17/25] linux-user/sparc: Clean up get_sigframe

2021-04-25 Thread Richard Henderson
Remove inline; fix spacing and comment format. Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 69fee5a76a..57dbc72c99 100644 --- a/linux-us

[PATCH v2 16/25] linux-user/sparc: Split out save_reg_win

2021-04-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/sparc/signal.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 0d9305818f..69fee5a76a 100644 --- a/linux-user/sparc/signal.c +++ b/linux-user/sparc/

[PATCH v2 04/25] linux-user: Pass CPUArchState to target_restore_altstack

2021-04-25 Thread Richard Henderson
In most cases we were already passing get_sp_from_cpustate directly to the function. In other cases, we were passing a local variable which already contained the same value. In the rest of the cases, we were passing the stack pointer out of env directly. Reviewed by: Warner Losh Signed-off-by: R

[PATCH v2 03/25] linux-user: Pass CPUArchState to do_sigaltstack

2021-04-25 Thread Richard Henderson
Now that we have exactly one call, it's easy to pass in env instead of passing in the sp value. Use target_save_altstack, which required env. Signed-off-by: Richard Henderson --- linux-user/qemu.h| 3 ++- linux-user/signal.c | 11 --- linux-user/syscall.c | 3 +-- 3 files changed,

[PATCH v2 08/25] linux-user/sparc: Merge sparc64 target_elf.h

2021-04-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/sparc64/target_elf.h | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/linux-user/sparc64/target_elf.h b/linux-user/sparc64/target_elf.h index d6e388f1cf..023b49b743 100644 --- a/linux-user/sparc64/target_elf.h +++

[PATCH v2 07/25] linux-user/sparc: Merge sparc64 target_syscall.h

2021-04-25 Thread Richard Henderson
There are only a few differences in sparc32 vs sparc64. This fixes target_shmlba for sparc32plus, which is v9. Signed-off-by: Richard Henderson --- linux-user/sparc/target_syscall.h | 42 + linux-user/sparc64/target_syscall.h | 36 + 2 files

[PATCH v2 02/25] linux-user: Use target_restore_altstack in all sigreturn

2021-04-25 Thread Richard Henderson
Note that target_restore_altstack uses the host memory pointer that we have already verified, so TARGET_EFAULT is not a possible return value. Note that using -EFAULT was a bug. Signed-off-by: Richard Henderson --- linux-user/aarch64/signal.c| 6 +- linux-user/alpha/signal.c | 6 +-

[PATCH v2 06/25] linux-user/sparc: Clean up init_thread

2021-04-25 Thread Richard Henderson
Share code between sparc32 and sparc64, removing a bit of pointless difference wrt psr/tstate. Use sizeof(abi_ulong) for allocating initial register window. Use TARGET_STACK_BIAS. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 33 + 1 file changed,

[PATCH v2 01/25] linux-user: Split out target_restore_altstack

2021-04-25 Thread Richard Henderson
Create a function to match target_save_altstack. Fix some style and unlock issues in do_sigaltstack. Signed-off-by: Richard Henderson --- linux-user/signal-common.h | 1 + linux-user/signal.c| 115 + 2 files changed, 66 insertions(+), 50 deletions(-)

[Bug 1926052] Re: qemu freezes during grub on arch cloudimg

2021-04-25 Thread ZhiQiang Yan
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1926052 Title: qemu freezes during grub on arch cloudimg Status in QEMU: Invalid Bug description:

Re: [PATCH v3 08/10] target/riscv: Consolidate RV32/64 32-bit instructions

2021-04-25 Thread Richard Henderson
On 4/25/21 3:58 PM, Alistair Francis wrote: On Sun, Apr 25, 2021 at 3:08 AM Richard Henderson wrote: On 4/23/21 8:34 PM, Alistair Francis wrote: --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -74,8 +74,6 @@ static inline bool has_ext(DisasContext *ctx, uint32_t ext) #ifd

Re: [PATCH v3 10/10] target/riscv: Fix the RV64H decode comment

2021-04-25 Thread Alistair Francis
On Sun, Apr 25, 2021 at 3:14 AM Richard Henderson wrote: > > On 4/23/21 8:34 PM, Alistair Francis wrote: > > BugLink: https://gitlab.com/qemu-project/qemu/-/issues/6 > > The issue got renumbered to 47, fwiw. Thanks! > > Reviewed-by: Richard Henderson > > r~ > > > Signed-off-by: Alistair Francis

Re: [PATCH v3 08/10] target/riscv: Consolidate RV32/64 32-bit instructions

2021-04-25 Thread Alistair Francis
On Sun, Apr 25, 2021 at 3:08 AM Richard Henderson wrote: > > On 4/23/21 8:34 PM, Alistair Francis wrote: > > --- a/target/riscv/translate.c > > +++ b/target/riscv/translate.c > > @@ -74,8 +74,6 @@ static inline bool has_ext(DisasContext *ctx, uint32_t > > ext) > > > > #ifdef TARGET_RISCV32 > >

Re: [PATCH v3 00/10] RISC-V: Steps towards running 32-bit guests on

2021-04-25 Thread Alistair Francis
On Sat, Apr 24, 2021 at 1:28 PM Alistair Francis wrote: > > This is another step towards running 32-bit CPU code on the 64-bit > softmmu builds for RISC-V. > > I have tested this and am able to run some 32-bit code, but eventually > hit some issue. This series doesn't allow users to use 32-bit CP

Re: [PATCH] hw/pci-host: Do not build gpex-acpi.c if GPEX is not selected

2021-04-25 Thread Alistair Francis
On Mon, Apr 26, 2021 at 4:21 AM Philippe Mathieu-Daudé wrote: > > Since its introduction in commit 5b85eabe68f ("acpi: add > acpi_dsdt_add_gpex") we build gpex-acpi.c if ACPI is selected, > even if the GPEX_HOST device isn't build. Add the missing > Kconfig dependency. > > Signed-off-by: Philippe

[Bug 1926044] Re: QEMU-user doesn't report HWCAP2_MTE

2021-04-25 Thread Richard Henderson
Yep, there's a whole bunch that have been missed. ** Changed in: qemu Assignee: (unassigned) => Richard Henderson (rth) ** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https

[Bug 1900122] Re: Unsupported ioctl: cmd=0xffffffff80685600 when accessing /dev/video* in aarch64 guest

2021-04-25 Thread Peter Maydell
** Tags removed: aarch64 ** Tags added: arm -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1900122 Title: Unsupported ioctl: cmd=0x80685600 when accessing /dev/video* in aarch64 guest Sta

[Bug 1908416] Re: qemu-system-aarch64 can't run Windows 10 for ARM version 2004

2021-04-25 Thread Peter Maydell
** Tags removed: aarch64 ** Tags added: arm ** Tags removed: 20h2 windows10arm -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1908416 Title: qemu-system-aarch64 can't run Windows 10 for ARM version

[Bug 1926044] Re: QEMU-user doesn't report HWCAP2_MTE

2021-04-25 Thread Peter Maydell
** Tags removed: aarch64 ** Tags added: arm -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1926044 Title: QEMU-user doesn't report HWCAP2_MTE Status in QEMU: New Bug description: Reproducible

Re: [PATCH 2/5] hw/pcmcia/microdrive: Register machine reset handler

2021-04-25 Thread Peter Maydell
On Sat, 24 Apr 2021 at 17:22, Philippe Mathieu-Daudé wrote: > > The abstract PCMCIA_CARD is a bus-less TYPE_DEVICE, so devices > implementing it are not reset automatically. > Register a reset handler so children get reset on machine reset. > > Note, the DSCM-1 device (TYPE_DSCM1) which in

Re: Resetting non-qdev children in a 3-phase reset device

2021-04-25 Thread Peter Maydell
On Sat, 24 Apr 2021 at 14:04, Philippe Mathieu-Daudé wrote: > I now understand better the diag288 case, but I still don't understand > the TYPE_APIC one. It has no DeviceClass::reset(), its abstract parent > TYPE_APIC_COMMON register apic_reset_common() but being TYPE_DEVICE it > is not on a qbus.

[PATCH] hw/pci-host: Do not build gpex-acpi.c if GPEX is not selected

2021-04-25 Thread Philippe Mathieu-Daudé
Since its introduction in commit 5b85eabe68f ("acpi: add acpi_dsdt_add_gpex") we build gpex-acpi.c if ACPI is selected, even if the GPEX_HOST device isn't build. Add the missing Kconfig dependency. Signed-off-by: Philippe Mathieu-Daudé --- The gpex*.c files aren't covered by any MAINTAINERS secti

Re: [PATCH 4/8] linux-user: Pass CPUArchState to target_restore_altstack

2021-04-25 Thread Warner Losh
On Sun, Apr 25, 2021 at 10:08 AM Richard Henderson < richard.hender...@linaro.org> wrote: > In most cases we were already passing get_sp_from_cpustate > directly to the function. In other cases, we were passing > a local variable which already contained the same value. > In the rest of the cases,

Re: [PATCH 5/8] linux-user/sparc64: Move sparc64 code out of sparc32 signal.c

2021-04-25 Thread Warner Losh
On Sun, Apr 25, 2021 at 10:03 AM Richard Henderson < richard.hender...@linaro.org> wrote: > The bulk of the code goes to sparc64/signal.c, with > TARGET_SPARC_BIAS going to target_cpu.h, as we will > shortly need this define beyond signal.c. > > Signed-off-by: Richard Henderson > --- > linux-use

Re: [PATCH 8/8] linux-user/sparc64: Implement signals

2021-04-25 Thread Richard Henderson
On 4/25/21 8:57 AM, Richard Henderson wrote: We've been using the 32-bit sparc abi for 64-bit signals. There's a surprising amount of difference, beginning with the fact that 64-bit always uses rt signal frames. Signed-off-by: Richard Henderson --- linux-user/sparc/target_signal.h| 2 +

[PATCH 4/8] linux-user: Pass CPUArchState to target_restore_altstack

2021-04-25 Thread Richard Henderson
In most cases we were already passing get_sp_from_cpustate directly to the function. In other cases, we were passing a local variable which already contained the same value. In the rest of the cases, we were passing the stack pointer out of env directly. Signed-off-by: Richard Henderson --- lin

[PATCH 8/8] linux-user/sparc64: Implement signals

2021-04-25 Thread Richard Henderson
We've been using the 32-bit sparc abi for 64-bit signals. There's a surprising amount of difference, beginning with the fact that 64-bit always uses rt signal frames. Signed-off-by: Richard Henderson --- linux-user/sparc/target_signal.h| 2 + linux-user/sparc64/target_syscall.h | 14 +- l

[PATCH 7/8] linux-user/sparc64: Include TARGET_STACK_BIAS in get_sp_from_cpustate

2021-04-25 Thread Richard Henderson
Generic code cares about the logical stack pointer, not the physical one that has a bias applied for sparc64. Signed-off-by: Richard Henderson --- linux-user/sparc/target_cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/sparc/target_cpu.h b/linux-user/sparc/

[PATCH 5/8] linux-user/sparc64: Move sparc64 code out of sparc32 signal.c

2021-04-25 Thread Richard Henderson
The bulk of the code goes to sparc64/signal.c, with TARGET_SPARC_BIAS going to target_cpu.h, as we will shortly need this define beyond signal.c. Signed-off-by: Richard Henderson --- linux-user/sparc/target_cpu.h | 6 + linux-user/sparc/signal.c | 280 -- li

[PATCH 6/8] linux-user/sparc: Clean up init_thread

2021-04-25 Thread Richard Henderson
Share code between sparc32 and sparc64, removing a bit of pointless difference wrt psr/tstate. Use sizeof(abi_ulong) for allocating initial register window. Use TARGET_STACK_BIAS. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 33 + 1 file changed,

[PATCH 2/8] linux-user: Use target_restore_altstack in all sigreturn

2021-04-25 Thread Richard Henderson
Note that target_restore_altstack uses the host memory pointer that we have already verified, so TARGET_EFAULT is not a possible return value. Note that using -EFAULT was a bug. Signed-off-by: Richard Henderson --- linux-user/aarch64/signal.c| 6 +- linux-user/alpha/signal.c | 6 +-

[PATCH 3/8] linux-user: Pass CPUArchState to do_sigaltstack

2021-04-25 Thread Richard Henderson
Now that we have exactly one call, it's easy to pass in env instead of passing in the sp value. Use target_save_altstack, which required env. Signed-off-by: Richard Henderson --- linux-user/qemu.h| 3 ++- linux-user/signal.c | 11 --- linux-user/syscall.c | 3 +-- 3 files changed,

[PATCH 0/8] linux-user/sparc64: Implement signals

2021-04-25 Thread Richard Henderson
We were re-using sparc32 signal handling for sparc64. In the process, clean up the altstack handling in do_*_sigreturn. r~ Richard Henderson (8): linux-user: Split out target_restore_altstack linux-user: Use target_restore_altstack in all sigreturn linux-user: Pass CPUArchState to do_siga

[PATCH 1/8] linux-user: Split out target_restore_altstack

2021-04-25 Thread Richard Henderson
Create a function to match target_save_altstack. Fix some style and unlock issues in do_sigaltstack. Signed-off-by: Richard Henderson --- linux-user/signal-common.h | 1 + linux-user/signal.c| 115 + 2 files changed, 66 insertions(+), 50 deletions(-)

[PATCH] hw/i386: Expand the range of CPU topologies between smp and maxcpus

2021-04-25 Thread caodon...@tsinghua.edu.cn
Change the criteria for the initial CPU topology and maxcpus, user can have more settings Signed-off-by: Dongli Cao --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 8a84b25..ef2e819 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c

Re: [PATCH 16/22] qapi/parser: add docstrings

2021-04-25 Thread Markus Armbruster
John Snow writes: > Signed-off-by: John Snow > > --- > > My hubris is infinite. Score one of the three principal virtues of a programmer ;) > OK, I only added a few -- to help me remember how the parser works at a > glance. > > Signed-off-by: John Snow > --- > scripts/qapi/parser.py | 66 ++

Re: [PATCH 12/22] qapi/parser: add type hint annotations

2021-04-25 Thread Markus Armbruster
John Snow writes: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > (Annotations for QAPIDoc are in a later commit.) > > Signed-off-by: John Snow > --- > scripts/qapi/parser.py | 61 -- > 1 file changed, 41 insertion

Re: [PATCH 11/22] qapi/parser: Rework _check_pragma_list_of_str as a TypeGuard

2021-04-25 Thread Markus Armbruster
John Snow writes: > TypeGuards wont exist in Python proper until 3.10. Ah well. We can hack > up our own by declaring this function to return the type we claim it > checks for and using this to safely downcast object -> List[str]. > > In so doing, I bring this function in-line under _pragma so it

Re: [PATCH] vmbus: Don't make QOM property registration conditional

2021-04-25 Thread Maciej S. Szmigiero
On 11.10.2020 01:30, Maciej S. Szmigiero wrote: On 09.10.2020 23:33, Eduardo Habkost wrote: On Fri, Oct 09, 2020 at 11:05:47PM +0200, Maciej S. Szmigiero wrote: On 09.10.2020 22:07, Eduardo Habkost wrote: Having properties registered conditionally makes QOM type introspection difficult. Inste

[PATCH RESEND] pc-dimm: remove unnecessary get_vmstate_memory_region() method

2021-04-25 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" The get_vmstate_memory_region() method from PCDIMMDeviceClass is only ever called from this class and is never overridden, so it can be converted into an ordinary function. This saves us from having to do an indirect call in order to reach it. Signed-off-by: Maciej S.

Re: [PATCH 10/22] qapi/parser: Fix typing of token membership tests

2021-04-25 Thread Markus Armbruster
John Snow writes: > When the token can be None, we can't use 'x in "abc"' style membership > tests to group types of tokens together, because 'None in "abc"' is a > TypeError. > > Easy enough to fix, if not a little ugly. > > Signed-off-by: John Snow > --- > scripts/qapi/parser.py | 5 +++-- >

Re: [PATCH 09/22] qapi: add match_nofail helper

2021-04-25 Thread Markus Armbruster
John Snow writes: > Mypy cannot generally understand that these regex functions cannot > possibly fail. Add a _nofail helper that clarifies this for mypy. Convention wants a blank line here. > Signed-off-by: John Snow > --- > scripts/qapi/common.py | 8 +++- > scripts/qapi/main.py | 6

Re: [PATCH 07/22] qapi/parser: assert object keys are strings

2021-04-25 Thread Markus Armbruster
John Snow writes: > The single quote token implies the value is a string. Assert this to be > the case. > > Signed-off-by: John Snow > --- > scripts/qapi/parser.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py > index 6b443b1247e..8d1

Re: [PATCH 06/22] qapi/parser: assert get_expr returns object in outer loop

2021-04-25 Thread Markus Armbruster
John Snow writes: > get_expr can return many things, depending on where it is used. In the > outer parsing loop, we expect and require it to return a dict. > > (It's (maybe) a bit involved to teach mypy that when nested is False, > this is already always True. I'll look into it later, maybe.) > >