Re: [PATCH] ppc/spapr: Fix ubsan warning with unaligned pointer access

2023-12-21 Thread Alexey Kardashevskiy
On 20/12/2023 12:45, Richard Henderson wrote: On 12/16/23 16:14, Daniel Hoffman wrote: Found while running QTest with UBsan. Unaligned pointers appear to be valid, so moving the read to an explicit memcpy to an intermediate. ---   hw/ppc/vof.c | 5 -   1 file changed, 4 insertions(+), 1

[PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2023-11-21 Thread Alexey Kardashevskiy
to fetch changes up to b6838bf9c01c32bfecd5c446c98e788bbfd467d9: pseries: Update SLOF firmware image (2023-11-21 19:11:31 +1100) Alexey Kardashevskiy (1): pseries: Update SLOF firmware image pc-bios/README | 2 +- pc

[PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2023-09-18 Thread Alexey Kardashevskiy
for you to fetch changes up to b4f872c6bcbf71f60326988c76b240318c51bd16: pseries: Update SLOF firmware image (2023-09-18 19:14:44 +1000) Alexey Kardashevskiy (1): pseries: Update SLOF firmware image pc-bios/README | 2

Re: [PATCH] MAINTAINERS: Nick Piggin PPC maintainer, other PPC changes

2023-09-18 Thread Alexey Kardashevskiy
@@ F: include/hw/pci-host/mv64361.h Virtual Open Firmware (VOF) M: Alexey Kardashevskiy -R: Cédric Le Goater -R: Daniel Henrique Barboza R: David Gibson -R: Greg Kurz L: qemu-...@nongnu.org -S: Maintained +S: Odd Fixes F: hw/ppc/spapr_vof* F: hw/ppc/vof* F: include/hw/ppc/vof

Re: [PATCH v2 02/19] ppc/vof: Fix missed fields in VOF cleanup

2023-08-16 Thread Alexey Kardashevskiy
: Alexey Kardashevskiy Fixes: fc8c745d501 ("spapr: Implement Open Firmware client interface") Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Cool to see it still in use :) --- hw/ppc/vof.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/vof.c b/hw/ppc/v

[PATCH qemu v2] sev/i386: Fix error reporting

2023-04-03 Thread Alexey Kardashevskiy
Error ** to sev_kvm_init()") Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * removed __func__ from afftected lines --- target/i386/sev.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 859e06f6ad..eabb095a69 100

[PATCH qemu] sev/i386: Fix error reporting

2023-04-03 Thread Alexey Kardashevskiy
L. Follow the pattern and use error_setg instead of error_report. Fixes: 9681f8677f26 ("sev/i386: Require in-kernel irqchip support for SEV-ES guests") Fixes: 6b98e96f1842 ("sev/i386: Add initial support for SEV-ES") Fixes: c9f5aaa6bce8 ("sev: Add Error ** to sev_kvm_init()&qu

Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2023-02-21 Thread Alexey Kardashevskiy
On 14/1/23 08:54, Sean Christopherson wrote: On Fri, Dec 02, 2022, Chao Peng wrote: The system call is currently wired up for x86 arch. Building on other architectures (except for arm64 for some reason) yields: CALL/.../scripts/checksyscalls.sh :1565:2: warning: #warning syscall

Re: x86, pflash, unassigned memory access

2022-10-21 Thread Alexey Kardashevskiy
On 18/10/2022 20:56, Philippe Mathieu-Daudé wrote: On 4/10/22 05:00, Alexey Kardashevskiy wrote: Anyone, ping? On 27/09/2022 12:35, Alexey Kardashevskiy wrote: Hi! I am trying qemu-system-x86_64 with OVMF with the q35 machine, the complete command line is below. It works fine

Re: x86, pflash, unassigned memory access

2022-10-03 Thread Alexey Kardashevskiy
Anyone, ping? On 27/09/2022 12:35, Alexey Kardashevskiy wrote: Hi! I am trying qemu-system-x86_64 with OVMF with the q35 machine, the complete command line is below. It works fine (including SEV on AMD EPYC), but these 2 parameters make me wonder if I miss something: -drive if=pflash

x86, pflash, unassigned memory access

2022-09-26 Thread Alexey Kardashevskiy
Hi! I am trying qemu-system-x86_64 with OVMF with the q35 machine, the complete command line is below. It works fine (including SEV on AMD EPYC), but these 2 parameters make me wonder if I miss something: -drive if=pflash,format=raw,unit=0,file=/home/aik/OVMF_CODE.fd,readonly=on,id=MYPF

Re: [PATCH for-7.2 v2 10/20] hw/ppc: set machine->fdt in spapr machine

2022-08-23 Thread Alexey Kardashevskiy
On 22/08/2022 20:30, Daniel Henrique Barboza wrote: On 8/22/22 00:29, Alexey Kardashevskiy wrote: On 22/08/2022 13:05, David Gibson wrote: On Fri, Aug 19, 2022 at 06:42:34AM -0300, Daniel Henrique Barboza wrote: On 8/18/22 23:11, Alexey Kardashevskiy wrote: On 05/08/2022 19:39

Re: [PATCH for-7.2 v2 10/20] hw/ppc: set machine->fdt in spapr machine

2022-08-21 Thread Alexey Kardashevskiy
On 22/08/2022 13:05, David Gibson wrote: On Fri, Aug 19, 2022 at 06:42:34AM -0300, Daniel Henrique Barboza wrote: On 8/18/22 23:11, Alexey Kardashevskiy wrote: On 05/08/2022 19:39, Daniel Henrique Barboza wrote: The pSeries machine never bothered with the common machine->fdt attrib

Re: [PATCH for-7.2 v2 10/20] hw/ppc: set machine->fdt in spapr machine

2022-08-18 Thread Alexey Kardashevskiy
On 05/08/2022 19:39, Daniel Henrique Barboza wrote: The pSeries machine never bothered with the common machine->fdt attribute. We do all the FDT related work using spapr->fdt_blob. We're going to introduce HMP commands to read and save the FDT, which will rely on setting machine->fdt

Re: [PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2022-07-21 Thread Alexey Kardashevskiy
On 21/07/2022 18:48, Peter Maydell wrote: On Thu, 21 Jul 2022 at 09:19, Alexey Kardashevskiy wrote: On 21/07/2022 02:08, Daniel Henrique Barboza wrote: Hey, On 7/19/22 04:59, Alexey Kardashevskiy wrote: Alexey Kardashevskiy (1): pseries: Update SLOF firmware image docs/system

Re: [PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2022-07-21 Thread Alexey Kardashevskiy
On 21/07/2022 02:08, Daniel Henrique Barboza wrote: Hey, On 7/19/22 04:59, Alexey Kardashevskiy wrote: The following changes since commit d2066bc50d690a6605307eaf0e72a9cf51e6fc25:    target/ppc: Check page dir/table base alignment (2022-07-18 13:59:43 -0300) are available in the Git

Re: [PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2022-07-19 Thread Alexey Kardashevskiy
oops wrong maintainer :) On 19/07/2022 17:59, Alexey Kardashevskiy wrote: The following changes since commit d2066bc50d690a6605307eaf0e72a9cf51e6fc25: target/ppc: Check page dir/table base alignment (2022-07-18 13:59:43 -0300) are available in the Git repository at: g

[PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2022-07-19 Thread Alexey Kardashevskiy
to 17c1ad657904787b1d986fb4c85431fee006a6ea: pseries: Update SLOF firmware image (2022-07-19 17:50:46 +1000) Alexey Kardashevskiy (1): pseries: Update SLOF firmware image docs/system/ppc/pseries.rst | 2 +- pc-bios/README

Re: [PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2022-07-18 Thread Alexey Kardashevskiy
I just pushed another update to SLOF but before I do pull request - I usually wait for it to sync up with git.qemu.org but the syncing does not seem happening this time, is that still supposed to work like that with gitlab too? On 10/01/2022 16:04, Alexey Kardashevskiy wrote: The following

[PATCH qemu v3] ppc: Define SETFIELD for the ppc target

2022-06-28 Thread Alexey Kardashevskiy
It keeps repeating, move it to the header. This uses __builtin_ffsll() to allow using the macros in #define. This is not using the QEMU's FIELD macros as this would require changing all such macros found in skiboot (the PPC PowerNV firmware). Signed-off-by: Alexey Kardashevskiy --- Changes: v3

Re: [PATCH qemu v2 1/2] ppc: Define SETFIELD for the ppc target

2022-06-27 Thread Alexey Kardashevskiy
On 6/28/22 04:04, Daniel Henrique Barboza wrote: On 6/27/22 01:54, Alexey Kardashevskiy wrote: On 6/25/22 06:12, Daniel Henrique Barboza wrote: Alexey, The newer version of this patch is having trouble with Gitlab runners, as you can read in my feedback there. I've tested this one

Re: [PATCH qemu v2 1/2] ppc: Define SETFIELD for the ppc target

2022-06-26 Thread Alexey Kardashevskiy
Daniel On 6/17/22 03:07, Alexey Kardashevskiy wrote: It keeps repeating, move it to the header. This uses __builtin_ctzl() to allow using the macros in #define. Signed-off-by: Alexey Kardashevskiy ---   include/hw/pci-host/pnv_phb3_regs.h | 16   target/ppc/cpu.h

[PATCH qemu] spapr/ddw: Implement 64bit query extension

2022-06-23 Thread Alexey Kardashevskiy
ow with 2M pages below the start of the 64bit window as it is the maximum we will see in practice. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_pci.c | 5 +++-- hw/ppc/spapr_rtas_ddw.c | 19 +++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spa

[PATCH qemu v2] spapr/ddw: Reset DMA when the last non-default window is removed

2022-06-21 Thread Alexey Kardashevskiy
=== This resets DMA as PAPR mandates. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * reverted changes to spapr_tce_table_enable() --- include/hw/ppc/spapr.h | 1 + hw/ppc/spapr_iommu.c| 3 ++- hw/ppc/spapr_pci.c | 1 + hw/ppc/spapr_rtas_ddw.c | 15 +++ 4 files

[PATCH qemu v3] ppc/spapr: Implement H_WATCHDOG

2022-06-21 Thread Alexey Kardashevskiy
line: -append \ "pseries-wdt.timeout=60 pseries-wdt.nowayout=1 pseries-wdt.action=2" and running "echo V > /dev/watchdog0" inside the VM. Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * removed @num from SpaprWatchdog * reworked to use standard FIELD_EX/FIELD_OP * ex

[PATCH qemu v2] ppc: Define SETFIELD for the ppc target

2022-06-21 Thread Alexey Kardashevskiy
It keeps repeating, move it to the header. This uses __builtin_ffsl() to allow using the macros in #define. This is not using the QEMU's FIELD macros as this would require changing all such macros found in skiboot (the PPC PowerNV firmware). Signed-off-by: Alexey Kardashevskiy --- Changes: v2

Re: [PATCH qemu] spapr/ddw: Reset DMA when the last non-default window is removed

2022-06-21 Thread Alexey Kardashevskiy
On 6/21/22 23:54, Daniel Henrique Barboza wrote: On 6/20/22 05:01, Alexey Kardashevskiy wrote: PAPR+/LoPAPR says: === The platform must restore the default DMA window for the PE on a call to the ibm,remove-pe-dma-window RTAS call when all of the following are true:   a. The call removes

Re: [PATCH qemu v2 2/2] ppc/spapr: Implement H_WATCHDOG

2022-06-20 Thread Alexey Kardashevskiy
On 6/20/22 16:23, Cédric Le Goater wrote: On 6/20/22 05:13, Alexey Kardashevskiy wrote: On 6/18/22 21:01, Cédric Le Goater wrote: On 6/17/22 08:07, Alexey Kardashevskiy wrote: The new PAPR 2.12 defines a watchdog facility managed via the new H_WATCHDOG hypercall. This adds H_WATCHDOG

Re: [PATCH qemu v2 1/2] ppc: Define SETFIELD for the ppc target

2022-06-20 Thread Alexey Kardashevskiy
On 6/20/22 16:17, Cédric Le Goater wrote: On 6/20/22 05:37, Alexey Kardashevskiy wrote: On 6/18/22 02:50, Daniel Henrique Barboza wrote: On 6/17/22 03:07, Alexey Kardashevskiy wrote: It keeps repeating, move it to the header. This uses __builtin_ctzl() to allow using the macros

[PATCH qemu] spapr/ddw: Reset DMA when the last non-default window is removed

2022-06-20 Thread Alexey Kardashevskiy
=== This resets DMA as PAPR mandates. Signed-off-by: Alexey Kardashevskiy --- include/hw/ppc/spapr.h | 3 ++- hw/ppc/spapr_iommu.c| 8 +--- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_rtas_ddw.c | 17 - hw/ppc/spapr_vio.c | 3 ++- 5 files changed, 26 insertions

Re: [PATCH qemu v2 1/2] ppc: Define SETFIELD for the ppc target

2022-06-19 Thread Alexey Kardashevskiy
On 6/18/22 02:50, Daniel Henrique Barboza wrote: On 6/17/22 03:07, Alexey Kardashevskiy wrote: It keeps repeating, move it to the header. This uses __builtin_ctzl() to allow using the macros in #define. Signed-off-by: Alexey Kardashevskiy --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH qemu v2 2/2] ppc/spapr: Implement H_WATCHDOG

2022-06-19 Thread Alexey Kardashevskiy
On 6/18/22 21:01, Cédric Le Goater wrote: On 6/17/22 08:07, Alexey Kardashevskiy wrote: The new PAPR 2.12 defines a watchdog facility managed via the new H_WATCHDOG hypercall. This adds H_WATCHDOG support which a proposed driver for pseries uses: https://patchwork.ozlabs.org/project

[PATCH qemu v2 1/2] ppc: Define SETFIELD for the ppc target

2022-06-17 Thread Alexey Kardashevskiy
It keeps repeating, move it to the header. This uses __builtin_ctzl() to allow using the macros in #define. Signed-off-by: Alexey Kardashevskiy --- include/hw/pci-host/pnv_phb3_regs.h | 16 target/ppc/cpu.h| 5 + hw/intc/pnv_xive.c | 20

[PATCH qemu v2 0/2] ppc/spapr: Implement H_WATCHDOG

2022-06-17 Thread Alexey Kardashevskiy
This implements H_WATCHDOG. More detailed comments are in the patches. This is based on sha1 96c343cc774b Joel Stanley "linux-user: Add PowerPC ISA 3.1 and MMA to hwcap". Please comment. Thanks. Alexey Kardashevskiy (2): ppc: Define SETFIELD for the ppc target ppc/spapr:

[PATCH qemu v2 2/2] ppc/spapr: Implement H_WATCHDOG

2022-06-17 Thread Alexey Kardashevskiy
line: -append \ "pseries-wdt.timeout=60 pseries-wdt.nowayout=1 pseries-wdt.action=2" and running "echo V > /dev/watchdog0" inside the VM. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * QOM'ed timers, "action" and "expire" are available via QMP *

Re: [PATCH qemu] ppc/spapr: Implement H_WATCHDOG

2022-06-16 Thread Alexey Kardashevskiy
On 6/17/22 04:42, Daniel Henrique Barboza wrote: Hey, As you might have seen in the kernel thread I was unable to test the implementation. The code errors out down there: On 6/8/22 00:01, Alexey Kardashevskiy wrote: The new PAPR 2.12 defines a watchdog facility managed via the new

Re: [PATCH qemu] ppc/spapr: Implement H_WATCHDOG

2022-06-15 Thread Alexey Kardashevskiy
On 6/15/22 14:48, Cédric Le Goater wrote: Hello Alexey, On 6/8/22 05:01, Alexey Kardashevskiy wrote: The new PAPR 2.12 defines a watchdog facility managed via the new H_WATCHDOG hypercall. This adds H_WATCHDOG support which a proposed driver for pseries uses: https://patchwork.ozlabs.org

[PATCH qemu] ppc/spapr: Implement H_WATCHDOG

2022-06-07 Thread Alexey Kardashevskiy
line: -append \ "pseries-wdt.timeout=60 pseries-wdt.nowayout=1 pseries-wdt.action=2" and running "echo V > /dev/watchdog0" inside the VM. Signed-off-by: Alexey Kardashevskiy --- include/hw/ppc/spapr.h | 23 +++- hw/ppc/spapr.c | 5 + hw/ppc

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

2022-05-17 Thread Alexey Kardashevskiy
On 5/18/22 04:58, Daniel Henrique Barboza wrote: Alexey, I had to amend your commit due to Gitlab CI complaining about ... On 5/4/22 03:55, Alexey Kardashevskiy wrote: tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. QEMU loads the kernel at 0x40 by default which

Re: [RFC PATCH qemu] spapr/docs: Add a few words about x-vof

2022-05-13 Thread Alexey Kardashevskiy
On 5/12/22 23:40, Daniel Henrique Barboza wrote: On 5/12/22 00:10, Alexey Kardashevskiy wrote: On 5/12/22 06:42, Daniel Henrique Barboza wrote: On 5/6/22 02:51, Alexey Kardashevskiy wrote: The alternative small firmware needs a few words of what it can and absolutely cannot do

Re: [RFC PATCH qemu] spapr/docs: Add a few words about x-vof

2022-05-11 Thread Alexey Kardashevskiy
On 5/12/22 06:42, Daniel Henrique Barboza wrote: On 5/6/22 02:51, Alexey Kardashevskiy wrote: The alternative small firmware needs a few words of what it can and absolutely cannot do; this adds those words. Signed-off-by: Alexey Kardashevskiy ---   docs/system/ppc/pseries.rst | 28

[RFC PATCH qemu] spapr/docs: Add a few words about x-vof

2022-05-05 Thread Alexey Kardashevskiy
The alternative small firmware needs a few words of what it can and absolutely cannot do; this adds those words. Signed-off-by: Alexey Kardashevskiy --- docs/system/ppc/pseries.rst | 28 1 file changed, 28 insertions(+) diff --git a/docs/system/ppc/pseries.rst b

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

2022-05-05 Thread Alexey Kardashevskiy
On 06/05/2022 01:50, Fabiano Rosas wrote: Alexey Kardashevskiy writes: On 5/5/22 05:16, Fabiano Rosas wrote: Alexey Kardashevskiy writes: tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. QEMU loads the kernel at 0x40 by default which works most of the time

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

2022-05-04 Thread Alexey Kardashevskiy
On 5/5/22 14:16, Joel Stanley wrote: On Thu, 5 May 2022 at 03:31, Alexey Kardashevskiy wrote: On 5/5/22 05:16, Fabiano Rosas wrote: Alexey Kardashevskiy writes: tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. QEMU loads the kernel at 0x40 by default which

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

2022-05-04 Thread Alexey Kardashevskiy
On 5/5/22 05:16, Fabiano Rosas wrote: Alexey Kardashevskiy writes: tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. QEMU loads the kernel at 0x40 by default which works most of the time as Linux kernels are relocatable, 64bit and compiled with "-pie"

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

2022-05-04 Thread Alexey Kardashevskiy
zImage as SLOF enables MSR_SF for everything loaded by QEMU and this leads to early crash of 32bit zImage. Note #2: BE/LE vmlinux images set MSR_SF in early boot so these just work; a LE zImage restores MSR_SF after every CI call and we are lucky enough not to crash before the first CI call.

Re: [PATCH qemu] spapr_pci: Disable IRQFD resampling on XIVE

2022-04-28 Thread Alexey Kardashevskiy
On 4/28/22 16:25, Cédric Le Goater wrote: On 4/28/22 07:32, Alexey Kardashevskiy wrote: On 4/27/22 17:36, Cédric Le Goater wrote: Hello Alexey, On 4/27/22 06:36, Alexey Kardashevskiy wrote: VFIO-PCI has an "KVM_IRQFD_FLAG_RESAMPLE" optimization for INTx EOI handling when KVM

Re: [PATCH qemu] spapr_pci: Disable IRQFD resampling on XIVE

2022-04-27 Thread Alexey Kardashevskiy
On 4/27/22 17:36, Cédric Le Goater wrote: Hello Alexey, On 4/27/22 06:36, Alexey Kardashevskiy wrote: VFIO-PCI has an "KVM_IRQFD_FLAG_RESAMPLE" optimization for INTx EOI handling when KVM can unmask PCI INTx (level triggered interrupt) without switching to the userspa

[PATCH qemu] spapr_pci: Disable IRQFD resampling on XIVE

2022-04-26 Thread Alexey Kardashevskiy
gured. This should not be very visible though KVM already exits to QEMU for INTx and XIVE-capable boxes (POWER9 and newer) do not seem to have performance-critical INTx-only capable devices. Signed-off-by: Alexey Kardashevskiy --- Cédric, this is what I meant when I said that spapr_pci.c was unawa

Re: XIVE VFIO kernel resample failure in INTx mode under heavy load

2022-04-20 Thread Alexey Kardashevskiy
On 14/04/2022 22:41, Cédric Le Goater wrote: After re-reading what I just wrote, I am leaning towards disabling use of KVM_CAP_IRQFD_RESAMPLE as it seems last worked on POWER8 and never since :) Did I miss something in the picture (hey Cedric)? How about disabling it like this? =

Re: XIVE VFIO kernel resample failure in INTx mode under heavy load

2022-04-18 Thread Alexey Kardashevskiy
On 14/04/2022 22:31, Cédric Le Goater wrote: Hello Alexey, Thanks for taking over. On 4/13/22 06:56, Alexey Kardashevskiy wrote: On 3/17/22 06:16, Cédric Le Goater wrote: Timothy, On 3/16/22 17:29, Cédric Le Goater wrote: Hello, I've been struggling for some time with what

Re: XIVE VFIO kernel resample failure in INTx mode under heavy load

2022-04-13 Thread Alexey Kardashevskiy
On 4/13/22 14:56, Alexey Kardashevskiy wrote: On 3/17/22 06:16, Cédric Le Goater wrote: Timothy, On 3/16/22 17:29, Cédric Le Goater wrote: Hello, I've been struggling for some time with what is looking like a potential bug in QEMU/KVM on the POWER9 platform.  It appears that in XIVE

Re: XIVE VFIO kernel resample failure in INTx mode under heavy load

2022-04-12 Thread Alexey Kardashevskiy
On 3/17/22 06:16, Cédric Le Goater wrote: Timothy, On 3/16/22 17:29, Cédric Le Goater wrote: Hello, I've been struggling for some time with what is looking like a potential bug in QEMU/KVM on the POWER9 platform.  It appears that in XIVE mode, when the in-kernel IRQ chip is enabled, an

Re: [PATCH qemu] ppc/spapr/ddw: Add 2M pagesize

2022-04-06 Thread Alexey Kardashevskiy
On 21/03/2022 18:19, Alexey Kardashevskiy wrote: Recently the LoPAPR spec got a new 2MB pagesize to support in Dynamic DMA Windows API (DDW), this adds the new flag. Linux supports it since https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=38727311871 Signed-off

[PATCH qemu] ppc/vof: Fix uninitialized string tracing

2022-04-05 Thread Alexey Kardashevskiy
There are error paths which do not initialize propname but the trace_exit label prints it anyway. This initializes the problem string. Spotted by Coverity CID 1487241. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/vof.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw

Re: XIVE VFIO kernel resample failure in INTx mode under heavy load

2022-03-22 Thread Alexey Kardashevskiy
On 15/03/2022 09:09, Alex Williamson wrote: [Cc +Alexey] On Fri, 11 Mar 2022 12:35:45 -0600 (CST) Timothy Pearson wrote: All, I've been struggling for some time with what is looking like a potential bug in QEMU/KVM on the POWER9 platform. It appears that in XIVE mode, when the in-kernel

[PATCH qemu] ppc/spapr/ddw: Add 2M pagesize

2022-03-21 Thread Alexey Kardashevskiy
Recently the LoPAPR spec got a new 2MB pagesize to support in Dynamic DMA Windows API (DDW), this adds the new flag. Linux supports it since https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=38727311871 Signed-off-by: Alexey Kardashevskiy --- PHYP added support

Re: [PATCH v4 07/18] ppc/pnv: Add a HOMER model to POWER10

2022-03-10 Thread Alexey Kardashevskiy
What is that HOMER thing anyway? skiboot and qemu mention it a lot but I cannot find traces in any available spec. On 3/1/22 02:52, Cédric Le Goater wrote: Reviewed-by: David Gibson Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 10 ++ include/hw/ppc/pnv_homer.h |

Re: [PATCH v3 1/4] target/ppc: Fix masked PVR matching

2022-03-10 Thread Alexey Kardashevskiy
On 3/7/22 17:55, Nicholas Piggin wrote: The pvr_match for a CPU class is not supposed to just match for any CPU in the family, but rather whether this particular CPU class is the best match in the family. Prior to this fix, e.g., a POWER9 DD2.3 KVM host matches to the power9_v1.0 class

[PATCH qemu] spapr/vof: Install rom and nvram binaries

2022-02-08 Thread Alexey Kardashevskiy
This installs VOF-related binaries (the firmware and the preformatted NVRAM) as those were left out when the VOF was submitted initially. Fixes: fc8c745d5015 ("spapr: Implement Open Firmware client interface") Signed-off-by: Alexey Kardashevskiy --- pc-bios/meson.build | 2 ++ 1 file

Re: [PATCH qemu] spapr: Force 32bit when resetting a core

2022-01-18 Thread Alexey Kardashevskiy
On 1/17/22 03:45, Peter Maydell wrote: On Fri, 7 Jan 2022 at 07:29, Alexey Kardashevskiy wrote: "PowerPC Processor binding to IEEE 1275" says in "8.2.1. Initial Register Values" that the initial state is defined as 32bit so do it for both SLOF and VOF. This should

[PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2022-01-09 Thread Alexey Kardashevskiy
changes up to 1c127fa8e2ff2b034ebf8e50faea2bbc5136afd2: pseries: Update SLOF firmware image (2022-01-10 15:31:14 +1100) Alexey Kardashevskiy (1): pseries: Update SLOF firmware image pc-bios/README | 2 +- pc-bios/slof.bin

Re: [PATCH qemu] spapr: Force 32bit when resetting a core

2022-01-09 Thread Alexey Kardashevskiy
On 08/01/2022 00:39, Greg Kurz wrote: On Fri, 7 Jan 2022 23:19:03 +1100 David Gibson wrote: On Fri, Jan 07, 2022 at 12:57:47PM +0100, Greg Kurz wrote: On Fri, 7 Jan 2022 18:24:23 +1100 Alexey Kardashevskiy wrote: "PowerPC Processor binding to IEEE 1275" says in "8.2.1. I

[PATCH qemu] spapr: Force 32bit when resetting a core

2022-01-06 Thread Alexey Kardashevskiy
his drops it for VOF. The goal is to make VOF work with TCG as otherwise it barfs with qemu: fatal: TCG hflags mismatch (current:0x6c04 rebuilt:0x6c00) Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_cpu_core.c | 5 + hw/ppc/spapr_vof.c | 2 -- 2 files changed, 5 insert

Re: [PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2021-11-16 Thread Alexey Kardashevskiy
On 17/11/2021 04:28, Richard Henderson wrote: On 11/16/21 6:12 PM, Philippe Mathieu-Daudé wrote: On 11/16/21 17:46, Cédric Le Goater wrote: On 11/14/21 01:51, Alexey Kardashevskiy wrote: The following changes since commit d139786e1b3d67991e6cb49a8a59bb2182350285:     ppc/mmu_helper.c: do

[PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2021-11-13 Thread Alexey Kardashevskiy
changes up to 73944a4bf4ab259b489af8128b4aec525484d642: pseries: Update SLOF firmware image (2021-11-13 14:47:56 +1100) Alexey Kardashevskiy (1): pseries: Update SLOF firmware image pc-bios/README | 2 +- pc-bios/slof.bin

Re: [PATCH v3 0/7] Reduce load on ppc target maintainers

2021-10-06 Thread Alexey Kardashevskiy
On 30/09/2021 11:15, David Gibson wrote: > On Mon, Sep 27, 2021 at 02:48:01PM +1000, David Gibson wrote: >> Greg Kurz and myself have been co-maintainers for the ppc and ppc64 >> targets for some time now. However, both our day job responsibilities >> and interests are leading us towards other

Re: Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms)

2021-10-05 Thread Alexey Kardashevskiy
On 05/10/2021 17:42, Thomas Huth wrote: On 05/10/2021 08.18, Alexey Kardashevskiy wrote: On 05/10/2021 15:44, Christophe Leroy wrote: Le 05/10/2021 à 02:48, David Gibson a écrit : On Fri, Oct 01, 2021 at 04:18:49PM +0200, Thomas Huth wrote: On 01/10/2021 15.04, Christophe Leroy wrote

Re: Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms)

2021-10-05 Thread Alexey Kardashevskiy
On 05/10/2021 15:44, Christophe Leroy wrote: Le 05/10/2021 à 02:48, David Gibson a écrit : On Fri, Oct 01, 2021 at 04:18:49PM +0200, Thomas Huth wrote: On 01/10/2021 15.04, Christophe Leroy wrote: Le 01/10/2021 à 14:04, Thomas Huth a écrit : On 01/10/2021 13.12, Peter Maydell wrote:

[PATCH qemu v2] ppc/vof: Fix Coverity issues

2021-07-19 Thread Alexey Kardashevskiy
is above 4GB as the client interface is 32bit. This still allows claiming memory above 4GB as potentially initrd can be put there and the client can read the address from the FDT's "available" property. Fixes: CID 1458139, 1458138, 1458137, 1458133, 1458132 Signed-off-by: Alexey Kardash

Re: [PATCH qemu] ppc/vof: Fix Coverity issues

2021-07-19 Thread Alexey Kardashevskiy
On 7/19/21 13:57, David Gibson wrote: On Tue, Jul 13, 2021 at 11:46:38PM +1000, Alexey Kardashevskiy wrote: This fixes NEGATIVE_RETURNS, OVERRUN issues reported by the Coverity. This adds a comment about the return parameters number in the VOF hcall. The reason for such counting is to keep

[PATCH qemu] ppc/vof: Fix Coverity issues

2021-07-13 Thread Alexey Kardashevskiy
This fixes NEGATIVE_RETURNS, OVERRUN issues reported by the Coverity. This adds a comment about the return parameters number in the VOF hcall. The reason for such counting is to keep the numbers look the same in vof_client_handle() and the Linux (an OF client). Signed-off-by: Alexey

[PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2021-07-11 Thread Alexey Kardashevskiy
to 13a20db82f3d177a348ac9839e30ece66dfa40f7: pseries: Update SLOF firmware image (2021-07-12 00:05:05 +1000) Alexey Kardashevskiy (1): pseries: Update SLOF firmware image pc-bios/README | 2 +- pc-bios/slof.bin | Bin 96 -> 991

Re: [PATCH qemu v23] spapr: Fix implementation of Open Firmware client interface

2021-07-09 Thread Alexey Kardashevskiy
On 09/07/2021 23:28, BALATON Zoltan wrote: On Fri, 9 Jul 2021, Alexey Kardashevskiy wrote: On 09/07/2021 08:34, BALATON Zoltan wrote: MorphOS still boots but this breaks Linux which changes a few things in the device tree to fix it up to make it look the way it thinks is better. What

Re: [PATCH qemu v23] spapr: Fix implementation of Open Firmware client interface

2021-07-08 Thread Alexey Kardashevskiy
On 09/07/2021 08:34, BALATON Zoltan wrote: On Thu, 8 Jul 2021, Alexey Kardashevskiy wrote: This addresses the comments from v22. The functional changes are (the VOF ones need retesting with Pegasos2): (VOF) setprop will start failing if the machine class callback did not handle it; (VOF

Re: [PATCH qemu v23] spapr: Fix implementation of Open Firmware client interface

2021-07-08 Thread Alexey Kardashevskiy
On 08/07/2021 20:39, BALATON Zoltan wrote: On Thu, 8 Jul 2021, Alexey Kardashevskiy wrote: On 08/07/2021 20:18, BALATON Zoltan wrote: On Thu, 8 Jul 2021, Alexey Kardashevskiy wrote: This addresses the comments from v22. The functional changes are (the VOF ones need retesting with Pegasos2

Re: [PATCH qemu v23] spapr: Fix implementation of Open Firmware client interface

2021-07-08 Thread Alexey Kardashevskiy
On 08/07/2021 20:18, BALATON Zoltan wrote: On Thu, 8 Jul 2021, Alexey Kardashevskiy wrote: This addresses the comments from v22. The functional changes are (the VOF ones need retesting with Pegasos2): (VOF) setprop will start failing if the machine class callback did not handle it; I'll

[PATCH qemu v23] spapr: Fix implementation of Open Firmware client interface

2021-07-08 Thread Alexey Kardashevskiy
kernel_cmdline if the client did not change it. Fixes: 5c991e5d4378 ("spapr: Implement Open Firmware client interface") Cc: BALATON Zoltan Signed-off-by: Alexey Kardashevskiy --- include/hw/ppc/spapr.h | 3 +-- pc-bios/vof/vof.h | 2 -- hw/ppc/spapr.c | 10 +---

Re: [PATCH qemu v22] spapr: Implement Open Firmware client interface

2021-07-08 Thread Alexey Kardashevskiy
On 08/07/2021 12:40, David Gibson wrote: [snip] +static uint32_t vof_getprop(const void *fdt, uint32_t nodeph, uint32_t pname, +uint32_t valaddr, uint32_t vallen) +{ +char propname[OF_PROPNAME_LEN_MAX + 1]; +uint32_t ret = 0; +int proplen = 0; +

Re: [PATCH qemu v22] spapr: Implement Open Firmware client interface

2021-07-07 Thread Alexey Kardashevskiy
On 08/07/2021 12:40, David Gibson wrote: On Fri, Jun 25, 2021 at 03:51:55PM +1000, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware

Re: [PATCH qemu v22] spapr: Implement Open Firmware client interface

2021-06-27 Thread Alexey Kardashevskiy
On 6/28/21 02:38, BALATON Zoltan wrote: On Fri, 25 Jun 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware and the hypervisor

[PATCH qemu v22] spapr: Implement Open Firmware client interface

2021-06-24 Thread Alexey Kardashevskiy
nds such as blockdev or netdev without devices/drivers used. Signed-off-by: Alexey Kardashevskiy --- The example command line is: /home/aik/pbuild/qemu-killslof-localhost-ppc64/qemu-system-ppc64 \ -nodefaults \ -chardev stdio,id=STDIO0,signal=off,mux=on \ -device spapr-vty,id=svty0,reg=0

Re: [PATCH qemu v21] spapr: Implement Open Firmware client interface

2021-06-22 Thread Alexey Kardashevskiy
On 6/18/21 20:13, BALATON Zoltan wrote: On Fri, 18 Jun 2021, Alexey Kardashevskiy wrote: On 6/17/21 21:29, BALATON Zoltan wrote: On Thu, 17 Jun 2021, Alexey Kardashevskiy wrote: On 17/06/2021 19:16, BALATON Zoltan wrote: On Thu, 17 Jun 2021, Alexey Kardashevskiy wrote: On 16/06/2021 20

[PATCH qemu] spapr: tune rtas-size

2021-06-22 Thread Alexey Kardashevskiy
Reset delivery") Signed-off-by: Alexey Kardashevskiy --- Alternatively SLOF could add hv_rtas_size to the property itself but splitting calculations between 2 chunks of code seems an overkill. The RTAS blob has always been 20 bytes and unlikely to ever change. --- include/hw/ppc/spapr.h | 2

Re: [PATCH qemu v21] spapr: Implement Open Firmware client interface

2021-06-17 Thread Alexey Kardashevskiy
On 6/17/21 21:29, BALATON Zoltan wrote: On Thu, 17 Jun 2021, Alexey Kardashevskiy wrote: On 17/06/2021 19:16, BALATON Zoltan wrote: On Thu, 17 Jun 2021, Alexey Kardashevskiy wrote: On 16/06/2021 20:34, BALATON Zoltan wrote: On Wed, 16 Jun 2021, Alexey Kardashevskiy wrote: On 6/15/21 20

Re: [PATCH qemu v21] spapr: Implement Open Firmware client interface

2021-06-17 Thread Alexey Kardashevskiy
On 17/06/2021 19:16, BALATON Zoltan wrote: On Thu, 17 Jun 2021, Alexey Kardashevskiy wrote: On 16/06/2021 20:34, BALATON Zoltan wrote: On Wed, 16 Jun 2021, Alexey Kardashevskiy wrote: On 6/15/21 20:29, BALATON Zoltan wrote: On Tue, 15 Jun 2021, Alexey Kardashevskiy wrote: The PAPR

Re: [PATCH qemu v21] spapr: Implement Open Firmware client interface

2021-06-16 Thread Alexey Kardashevskiy
On 16/06/2021 20:26, BALATON Zoltan wrote: On Wed, 16 Jun 2021, Alexey Kardashevskiy wrote: On 6/16/21 07:09, BALATON Zoltan wrote: On Tue, 15 Jun 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware

Re: [PATCH qemu v21] spapr: Implement Open Firmware client interface

2021-06-16 Thread Alexey Kardashevskiy
On 16/06/2021 20:34, BALATON Zoltan wrote: On Wed, 16 Jun 2021, Alexey Kardashevskiy wrote: On 6/15/21 20:29, BALATON Zoltan wrote: On Tue, 15 Jun 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware

Re: [PATCH qemu v21] spapr: Implement Open Firmware client interface

2021-06-16 Thread Alexey Kardashevskiy
On 6/15/21 20:29, BALATON Zoltan wrote: On Tue, 15 Jun 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware and the hypervisor

Re: [PATCH qemu v21] spapr: Implement Open Firmware client interface

2021-06-16 Thread Alexey Kardashevskiy
On 6/16/21 07:09, BALATON Zoltan wrote: On Tue, 15 Jun 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware. The features it specifies require collaboration between the firmware and the hypervisor

Re: [RFC PATCH 4/5] ppc/pegasos2: Use Virtual Open Firmware as firmware replacement

2021-06-15 Thread Alexey Kardashevskiy
On 6/15/21 19:44, BALATON Zoltan wrote: On Tue, 15 Jun 2021, Alexey Kardashevskiy wrote: On 6/7/21 01:46, BALATON Zoltan wrote: The pegasos2 board comes with an Open Firmware compliant ROM based on SmartFirmware but it has some changes that are not open source therefore the ROM binary

Re: [RFC PATCH 4/5] ppc/pegasos2: Use Virtual Open Firmware as firmware replacement

2021-06-15 Thread Alexey Kardashevskiy
On 6/7/21 01:46, BALATON Zoltan wrote: The pegasos2 board comes with an Open Firmware compliant ROM based on SmartFirmware but it has some changes that are not open source therefore the ROM binary cannot be included in QEMU. Guests running on the board however depend on services provided by

[PATCH qemu v21] spapr: Implement Open Firmware client interface

2021-06-15 Thread Alexey Kardashevskiy
ble-vof to ./configure to enable it. This assumes potential support for booting from QEMU backends such as blockdev or netdev without devices/drivers used. Signed-off-by: Alexey Kardashevskiy --- The example command line is: /home/aik/pbuild/qemu-killslof-localhost-ppc64/qemu-system-ppc64

Re: [RFC PATCH 0/5] ppc/Pegasos2 VOF

2021-06-10 Thread Alexey Kardashevskiy
On 6/9/21 20:28, BALATON Zoltan wrote: On Wed, 9 Jun 2021, Alexey Kardashevskiy wrote: On 6/7/21 01:46, BALATON Zoltan wrote: Based-on: <20210520090557.435689-1-...@ozlabs.ru> ^ That is v20 of Alexey's VOF patch Hello, Posting these for early review now. I plan to rebase on the ne

Re: [RFC PATCH 0/5] ppc/Pegasos2 VOF

2021-06-09 Thread Alexey Kardashevskiy
On 6/7/21 01:46, BALATON Zoltan wrote: Based-on: <20210520090557.435689-1-...@ozlabs.ru> ^ That is v20 of Alexey's VOF patch Hello, Posting these for early review now. I plan to rebase on the next VOF patch that hopefully fixes those points that I had to circumvent in patch 1 for now. I've

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-06-09 Thread Alexey Kardashevskiy
On 6/7/21 13:05, David Gibson wrote: On Fri, Jun 04, 2021 at 03:50:28PM +0200, BALATON Zoltan wrote: On Fri, 4 Jun 2021, David Gibson wrote: On Sun, May 30, 2021 at 07:33:01PM +0200, BALATON Zoltan wrote: [snip] MorphOS checks the name property of the root node ("/") to decide what

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-06-08 Thread Alexey Kardashevskiy
On 6/8/21 08:54, BALATON Zoltan wrote: On Mon, 7 Jun 2021, David Gibson wrote: On Fri, Jun 04, 2021 at 03:59:22PM +0200, BALATON Zoltan wrote: On Fri, 4 Jun 2021, David Gibson wrote: On Wed, Jun 02, 2021 at 02:29:29PM +0200, BALATON Zoltan wrote: On Wed, 2 Jun 2021, David Gibson wrote:

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-06-01 Thread Alexey Kardashevskiy
On 31/05/2021 23:07, BALATON Zoltan wrote: On Sun, 30 May 2021, BALATON Zoltan wrote: On Thu, 20 May 2021, Alexey Kardashevskiy wrote: diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c new file mode 100644 index ..a283b7d251a7 --- /dev/null +++ b/hw/ppc/vof.c @@ -0,0 +1,1021

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-05-24 Thread Alexey Kardashevskiy
On 24/05/2021 20:55, BALATON Zoltan wrote: On Mon, 24 May 2021, David Gibson wrote: On Sun, May 23, 2021 at 07:09:26PM +0200, BALATON Zoltan wrote: On Sun, 23 May 2021, BALATON Zoltan wrote: On Sun, 23 May 2021, Alexey Kardashevskiy wrote: One thing to note about PCI is that normally I

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-05-23 Thread Alexey Kardashevskiy
On 5/23/21 21:24, BALATON Zoltan wrote: On Sun, 23 May 2021, Alexey Kardashevskiy wrote: On 23/05/2021 01:02, BALATON Zoltan wrote: On Sat, 22 May 2021, BALATON Zoltan wrote: On Sat, 22 May 2021, Alexey Kardashevskiy wrote: VOF itself does not prints anything in this patch. However

  1   2   3   4   5   6   7   8   9   10   >