Re: [PATCH v1 1/1] target/i386: Mask xstate_bv based on the cpu enabled features

2022-02-05 Thread Leonardo Bras Soares Passos
Hello David, thank you for the feedback. On Wed, Feb 2, 2022 at 12:47 PM David Edmondson wrote: > > On Tuesday, 2022-02-01 at 16:09:57 -03, Leonardo Brás wrote: > > > Hello David, thanks for this feedback! > > > > On Mon, 2022-01-31 at 12:53 +, David Edmondson wrote: > >> On Saturday, 2022-01

Re: [PATCH v3 1/2] hw/i386: Attach CPUs to machine

2022-02-05 Thread Paolo Bonzini
It broke check-system-debian in CI. Paolo Il ven 4 feb 2022, 20:31 Philippe Mathieu-Daudé ha scritto: > On 4/2/22 18:59, Paolo Bonzini wrote: > > This is causing breakage in the acpi-tables-test, sorry. > > $ make check-qtest-x86_64 > > Ok: 49 > Expected Fail: 0 > Fail:

Re: [PATCH v3 1/2] hw/i386: Attach CPUs to machine

2022-02-05 Thread Philippe Mathieu-Daudé via
+Igor On 5/2/22 10:21, Paolo Bonzini wrote: It broke check-system-debian in CI. OK. This is odd because I am using Ubuntu 20.04 x86_64 host and can not reproduce. I'll investigate. Il ven 4 feb 2022, 20:31 Philippe Mathieu-Daudé > ha scritto: On 4/2/22 18:59, Pao

Re: [PULL 0/2] VFIO fixes 2022-02-03

2022-02-05 Thread Peter Maydell
On Thu, 3 Feb 2022 at 22:38, Alex Williamson wrote: > > The following changes since commit 8f3e5ce773c62bb5c4a847f3a9a5c98bbb3b359f: > > Merge remote-tracking branch > 'remotes/hdeller/tags/hppa-updates-pull-request' into staging (2022-02-02 > 19:54:30 +) > > are available in the Git repos

Re: [PATCH 01/11] mos6522: add defines for IFR bit flags

2022-02-05 Thread Mark Cave-Ayland
On 27/01/2022 23:16, BALATON Zoltan wrote: On Thu, 27 Jan 2022, Mark Cave-Ayland wrote: These are intended to make it easier to see how the physical control lines are wired for each instance. Signed-off-by: Mark Cave-Ayland --- include/hw/misc/mos6522.h | 22 +++--- 1 file chan

Re: [PATCH] input/adb: Only include where needed

2022-02-05 Thread Mark Cave-Ayland
On 27/01/2022 23:39, BALATON Zoltan wrote: On Mon, 5 Jul 2021, BALATON Zoltan wrote: The header hw/input/adb.h is included by some files that don't need it. Clean it up and include only where necessary. When you're touching mos6522, I've also have this patch that cleans up includes that's so

Re: [PULL 00/32] virtio,pc: features, cleanups, fixes

2022-02-05 Thread Peter Maydell
On Sat, 5 Feb 2022 at 01:42, Michael S. Tsirkin wrote: > > The following changes since commit 8f3e5ce773c62bb5c4a847f3a9a5c98bbb3b359f: > > Merge remote-tracking branch > 'remotes/hdeller/tags/hppa-updates-pull-request' into staging (2022-02-02 > 19:54:30 +) > > are available in the Git re

Re: [PATCH v2 5/6] target/riscv: Add *envcfg* CSRs support

2022-02-05 Thread Weiwei Li
在 2022/2/5 上午8:36, Atish Patra 写道: The RISC-V privileged specification v1.12 defines few execution environment configuration CSRs that can be used enable/disable extensions per privilege levels. Add the basic support for these CSRs. Signed-off-by: Atish Patra --- target/riscv/cpu.h |

Re: [PATCH] input/adb: Only include where needed

2022-02-05 Thread Philippe Mathieu-Daudé via
On 5/2/22 12:02, Mark Cave-Ayland wrote: On 27/01/2022 23:39, BALATON Zoltan wrote: On Mon, 5 Jul 2021, BALATON Zoltan wrote: The header hw/input/adb.h is included by some files that don't need it. Clean it up and include only where necessary. When you're touching mos6522, I've also have thi

Re: [PATCH 01/11] mos6522: add defines for IFR bit flags

2022-02-05 Thread Philippe Mathieu-Daudé via
On 5/2/22 11:51, Mark Cave-Ayland wrote: On 27/01/2022 23:16, BALATON Zoltan wrote: On Thu, 27 Jan 2022, Mark Cave-Ayland wrote: These are intended to make it easier to see how the physical control lines are wired for each instance. Signed-off-by: Mark Cave-Ayland --- include/hw/misc/mos652

Re: [PULL 0/2] VFIO fixes 2022-02-03

2022-02-05 Thread Philippe Mathieu-Daudé via
On 5/2/22 11:49, Peter Maydell wrote: On Thu, 3 Feb 2022 at 22:38, Alex Williamson wrote: The following changes since commit 8f3e5ce773c62bb5c4a847f3a9a5c98bbb3b359f: Merge remote-tracking branch 'remotes/hdeller/tags/hppa-updates-pull-request' into staging (2022-02-02 19:54:30 +) a

Re: [PATCH v2 4/6] target/riscv: Add support for mconfigptr

2022-02-05 Thread Weiwei Li
在 2022/2/5 上午8:36, Atish Patra 写道: RISC-V privileged specification v1.12 introduced a mconfigptr which will hold the physical address of a configuration data structure. As Qemu doesn't have a configuration data structure, is read as zero which is valid as per the priv spec. Signed-off-by: Atis

Re: [PATCH v3] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-05 Thread Christian Schoenebeck
On Freitag, 4. Februar 2022 06:06:09 CET Vitaly Chikunov wrote: > `struct dirent' returned from readdir(3) could be shorter (or longer) > than `sizeof(struct dirent)', thus memcpy of sizeof length will overread > into unallocated page causing SIGSEGV. Example stack trace: > > #0 0x559ebe

Re: [PATCH v3] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-05 Thread Philippe Mathieu-Daudé via
On 5/2/22 12:36, Christian Schoenebeck wrote: On Freitag, 4. Februar 2022 06:06:09 CET Vitaly Chikunov wrote: `struct dirent' returned from readdir(3) could be shorter (or longer) than `sizeof(struct dirent)', thus memcpy of sizeof length will overread into unallocated page causing SIGSEGV. Exam

Re: [PATCH 01/11] mos6522: add defines for IFR bit flags

2022-02-05 Thread BALATON Zoltan
On Sat, 5 Feb 2022, Philippe Mathieu-Daudé wrote: On 5/2/22 11:51, Mark Cave-Ayland wrote: On 27/01/2022 23:16, BALATON Zoltan wrote: On Thu, 27 Jan 2022, Mark Cave-Ayland wrote: These are intended to make it easier to see how the physical control lines are wired for each instance. Signed-o

Re: [RFC PATCH v5 08/30] target/loongarch: Add LoongArch IOCSR instruction

2022-02-05 Thread Mark Cave-Ayland
On 28/01/2022 03:43, Xiaojuan Yang wrote: This includes: - IOCSR{RD/WR}.{B/H/W/D} Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu.c| 8 + target/loongarch/cpu.h| 4 + target/loongarch/disas.c

Re: [RFC PATCH v5 16/30] hw/loongarch: Add LoongArch cpu interrupt support(CPUINTC)

2022-02-05 Thread Mark Cave-Ayland
On 28/01/2022 03:43, Xiaojuan Yang wrote: Loongson-3A5000 support 14 interrupts from 64 - 77(Timer->75 IPI->76) Loongson-3A5000 and ls7a form a legacy model and extended model irq hierarchy.Tcg mode emulate a simplified extended model which has no Legacy I/O Interrupt Controller(LIOINTC) and LPC

Re: [RFC PATCH v5 17/30] hw/loongarch: Add LoongArch ipi interrupt support(IPI)

2022-02-05 Thread Mark Cave-Ayland
On 28/01/2022 03:43, Xiaojuan Yang wrote: This patch realize the IPI interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/intc/Kconfig | 3 + hw/intc/loongarch_ipi.c | 164 hw/intc/meson.build

Re: [PULL 00/32] virtio,pc: features, cleanups, fixes

2022-02-05 Thread Michael S. Tsirkin
On Sat, Feb 05, 2022 at 11:07:33AM +, Peter Maydell wrote: > On Sat, 5 Feb 2022 at 01:42, Michael S. Tsirkin wrote: > > > > The following changes since commit 8f3e5ce773c62bb5c4a847f3a9a5c98bbb3b359f: > > > > Merge remote-tracking branch > > 'remotes/hdeller/tags/hppa-updates-pull-request'

[PATCH v4 0/4] hw/i386: QOM-attach CPUs/SGX-EPC objects to their parents

2022-02-05 Thread Philippe Mathieu-Daudé via
Trying to fix the issue reported here: https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg05670.html First attach the CPUs and SGX-EPC objects to the machine. Since v3: - update VIOT ACPI table (Paolo) Since v2: - added missing QOM property auto-enum: [*] (Yang Zhong) Since v1: - addre

[PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine

2022-02-05 Thread Philippe Mathieu-Daudé via
Previously SGX-EPC objects were exposed in the QOM tree at a path /machine/unattached/device[nn] where the 'nn' varies depending on what devices were already created. With this change the SGX-EPC objects are now at /machine/sgx-epc[nn] where the 'nn' of the first SGX-EPC object is always z

[PATCH v4 3/4] tests/qtest/acpi: Update VIOT table blob

2022-02-05 Thread Philippe Mathieu-Daudé via
Empty bios-tables-test-allowed-diff.h and run rebuild-expected-aml.sh to update the VIOT blob. The iasl output diff is: /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20210604 (64-bit version) * Copyright (c) 2000 - 2021 Intel Corporation * * Disassembly of tests

[PATCH v4 1/4] tests/qtest/acpi: Temporary allow VIOT table changes

2022-02-05 Thread Philippe Mathieu-Daudé via
In preparation of changing the VIOT table, add it to the ACPI tests allowlist. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-all

Re: [PATCH v3 1/2] hw/i386: Attach CPUs to machine

2022-02-05 Thread Philippe Mathieu-Daudé via
On 5/2/22 11:32, Philippe Mathieu-Daudé wrote: +Igor On 5/2/22 10:21, Paolo Bonzini wrote: It broke check-system-debian in CI. OK. This is odd because I am using Ubuntu 20.04 x86_64 host and can not reproduce. I'll investigate. OK I could reproduce using the Docker image pulled from registr

[PATCH v4 2/4] hw/i386: Attach CPUs to machine

2022-02-05 Thread Philippe Mathieu-Daudé via
Previously CPUs were exposed in the QOM tree at a path /machine/unattached/device[nn] where the 'nn' of the first CPU is usually zero, but can vary depending on what devices were already created. With this change the CPUs are now at /machine/cpu[nn] where the 'nn' of the first CPU is alway

Re: [RFC PATCH v5 20/30] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2022-02-05 Thread Mark Cave-Ayland
On 28/01/2022 03:44, Xiaojuan Yang wrote: This patch realize the EIOINTC interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/intc/Kconfig| 3 + hw/intc/loongarch_extioi.c | 409 + hw/intc/meson.build

Re: [RFC PATCH v5 21/30] hw/loongarch: Add irq hierarchy for the system

2022-02-05 Thread Mark Cave-Ayland
On 28/01/2022 03:44, Xiaojuan Yang wrote: This patch add the irq hierarchy for the virt board. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/loongson3.c | 88 ++ include/hw/pci-host/ls7a.h | 13 ++ 2 files changed, 101 inse

Re: [RFC PATCH v5 23/30] hw/loongarch: Add some devices support for 3A5000.

2022-02-05 Thread Mark Cave-Ayland
On 28/01/2022 03:44, Xiaojuan Yang wrote: 1.Add uart,virtio-net,vga and usb for 3A5000. 2.Add irq set and map for the pci host. Non pci device use irq 0-16, pci device use 16-64. 3.Add some unimplented device to emulate guest unused memory space. Signed-off-by: Xiaojuan Yang Signed-off-by: Son

Re: [RFC PATCH v5 01/30] target/loongarch: Add system emulation introduction

2022-02-05 Thread Mark Cave-Ayland
On 28/01/2022 03:43, Xiaojuan Yang wrote: Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- docs/system/loongarch/loongson3.rst | 78 + target/loongarch/README | 28 +++ 2 files changed, 106 insertions(+) create mode 100644 docs/syst

Re: [PULL 00/32] virtio,pc: features, cleanups, fixes

2022-02-05 Thread Peter Maydell
On Sat, 5 Feb 2022 at 12:25, Michael S. Tsirkin wrote: > > On Sat, Feb 05, 2022 at 11:07:33AM +, Peter Maydell wrote: > > On Sat, 5 Feb 2022 at 01:42, Michael S. Tsirkin wrote: > > > > > > The following changes since commit > > > 8f3e5ce773c62bb5c4a847f3a9a5c98bbb3b359f: > > > > > > Merge

Re: [RFC PATCH v5 00/30] Add LoongArch softmmu support

2022-02-05 Thread Mark Cave-Ayland
On 28/01/2022 03:40, Xiaojuan Yang wrote: This series patch add softmmu support for LoongArch. The latest kernel: * https://github.com/loongson/linux/tree/loongarch-next The latest uefi: * https://github.com/loongson/edk2 * https://github.com/loongson/edk2-platforms The manual: * htt

Re: [PATCH v2] hw/display/tcx: Mark the VRAM dirty upon reset

2022-02-05 Thread Mark Cave-Ayland
On 03/02/2022 00:05, Philippe Mathieu-Daudé via wrote: When resetting we don't want to *reset* the dirty bitmap, we want to *set* it to mark the entire VRAM dirty due to the memset() call. Replace memory_region_reset_dirty() by tcx_set_dirty() which conveniently set the correct ranges dirty. S

Re: [PATCH v2] hw/display/tcx: Mark the VRAM dirty upon reset

2022-02-05 Thread BALATON Zoltan
On Sat, 5 Feb 2022, Mark Cave-Ayland wrote: On 03/02/2022 00:05, Philippe Mathieu-Daudé via wrote: When resetting we don't want to *reset* the dirty bitmap, we want to *set* it to mark the entire VRAM dirty due to the memset() call. Replace memory_region_reset_dirty() by tcx_set_dirty() which

[PATCH] hw/ide: implement ich6 ide controller support

2022-02-05 Thread Liav Albani
This type of IDE controller has support for relocating the IO ports and doesn't use IRQ 14 and 15 but one allocated PCI IRQ for the controller. Signed-off-by: Liav Albani --- hw/i386/Kconfig | 2 + hw/ide/Kconfig | 5 + hw/ide/bmdma.c | 83 +++ hw/id

Re: [PATCH v2] hw/display/tcx: Mark the VRAM dirty upon reset

2022-02-05 Thread Peter Maydell
On Sat, 5 Feb 2022 at 14:24, BALATON Zoltan wrote: > > On Sat, 5 Feb 2022, Mark Cave-Ayland wrote: > > On 03/02/2022 00:05, Philippe Mathieu-Daudé via wrote: > > > >> When resetting we don't want to *reset* the dirty bitmap, > >> we want to *set* it to mark the entire VRAM dirty due to > >> the me

Re: [PATCH] hw/ide: implement ich6 ide controller support

2022-02-05 Thread BALATON Zoltan
On Sat, 5 Feb 2022, Liav Albani wrote: This type of IDE controller has support for relocating the IO ports and doesn't use IRQ 14 and 15 but one allocated PCI IRQ for the controller. I haven't looked at in detail so only a few comments I've got while reading it. What machine needs this? In QEM

Re: [PATCH v4 0/4] hw/i386: QOM-attach CPUs/SGX-EPC objects to their parents

2022-02-05 Thread Philippe Mathieu-Daudé via
On 5/2/22 13:45, Philippe Mathieu-Daudé wrote: Trying to fix the issue reported here: https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg05670.html First attach the CPUs and SGX-EPC objects to the machine. Since v3: - update VIOT ACPI table (Paolo) This now works on Debian, but fails

Re: [PATCH] hw/ide: implement ich6 ide controller support

2022-02-05 Thread Liav Albani
On 2/5/22 17:48, BALATON Zoltan wrote: On Sat, 5 Feb 2022, Liav Albani wrote: This type of IDE controller has support for relocating the IO ports and doesn't use IRQ 14 and 15 but one allocated PCI IRQ for the controller. I haven't looked at in detail so only a few comments I've got while r

[RFC PATCH] Allow VIRTIO_F_IN_ORDER to be negotiated for vdpa devices

2022-02-05 Thread gautam.dawar
From: Gautam Dawar Hi All, The VIRTIO_F_IN_ORDER feature is implemented by DPDK's virtio_net driver but not by the Linux kernel's virtio_net driver. However, this feature still can't be tested using vhost-vdpa with hardware devices that implement it as VIRTIO_F_IN_ORDER isn't defined in kernel's

Re: [PULL 00/32] virtio,pc: features, cleanups, fixes

2022-02-05 Thread Michael S. Tsirkin
On Sat, Feb 05, 2022 at 01:31:17PM +, Peter Maydell wrote: > On Sat, 5 Feb 2022 at 12:25, Michael S. Tsirkin wrote: > > > > On Sat, Feb 05, 2022 at 11:07:33AM +, Peter Maydell wrote: > > > On Sat, 5 Feb 2022 at 01:42, Michael S. Tsirkin wrote: > > > > > > > > The following changes since c

Re: [PATCH] hw/ide: implement ich6 ide controller support

2022-02-05 Thread BALATON Zoltan
Hello, On Sat, 5 Feb 2022, Liav Albani wrote: On 2/5/22 17:48, BALATON Zoltan wrote: On Sat, 5 Feb 2022, Liav Albani wrote: This type of IDE controller has support for relocating the IO ports and doesn't use IRQ 14 and 15 but one allocated PCI IRQ for the controller. I haven't looked at in d

[PATCH 0/2] Make mc146818rtc more self-contained

2022-02-05 Thread Bernhard Beschow
The internal state of mc146818rtc is currently exported as RTCState. This violates encapsulation. Resolve it by first converting the last external user, then by unexporting RTCState. Bernhard Beschow (2): isa/piix4: Resolve RTCState attribute mc146818rtc: Unexport RTCState hw/isa/piix4.c

[PATCH 1/2] isa/piix4: Resolve RTCState attribute

2022-02-05 Thread Bernhard Beschow
Assuming that mc146818_rtc_init() is "syntactic sugar" for code that could be converted into configuration in the future, this patch is a step towards this future by freeing piix4 to care about the inner details of mc146818. Furthermore, by reusing mc146818_rtc_init(), piix4's code becomes more ho

[PATCH 2/2] mc146818rtc: Unexport RTCState

2022-02-05 Thread Bernhard Beschow
Now that RTCState isn't used outside mc146818rtc.c any more, it can be unexported to prevent outside code to depend on its details. Signed-off-by: Bernhard Beschow --- hw/rtc/mc146818rtc.c | 34 ++ include/hw/rtc/mc146818rtc.h | 35 +---

Re: [PATCH 1/2] isa/piix4: Resolve RTCState attribute

2022-02-05 Thread Peter Maydell
On Sat, 5 Feb 2022 at 18:05, Bernhard Beschow wrote: > > Assuming that mc146818_rtc_init() is "syntactic sugar" for code that could > be converted into configuration in the future, this patch is a step towards > this future by freeing piix4 to care about the inner details of mc146818. > > Furtherm

Re: [PULL 00/32] virtio,pc: features, cleanups, fixes

2022-02-05 Thread Peter Maydell
On Sat, 5 Feb 2022 at 17:42, Michael S. Tsirkin wrote: > > On Sat, Feb 05, 2022 at 01:31:17PM +, Peter Maydell wrote: > > On Sat, 5 Feb 2022 at 12:25, Michael S. Tsirkin wrote: > > > > > > On Sat, Feb 05, 2022 at 11:07:33AM +, Peter Maydell wrote: > > > > Fails to compile for 32-bit, Wind

Re: [PATCH 1/2] isa/piix4: Resolve RTCState attribute

2022-02-05 Thread Philippe Mathieu-Daudé via
On 5/2/22 19:53, Peter Maydell wrote: On Sat, 5 Feb 2022 at 18:05, Bernhard Beschow wrote: Assuming that mc146818_rtc_init() is "syntactic sugar" for code that could be converted into configuration in the future, this patch is a step towards this future by freeing piix4 to care about the inner

Re: [PATCH v2 01/21] accel: Restrict sysemu stubs to system emulation

2022-02-05 Thread Richard Henderson
On 2/4/22 06:17, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/meson.build | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/accel/stubs/meson.build b/accel/stubs/meson.build index 12dd1539af..0249b9258f 100644 --- a/accel/st

Re: [PATCH v2 03/21] exec: Declare vaddr as a generic target-agnostic type

2022-02-05 Thread Richard Henderson
On 2/4/22 06:17, Philippe Mathieu-Daudé wrote: Move vaddr type declaration to the generic "exec/cpu-common.h" header. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 12 include/hw/core/cpu.h | 13 + 2 files changed, 13 insertions(+), 12 del

Re: [PATCH v2 04/21] exec: Make cpu_memory_rw_debug() target agnostic

2022-02-05 Thread Richard Henderson
On 2/4/22 06:17, Philippe Mathieu-Daudé wrote: cpu_memory_rw_debug() is declared in "exec/cpu-all.h" which contains target-specific declarations. To be able to use it from target agnostic source, move the declaration to the generic "exec/cpu-common.h" header. Replace the target-specific 'target_

Re: [PATCH v2 08/21] accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE

2022-02-05 Thread Richard Henderson
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote: Mirror "sysemu/kvm.h" #ifdef'ry to define CONFIG_HAX_IS_POSSIBLE, expose hax_allowed to hax_enabled() macro. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/hax-stub.c| 2 ++ include/sysemu/hax.h |

Re: [PATCH v2 09/21] softmmu/cpus: Code movement

2022-02-05 Thread Richard Henderson
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote: We want cpu_thread_is_idle() to use cpus_accel, so declare this variable earlier. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/cpus.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 10/21] accel: Introduce AccelOpsClass::cpu_thread_is_idle()

2022-02-05 Thread Richard Henderson
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote: Add cpu_thread_is_idle() to AccelOps, and implement it for the KVM / WHPX accelerators. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-accel-ops.c | 6 ++ include/sysemu/accel-ops.h| 1

Re: [PATCH v2 11/21] accel: Introduce AccelOpsClass::cpus_are_resettable()

2022-02-05 Thread Richard Henderson
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote: Add cpus_are_resettable() to AccelOps, and implement it for the KVM accelerator. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-accel-ops.c | 6 ++ include/sysemu/accel-ops.h | 2 ++ include/sysemu

Re: [PATCH v2 14/21] softmmu/physmem: Remove unnecessary include

2022-02-05 Thread Richard Henderson
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- softmmu/physmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index eb4b3bcae7..09951c0996 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -60,7 +60,

Re: [PATCH v2 17/21] misc: Add missing "sysemu/cpu-timers.h" include

2022-02-05 Thread Richard Henderson
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-icount.c | 1 + accel/tcg/tcg-accel-ops-mttcg.c | 1 + accel/tcg/tcg-accel-ops-rr.c | 1 + accel/tcg/tcg-accel-ops.c| 1 + include/exec/exec-all.h | 1 - t

Re: [PATCH v2 16/21] misc: Remove unnecessary "sysemu/cpu-timers.h" include

2022-02-05 Thread Richard Henderson
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/qtest/qtest.c| 1 - target/alpha/translate.c | 1 - tests/unit/ptimer-test-stubs.c | 1 - 3 files changed, 3 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 19/21] exec/cpu: Make address_space_init/reloading_memory_map target agnostic

2022-02-05 Thread Richard Henderson
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote: cpu_address_space_init() and cpu_reloading_memory_map() are target-agnostic, but are declared in "exec/exec-all.h" which contains target-specific declarations. Any target-agnostic source including "exec/exec-all.h" becomes target-specific and we have

Re: [PATCH v2 20/21] softmmu: Add qemu_init_arch_modules()

2022-02-05 Thread Richard Henderson
On 2/4/22 06:18, Philippe Mathieu-Daudé wrote: module_allow_arch() is the single target-specific call in the whole vl.c file. Move the module initialization out to arch_init.c, that way we'll be able to build vl.o once for all targets (the next commit). Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH 01/10] hw/tpm: Clean includes

2022-02-05 Thread Richard Henderson
On 2/4/22 06:37, Philippe Mathieu-Daudé wrote: "tpm_ppi.h" only requires to include "exec/memory.h" to get the MemoryRegion declaration. tpm_ppi.c requires "hw/qdev-core.h" to use the DEVICE() macro, tpm_crb.c is the only source file requiring "exec/address-spaces.h". Signed-off-by: Philippe Ma

Re: [PATCH 02/10] hw/remote: Add missing include

2022-02-05 Thread Richard Henderson
On 2/4/22 06:37, Philippe Mathieu-Daudé wrote: Currently "qemu/error-report.h" is implicitly included, however if headers in include/ get refactored, we get: hw/remote/proxy-memory-listener.c: In function ‘proxy_memory_listener_commit’: hw/remote/proxy-memory-listener.c:183:9: error: impl

Re: [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include

2022-02-05 Thread Richard Henderson
On 2/4/22 06:37, Philippe Mathieu-Daudé wrote: CPUS390XState is declared in "cpu.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/s390-virtio-hcall.h | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 06/10] exec/ramblock: Add missing includes

2022-02-05 Thread Richard Henderson
On 2/4/22 06:37, Philippe Mathieu-Daudé wrote: Add missing includes to avoid when refactoring include/ include/exec/ramblock.h:26:21: error: field has incomplete type 'struct rcu_head' struct rcu_head rcu; ^ Signed-off-by: Philippe Mathieu-Daudé --- include/exec/

Re: [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include

2022-02-05 Thread Richard Henderson
On 2/4/22 06:37, Philippe Mathieu-Daudé wrote: Add "hw/qdev-core.h" to avoid when refactoring include/: softmmu/qtest.c:404:9: error: use of undeclared identifier 'NamedGPIOList' NamedGPIOList *ngl; ^ Signed-off-by: Philippe Mathieu-Daudé --- softmmu/qtest.c | 1 + 1 fil

Re: [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include

2022-02-05 Thread Richard Henderson
On 2/4/22 06:38, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/core/ptimer.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 08/10] target: Add missing "qemu/timer.h" include

2022-02-05 Thread Richard Henderson
On 2/4/22 06:38, Philippe Mathieu-Daudé wrote: cpu_get_host_ticks() and NANOSECONDS_PER_SECOND are declared in "qemu/timer.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.c | 1 + target/arm/helper.c | 1 + target/hppa/cpu.c | 1 + target/riscv/csr.c| 1 + targe

Re: [PATCH 09/10] linux-user: Add missing "qemu/timer.h" include

2022-02-05 Thread Richard Henderson
On 2/4/22 06:38, Philippe Mathieu-Daudé wrote: "qemu/timer.h" declares cpu_get_host_ticks(). Signed-off-by: Philippe Mathieu-Daudé --- linux-user/i386/cpu_loop.c | 1 + linux-user/ppc/cpu_loop.c | 1 + 2 files changed, 2 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it

2022-02-05 Thread Richard Henderson
On 2/4/22 06:38, Philippe Mathieu-Daudé wrote: Many files use "qemu/log.h" declarations but neglect to include it (they inherit it via "exec/exec-all.h"). "exec/exec-all.h" is a core component and shouldn't be used that way. Move the "qemu/log.h" inclusion locally to each unit requiring it. Sign

Re: [PATCH 1/6] target/arm: Move '-cpu host' code to cpu64.c

2022-02-05 Thread Richard Henderson
On 2/5/22 03:55, Peter Maydell wrote: Now that KVM has dropped AArch32 host support, the 'host' CPU type is always AArch64, and we can move it to cpu64.c. This move will allow us to share code between it and '-cpu max', which should behave the same as '-cpu host' when using KVM or HVF. Signed-o

Re: [PATCH 2/6] target/arm: Use aarch64_cpu_register() for 'host' CPU type

2022-02-05 Thread Richard Henderson
On 2/5/22 03:55, Peter Maydell wrote: Use the aarch64_cpu_register() machinery to register the 'host' CPU type. This doesn't gain us anything functionally, but it does mean that the code for initializing it looks more like that for the other CPU types, in that its initfn then doesn't need to cal

Re: [PATCH 3/6] target/arm: Make KVM -cpu max exactly like -cpu host

2022-02-05 Thread Richard Henderson
On 2/5/22 03:55, Peter Maydell wrote: Currently for KVM the intention is that '-cpu max' and '-cpu host' are the same thing, but because we did this with two separate pieces of code they have got a little bit out of sync. Specifically, 'max' has a 'sve-max-vq' property, and 'host' does not. Brin

Re: [PATCH 5/6] target/arm: Fix '-cpu max' for HVF

2022-02-05 Thread Richard Henderson
On 2/5/22 03:55, Peter Maydell wrote: Currently when using hvf we mishandle '-cpu max': we fall through to the TCG version of its initfn, which then sets a lot of feature bits that the real host CPU doesn't have. The hvf accelerator code then exposes these bogus ID register values to the guest be

Re: [PATCH 4/6] target/arm: Unindent unnecessary else-clause

2022-02-05 Thread Richard Henderson
On 2/5/22 03:55, Peter Maydell wrote: Now that the if() branch of the condition in aarch64_max_initfn() returns early, we don't need to keep the rest of the code in the function inside an else block. Remove the else, unindenting that code. Signed-off-by: Peter Maydell --- target/arm/cpu64.c |

Re: [PATCH 6/6] target/arm: Support PAuth extension for hvf

2022-02-05 Thread Richard Henderson
On 2/5/22 03:55, Peter Maydell wrote: Currently we don't allow guests under hvf to use the PAuth extension, because we didn't have any special code to handle that, and therefore in arm_cpu_pauth_finalize() we will sanitize the ID_AA64ISAR1 value the guest sees to clear the PAuth related fields.

Re: [PATCH] target/ppc: Change VSX instructions behavior to fill with zeros

2022-02-05 Thread Richard Henderson
On 2/5/22 05:19, Víctor Colombo wrote: ISA v3.1 changed some VSX instructions behavior by changing what the other words/doubleword in the result should contain when the result is only one word/doubleword. e.g. xsmaxdp operates on doubleword 0 and saves the result also in doubleword 0. Before, the

Re: [PATCH v3 03/26] Makefile: also remove .gcno files when cleaning

2022-02-05 Thread Richard Henderson
On 2/5/22 07:43, Alex Bennée wrote: Left over .gcno files from old builds can really confuse gcov and the user expects a clean slate after "make clean". Make clean mean clean. Signed-off-by: Alex Bennée Message-Id:<20220124201608.604599-4-alex.ben...@linaro.org> --- v2 - fix whitespace damag

Re: [PATCH v3 04/26] .gitignore: add .gcov pattern

2022-02-05 Thread Richard Henderson
On 2/5/22 07:43, Alex Bennée wrote: The gcovr tool is very messy and can leave a lot of crap in the source tree even when using build directories. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220124201608.604599-5-alex.ben...@linaro.org> --- .gitignore | 1 +

Re: [PATCH v3 26/26] plugins: move reset of plugin data to tb_start

2022-02-05 Thread Richard Henderson
On 2/5/22 07:43, Alex Bennée wrote: We can't always guarantee we get to the end of a translator loop. Although this can happen for a variety of reasons it does happen more often on x86 system emulation when an instruction spans across to an un-faulted page. This caused confusion of the instructio

[PATCH v4] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-05 Thread Vitaly Chikunov
`struct dirent' returned from readdir(3) could be shorter (or longer) than `sizeof(struct dirent)', thus memcpy of sizeof length will overread into unallocated page causing SIGSEGV. Example stack trace: #0 0x559ebeed v9fs_co_readdir_many (/usr/bin/qemu-system-x86_64 + 0x497eed) #1 0x0

[PATCH v2] tests/qtest: add qtests for npcm7xx sdhci

2022-02-05 Thread Patrick Venture
From: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Signed-off-by: Shengtan Mao Signed-off-by: Patrick Venture --- v2: * update copyright year * check result of open * use g_free instead of free * move declarations to the top * use g_file_open_tmp --- tests/qtest/meson.build

Re: [RFC PATCH] arm: force flag recalculation when messing with DAIF

2022-02-05 Thread Richard Henderson
On 2/2/22 23:23, Alex Bennée wrote: The recently introduced debug tests in kvm-unit-tests exposed an error in our handling of singlestep cause by stale hflags. This is caught by --enable-debug-tcg when running the tests. You could mention that PSTATE_D is used by aa64_generate_debug_exceptions.

Re: New arm alignment issue with 6.2.0 - bisected to single revision

2022-02-05 Thread Richard Henderson
On 1/7/22 04:09, Peter Maydell wrote: On Wed, 29 Dec 2021 at 20:15, Mark Watson wrote: I'm seeing a repeatable alignment exception running m68k system mode on armv7l (arm cortex a9) following this commit: "fa947a667fceab02f9f85fc99f54aebcc9ae6b51 is the first bad commit commit fa947a667fceab02