[PATCH qemu v7 1/5] ppc/spapr: Move GPRs setup to one place

2020-02-19 Thread Alexey Kardashevskiy
mlinux can find this from the device tree but zImage from distro kernels cannot). This extends spapr_cpu_set_entry_state() to take more registers. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy --- Changes: v7: * removed r5 as it points to prom entry which is now pro

[PATCH qemu v7 5/5] spapr/vof: Add basic support for MBR/GPT/GRUB

2020-02-19 Thread Alexey Kardashevskiy
This hooks up disks to block backends so vof.bin can read MBR/GPT, find a bootloader and run it. This bypasses the device drivers and goes straight to the backend. This implements basic support for 32bit big endian bootloader; tested on GRUB. Signed-off-by: Alexey Kardashevskiy --- pc-bios/vof

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

2020-02-19 Thread Alexey Kardashevskiy
On 19/02/2020 18:18, Cédric Le Goater wrote: > On 2/19/20 7:44 AM, Alexey Kardashevskiy wrote: >> >> >> On 19/02/2020 12:20, Alexey Kardashevskiy wrote: >>> >>> >>> On 18/02/2020 23:59, Cédric Le Goater wrote: >>>> On 2/18/20 1:48 PM,

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

2020-02-18 Thread Alexey Kardashevskiy
On 19/02/2020 12:20, Alexey Kardashevskiy wrote: > > > On 18/02/2020 23:59, Cédric Le Goater wrote: >> On 2/18/20 1:48 PM, Cédric Le Goater wrote: >>> On 2/18/20 10:40 AM, Cédric Le Goater wrote: >>>> On 2/18/20 10:10 AM, Alexey Kardashevskiy wrote: &

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

2020-02-18 Thread Alexey Kardashevskiy
On 18/02/2020 23:59, Cédric Le Goater wrote: > On 2/18/20 1:48 PM, Cédric Le Goater wrote: >> On 2/18/20 10:40 AM, Cédric Le Goater wrote: >>> On 2/18/20 10:10 AM, Alexey Kardashevskiy wrote: >>>> >>>> >>>> On 18/02/2020 20:05, Alexey Kard

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

2020-02-18 Thread Alexey Kardashevskiy
On 18/02/2020 20:05, Alexey Kardashevskiy wrote: > > > On 18/02/2020 18:12, Cédric Le Goater wrote: >> On 2/18/20 1:30 AM, Alexey Kardashevskiy wrote: >>> >>> >>> On 17/02/2020 20:48, Cédric Le Goater wrote: >>>> On 2/17/20 3:12 AM, A

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

2020-02-18 Thread Alexey Kardashevskiy
On 18/02/2020 18:12, Cédric Le Goater wrote: > On 2/18/20 1:30 AM, Alexey Kardashevskiy wrote: >> >> >> On 17/02/2020 20:48, Cédric Le Goater wrote: >>> On 2/17/20 3:12 AM, Alexey Kardashevskiy wrote: >>>> The following changes since commit >

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

2020-02-17 Thread Alexey Kardashevskiy
On 17/02/2020 20:26, Philippe Mathieu-Daudé wrote: > Hi Alexey, > > On 2/17/20 3:12 AM, Alexey Kardashevskiy wrote: >> The following changes since commit >> 05943fb4ca41f626078014c0327781815c6584c5: >> >>    ppc: free 'fdt' after reset the ma

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

2020-02-17 Thread Alexey Kardashevskiy
On 17/02/2020 20:48, Cédric Le Goater wrote: > On 2/17/20 3:12 AM, Alexey Kardashevskiy wrote: >> The following changes since commit 05943fb4ca41f626078014c0327781815c6584c5: >> >> ppc: free 'fdt' after reset the machine (2020-02-17 11:27:23 +1100) >> >

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

2020-02-16 Thread Alexey Kardashevskiy
nges up to ea9a03e5aa023c5391bab5259898475d0298aac2: pseries: Update SLOF firmware image (2020-02-17 13:08:59 +1100) -------- Alexey Kardashevskiy (1): pseries: Update SLOF firmware image pc-bios/README | 2 +- pc-bios/slof.bin | Bin 931032 ->

Re: BIOS updates

2020-02-16 Thread Alexey Kardashevskiy
On 17/02/2020 12:27, Alexey Kardashevskiy wrote: > Hi! > > We have a SLOF repo mirrored at git.qemu.org. Once I push an update to > my github repo, it gets mirrored soon, it works fine. > > Now to the problems :) > > 1. by accident I pushed a branch with a lot of debu

BIOS updates

2020-02-16 Thread Alexey Kardashevskiy
Hi! We have a SLOF repo mirrored at git.qemu.org. Once I push an update to my github repo, it gets mirrored soon, it works fine. Now to the problems :) 1. by accident I pushed a branch with a lot of debug stuff on top. When I noticed, I force-pushed the correct one but it was too late - the inco

Re: VW ELF loader

2020-02-13 Thread Alexey Kardashevskiy
On 13/02/2020 21:17, Paolo Bonzini wrote: > On 13/02/20 02:43, Alexey Kardashevskiy wrote: >> >> Ok. So, I have made a small firmware which does OF CI, loads GRUB and >> instantiates RTAS: >> https://github.com/aik/of1275 >> Quite raw but gives the idea. >

Re: Question about (and problem with) pflash data access

2020-02-12 Thread Alexey Kardashevskiy
On 13/02/2020 10:50, Philippe Mathieu-Daudé wrote: > Cc'ing Paolo and Alexey. > > On 2/13/20 12:09 AM, Guenter Roeck wrote: >> On Wed, Feb 12, 2020 at 10:39:30PM +0100, Philippe Mathieu-Daudé wrote: >>> Cc'ing Jean-Christophe and Peter. >>> >>> On 2/12/20 7:46 PM, Guenter Roeck wrote: Hi,

Re: [PATCH qemu v6 1/6] ppc: Start CPU in the default mode which is big-endian 32bit

2020-02-12 Thread Alexey Kardashevskiy
On 12/02/2020 16:43, David Gibson wrote: > On Mon, Feb 03, 2020 at 02:29:38PM +1100, Alexey Kardashevskiy wrote: >> At the moment we enforce 64bit mode on a CPU when reset. This does not >> make difference as SLOF or Linux set the desired mode straight away. >> However if w

Re: VW ELF loader

2020-02-12 Thread Alexey Kardashevskiy
On 10/02/2020 11:31, Alexey Kardashevskiy wrote: > > > On 07/02/2020 10:46, Paolo Bonzini wrote: >> On 07/02/20 00:23, Alexey Kardashevskiy wrote: >>>> Right, not unlike what you get with vof=on. :) I'm not against at all >>>> that idea. I just do

Re: VW ELF loader

2020-02-09 Thread Alexey Kardashevskiy
On 07/02/2020 10:46, Paolo Bonzini wrote: > On 07/02/20 00:23, Alexey Kardashevskiy wrote: >>> Right, not unlike what you get with vof=on. :) I'm not against at all >>> that idea. I just don't understand what you refer to below as (2). >>> Does petitboo

Re: VW ELF loader

2020-02-06 Thread Alexey Kardashevskiy
On 06/02/2020 19:29, Paolo Bonzini wrote: > On 05/02/20 06:58, David Gibson wrote: >>> Yes, SLOF is big and slow. petitboot is not petit at all either, and >>> has the disadvantage that you have to find a way to run GRUB afterwards. >> Well, not usually. Petitboot parses grub configuration its

Re: VW ELF loader

2020-02-06 Thread Alexey Kardashevskiy
On 06/02/2020 19:27, Paolo Bonzini wrote: > On 05/02/20 07:06, David Gibson wrote: >> On Tue, Feb 04, 2020 at 12:26:32AM +0100, Paolo Bonzini wrote: >>> Il mar 4 feb 2020, 00:20 Alexey Kardashevskiy ha scritto: >>>> Speaking seriously, what would I put into the g

[PATCH qemu v6] spapr: OF CI networking

2020-02-04 Thread Alexey Kardashevskiy
GRUB (compiled separately and loaded via "-kernel") but this is very unstable - needs syncronization, correct qemu_flush_queued_packets/qemu_purge_queued_packets in places, etc. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_of_client.c | 150 +++

Re: [PATCH qemu v6 6/6] spapr: Implement Open Firmware client interface

2020-02-04 Thread Alexey Kardashevskiy
On 04/02/2020 00:03, BALATON Zoltan wrote: > On Mon, 3 Feb 2020, Alexey Kardashevskiy wrote: > [...] >> diff --git a/hw/ppc/spapr_of_client.c b/hw/ppc/spapr_of_client.c >> new file mode 100644 >> index ..31555c356de8 >> --- /dev/null >> +++ b

Re: VW ELF loader

2020-02-04 Thread Alexey Kardashevskiy
On 04/02/2020 10:26, Paolo Bonzini wrote: > > > Il mar 4 feb 2020, 00:20 Alexey Kardashevskiy <mailto:a...@ozlabs.ru>> ha scritto: > > > > Speaking seriously, what would I put into the guest? > > > Only things that would be considered drivers

Re: VW ELF loader

2020-02-03 Thread Alexey Kardashevskiy
On 04/02/2020 09:56, Paolo Bonzini wrote: > > > Il lun 3 feb 2020, 23:36 Alexey Kardashevskiy <mailto:a...@ozlabs.ru>> ha scritto: > > > > What partition formats would have to be supported? > > MBR, GPT, is there anything else? "Support

Re: VW ELF loader

2020-02-03 Thread Alexey Kardashevskiy
On 04/02/2020 02:08, Paolo Bonzini wrote: > On 03/02/20 11:58, Alexey Kardashevskiy wrote: >>>> So really, the question isn't whether we implement things in firmware >>>> or in qemu. It's whether we implement the firmware functionality as >>>>

Re: VW ELF loader

2020-02-03 Thread Alexey Kardashevskiy
On 3/2/20 8:12 pm, Paolo Bonzini wrote: > On 03/02/20 02:28, David Gibson wrote: >> But "pseries" is different. We're implementing the PAPR platform, >> which describes an OS environment that's presented by a combination of >> a hypervisor and firmware. The features it specifies *require* >> c

[PATCH qemu v6 5/6] spapr: Allow changing offset for -kernel image

2020-02-02 Thread Alexey Kardashevskiy
This allows moving the kernel in the guest memory. The option is useful for step debugging (as Linux is linked at 0x0); it also allows loading grub which is normally linked to run at 0x2. This uses the existing kernel address by default. Signed-off-by: Alexey Kardashevskiy --- include/hw

[PATCH qemu v6 2/6] ppc/spapr: Move GPRs setup to one place

2020-02-02 Thread Alexey Kardashevskiy
s at r3/r4 for the initramdisk location (although vmlinux can find this from the device tree but zImage from distro kernels cannot). This extends spapr_cpu_set_entry_state() to take more registers. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy --- incl

[PATCH qemu v6 3/6] spapr/spapr: Make vty_getchars public

2020-02-02 Thread Alexey Kardashevskiy
VIO_SPAPR_VTY_DEVICE. The OF client is going to need this. Signed-off-by: Alexey Kardashevskiy --- include/hw/ppc/spapr_vio.h | 1 + hw/char/spapr_vty.c| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/ppc/spapr_vio.h b/include/hw/ppc/spapr_vio.h index bed7df60e35c

[PATCH qemu v6 6/6] spapr: Implement Open Firmware client interface

2020-02-02 Thread Alexey Kardashevskiy
device spapr-vscsi,id=svscsi0 \ -drive id=DRIVE0,if=none,file=img/f30le.qcow2,format=qcow2 \ -device scsi-hd,id=scsi-hd0,drive=DRIVE0,bootindex=1 \ -snapshot \ -enable-kvm \ -smp 8,threads=8 \ -L /home/aik/t/qemu-ppc64-bios/ \ -trace events=qemu_trace_events \ -d guest_errors \ -chardev so

[PATCH qemu v6 4/6] spapr/cas: Separate CAS handling from rebuilding the FDT

2020-02-02 Thread Alexey Kardashevskiy
leaves writing FDT to the guest in the H_CAS handler. This should not cause any behavioral change. Signed-off-by: Alexey Kardashevskiy --- include/hw/ppc/spapr.h | 7 + hw/ppc/spapr.c | 1 - hw/ppc/spapr_hcall.c | 67 ++ 3 files chan

[PATCH qemu v6 1/6] ppc: Start CPU in the default mode which is big-endian 32bit

2020-02-02 Thread Alexey Kardashevskiy
. This removes setting MSR_SF from the PPC CPU reset. Signed-off-by: Alexey Kardashevskiy --- target/ppc/translate_init.inc.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c index 53995f62eab2..f6a676cf55e8 100644 --- a

[PATCH qemu v6 0/6] spapr: Kill SLOF

2020-02-02 Thread Alexey Kardashevskiy
Richard Henderson "target/ppc: Use probe_write for DCBZ". Please comment. Thanks. Alexey Kardashevskiy (6): ppc: Start CPU in the default mode which is big-endian 32bit ppc/spapr: Move GPRs setup to one place spapr/spapr: Make vty_getchars public spapr/cas: Separate CAS han

[PATCH qemu] spapr/rtas: Print message from "ibm,os-term"

2020-02-02 Thread Alexey Kardashevskiy
The "ibm,os-term" RTAS call has a single parameter which is a pointer to a message from the guest kernel about the termination cause; this prints it. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_rtas.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/ppc/spapr_r

Re: VW ELF loader

2020-02-02 Thread Alexey Kardashevskiy
On 02/02/2020 06:04, Paolo Bonzini wrote: On 01/02/20 14:39, Alexey Kardashevskiy wrote: QEMU needs to load GRUB from the disk. The current workaround is to read it from qcow2, save in a file and then call load_elf(). Not nice. 2 problems with that. 1. when load_elf calls

VW ELF loader

2020-02-01 Thread Alexey Kardashevskiy
Hi! In my effort to "kill SLOF" (the PPC pseries guest firmware), I proceeded to the stage when QEMU needs to load GRUB from the disk. The current workaround is to read it from qcow2, save in a file and then call load_elf(). Not nice. 2 problems with that. 1. when load_elf calls address_space

Re: [PATCH qemu v5] spapr: Kill SLOF

2020-01-29 Thread Alexey Kardashevskiy
On 28/01/2020 22:31, Andrea Bolognani wrote: > On Thu, 2020-01-23 at 16:11 +1100, David Gibson wrote: >> On Wed, Jan 22, 2020 at 06:14:37PM +1100, Alexey Kardashevskiy wrote: >>> On 22/01/2020 17:32, David Gibson wrote: >>>> I'm not thinking of "grub&q

Re: [PATCH qemu] spapr_pci: Create assigned properties for bridges

2020-01-29 Thread Alexey Kardashevskiy
On 29/01/2020 14:37, David Gibson wrote: > On Wed, Jan 29, 2020 at 01:31:11PM +1100, Alexey Kardashevskiy wrote: >> QEMU assigns bus numbers so tell the guest about assigned values. >> >> This also adds an empty "ranges" to let the existing linux kernels p

Re: [RFC PATCH] hw/arm/virt: Support NMI injection

2020-01-28 Thread Alexey Kardashevskiy
On 28/01/2020 17:48, Gavin Shan wrote: > [including more folks into the discussion] > >> On Fri, 17 Jan 2020 at 14:00, Peter Maydell >> wrote: >>> On Thu, 19 Dec 2019 at 04:06, Gavin Shan wrote: This supports NMI injection for virtual machine and currently it's only supported on GIC

[PATCH qemu] spapr_pci: Create assigned properties for bridges

2020-01-28 Thread Alexey Kardashevskiy
QEMU assigns bus numbers so tell the guest about assigned values. This also adds an empty "ranges" to let the existing linux kernels proceed far enough to trigger resource reassignment (which is rather a hack). Signed-off-by: Alexey Kardashevskiy --- This is a part of the "

Re: [PATCH qemu v5] spapr: Kill SLOF

2020-01-23 Thread Alexey Kardashevskiy
On 23/01/2020 16:11, David Gibson wrote: > On Wed, Jan 22, 2020 at 06:14:37PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 22/01/2020 17:32, David Gibson wrote: >>> On Tue, Jan 21, 2020 at 06:25:36PM +1100, Alexey Kardashevskiy wrote: >>>> >>

Re: [PATCH qemu v5] spapr: Kill SLOF

2020-01-21 Thread Alexey Kardashevskiy
On 22/01/2020 17:32, David Gibson wrote: > On Tue, Jan 21, 2020 at 06:25:36PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 21/01/2020 16:11, David Gibson wrote: >>> On Fri, Jan 10, 2020 at 01:09:25PM +1100, Alexey Kardashevskiy wrote: >>>> The Peti

Re: [PATCH qemu v5] spapr: Kill SLOF

2020-01-20 Thread Alexey Kardashevskiy
On 21/01/2020 16:11, David Gibson wrote: > On Fri, Jan 10, 2020 at 01:09:25PM +1100, Alexey Kardashevskiy wrote: >> The Petitboot bootloader is way more advanced than SLOF is ever going to >> be as Petitboot comes with the full-featured Linux kernel with all >> the drivers,

Re: PCIe device paththrough via vfio issue

2020-01-13 Thread Alexey Kardashevskiy
On 14/01/2020 03:28, Alex Williamson wrote: > On Mon, 13 Jan 2020 18:49:21 +0300 > yurij wrote: > >> Hello everybody! >> >> I have a specific PCIe device (sorry, but I can't tell about what is it >> and what it does) but PCI configuration space consists of 4 BARs (lspci >> output brief): >>

Re: [RFC PATCH qemu] spapr: Kill SLOF

2020-01-13 Thread Alexey Kardashevskiy
On 13/01/2020 20:13, Andrea Bolognani wrote: > On Wed, 2020-01-08 at 13:34 +1100, Alexey Kardashevskiy wrote: >> On 07/01/2020 20:39, Andrea Bolognani wrote: >>> On Tue, 2020-01-07 at 12:55 +1100, Alexey Kardashevskiy wrote: >>>> Petitboot kernel+initramdi

Re: [PATCH qemu v4] spapr: Kill SLOF

2020-01-13 Thread Alexey Kardashevskiy
On 13/01/2020 18:05, David Gibson wrote: > On Fri, Jan 10, 2020 at 11:51:32AM +1100, Alexey Kardashevskiy wrote: >> >> >> On 10/01/2020 10:32, Alexey Kardashevskiy wrote: >>> >>> >>> On 10/01/2020 10:05, Alexey Kardashevskiy wrote: >>>&g

[PATCH qemu v5] spapr: Kill SLOF

2020-01-09 Thread Alexey Kardashevskiy
,id=TAP0,helper=/home/aik/qemu-bridge-helper --br=br0 \ -device virtio-net-pci,id=vnet0,netdev=TAP0 img/f30le.qcow2 \ -snapshot \ -smp 8,threads=8 \ -trace events=qemu_trace_events \ -d guest_errors \ -chardev socket,id=SOCKET0,server,nowait,path=qemu.mon.ssh54088 \ -mon chardev=SOCKET0,mode=contro

Re: [PATCH qemu v4] spapr: Kill SLOF

2020-01-09 Thread Alexey Kardashevskiy
On 10/01/2020 10:32, Alexey Kardashevskiy wrote: > > > On 10/01/2020 10:05, Alexey Kardashevskiy wrote: >> >> >> On 08/01/2020 17:18, Alexey Kardashevskiy wrote: >>> The Petitboot bootloader is way more advanced than SLOF is ever going to >>> be as

Re: [PATCH qemu v4] spapr: Kill SLOF

2020-01-09 Thread Alexey Kardashevskiy
On 10/01/2020 10:05, Alexey Kardashevskiy wrote: > > > On 08/01/2020 17:18, Alexey Kardashevskiy wrote: >> The Petitboot bootloader is way more advanced than SLOF is ever going to >> be as Petitboot comes with the full-featured Linux kernel with all >> the drivers,

Re: [PATCH qemu v4] spapr: Kill SLOF

2020-01-09 Thread Alexey Kardashevskiy
On 08/01/2020 17:18, Alexey Kardashevskiy wrote: > The Petitboot bootloader is way more advanced than SLOF is ever going to > be as Petitboot comes with the full-featured Linux kernel with all > the drivers, and initramdisk with quite user friendly interface. > The problem with ditc

Re: [PATCH v2 09/10] target/ppc: Correct RMLS table

2020-01-08 Thread Alexey Kardashevskiy
On 08/01/2020 12:06, David Gibson wrote: > On Tue, Jan 07, 2020 at 03:21:42PM +0100, Cédric Le Goater wrote: >> On 1/7/20 5:48 AM, David Gibson wrote: >>> The table of RMA limits based on the LPCR[RMLS] field is slightly wrong. >>> We're missing the RMLS == 0 => 256 GiB RMA option, which is avai

Re: [PATCH v2 05/10] spapr, ppc: Remove VPM0/RMLS hacks for POWER9

2020-01-08 Thread Alexey Kardashevskiy
On 07/01/2020 15:48, David Gibson wrote: > For the "pseries" machine, we use "virtual hypervisor" mode where we only > model the CPU in non-hypervisor privileged mode. This means that we need > guest physical addresses within the modelled within the cpu to be treated > as absolute physical addr

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-08 Thread Alexey Kardashevskiy
On 09/01/2020 15:07, David Gibson wrote: > On Wed, Jan 08, 2020 at 03:07:41PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 07/01/2020 16:26, David Gibson wrote: >> >>>>>>>> +static uint32_t client_setprop(SpaprMachineState *sm, >&

Re: [PATCH qemu v4] spapr: Kill SLOF

2020-01-08 Thread Alexey Kardashevskiy
On 08/01/2020 17:18, Alexey Kardashevskiy wrote: > The Petitboot bootloader is way more advanced than SLOF is ever going to > be as Petitboot comes with the full-featured Linux kernel with all > the drivers, and initramdisk with quite user friendly interface. > The problem with ditc

[PATCH qemu v4] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
ow2 \ -snapshot \ -smp 8,threads=8 \ -trace events=qemu_trace_events \ -d guest_errors \ -chardev socket,id=SOCKET0,server,nowait,path=qemu.mon.ssh54088 \ -mon chardev=SOCKET0,mode=control Signed-off-by: Alexey Kardashevskiy --- Changes: v4: * fixed open * validate ihandles in "call-method&quo

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
On 08/01/2020 15:20, Alexey Kardashevskiy wrote: > > > On 07/01/2020 16:54, David Gibson wrote: >> On Tue, Jan 07, 2020 at 03:44:35PM +1100, Alexey Kardashevskiy wrote: >>> >>> >>> On 06/01/2020 15:19, David Gibson wrote: >>>>> + >

Re: [PATCH qemu v3] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
On 08/01/2020 13:30, Alexey Kardashevskiy wrote: > + > +uint32_t spapr_of_client_open(SpaprMachineState *spapr, uint32_t phandle) Ooops, this should have been an address of a path, not a phandle. > +{ > +g_assert(spapr->of_instance_last != 0x); > +++spapr

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
On 07/01/2020 16:54, David Gibson wrote: > On Tue, Jan 07, 2020 at 03:44:35PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 06/01/2020 15:19, David Gibson wrote: >>>> + >>>> +static uint32_t client_pack

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
On 07/01/2020 16:26, David Gibson wrote: >> +static uint32_t client_setprop(SpaprMachineState *sm, >> + uint32_t nodeph, uint32_t pname, >> + uint32_t valaddr, uint32_t vallen) >> +{ >> +char propname[64]; >

Re: [RFC PATCH qemu] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
On 07/01/2020 20:39, Andrea Bolognani wrote: > On Tue, 2020-01-07 at 12:55 +1100, Alexey Kardashevskiy wrote: >> On 07/01/2020 01:15, Daniel Henrique Barboza wrote: >>> Question: does Petitboot already replaces SLOF in every possible >>> scenario for all >

[PATCH qemu v3] spapr: Kill SLOF

2020-01-07 Thread Alexey Kardashevskiy
ow2 \ -snapshot \ -smp 8,threads=8 \ -trace events=qemu_trace_events \ -d guest_errors \ -chardev socket,id=SOCKET0,server,nowait,path=qemu.mon.ssh54088 \ -mon chardev=SOCKET0,mode=control Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * fixed phandles allocation * s/__be32/uint32_t/ as w

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 06/01/2020 15:19, David Gibson wrote: >> + >> +static uint32_t client_package_to_path(const void *fdt, uint32_t phandle, >> + uint32_t buf, uint32_t len) >> +{ >> +char tmp[256]; > > Fixed sized buffers are icky. You could either dynamically allocat

Re: [RFC PATCH qemu] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 07/01/2020 01:15, Daniel Henrique Barboza wrote: > Hey, > > On 1/5/20 8:38 PM, Alexey Kardashevskiy wrote: >> Another version is coming, I'll start putting fewer people in the cc: >> list, watch qemu-...@nongnu.org for further updates if interested. >>

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 07/01/2020 04:25, Peter Maydell wrote: > On Mon, 6 Jan 2020 at 17:09, Cédric Le Goater wrote: >> ARM bootloaders are also embedded in QEMU's code. See hw/arm/boot.c. >> You could improve a bit the definition though. > > Given an opportunity to restart from scratch I don't know > that I'd do

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 06/01/2020 15:19, David Gibson wrote: +const struct fdt_property *prop; +const char *tmp; + +readstr(prevaddr, prev); +for (offset = fdt_first_property_offset(fdt, offset); + (offset >= 0); + (offset = fdt_next_property_offset(fdt, offset))) { + +pro

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-06 Thread Alexey Kardashevskiy
On 06/01/2020 19:50, David Gibson wrote: On Mon, Jan 06, 2020 at 05:28:55PM +1100, Alexey Kardashevskiy wrote: On 06/01/2020 15:19, David Gibson wrote: On Mon, Jan 06, 2020 at 10:42:42AM +1100, Alexey Kardashevskiy wrote: The Petitboot bootloader is way more advanced than SLOF is ever

Re: [PATCH qemu v2] spapr: Kill SLOF

2020-01-05 Thread Alexey Kardashevskiy
On 06/01/2020 15:19, David Gibson wrote: > On Mon, Jan 06, 2020 at 10:42:42AM +1100, Alexey Kardashevskiy wrote: >> The Petitboot bootloader is way more advanced than SLOF is ever going to >> be as Petitboot comes with the full-featured Linux kernel with all >> the drivers,

[PATCH qemu v2] spapr: Kill SLOF

2020-01-05 Thread Alexey Kardashevskiy
.xz \ img/u1804-64le.qcow2 \ -snapshot \ -smp 8,threads=8 \ -L /home/aik/t/qemu-ppc64-bios/ \ -trace events=qemu_trace_events \ -d guest_errors \ -chardev socket,id=SOCKET0,server,nowait,path=qemu.mon.ssh37874 \ -mon chardev=SOCKET0,mode=control Signed-off-by: Alexey Kardashevskiy --- Changes: v

Re: [RFC PATCH qemu] spapr: Kill SLOF

2020-01-05 Thread Alexey Kardashevskiy
Another version is coming, I'll start putting fewer people in the cc: list, watch qemu-...@nongnu.org for further updates if interested. Thanks, On 03/01/2020 18:44, Alexey Kardashevskiy wrote: > The Petitboot bootloader is way more advanced than SLOF is ever going to > be as Peti

[RFC PATCH qemu] spapr: Kill SLOF

2020-01-02 Thread Alexey Kardashevskiy
Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Michael Ellerman Cc: Michael Roth Cc: Fabiano Rosas Cc: Leonardo Bras Signed-off-by: Alexey Kardashevskiy --- hw/ppc/Makefile.objs | 1 + include/hw/loader.h| 1 + include/hw/ppc/spapr.h | 25 ++- hw/ppc/spapr.c | 207

Re: [PATCH qemu] spapr: Kill SLOF

2020-01-02 Thread Alexey Kardashevskiy
Ignore this please, v2 is coming soon. And this one is missing "RFC" anyway. Thanks, On 03/01/2020 17:12, Alexey Kardashevskiy wrote: > The Petitboot bootloader is way more advanced than SLOF is ever going to > be as Petitboot comes with the full-featured Linux kernel with a

[PATCH qemu] spapr: Kill SLOF

2020-01-02 Thread Alexey Kardashevskiy
-smp 8,threads=8 \ -L /home/aik/t/qemu-ppc64-bios/ \ -trace events=qemu_trace_events \ -d guest_errors \ -chardev socket,id=SOCKET0,server,nowait,path=qemu.mon.ssh37874 \ -mon chardev=SOCKET0,mode=control Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Michael Ellerman Cc: Michael Roth Cc: Fabiano Rosas

Re: [PATCH v4 ppc-for-5.0 2/2] ppc/spapr: Support reboot of secure pseries guest

2020-01-01 Thread Alexey Kardashevskiy
On 19/12/2019 14:14, Bharata B Rao wrote: > A pseries guest can be run as a secure guest on Ultravisor-enabled > POWER platforms. When such a secure guest is reset, we need to > release/reset a few resources both on ultravisor and hypervisor side. > This is achieved by invoking this new ioctl KV

Re: [PATCH v4 0/4] Improve default object property_add uint helpers

2019-12-19 Thread Alexey Kardashevskiy
On 20/12/2019 05:02, Felipe Franciosi wrote: > This improves the family of object_property_add_uintXX_ptr helpers by enabling > a default getter/setter only when desired. To prevent an API behavioural > change > (from clients that already used these helpers and did not want a setter), we > add

Re: virtio capabilities

2019-12-17 Thread Alexey Kardashevskiy
On 13/12/2019 19:36, Michael S. Tsirkin wrote: > On Fri, Dec 13, 2019 at 07:29:40PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 13/12/2019 18:24, Michael S. Tsirkin wrote: >>> On Fri, Dec 13, 2019 at 05:05:05PM +1100, Alexey Kardashevskiy wrote: >>>&g

Re: [PATCH v3 4/4] qom/object: Use common get/set uint helpers

2019-12-17 Thread Alexey Kardashevskiy
then makes the > change Marc-Andre recommended (by dropping the (void *) cast). > > Is it ok for me to just drop that part of my patch and send the v4? Yes. Thanks, > You can follow-up on the cast change afterwards. > > Thanks, > F. > > >> On Dec 10, 2019, at

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

2019-12-16 Thread Alexey Kardashevskiy
37d7f4242316380fb58566f6b667ac7ddbbc22dd: pseries: Update SLOF firmware image (2019-12-17 11:32:10 +1100) Alexey Kardashevskiy (1): pseries: Update SLOF firmware image pc-bios/README | 2 +- pc-bios/slof.bin | Bin 931040 -> 931032 bytes roms/S

Re: virtio capabilities

2019-12-13 Thread Alexey Kardashevskiy
On 13/12/2019 18:24, Michael S. Tsirkin wrote: > On Fri, Dec 13, 2019 at 05:05:05PM +1100, Alexey Kardashevskiy wrote: >> Hi! >> >> I am having an issue with capabilities (hopefully the chunk formatting >> won't break). >> >> The problem is

virtio capabilities

2019-12-12 Thread Alexey Kardashevskiy
Hi! I am having an issue with capabilities (hopefully the chunk formatting won't break). The problem is that when virtio_pci_find_capability() reads pci_find_capability(dev, PCI_CAP_ID_VNDR), 0 is returned; if repeated, it returns a valid number (0x84). Timing seems to matter. pci_cfg_read trace

Re: [PATCH v3 4/4] qom/object: Use common get/set uint helpers

2019-12-11 Thread Alexey Kardashevskiy
On 10/12/2019 23:04, Felipe Franciosi wrote: > Hi > >> On Dec 2, 2019, at 6:31 AM, Alexey Kardashevskiy wrote: >> >> >> >> On 30/11/2019 04:46, Felipe Franciosi wrote: >>> Several objects implemented their own uint property getters and setters, &g

Re: [PATCH v1 ppc-for-5.0 2/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-09 Thread Alexey Kardashevskiy
On 10/12/2019 14:50, Bharata B Rao wrote: > On Tue, Dec 10, 2019 at 02:28:51PM +1100, David Gibson wrote: >> On Mon, Dec 09, 2019 at 12:30:12PM +0530, Bharata B Rao wrote: >>> A pseries guest can be run as a secure guest on Ultravisor-enabled >>> POWER platforms. When such a secure guest is rese

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

2019-12-08 Thread Alexey Kardashevskiy
5d8e32b0d6b4f1240c240184d5012ec200da65ab: pseries: Update SLOF firmware image (2019-12-09 12:08:25 +1100) Alexey Kardashevskiy (1): pseries: Update SLOF firmware image pc-bios/README | 2 +- pc-bios/slof.bin | Bin 928552 -> 931040 bytes r

[GIT PULL for qemu-pseries] pseries: Update SLOF firmware image

2019-12-05 Thread Alexey Kardashevskiy
e53a5569a27066a4f2f36ae368c728ab6c514352: pseries: Update SLOF firmware image (2019-12-06 12:20:42 +1100) Alexey Kardashevskiy (1): pseries: Update SLOF firmware image pc-bios/README | 2 +- pc-bios/slof.bin | Bin 928552 -> 931032 bytes r

Re: [PATCH v2] virtio-pci: disable vring processing when bus-mastering is disabled

2019-12-04 Thread Alexey Kardashevskiy
t's use for > older machine types. Users requiring the use of the flag in conjunction > with older machine types can set it explicitly as a virtio-device > option. > > NOTES: > > - This leaves some other oddities in play, like the fact that >DRIVER_OK also gets

Re: [PULL v2 4/6] spapr: Add /chosen to FDT only at reset time to preserve kernel and initramdisk

2019-12-04 Thread Alexey Kardashevskiy
On 04/12/2019 21:32, Laurent Vivier wrote: > On 04/12/2019 05:40, Alexey Kardashevskiy wrote: >> >> >> On 04/12/2019 15:23, Alexey Kardashevskiy wrote: >>> >>> >>> On 04/12/2019 03:09, Laurent Vivier wrote: >>>> >>>> Bad re

Re: [PULL v2 4/6] spapr: Add /chosen to FDT only at reset time to preserve kernel and initramdisk

2019-12-03 Thread Alexey Kardashevskiy
On 04/12/2019 15:23, Alexey Kardashevskiy wrote: > > > On 04/12/2019 03:09, Laurent Vivier wrote: >> >> Bad reply, the problem is with >> >> "spapr: Render full FDT on ibm,client-architecture-support" > > > https://git.qe

Re: [PULL v2 4/6] spapr: Add /chosen to FDT only at reset time to preserve kernel and initramdisk

2019-12-03 Thread Alexey Kardashevskiy
t Vivier wrote: >> On 18/11/2019 11:53, Laurent Vivier wrote: >>> From: Alexey Kardashevskiy >>> >>> Since "spapr: Render full FDT on ibm,client-architecture-support" we build >>> the entire flatten device tree (FDT) twice - at the reset time and >&

Re: [for-5.0 3/4] spapr: Clean up RMA size calculation

2019-12-02 Thread Alexey Kardashevskiy
On 03/12/2019 14:44, Alexey Kardashevskiy wrote: > > > On 29/11/2019 12:35, David Gibson wrote: >> Move the calculation of the Real Mode Area (RMA) size into a helper >> function. While we're there clean it up and correct it in a few ways: >> * Add comm

Re: [for-5.0 4/4] spapr: Correct clamping of RMA to Node 0 size

2019-12-02 Thread Alexey Kardashevskiy
On 29/11/2019 12:35, David Gibson wrote: > The Real Mode Area (RMA) needs to fit within Node 0 in NUMA configurations. > We use a helper function spapr_node0_size() to calculate this. > > But that function doesn't actually get the size of Node 0, it gets the > minimum size of all nodes, ever si

Re: [for-5.0 3/4] spapr: Clean up RMA size calculation

2019-12-02 Thread Alexey Kardashevskiy
On 29/11/2019 12:35, David Gibson wrote: > Move the calculation of the Real Mode Area (RMA) size into a helper > function. While we're there clean it up and correct it in a few ways: > * Add comments making it clearer where the various constraints come from > * Remove a pointless check that

Re: [for-5.0 2/4] spapr: Don't attempt to clamp RMA to VRMA constraint

2019-12-02 Thread Alexey Kardashevskiy
the RMA > within the VRMA limit (the RMA must always fit within Node 0). > > Previously, on KVM, we also temporarily reduced the rma_size to 256M so > that the we'd load the kernel and initrd safely, regardless of the VRMA > limit. This was a) confusing, b) could significan

Re: [for-5.0 1/4] spapr,ppc: Simplify signature of kvmppc_rma_size()

2019-12-02 Thread Alexey Kardashevskiy
r be called in the KVM enabled case, so replace > its !CONFIG_KVM stub with an assert() rather than a dummy value. > > Signed-off-by: David Gibson Besides not compiling, otherwise looks good. Reviewed-by: Alexey Kardashevskiy > --- > hw/ppc/spapr.c | 5 +++-- > target

Re: [PATCH v3 4/4] qom/object: Use common get/set uint helpers

2019-12-01 Thread Alexey Kardashevskiy
On 30/11/2019 04:46, Felipe Franciosi wrote: > Several objects implemented their own uint property getters and setters, > despite them being straightforward (without any checks/validations on > the values themselves) and identical across objects. This makes use of > an enhanced API for object_pr

Re: [PATCH 4/4] qom/object: Use common get/set uint helpers

2019-11-27 Thread Alexey Kardashevskiy
On 26/11/2019 20:39, Felipe Franciosi wrote: > > >> On Nov 26, 2019, at 8:39 AM, Marc-André Lureau >> wrote: >> >> Hi > > Heya, thanks for the review. > >> >> On Mon, Nov 25, 2019 at 7:37 PM Felipe Franciosi wrote: >>> >>> Several objects implemented their own uint property getters and se

Re: virtio,iommu_platform=on

2019-11-14 Thread Alexey Kardashevskiy
On 14/11/2019 19:42, Michael S. Tsirkin wrote: > On Thu, Nov 14, 2019 at 09:58:47AM +1100, Alexey Kardashevskiy wrote: >> >> >> On 13/11/2019 21:00, Michael S. Tsirkin wrote: >>> On Wed, Nov 13, 2019 at 03:44:28PM +1100, Alexey Kardashevskiy wrote: >>>>

Re: virtio,iommu_platform=on

2019-11-13 Thread Alexey Kardashevskiy
On 13/11/2019 21:00, Michael S. Tsirkin wrote: > On Wed, Nov 13, 2019 at 03:44:28PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 12/11/2019 18:08, Michael S. Tsirkin wrote: >>> On Tue, Nov 12, 2019 at 02:53:49PM +1100, Alexey Kardashevskiy wrote: >>>

Re: virtio,iommu_platform=on

2019-11-12 Thread Alexey Kardashevskiy
On 13/11/2019 17:23, Alexey Kardashevskiy wrote: > > > On 13/11/2019 16:54, Michael Roth wrote: >> Quoting Alexey Kardashevskiy (2019-11-11 21:53:49) >>> Hi! >>> >>> I am enabling IOMMU for virtio in the pseries firmware (SLOF) and seeing >>&g

Re: virtio,iommu_platform=on

2019-11-12 Thread Alexey Kardashevskiy
On 13/11/2019 16:54, Michael Roth wrote: > Quoting Alexey Kardashevskiy (2019-11-11 21:53:49) >> Hi! >> >> I am enabling IOMMU for virtio in the pseries firmware (SLOF) and seeing >> problems, one of them is SLOF does SCSI bus scan, then it stops the >> virtio-s

Re: virtio,iommu_platform=on

2019-11-12 Thread Alexey Kardashevskiy
On 12/11/2019 20:06, Laszlo Ersek wrote: > On 11/12/19 04:53, Alexey Kardashevskiy wrote: >> Hi! >> >> I am enabling IOMMU for virtio in the pseries firmware (SLOF) and seeing >> problems, one of them is SLOF does SCSI bus scan, then it stops the >> virtio-s

Re: virtio,iommu_platform=on

2019-11-12 Thread Alexey Kardashevskiy
On 12/11/2019 18:08, Michael S. Tsirkin wrote: > On Tue, Nov 12, 2019 at 02:53:49PM +1100, Alexey Kardashevskiy wrote: >> Hi! >> >> I am enabling IOMMU for virtio in the pseries firmware (SLOF) and seeing >> problems, one of them is SLOF does SCSI bus scan, then it

virtio,iommu_platform=on

2019-11-11 Thread Alexey Kardashevskiy
Hi! I am enabling IOMMU for virtio in the pseries firmware (SLOF) and seeing problems, one of them is SLOF does SCSI bus scan, then it stops the virtio-scsi by clearing MMIO|IO|BUSMASTER from PCI_COMMAND (as SLOF stopped using the devices) and when this happens, I see unassigned memory access (see

<    1   2   3   4   5   6   7   8   9   10   >