[PATCH v2 09/17] pcie: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- docs/pcie_sriov.txt| 4 +-- hw/display/bochs-display.c | 4 +-- hw/net/e1000e.c| 4 +-- hw/pci-bridge/cxl_downstream.c | 9 ++ hw/pci-bridge/cxl_upstream.c | 8 ++--- hw/pci-bridge/pcie_pci_bridge.c

[QEMU][PATCH v2 0/5] Introduce Xilinx Versal CANFD

2022-10-21 Thread Vikram Garhwal
Hi, This patch implements CANFD controller for xlnx-versal-virt machine. There are two controllers CANFD0@0xFF06_ and CANFD1@0xFF07_ are connected to the machine. Also, added basic qtests for data exchange between both the controllers in various supported configs. Changelog: v1->v2

[PATCH v2 02/17] hw/i386/amd_iommu: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/i386/amd_iommu.c | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 725f69095b..8a88cbea0a 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -1539,7 +1539,6 @@

[PATCH v2 13/17] hw/pci-bridge/pcie_pci_bridge: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/pci-bridge/pcie_pci_bridge.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/pci-bridge/pcie_pci_bridge.c b/hw/pci-bridge/pcie_pci_bridge.c index 99778e3e24..1b839465e7 100644 --- a/hw/pci-bridge/pcie_pci_bridge.c +++

[PATCH v2 14/17] hw/vfio/pci-quirks: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/vfio/pci-quirks.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index f0147a050a..e94fd273ea 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -1530,7 +1530,7 @@

[PATCH v2 17/17] pci: Remove legacy errp from pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/pci/pci.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 8ee2171011..8ff71e4553 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2513,38 +2513,23 @@ static void

[PATCH v2 10/17] pci/shpc: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-bridge/pcie_pci_bridge.c | 2 +- hw/pci/shpc.c | 23 ++- include/hw/pci/shpc.h | 3 +-- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git

Re: [PATCH] target/i386: Fix caculation of LOCK NEG eflags

2022-10-21 Thread Richard Henderson
On 10/21/22 23:17, Qi Hu wrote: t0 = tcg_temp_local_new(); +t1 = tcg_temp_local_new(); label1 = gen_new_label(); tcg_gen_mov_tl(a0, s->A0); tcg_gen_mov_tl(t0, s->T0);

[PATCH v2 16/17] virtio-pci: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/virtio/virtio-pci.c | 9 ++--- include/hw/pci/pci.h | 12 ++-- include/hw/virtio/virtio-pci.h | 2 +- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index

[PATCH v2 08/17] hw/pci/pci_bridge: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/pci-bridge/i82801b11.c | 14 ++ hw/pci-bridge/pcie_root_port.c | 7 +-- hw/pci-bridge/xio3130_downstream.c | 8 ++-- hw/pci-bridge/xio3130_upstream.c | 8 ++-- hw/pci/pci_bridge.c| 21

[PATCH v2 00/17] pci: Abort if pci_add_capability fails

2022-10-21 Thread Akihiko Odaki
pci_add_capability appears most PCI devices. Its error handling required lots of code, and led to inconsistent behaviors such as: - passing error_abort - passing error_fatal - asserting the returned value - propagating the error to the caller - skipping the rest of the function - just ignoring

[PATCH v2 12/17] pci/slotid: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/pci/slotid_cap.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/pci/slotid_cap.c b/hw/pci/slotid_cap.c index 36d021b4a6..5da8c82133 100644 --- a/hw/pci/slotid_cap.c +++ b/hw/pci/slotid_cap.c @@ -12,7 +12,7 @@ int

[PATCH v2 01/17] pci: Allow to omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
pci_add_capability appears most PCI devices. Its error handling required lots of code, and led to inconsistent behaviors such as: - passing error_abort - passing error_fatal - asserting the returned value - propagating the error to the caller - skipping the rest of the function - just ignoring

[PATCH v2 04/17] e1000e: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/e1000e.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index ac96f7665a..e433b8f9a5 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -377,17 +377,10 @@ e1000e_gen_dsn(uint8_t

[PATCH v2 07/17] msi: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/pci/msi.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/pci/msi.c b/hw/pci/msi.c index 058d1d1ef1..5283a08b5a 100644 --- a/hw/pci/msi.c +++ b/hw/pci/msi.c @@ -194,7 +194,6 @@ int msi_init(struct PCIDevice *dev, uint8_t offset,

[PATCH v2 05/17] eepro100: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/net/eepro100.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index 679f52f80f..bf2ecdded9 100644 --- a/hw/net/eepro100.c +++ b/hw/net/eepro100.c @@ -549,12 +549,7 @@ static void

Re: [RFC PATCH] target/arm: don't process FCSE translations on physical TLBs

2022-10-21 Thread Richard Henderson
On 10/22/22 03:23, Alex Bennée wrote: A recent change to the page table walking code missed checking if we are at the processing the physical translation and bombs attempting to derive the current EL. Fix this by introducing a new helper (regime_is_phys) and extending the check around the FCSE

[PATCH v2 03/17] ahci: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/ide/ich.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 1007a51fcb..3b478b01f8 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -106,7 +106,7 @@ static void pci_ich9_ahci_init(Object *obj) static

[PATCH v2 06/17] hw/nvme: Omit errp for pci_add_capability

2022-10-21 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- hw/nvme/ctrl.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 87aeba0564..ff4e2beea6 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -7325,17 +7325,9 @@ static void

Re: [PATCH v2 33/36] tcg/tci: Add TCG_TARGET_CALL_{RET,ARG}_I128

2022-10-21 Thread Richard Henderson
On 10/21/22 20:47, Philippe Mathieu-Daudé wrote: On 21/10/22 09:15, Richard Henderson wrote: Fill in the parameters for libffi for Int128. Adjust the interpreter to allow for 16-byte return values. Adjust tcg_out_call to record the return value length. Call parameters are no longer all the

[PATCH] [PING^2] gdb-xml: Fix size of EFER register on i386 architecture when debugged by GDB

2022-10-21 Thread TaiseiIto
This is a ping to the patch below. https://patchew.org/QEMU/ty0pr0101mb4285f637209075c9f65fcda6a4...@ty0pr0101mb4285.apcprd01.prod.exchangelabs.com/ https://lore.kernel.org/qemu-devel/ty0pr0101mb4285f637209075c9f65fcda6a4...@ty0pr0101mb4285.apcprd01.prod.exchangelabs.com/ Before this commit,

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-21 Thread Ani Sinha
On Fri, Oct 21, 2022 at 21:32 Alex Bennée wrote: > > Ani Sinha writes: > > > On Fri, 21 Oct, 2022, 5:52 pm Ani Sinha, wrote: > > > > On Fri, 21 Oct, 2022, 5:26 pm Alex Bennée, > wrote: > > > > Ani Sinha writes: > > > > > On Fri, Oct 21, 2022 at 3:10 PM Michael S. Tsirkin > wrote: > > >>

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Luben Tuikov
On 2022-10-21 05:56, Yang Yingliang wrote: > > On 2022/10/21 17:08, Luben Tuikov wrote: >> On 2022-10-21 04:59, Yang Yingliang wrote: >>> On 2022/10/21 16:36, Greg KH wrote: On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote: > On 2022/10/21 13:37, Greg KH wrote: >> On

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Luben Tuikov
On 2022-10-21 05:12, Yang Yingliang wrote: > > On 2022/10/21 16:36, Greg KH wrote: >> On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote: >>> On 2022/10/21 13:37, Greg KH wrote: On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: > On 2022-10-20 22:20, Yang

Re: [PATCH] qga: add channel path to error messages

2022-10-21 Thread Bjørn Forsman
On Fri, 21 Oct 2022 at 08:53, Marc-André Lureau wrote: > [...] > Wouldn't it be simpler to modify the g_critical() in ga_channel_new() instead? > > if (!ga_channel_open(c, path, method, listen_fd, )) { > g_critical("Failed to open %s: %s", path, error_get_pretty(err)); Sounds like a

[PATCH V2 1/4] hw/block/nvme: add ZONE_FINISH_RECOMMENDED functionality

2022-10-21 Thread clay.mayers
From: Clay Mayers Adds ns.param.zoned.finish_time, which sets the number of seconds a zone can remain active before the zone attribute ZONE_FINISH_RECOMMENDED is set. This requires scanning the exp open, imp open and closed lists of zones whenever a zone is marked as requiring finishing. The

Re: [QEMU][PATCH 2/5] hw/net/can: Introduce Xilinx Versal CANFD controller

2022-10-21 Thread Vikram Garhwal
Hi Peter, On 9/22/22 7:46 AM, Peter Maydell wrote: On Sat, 10 Sept 2022 at 07:13, Vikram Garhwal wrote: The Xilinx Versal CANFD controller is developed based on SocketCAN, QEMU CAN bus implementation. Bus connection and socketCAN connection for each CAN module can be set through command

[PATCH V2 4/4] hw/block/nvme: add zone descriptor changed AEN

2022-10-21 Thread clay.mayers
From: Clay Mayers If a namespace's param.zoned.finish_time is non-zero, controllers register with the namespace to be notified when entries are added to its zone-descriptor-changed log page. If the zone-descriptor-changed aen is enabled, this will cause an AEN to be sent from that controller.

Re: [PATCH v7 1/8] ppc440_uc.c: Move DDR2 SDRAM controller model to ppc4xx_sdram.c

2022-10-21 Thread Daniel Henrique Barboza
Minimal nit down below: On 10/19/22 13:02, BALATON Zoltan wrote: In order to move PPC4xx SDRAM controller models together move out the DDR2 controller model from ppc440_uc.c into a new ppc4xx_sdram.c file. Signed-off-by: BALATON Zoltan --- hw/ppc/meson.build| 3 +- hw/ppc/ppc440_uc.c

[PATCH V2 0/4] hw/block/nvme: Implement ZNS finish-zone ZDC AEN

2022-10-21 Thread clay.mayers
From: Clay Mayers ZNS controllers have the option to limit the time a zone can remain in the active state. It begins with a background process in the controller setting the finish-zone-recommended FZR attribute for a zone. As part of setting this attribute, the zone's id is added to the

[PATCH V2 3/4] hw/block/nvme: supply dw1 for aen result

2022-10-21 Thread clay.mayers
From: Clay Mayers cqe.dw1 AEN is sometimes required to convey the NSID of the log page to read. This is the case for the zone descriptor changed log page. Signed-off-by: Clay Mayers --- hw/nvme/ctrl.c | 19 +++ hw/nvme/trace-events | 2 +- include/block/nvme.h | 4

[PATCH V2 2/4] hw/block/nvme: add zone descriptor changed log page

2022-10-21 Thread clay.mayers
From: Clay Mayers Zones marked with ZONE_FINISH_RECOMMENDED are added to the zone descriptor changed log page. Once read with RAE cleared, they are removed from the list. Zones stay in the list regardless of what other states the zones may go through so applications must be aware of ABA issues

Re: QEMU Advent Calendar 2022 Call for Images

2022-10-21 Thread Stefan Hajnoczi
On Fri, 21 Oct 2022 at 12:45, Eldon Stegall wrote: > We are working to make QEMU Advent Calendar 2022 happen this year, and > if you have had an interesting experience with QEMU recently, we would > love for you to contribute! Hi Eldon, Count me in for 1 disk image. I will find something cool

[PATCH] ui/gtk: prevent ui lock up when dpy_gl_update called again before current draw event occurs

2022-10-21 Thread Dongwon Kim
A warning, "qemu: warning: console: no gl-unblock within" followed by guest scanout lockup can happen if dpy_gl_update is called in a row and the second call is made before gd_draw_event scheduled by the first call is taking place. This is because draw call returns without decrementing gl_block

Re: [PATCH v4] m68k: write bootinfo as rom section and re-randomize on reboot

2022-10-21 Thread Laurent Vivier
Le 17/10/2022 à 22:29, Jason A. Donenfeld a écrit : Rather than poking directly into RAM, add the bootinfo block as a proper ROM, so that it's restored when rebooting the system. This way, if the guest corrupts any of the bootinfo items, but then tries to reboot, it'll still be restored back to

Re: [PATCH v2] linux-user: Add guest memory layout to exception dump

2022-10-21 Thread Helge Deller
On 10/21/22 17:43, Laurent Vivier wrote: Le 21/10/2022 à 16:57, Laurent Vivier a écrit : Le 27/09/2022 à 18:58, Helge Deller a écrit : When the emulation stops with a hard exception it's very useful for debugging purposes to dump the current guest memory layout (for an example see

[PATCH v3 4/4] hw/usb: fix tab indentation

2022-10-21 Thread Amarjargal Gundjalam
The TABs should be replaced with spaces, to make sure that we have a consistent coding style with an indentation of 4 spaces everywhere. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/370 Reviewed-by: Daniel P. Berrangé Signed-off-by: Amarjargal Gundjalam --- hw/usb/dev-hub.c

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-21 Thread Ani Sinha
On Fri, Oct 21, 2022 at 21:36 Alex Bennée wrote: > > Ani Sinha writes: > > > > > > We have added a mirror of biosbits to the QEMU project so there is no > > reason why we can't track changes and modifications there (we do this > > for TestFloat which is forked from the upstream SoftFloat

RE: [PATCH 4/4] hw/block/nvme: add zone descriptor changed AEN

2022-10-21 Thread Clay Mayers
> From: Klaus Jensen > Sent: Thursday, October 20, 2022 11:41 PM > > On Oct 20 17:18, clay.may...@kioxia.com wrote: > > From: Clay Mayers > > > > If a namespace's param.zoned.finish_time is non-zero, > > controllers register with the namespace to be notified > > when entries are added to its

[PATCH 0/3] Performance optimizations for PPC64

2022-10-21 Thread Leandro Lupori
This patch series contains 2 performance optimizations that target PPC64, although the first one also benefits other archs. In the first optimization, the check for empty breakpoints' queue is moved out of check_for_breakpoints(), into a macro, to avoid the call overhead. In the second

[RFC PATCH] target/arm: don't process FCSE translations on physical TLBs

2022-10-21 Thread Alex Bennée
A recent change to the page table walking code missed checking if we are at the processing the physical translation and bombs attempting to derive the current EL. Fix this by introducing a new helper (regime_is_phys) and extending the check around the FCSE processing. Signed-off-by: Alex Bennée

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-21 Thread Sean Christopherson
On Fri, Oct 21, 2022, Chao Peng wrote: > On Thu, Oct 20, 2022 at 04:20:58PM +0530, Vishal Annapurve wrote: > > On Wed, Oct 19, 2022 at 9:02 PM Kirill A . Shutemov > > wrote: > > > > > > On Tue, Oct 18, 2022 at 07:12:10PM +0530, Vishal Annapurve wrote: > > > > I think moving this

[PATCH qemu.git] target/imx: reload cmp timer outside of the reload ptimer transaction

2022-10-21 Thread ~axelheider
From: Axel Heider Signed-off-by: Axel Heider --- See https://gitlab.com/qemu-project/qemu/-/issues/1263 When running the seL4 tests (https://docs.sel4.systems/projects/sel4test), on the sabrelight platform the timer test fails (and thus it's disabled by default). Investigation has shown that

[PATCH v3 0/4] ui:hw: fix tab indentation

2022-10-21 Thread Amarjargal Gundjalam
V3 addresses the comments put forward by Thomas. V2 actually already addressed the comments by Daniel, but I forgot to update the patch description add his R-b which are all added in this version. Amarjargal Gundjalam (4): ui: fix tab indentation hw/audio: fix tab indentation hw/display:

Re: [PATCH] hw/acpi/erst.c: Fix memset argument order

2022-10-21 Thread Alexander Bulekov
On 221019 2115, Christian A. Ehrhardt wrote: > Fix memset argument order: The second argument is > the value, the length goes last. > > Cc: Eric DeVolder > Cc: qemu-sta...@nongnu.org > Fixes: f7e26ffa590 ("ACPI ERST: support for ACPI ERST feature") > Signed-off-by: Christian A. Ehrhardt > --- >

Re: [BUG] AArch64 boot hang with -icount and -smp >1 (iothread locking issue?)

2022-10-21 Thread Aaron Lindsay
On Oct 21 17:00, Peter Maydell wrote: > On Fri, 21 Oct 2022 at 16:48, Aaron Lindsay > wrote: > > > > Hello, > > > > I am encountering one or more bugs when using -icount and -smp >1 that I am > > attempting to sort out. My current theory is that it is an iothread locking > > issue. > > Weird

Re: [PATCH v7 3/8] ppc4xx_sdram: Move ppc4xx_sdram_banks() to ppc4xx_sdram.c

2022-10-21 Thread Daniel Henrique Barboza
On 10/19/22 13:02, BALATON Zoltan wrote: This function is only used by the ppc4xx memory controller models so it can be made static. Signed-off-by: BALATON Zoltan --- Reviewed-by: Daniel Henrique Barboza hw/ppc/ppc4xx_devs.c| 62 -

[PATCH 2/3] target/ppc: Add new PMC HFLAGS

2022-10-21 Thread Leandro Lupori
Add 2 new PMC related HFLAGS: - HFLAGS_PMCJCE - value of MMCR0 PMCjCE bit - HFLAGS_PMC_OTHER - set if a PMC other than PMC5-6 is enabled These flags allow further optimization of PMC5 update code, by allowing frequently tested conditions to be performed at translation time. Signed-off-by:

[PATCH 1/3] accel/tcg: Add a quicker check for breakpoints

2022-10-21 Thread Leandro Lupori
Profiling QEMU during Fedora 35 for PPC64 boot revealed that a considerable amount of time was being spent in check_for_breakpoints() (0.61% of total time on PPC64 and 2.19% on amd64), even though it was just checking that its queue was empty and returning, when no breakpoints were set. It turns

Re: [PATCH 3/4] meson: enforce a minimum Linux kernel headers version >= 4.18

2022-10-21 Thread Alex Bennée
Daniel P. Berrangé writes: > On Fri, Oct 21, 2022 at 03:38:38PM +0100, Peter Maydell wrote: >> On Fri, 21 Oct 2022 at 15:30, Laurent Vivier wrote: >> > >> > Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : >> > > Various areas of QEMU have a dependency on Linux kernel header >> > >

[RFC PATCH] contrib/plugins: protect execlog's last_exec expansion

2022-10-21 Thread Alex Bennée
We originally naively treated expansion as safe because we expected each new CPU/thread to appear in order. However the -M raspi2 model triggered a case where a new high cpu_index thread started executing just before a smaller one. Clean this up by converting the GArray into the simpler GPtrArray

[PATCH] Revert "accel/tcg: Init TCG cflags in vCPU thread handler"

2022-10-21 Thread Peter Maydell
Commit a82fd5a4ec24d was intended to be a code cleanup, but unfortunately it has a bug. It moves the initialization of the TCG cflags from the "start a new vcpu" function to the thread handler; this is fine when each vcpu has its own thread, but when we are doing round-robin of vcpus on a single

[PATCH v3 2/4] hw/audio: fix tab indentation

2022-10-21 Thread Amarjargal Gundjalam
The TABs should be replaced with spaces, to make sure that we have a consistent coding style with an indentation of 4 spaces everywhere. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/370 Reviewed-by: Daniel P. Berrangé Signed-off-by: Amarjargal Gundjalam --- hw/audio/fmopl.c

[PATCH 3/3] target/ppc: Increment PMC5 with inline insns

2022-10-21 Thread Leandro Lupori
Profiling QEMU during Fedora 35 for PPC64 boot revealed that 6.39% of total time was being spent in helper_insns_inc(), on a POWER9 machine. To avoid calling this helper every time PMCs had to be incremented, an inline implementation of PMC5 increment and check for overflow was developed. This led

Re: [PATCH v7 2/8] ppc4xx_devs.c: Move DDR SDRAM controller model to ppc4xx_sdram.c

2022-10-21 Thread Daniel Henrique Barboza
Reviewed-by: Daniel Henrique Barboza On 10/19/22 13:02, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan --- hw/ppc/ppc4xx_devs.c | 352 hw/ppc/ppc4xx_sdram.c | 365 ++ 2 files changed, 365 insertions(+),

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-21 Thread Ani Sinha
On Fri, Oct 21, 2022 at 21:32 Alex Bennée wrote: > > Ani Sinha writes: > > > On Fri, 21 Oct, 2022, 5:52 pm Ani Sinha, wrote: > > > > On Fri, 21 Oct, 2022, 5:26 pm Alex Bennée, > wrote: > > > > Ani Sinha writes: > > > > > On Fri, Oct 21, 2022 at 3:10 PM Michael S. Tsirkin > wrote: > > >>

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-21 Thread Sean Christopherson
On Fri, Oct 21, 2022, Chao Peng wrote: > > > > In the context of userspace inaccessible memfd, what would be a > > suggested way to enforce NUMA memory policy for physical memory > > allocation? mbind[1] won't work here in absence of virtual address > > range. > > How about set_mempolicy(): >

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-21 Thread Alex Bennée
Ani Sinha writes: > > We have added a mirror of biosbits to the QEMU project so there is no > reason why we can't track changes and modifications there (we do this > for TestFloat which is forked from the upstream SoftFloat code). > > The whole idea was that say an acpi developer added

[PATCH v2] target/arm: Implement FEAT_E0PD

2022-10-21 Thread Peter Maydell
FEAT_E0PD adds new bits E0PD0 and E0PD1 to TCR_EL1, which allow the OS to forbid EL0 access to half of the address space. Since this is an EL0-specific variation on the existing TCR_ELx.{EPD0,EPD1}, we can implement it entirely in aa64_va_parameters(). This requires moving the existing

QEMU Advent Calendar 2022 Call for Images

2022-10-21 Thread Eldon Stegall
Hi, We are working to make QEMU Advent Calendar 2022 happen this year, and if you have had an interesting experience with QEMU recently, we would love for you to contribute! QEMU invocations that showcase new functionality, something cool, bring back retro computing memories, or simply entertain

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-21 Thread Alex Bennée
Ani Sinha writes: > On Fri, 21 Oct, 2022, 5:52 pm Ani Sinha, wrote: > > On Fri, 21 Oct, 2022, 5:26 pm Alex Bennée, wrote: > > Ani Sinha writes: > > > On Fri, Oct 21, 2022 at 3:10 PM Michael S. Tsirkin wrote: > >> > >> On Fri, Oct 21, 2022 at 10:30:09AM +0100, Alex Bennée wrote: > >>

Re: [BUG] AArch64 boot hang with -icount and -smp >1 (iothread locking issue?)

2022-10-21 Thread Peter Maydell
On Fri, 21 Oct 2022 at 16:48, Aaron Lindsay wrote: > > Hello, > > I am encountering one or more bugs when using -icount and -smp >1 that I am > attempting to sort out. My current theory is that it is an iothread locking > issue. Weird coincidence, that is a bug that's been in the tree for months

[RFC PATCH] contrib/plugins: enable debug on CONFIG_DEBUG_TCG

2022-10-21 Thread Alex Bennée
We used to rely on QEMU_CFLAGS to expose the debug flags but now this is synthesised by meson and only available to the main build. Add our own flags if we detect the build has been enabled with CONFIG_DEBUG_TCG (which is the default for --enable-debug anyway). Signed-off-by: Alex Bennée Cc:

[BUG] AArch64 boot hang with -icount and -smp >1 (iothread locking issue?)

2022-10-21 Thread Aaron Lindsay
Hello, I am encountering one or more bugs when using -icount and -smp >1 that I am attempting to sort out. My current theory is that it is an iothread locking issue. I am using a command-line like the following where $kernel is a recent upstream AArch64 Linux kernel Image (I can provide a binary

RE: [PATCH 2/4] hw/block/nvme: add zone descriptor changed log page

2022-10-21 Thread Clay Mayers
> From: Klaus Jensen > Sent: Thursday, October 20, 2022 11:26 PM > > On Okt 20 17:18, clay.may...@kioxia.com wrote: > > From: Clay Mayers > > > > Zones marked with ZONE_FINISH_RECOMMENDED are added to the zone > > descriptor changed log page. Once read with RAE cleared, they are > > removed

Re: [PATCH v2] linux-user: Add guest memory layout to exception dump

2022-10-21 Thread Laurent Vivier
Le 21/10/2022 à 16:57, Laurent Vivier a écrit : Le 27/09/2022 à 18:58, Helge Deller a écrit : When the emulation stops with a hard exception it's very useful for debugging purposes to dump the current guest memory layout (for an example see /proc/self/maps) beside the CPU registers. The

RE: [PATCH 3/4] hw/block/nvme: supply dw1 for aen result

2022-10-21 Thread Clay Mayers
> From: Klaus Jensen > Sent: Thursday, October 20, 2022 10:59 PM > > On Okt 20 17:18, clay.may...@kioxia.com wrote: > > From: Clay Mayers > > > > cqe.dw1 AEN is sometimes required to convey the NSID of the log page > > to read. This is the case for the zone descriptor changed log > > page. > >

Re: [PATCH 3/4] meson: enforce a minimum Linux kernel headers version >= 4.18

2022-10-21 Thread Daniel P . Berrangé
On Fri, Oct 21, 2022 at 04:05:27PM +0100, Peter Maydell wrote: > On Fri, 21 Oct 2022 at 15:50, Daniel P. Berrangé wrote: > > > > On Fri, Oct 21, 2022 at 03:38:38PM +0100, Peter Maydell wrote: > > > On Fri, 21 Oct 2022 at 15:30, Laurent Vivier wrote: > > > > > > > > Le 04/10/2022 à 11:32, Daniel

Re: [PATCH] hw/acpi/erst.c: Fix memset argument order

2022-10-21 Thread Eric DeVolder
On 10/20/22 01:14, Markus Armbruster wrote: "Christian A. Ehrhardt" writes: Fix memset argument order: The second argument is the value, the length goes last. Impact of the bug? Cc: Eric DeVolder Cc: qemu-sta...@nongnu.org Fixes: f7e26ffa590 ("ACPI ERST: support for ACPI ERST

Re: [PATCH] linux-user: Implement faccessat2

2022-10-21 Thread Laurent Vivier
Le 09/10/2022 à 08:08, WANG Xuerui a écrit : User space has been preferring this syscall for a while, due to its closer match with C semantics, and newer platforms such as LoongArch apparently have libc implementations that don't fallback to faccessat so normal access checks are failing without

Re: [PATCH 2/4] linux-user: remove conditionals for many fs.h ioctls

2022-10-21 Thread Laurent Vivier
Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : These ioctls have been defined in linux/fs.h for a long time * BLKGETSIZE64 - <2.6.12 (linux.git epoch) * BLKDISCARD - 2.6.28 (d30a2605be9d5132d95944916e8f578fcfe4f976) * BLKIOMIN - 2.6.32 (ac481c20ef8f6c6f2be75d581863f40c43874ef7)

Re: [PATCH 1/4] linux-user: add more compat ioctl definitions

2022-10-21 Thread Laurent Vivier
Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : GLibc changes prevent us from including linux/fs.h anymore, and we previously adjusted to this in commit 3cd3df2a9584e6f753bb62a0028bd67124ab5532 Author: Daniel P. Berrangé Date: Tue Aug 2 12:41:34 2022 -0400 linux-user: fix

Re: [PATCH v2 2/2] linux-user: don't use AT_EXECFD in do_openat()

2022-10-21 Thread Laurent Vivier
Le 27/09/2022 à 14:43, Laurent Vivier a écrit : AT_EXECFD gives access to the binary file even if it is not readable (only executable). Moreover it can be opened with flags and mode that are not the ones provided by do_openat() caller. And it is not available because loader_exec() has closed

Re: [PATCH v2 1/2] linux-user: handle /proc/self/exe with execve() syscall

2022-10-21 Thread Laurent Vivier
Le 27/09/2022 à 14:43, Laurent Vivier a écrit : If path is /proc/self/exe, use the executable path provided by exec_path. Don't use execfd as it is closed by loader_exec() and otherwise will survive to the exec() syscall and be usable child process. Signed-off-by: Laurent Vivier ---

Re: [PATCH 3/4] meson: enforce a minimum Linux kernel headers version >= 4.18

2022-10-21 Thread Peter Maydell
On Fri, 21 Oct 2022 at 15:50, Daniel P. Berrangé wrote: > > On Fri, Oct 21, 2022 at 03:38:38PM +0100, Peter Maydell wrote: > > On Fri, 21 Oct 2022 at 15:30, Laurent Vivier wrote: > > > > > > Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : > > > > Various areas of QEMU have a dependency on

Re: [PATCH] linux-user: fix pidfd_send_signal()

2022-10-21 Thread Laurent Vivier
Le 05/10/2022 à 18:38, Laurent Vivier a écrit : According to pidfd_send_signal(2), info argument can be a NULL pointer. Fix strace to correctly manage ending comma in parameters. Fixes: cc054c6f13 ("linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls") cc: Helge Deller

Re: [PATCH v2] linux-user: Add guest memory layout to exception dump

2022-10-21 Thread Laurent Vivier
Le 27/09/2022 à 18:58, Helge Deller a écrit : When the emulation stops with a hard exception it's very useful for debugging purposes to dump the current guest memory layout (for an example see /proc/self/maps) beside the CPU registers. The open_self_maps() function provides such a memory dump,

Re: [PULL 12/24] target/arm: Use softmmu tlbs for page table walking

2022-10-21 Thread Alex Bennée
Peter Maydell writes: > From: Richard Henderson > > So far, limit the change to S1_ptw_translate, arm_ldl_ptw, and > arm_ldq_ptw. Use probe_access_full to find the host address, > and if so use a host load. If the probe fails, we've got our > fault info already. On the off chance that page

Re: [PATCH 3/4] meson: enforce a minimum Linux kernel headers version >= 4.18

2022-10-21 Thread Daniel P . Berrangé
On Fri, Oct 21, 2022 at 03:38:38PM +0100, Peter Maydell wrote: > On Fri, 21 Oct 2022 at 15:30, Laurent Vivier wrote: > > > > Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : > > > Various areas of QEMU have a dependency on Linux kernel header > > > definitions. This falls under the scope of

Re: [PATCH 3/4] meson: enforce a minimum Linux kernel headers version >= 4.18

2022-10-21 Thread Peter Maydell
On Fri, 21 Oct 2022 at 15:30, Laurent Vivier wrote: > > Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : > > Various areas of QEMU have a dependency on Linux kernel header > > definitions. This falls under the scope of our supported platforms > > matrix, but historically we've not checked for

Re: [PATCH] linux-user: Fix more MIPS n32 syscall ABI issues

2022-10-21 Thread Laurent Vivier
Le 06/10/2022 à 10:55, WANG Xuerui a écrit : In commit 80f0fe3a85 ("linux-user: Fix syscall parameter handling for MIPS n32") the ABI problem regarding offset64 on MIPS n32 was fixed, but still some cases remain where the n32 is incorrectly treated as any other 32-bit ABI that passes 64-bit

Re: [PATCH v2 7/8] hw/arm/virt: Fix devicetree warnings about the virtio-iommu node

2022-10-21 Thread Jean-Philippe Brucker
On Tue, Sep 27, 2022 at 04:35:25PM +0200, Eric Auger wrote: > >> diff --git a/hw/arm/virt.c b/hw/arm/virt.c > >> index 2de16f6324..5e16d54bbb 100644 > >> --- a/hw/arm/virt.c > >> +++ b/hw/arm/virt.c > >> @@ -1372,14 +1372,15 @@ static void create_smmu(const VirtMachineState > >> *vms, > >> > >>

Re: [PATCH 4/4] linux-user: drop conditionals for obsolete kernel header versions

2022-10-21 Thread Laurent Vivier
Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : Given our newly enforced 4.18 baseline for the kernel headers version, we can drop any conditional checks for older versions. Signed-off-by: Daniel P. Berrangé --- linux-user/linux_loop.h| 4 linux-user/syscall.c | 14

Re: [PATCH 3/4] meson: enforce a minimum Linux kernel headers version >= 4.18

2022-10-21 Thread Laurent Vivier
Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : Various areas of QEMU have a dependency on Linux kernel header definitions. This falls under the scope of our supported platforms matrix, but historically we've not checked for a minimum kernel headers version. This has made it unclear when we

[PATCH v4 1/3] target/ppc: introduce ppc_maybe_interrupt

2022-10-21 Thread Matheus Ferst
This new method will check if any pending interrupt was unmasked and then call cpu_interrupt/cpu_reset_interrupt accordingly. Code that raises/lowers or masks/unmasks interrupts should call this method to keep CPU_INTERRUPT_HARD coherent with env->pending_interrupts. Signed-off-by: Matheus Ferst

[PATCH v4 2/3] target/ppc: unify cpu->has_work based on cs->interrupt_request

2022-10-21 Thread Matheus Ferst
Now that cs->interrupt_request indicates if there is any unmasked interrupt, checking if the CPU has work to do can be simplified to a single check that works for all CPU models. Reviewed-by: Fabiano Rosas Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c | 94

[PATCH v4 3/3] target/ppc: move the p*_interrupt_powersave methods to excp_helper.c

2022-10-21 Thread Matheus Ferst
Move the methods to excp_helper.c and make them static. Reviewed-by: Fabiano Rosas Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c| 102 --- target/ppc/excp_helper.c | 102 +++ target/ppc/internal.h| 6 ---

[PATCH v4 0/3] PowerPC interrupt rework

2022-10-21 Thread Matheus Ferst
This version fixes the problems found by Daniel with e500 tests and rebases on ppc-next. Based-on: https://gitlab.com/danielhb/qemu/-/tree/ppc-next Matheus Ferst (3): target/ppc: introduce ppc_maybe_interrupt target/ppc: unify cpu->has_work based on cs->interrupt_request target/ppc: move

Re: [PATCH v3 00/29] PowerPC interrupt rework

2022-10-21 Thread Matheus K. Ferst
On 21/10/2022 07:56, Daniel Henrique Barboza wrote: Matheus, I did some digging yesterday. There are 2 distinct things happening: - the apparent problem with the avocado test. After doing more and more tests it seems like the test failure rate is lower than 10%. With a simple script to

Re: [PATCH 2/4] linux-user: remove conditionals for many fs.h ioctls

2022-10-21 Thread Laurent Vivier
Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : These ioctls have been defined in linux/fs.h for a long time * BLKGETSIZE64 - <2.6.12 (linux.git epoch) * BLKDISCARD - 2.6.28 (d30a2605be9d5132d95944916e8f578fcfe4f976) * BLKIOMIN - 2.6.32 (ac481c20ef8f6c6f2be75d581863f40c43874ef7)

Re: [PATCH 1/4] linux-user: add more compat ioctl definitions

2022-10-21 Thread Laurent Vivier
Le 04/10/2022 à 11:32, Daniel P. Berrangé a écrit : GLibc changes prevent us from including linux/fs.h anymore, and we previously adjusted to this in commit 3cd3df2a9584e6f753bb62a0028bd67124ab5532 Author: Daniel P. Berrangé Date: Tue Aug 2 12:41:34 2022 -0400 linux-user: fix

Re: [PATCH v2 1/2] util/log: Derive thread id from getpid() on hosts w/o gettid() syscall

2022-10-21 Thread Greg Kurz
On Thu, 20 Oct 2022 12:39:41 +0200 Paolo Bonzini wrote: > On 10/19/22 17:57, Daniel P. Berrangé wrote: > >> +if (my_id == -1) { > >> +my_id = getpid() + qatomic_fetch_inc(); > >> +} > >> +return my_id; > > This doesn't look safe for linux-user when we fork, but don't exec. >

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-21 Thread Chao Peng
On Thu, Oct 20, 2022 at 04:20:58PM +0530, Vishal Annapurve wrote: > On Wed, Oct 19, 2022 at 9:02 PM Kirill A . Shutemov > wrote: > > > > On Tue, Oct 18, 2022 at 07:12:10PM +0530, Vishal Annapurve wrote: > > > On Tue, Oct 18, 2022 at 3:27 AM Kirill A . Shutemov > > > wrote: > > > > > > > > On

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-21 Thread Chao Peng
> > In the context of userspace inaccessible memfd, what would be a > suggested way to enforce NUMA memory policy for physical memory > allocation? mbind[1] won't work here in absence of virtual address > range. How about set_mempolicy():

[PULL 01/11] dump: Use a buffer for ELF section data and headers

2022-10-21 Thread marcandre . lureau
From: Janosch Frank Currently we're writing the NULL section header if we overflow the physical header number in the ELF header. But in the future we'll add custom section headers AND section data. To facilitate this we need to rearange section handling a bit. As with the other ELF headers we

[PULL 05/11] dump: Add architecture section and section string table support

2022-10-21 Thread marcandre . lureau
From: Janosch Frank Add hooks which architectures can use to add arbitrary data to custom sections. Also add a section name string table in order to identify section contents Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Message-Id:

[PULL 03/11] dump: Reorder struct DumpState

2022-10-21 Thread marcandre . lureau
From: Janosch Frank Let's move ELF related members into one block and guest memory related ones into another to improve readability. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau Message-Id: <20221017083822.43118-4-fran...@linux.ibm.com> ---

[PULL 02/11] dump: Write ELF section headers right after ELF header

2022-10-21 Thread marcandre . lureau
From: Janosch Frank Let's start bundling the writes of the headers and of the data so we have a clear ordering between them. Since the ELF header uses offsets to the headers we can freely order them. Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Message-Id:

Re: [PATCH 01/11] kset: fix documentation for kset_register()

2022-10-21 Thread Luben Tuikov
On 2022-10-20 22:20, Yang Yingliang wrote: > kset_register() is currently used in some places without calling > kset_put() in error path, because the callers think it should be > kset internal thing to do, but the driver core can not know what > caller doing with that memory at times. The memory

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Luben Tuikov
On 2022-10-21 04:36, Greg KH wrote: > On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote: >> >> On 2022/10/21 13:37, Greg KH wrote: >>> On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: On 2022-10-20 22:20, Yang Yingliang wrote: > The previous discussion link:

  1   2   3   >