[Qemu-devel] [PATCH 2/4] spapr: Add RTAS sysparm UUID

2014-06-23 Thread Sam Bobroff
Add support for the UUID parameter to the emulated RTAS call ibm,get-system-parameter. Return the guest's UUID as the value for the RTAS UUID system parameter, or null (a zero length result) if it is not set. Signed-off-by: Sam Bobroff --- hw/ppc/spapr_rtas.c | 6 ++ 1 file chang

[Qemu-devel] [PATCH 3/4] spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE

2014-06-23 Thread Sam Bobroff
This is corrected by using the rtas_st_buffer() function to write to the buffer. The function return value code is also slightly simplified. Signed-off-by: Sam Bobroff --- hw/ppc/spapr_rtas.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr_rtas.c b

[Qemu-devel] [PATCH 0/4] spapr: improve RTAS get_system_parameter

2014-06-23 Thread Sam Bobroff
s Run Mode" parameter. It also improves the surrounding code a little to support the addition of additional system parameters. Sam Bobroff (4): spapr: Add rtas_st_buffer utility function spapr: Add RTAS sysparm UUID spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE spapr: Add RTAS sysparm

[Qemu-devel] [PATCH 4/4] spapr: Add RTAS sysparm SPLPAR Characteristics

2014-06-23 Thread Sam Bobroff
roduce the following kernel message: arch/powerpc/platforms/pseries/lparcfg.c \ parse_system_parameter_string Error calling get-system-parameter \ (0xfffd) Signed-off-by: Sam Bobroff --- hw/ppc/spapr_rtas.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/ppc/spapr_rtas.

[Qemu-devel] [PATCH 1/4] spapr: Add rtas_st_buffer utility function

2014-06-23 Thread Sam Bobroff
. Signed-off-by: Sam Bobroff --- include/hw/ppc/spapr.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 08c301f..39a7764 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -373,6 +373,23 @@ static inline

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] spapr: improve RTAS get_system_parameter

2014-06-24 Thread Sam Bobroff
On 24/06/14 22:06, Alexander Graf wrote: > > On 24.06.14 02:22, Sam Bobroff wrote: >> This series of patches improves QEMU's emulation of the RTAS call >> "ibm,get-system-parameter" by adding support for the "UUID" and "SPLPAR >> Characterist

[Qemu-devel] [PATCH v2 1/4] spapr: Add rtas_st_buffer utility function

2014-06-24 Thread Sam Bobroff
. Signed-off-by: Sam Bobroff --- include/hw/ppc/spapr.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 08c301f..088baba 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -373,6 +373,19 @@ static inline void

[Qemu-devel] [PATCH v2 3/4] spapr: Add RTAS sysparm UUID

2014-06-24 Thread Sam Bobroff
Add support for the UUID parameter to the emulated RTAS call ibm,get-system-parameter. Return the guest's UUID as the value for the RTAS UUID system parameter, or null (a zero length result) if it is not set. Signed-off-by: Sam Bobroff --- hw/ppc/spapr_rtas.c| 4 include/h

[Qemu-devel] [PATCH v2 0/4] spapr: improve RTAS get_system_parameter

2014-06-24 Thread Sam Bobroff
of them moved out into spapr.h. * Use g_strdup_printf()/g_free() rather than snprintf() to a stack array. * Use cpu_physical_memory_write() instead of looping over each byte. Sam Bobroff (4): spapr: Add rtas_st_buffer utility function spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE s

[Qemu-devel] [PATCH v2 2/4] spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE

2014-06-24 Thread Sam Bobroff
This is corrected by using the rtas_st_buffer() function to write to the buffer. The RTAS constants are also moved out into a header file, some new constants added and the surrounding code slightly simplified. Signed-off-by: Sam Bobroff --- hw/ppc/spapr_rtas.c| 18 +- include

[Qemu-devel] [PATCH v2 4/4] spapr: Add RTAS sysparm SPLPAR Characteristics

2014-06-24 Thread Sam Bobroff
roduce the following kernel message: arch/powerpc/platforms/pseries/lparcfg.c \ parse_system_parameter_string Error calling get-system-parameter \ (0xfffd) Signed-off-by: Sam Bobroff --- hw/ppc/spapr_rtas.c| 8 include/hw/ppc/spapr.h | 1 + 2 files changed, 9 insertions(+) diff

Re: [Qemu-devel] [Bug 1319493] Re: strip: '/usr/local/bin/fsdev/virtfs-proxy-helper': No such file make: *** [install] Error 1

2014-06-03 Thread Sam Bobroff
On 04/06/14 04:04, DEnis wrote: > 2014.06.03 Problem remains current > > -- = > > You received this bug notification because you are a member of qemu- > devel-ml, which is subscribed to QEMU. > https://bugs.launchpad.net/bugs/1319493 > > Title: > strip: '/usr/local/bin/fsdev/virtfs-proxy-help

[Qemu-devel] [PATCH 1/1] Makefile: Correct path in stripping tool binaries

2014-06-03 Thread Sam Bobroff
Allow "make install" to handle tool binaries that reside in sub-directories. Without this patch "make install" will fail if it needs to strip a tool binary (e.g. debugging is not enabled) that is installed from a subdirectory. An example is fsdev/virtfs-proxy-helper. Signed

[Qemu-devel] [PATCH 1/1] monitor: correct socket listen port

2015-10-28 Thread Sam Bobroff
quot;. The cause is that the has_port field is not set in the address, so later it is not copied by qapi_copy_SocketAddress(). This patch simply adds the missing "has_port = true". Signed-off-by: Sam Bobroff --- qemu-char.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-char

Re: [Qemu-devel] [PATCH 1/1] monitor: correct socket listen port

2015-10-29 Thread Sam Bobroff
On Thu, Oct 29, 2015 at 07:26:14AM +0100, Markus Armbruster wrote: > Sam Bobroff writes: > > > Currently when constructing an inet socket monitor (e.g. via "-monitor > > telent:localhost:12345,server,nowait") the port is ignored and a > > random one is used inst

[Qemu-devel] [PATCH 1/1] Protect stderr from non-blocking mode

2016-01-27 Thread Sam Bobroff
implemented, we display a warning message. Signed-off-by: Sam Bobroff --- This is somewhat of an RFC as the issue probably hasn't been noticed very often (ever?) and there are several approaches to addressing it. The discussion was a while ago, here: http://lists.nongnu.org/archive/html/qe

[Qemu-devel] Question about nonblocking stderr and lost logs

2015-11-29 Thread Sam Bobroff
Hi QEMU programmers, While doing some experimental work on QEMU that has involved adding a lot of new log messages (using qemu_log_mask()), I've discovered that under some conditions a lot of my log messages go missing. I've tracked the issue down to qemu_logfile being left at the default (stderr

Re: [Qemu-devel] Question about nonblocking stderr and lost logs

2015-12-06 Thread Sam Bobroff
On Fri, Dec 04, 2015 at 02:33:01PM +0800, Stefan Hajnoczi wrote: > On Mon, Nov 30, 2015 at 04:34:47PM +1100, Sam Bobroff wrote: > > Hi QEMU programmers, > > > > While doing some experimental work on QEMU that has involved adding a lot of > > new log messages (u

Re: [Qemu-devel] [Qemu-ppc] [PATCHv2 07/10] pseries: DEFINE_SPAPR_MACHINE

2015-12-07 Thread Sam Bobroff
NE, > -.class_init= spapr_machine_2_1_class_init, > -.instance_init = spapr_machine_2_1_instance_init, > -}; > +DEFINE_SPAPR_MACHINE(2_1, "2.1"); > > static void spapr_machine_register_types(void) > { > type_register_static(&spapr_machine_info); > -type_register_static(&spapr_machine_2_1_info); > -type_register_static(&spapr_machine_2_2_info); > -type_register_static(&spapr_machine_2_3_info); > -type_register_static(&spapr_machine_2_4_info); > -type_register_static(&spapr_machine_2_5_info); > } > > type_init(spapr_machine_register_types) > -- > 2.5.0 Looks good to me. Just one nit: I couldn't help noticing that the suffix and verstr parameters to the macro were both encoding the same information. Did you consider a macro with the major and minor version as the parameters? e.g. #define DEFINE_SPAPR_MACHINE(major, minor) So usage would be: DEFINE_SPAPR_MACHINE(2, 1); Reviewed-by: Sam Bobroff

Re: [Qemu-devel] Question about nonblocking stderr and lost logs

2015-12-13 Thread Sam Bobroff
On Thu, Dec 10, 2015 at 04:37:22PM +0800, Stefan Hajnoczi wrote: > On Mon, Dec 07, 2015 at 02:22:18PM +1100, Sam Bobroff wrote: > > On Fri, Dec 04, 2015 at 02:33:01PM +0800, Stefan Hajnoczi wrote: > > > On Mon, Nov 30, 2015 at 04:34:47PM +1100, Sam Bobroff wrote: > >

Re: [Qemu-devel] Question about nonblocking stderr and lost logs

2015-12-15 Thread Sam Bobroff
On Mon, Dec 14, 2015 at 03:29:49PM +0800, Stefan Hajnoczi wrote: > On Mon, Dec 14, 2015 at 04:19:50PM +1100, Sam Bobroff wrote: > > On Thu, Dec 10, 2015 at 04:37:22PM +0800, Stefan Hajnoczi wrote: > > > On Mon, Dec 07, 2015 at 02:22:18PM +1100, Sam Bobroff wrote: > > > &

[Qemu-devel] [PATCH 0/4] spapr: Small PAPR compliance fixes

2015-07-02 Thread Sam Bobroff
This patch set contains several small fixes to make QEMU more PAPR compliant. Sam Bobroff (4): spapr: Add /ibm,partition-name spapr: Add /rtas/ibm,change-msix-capable spapr: Make ibm,change-msi respect 3 return values spapr: SPLPAR Characteristics hw/ppc/spapr.c | 9

[Qemu-devel] [PATCH 1/4] spapr: Add /ibm,partition-name

2015-07-02 Thread Sam Bobroff
QEMU has a notion of the guest name, so if it's present we might as well put that into the device tree as /ibm,partition-name. This is specificed by PAPR. Signed-off-by: Sam Bobroff --- hw/ppc/spapr.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/sp

[Qemu-devel] [PATCH 3/4] spapr: Make ibm, change-msi respect 3 return values

2015-07-02 Thread Sam Bobroff
Currently, rtas_ibm_change_msi() always returns four values even if less are specified. Correct this by only returning the fourth parameter if it was requested. This is specified by PAPR. Signed-off-by: Sam Bobroff --- hw/ppc/spapr_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[Qemu-devel] [PATCH 4/4] spapr: SPLPAR Characteristics

2015-07-02 Thread Sam Bobroff
and values are specified by PAPR. Signed-off-by: Sam Bobroff --- hw/ppc/spapr_rtas.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 0f1ae55..a08254b 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -33,6

[Qemu-devel] [PATCH 2/4] spapr: Add /rtas/ibm,change-msix-capable

2015-07-02 Thread Sam Bobroff
QEMU is MSI-X capable and makes it available via ibm,change-msi, so we should indicate this by adding /rtas/ibm,change-msix-capable to the device tree. This is specificed by PAPR. Signed-off-by: Sam Bobroff --- hw/ppc/spapr.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/ppc

[Qemu-devel] PPC VCPU ID packing via KVM_CAP_PPC_SMT

2015-10-18 Thread Sam Bobroff
Hi everyone, It's currently possible to configure QEMU and KVM such that (on a Power 7 or 8 host) users are unable to create as many VCPUs as they might reasonably expect. I'll outline one fairly straight forward solution (below) and I would welcome feedback: Does this seem a reasonable approach?

[Qemu-devel] Question about odd snapshot behaviour

2015-10-18 Thread Sam Bobroff
Hi all, While working through the QEMU code that saves and loads snapshots, I've noticed some confusing behaviour when using named VM snapshots that may need to be fixed somehow. This is what I've noticed: * If I create two empty qcow2 filesystems: fs1.qcow2 and fs2.qcow2: * e.g. qemu-ima

Re: [Qemu-devel] Question about odd snapshot behaviour

2015-10-22 Thread Sam Bobroff
On Mon, Oct 19, 2015 at 02:50:17PM +0200, Kevin Wolf wrote: > [ CC: qemu-block ] > > Am 19.10.2015 um 07:27 hat Sam Bobroff geschrieben: > > Hi all, > > > > While working through the QEMU code that saves and loads snapshots, I've > > noticed some confusing b

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/4] target-ppc: Add FWNMI support in qemu for powerKVM guests

2015-08-06 Thread Sam Bobroff
Hello Aravinda and all, On Wed, Jul 08, 2015 at 01:58:13PM +0530, Aravinda Prasad wrote: > On Friday 03 July 2015 11:31 AM, David Gibson wrote: > > On Thu, Jul 02, 2015 at 07:11:52PM +1000, Alexey Kardashevskiy wrote: > >> On 04/02/2015 03:46 PM, David Gibson wrote: > >>> On Thu, Apr 02, 2015 at 0

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/4] target-ppc: Add FWNMI support in qemu for powerKVM guests

2015-08-09 Thread Sam Bobroff
On Sun, Aug 09, 2015 at 03:53:02PM +0200, Alexander Graf wrote: > > > On 07.08.15 05:37, Sam Bobroff wrote: > > Hello Aravinda and all, > > > > On Wed, Jul 08, 2015 at 01:58:13PM +0530, Aravinda Prasad wrote: > >> On Friday 03 July 2015 11:31 AM, David Gibs

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/2] spapr: Add support for hwrng when available

2015-09-07 Thread Sam Bobroff
On Tue, Sep 01, 2015 at 12:53:26PM +0200, Thomas Huth wrote: > On 01/09/15 02:38, David Gibson wrote: > > On Mon, Aug 31, 2015 at 08:46:01PM +0200, Thomas Huth wrote: > >> From: Michael Ellerman > >> > >> Some powerpc systems have support for a hardware random number generator > >> (hwrng). If suc

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/2] spapr: Add support for hwrng when available

2015-09-08 Thread Sam Bobroff
On Tue, Sep 08, 2015 at 07:38:12AM +0200, Thomas Huth wrote: > On 08/09/15 07:03, Sam Bobroff wrote: > > On Tue, Sep 01, 2015 at 12:53:26PM +0200, Thomas Huth wrote: > >> On 01/09/15 02:38, David Gibson wrote: > >>> On Mon, Aug 31, 2015 at 08:46:01PM +0200, Thomas Hu

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/4] target-ppc: Add FWNMI support in qemu for powerKVM guests

2015-09-01 Thread Sam Bobroff
On Tue, Sep 01, 2015 at 04:37:51PM +0530, Aravinda Prasad wrote: > > > On Monday 10 August 2015 09:35 AM, Sam Bobroff wrote: > > On Sun, Aug 09, 2015 at 03:53:02PM +0200, Alexander Graf wrote: > >> > >> > >> On 07.08.15 05:37, Sam Bobroff wrote: > &

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/4] target-ppc: Add FWNMI support in qemu for powerKVM guests

2015-09-02 Thread Sam Bobroff
On Thu, Sep 03, 2015 at 09:53:20AM +1000, David Gibson wrote: > On Wed, Sep 02, 2015 at 04:34:01PM +1000, Sam Bobroff wrote: > > On Tue, Sep 01, 2015 at 04:37:51PM +0530, Aravinda Prasad wrote: > > > > > > > > > On Monday 10 August 2015 09:35 AM, Sam Bobroff

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/4] target-ppc: Add FWNMI support in qemu for powerKVM guests

2015-09-02 Thread Sam Bobroff
On Thu, Sep 03, 2015 at 03:05:21PM +1000, David Gibson wrote: [snip] > Hm.. so why can't the hypervisor code do the retrying? Aravinda replied to this earlier in the thread: "Retrying cannot be done internally in h_report_mc_err hcall: only one thread can succeed entering qemu upon parallel hca

Re: [Qemu-devel] [PATCH 0/4] spapr: Small PAPR compliance fixes

2015-07-19 Thread Sam Bobroff
On Tue, Jul 07, 2015 at 05:26:49PM +1000, David Gibson wrote: > On Fri, Jul 03, 2015 at 01:42:16PM +1000, Sam Bobroff wrote: > > > > This patch set contains several small fixes to make QEMU more PAPR > > compliant. > > Applied to spapr-next, thanks. > > In fut

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 0/4] spapr: improve RTAS get_system_parameter

2014-06-25 Thread Sam Bobroff
On 25/06/14 21:12, Alexander Graf wrote: > > On 25.06.14 05:54, Sam Bobroff wrote: >> This series of patches improves QEMU's emulation of the RTAS call >> "ibm,get-system-parameter" by adding support for the "UUID" and "SPLPAR >> Characterist

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-04 Thread Sam Bobroff
On Wed, Aug 31, 2016 at 06:34:11PM +0200, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > XSCOM is an interface to a sideband bus provided by the POWER8 chip > pervasive unit, which gives access to a number of facilities in the > chip that are needed by the OPAL firmware and to a lesse

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/1] hw/net/spapr_llan: 6 byte mac address device tree entry

2016-11-21 Thread Sam Bobroff
On Mon, Nov 21, 2016 at 11:14:26AM +0100, Thomas Huth wrote: > On 21.11.2016 06:04, Sam Bobroff wrote: > > The spapr-vlan device in QEMU has always presented it's MAC address in > > the device tree as an 8 byte value, even though PAPR requires it to be > > 6 bytes. Th

[Qemu-devel] [PATCH v3 1/1] hw/net/spapr_llan: 6 byte mac address device tree entry

2016-11-21 Thread Sam Bobroff
The two bits in question are significant in a MAC address: they indicate a locally-administered unicast address.) So to maintain compatibility the old 8 byte value is presented when the lowest two bits of the first byte are not 10. Signed-off-by: Sam Bobroff --- v3: Made code comments more acc

Re: [Qemu-devel] [PATCH 1/1] ppc: Fix MMU model values needed by PR KVM

2016-12-01 Thread Sam Bobroff
Ping? On Thu, Jul 21, 2016 at 08:07:25AM +0100, Mark Cave-Ayland wrote: > On 21/07/16 06:55, Sam Bobroff wrote: > > > Commit 4322e8c "ppc: Fix 64K pages support in full emulation" added > > the POWERPC_MMU_64K flag to the POWERPC_MMU_2_06 and POWERPC_MMU_2_07 >

[Qemu-devel] [PATCH 1/1] hw/net/spapr_llan: 6 byte mac address device tree entry

2016-11-16 Thread Sam Bobroff
er, so any breakage should be rare. The breakage would appear as the MAC address losing the first two bytes and receiving two bytes of garbage at the other end. Signed-off-by: Sam Bobroff --- hw/net/spapr_llan.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --gi

[Qemu-devel] [PATCH v2 1/1] hw/net/spapr_llan: 6 byte mac address device tree entry

2016-11-20 Thread Sam Bobroff
The two bits in question are significant in a MAC address: they indicate a locally-administered unicast address.) So to maintain compatibility the old 8 byte value is presented when the lowest two bits of the first byte are not 10. Signed-off-by: Sam Bobroff --- v2: Re-introduced the old workaro

[Qemu-devel] [RFC PATCH v2 02/12] scripts/update-linux-headers.sh: refactor extra files

2017-02-22 Thread Sam Bobroff
Refactor the architecture specific code to make it easier to add new special case files. There should be no change in functionality. Signed-off-by: Sam Bobroff --- v2: I've factored the script to make it easier to add new files. scripts/update-linux-headers.sh

[Qemu-devel] [RFC PATCH v2 00/12] ISA 3.00 KVM guest support

2017-02-22 Thread Sam Bobroff
Legacy guest workaround moved to it's own patch. * I'm sorry for the bitfield constants in spapr_dt_ov5_platform_support() but there don't seem to be convienent macros for converting an option vector specifier (OV_BIT(x,y)) into a byte-mask. I'm open to suggestions. Sam Bo

[Qemu-devel] [RFC PATCH v2 04/12] Move virtio_mmio.h to fix update-linux-headers.sh

2017-02-22 Thread Sam Bobroff
d by the update script) but it is not one of the files in that set. Fix this by moving that file into a new directory. In the future if that file is added to the "headers_install" target then this change should be reverted. Signed-off-by: Sam Bobroff --- v2: * FWIW, here's one way of

[Qemu-devel] [RFC PATCH v2 03/12] scripts/update-linux-headers.sh: add new files for ARM

2017-02-22 Thread Sam Bobroff
The kernel has added some new headers for ARM, so add these so that the script can be run successfully. Signed-off-by: Sam Bobroff --- v2: * Added the two new arm headers. scripts/update-linux-headers.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/update-linux-headers.sh b

[Qemu-devel] [RFC PATCH v2 06/12] spapr: Add ibm, processor-radix-AP-encodings to the device tree

2017-02-22 Thread Sam Bobroff
Use the new ioctl, KVM_PPC_GET_RMMU_INFO, to fetch radix MMU information from KVM and present the page encodings in the device tree under ibm,processor-radix-AP-encodings. This provides page size information to the guest which is necessary for it to use radix mode. Signed-off-by: Sam Bobroff

[Qemu-devel] [RFC PATCH v2 09/12] spapr: Add h_register_process_table() hypercall

2017-02-22 Thread Sam Bobroff
Both radix and hash modes require guests to use h_register_process_table() to set up the MMU. Implement it using the new KVM ioctl KVM_PPC_CONFIGURE_V3_MMU. This hypercall is also necessary for fully emulated guests, so it will need to be reworked to integrate with Suraj's TCG patchset. --- v2: *

[Qemu-devel] [RFC PATCH v2 08/12] spapr: Only setup HTP if necessary.

2017-02-22 Thread Sam Bobroff
If QEMU is using KVM, and KVM is capable of running in radix mode, guests can be run in real-mode without allocating a HPT (because KVM will use a minimal RPT). So in this case, we avoid creating the HPT at reset time and later (during CAS) create it if it is necessary. Signed-off-by: Sam Bobroff

[Qemu-devel] [RFC PATCH v2 01/12] spapr: Small cleanup of PPC MMU enums

2017-02-22 Thread Sam Bobroff
st and should ease maintenance. Signed-off-by: Sam Bobroff --- hw/ppc/spapr.c | 8 +++--- target/ppc/cpu-qom.h| 12 - target/ppc/kvm.c| 8 +++--- target/ppc/mmu-hash64.c | 10 target/ppc/mmu_helper.c | 67 -

[Qemu-devel] [RFC PATCH v2 10/12] spapr: move spapr_populate_pa_features()

2017-02-22 Thread Sam Bobroff
In the next patch, spapr_fixup_cpu_dt() will need to call spapr_populate_pa_features() so move it's definition up without making any other changes. Signed-off-by: Sam Bobroff --- hw/ppc/spapr.c | 86 +- 1 file changed, 43 insertions(+

[Qemu-devel] [RFC PATCH v2 07/12] target-ppc: support KVM_CAP_PPC_MMU_RADIX, KVM_CAP_PPC_MMU_HASH_V3

2017-02-22 Thread Sam Bobroff
Query and cache the value of two new KVM capabilities that indicate KVM's support for new radix and hash modes of the MMU. Signed-off-by: Sam Bobroff --- v2: * cap_mmu_hash renamed to cap_mmu_hash_v3. target/ppc/kvm.c | 14 ++ target/ppc/kvm_ppc.h | 12 2

[Qemu-devel] [RFC PATCH v2 11/12] spapr: Enable ISA 3.0 MMU mode selection via CAS

2017-02-22 Thread Sam Bobroff
_table(), which has been added previously. Signed-off-by: Sam Bobroff --- v2: * Unused bits removed. * Logic and bit definitions changed due to architectural change. * Cleanly terminate QEMU if the guest requests an unavailable mode (as required by the new architecture). * Legacy guest work

[Qemu-devel] [RFC PATCH v2 12/12] spapr: Workaround for broken radix guests

2017-02-22 Thread Sam Bobroff
vector 1, and then removing the radix bit from ibm,pa-features. Note: This now requires regeneration of that node after CAS negotiation. Signed-off-by: Sam Bobroff --- hw/ppc/spapr.c | 15 +-- hw/ppc/spapr_hcall.c| 5 +++-- include/hw/ppc/spapr.h | 1

[Qemu-devel] [RFC PATCH v2 05/12] Update headers using update-linux-headers.sh

2017-02-22 Thread Sam Bobroff
since some kernel header files have become autogenerated. Signed-off-by: Sam Bobroff --- v2: * Added information about where the headers came from. include/standard-headers/linux/input-event-codes.h | 2 +- include/standard-headers/linux/pci_regs.h | 8 + include/standard-headers/

Re: [Qemu-devel] [RFC PATCH v2 04/12] Move virtio_mmio.h to fix update-linux-headers.sh

2017-02-27 Thread Sam Bobroff
On Fri, Feb 24, 2017 at 06:47:03PM +0200, Michael S. Tsirkin wrote: > On Thu, Feb 23, 2017 at 04:59:57PM +1100, Sam Bobroff wrote: > > Currently, running update-linux-headers.sh will produce a patch that > > deletes virtio_mmio.h, which is still needed. This happens because > >

[Qemu-devel] [PATCH 1/1] ppc: Fix MMU model values needed by PR KVM

2016-07-20 Thread Sam Bobroff
POWERPC_MMU_64K flag to the POWERPC_MMU_2_06a and POWERPC_MMU_2_07a values, preventing the error. Signed-off-by: Sam Bobroff --- I recently discovered that I can't start QEMU with KVM PR for modern pseries machines: $ rmmod kvm_hv $ modprobe kvm-pr $ qemu-system-ppc64 -nographic -vga none -

Re: [Qemu-devel] [1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-18 Thread Sam Bobroff
On Fri, Jul 08, 2016 at 08:49:49PM +1000, Michael Ellerman wrote: > On Wed, 2016-06-07 at 06:05:54 UTC, Sam bobroff wrote: > > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > > index 02416fe..06d79bc 100644 > > --- a/arch/powerpc/kvm/powerpc.c >

[Qemu-devel] [PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-19 Thread Sam Bobroff
Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to determine if a PowerPC KVM guest should use HTM (Hardware Transactional Memory). This will be used by QEMU to populate the pa-features bits in the guest's device tree. Signed-off-by: Sam Bobroff --- v2:

[Qemu-devel] [PATCH 1/1] target/ppc: Fix emulated userspace access to USPRG3

2017-04-19 Thread Sam Bobroff
read-only counterparts). This patch registers the new SPR for Book 3S processors and has it provide read-only access to SPR 0x113. Signed-off-by: Sam Bobroff --- target/ppc/translate_init.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target/ppc/translate_init.c b/target/ppc

[Qemu-devel] [PATCH 1/1] update-linux-headers: change SRCARCH to ARCH

2017-01-26 Thread Sam Bobroff
CARCH to ARCH, which corrects the problem. Signed-off-by: Sam Bobroff --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 72cf1fbf0a..ef11a8ab42 100755 --- a/scripts/

Re: [Qemu-devel] qemu-pcc 2.8.0 linux-user segfaults

2017-01-30 Thread Sam Bobroff
On Mon, Jan 16, 2017 at 04:03:21PM -0600, Aníbal Limón wrote: > > > On 01/16/2017 03:56 PM, Aníbal Limón wrote: > > Hi folks, > > > > I'm trying to upgrade qemu to 2.8.0 in Openembedded-core and segfaults > > in qemu-ppc when is executing: Hi Aníbal, I've recently encountered a similar problem

Re: [Qemu-devel] qemu-pcc 2.8.0 linux-user segfaults

2017-02-01 Thread Sam Bobroff
On Wed, Feb 01, 2017 at 03:25:05PM +, Peter Maydell wrote: > On 30 January 2017 at 23:52, Sam Bobroff wrote: > >> On 01/16/2017 03:56 PM, Aníbal Limón wrote: > >> > I'm trying to upgrade qemu to 2.8.0 in Openembedded-core and segfaults > >> > i

[Qemu-devel] [RFC PATCH 1/9] spapr: fix off-by-one error in spapr_ovec_populate_dt()

2017-02-06 Thread Sam Bobroff
The last byte of the option vector was missing due to an off-by-one error. Without this fix, client architecture support negotiation will fail because the last byte of option vector 5, which contains the MMU support, will be missed. Signed-off-by: Sam Bobroff --- hw/ppc/spapr_ovec.c | 2 +- 1

[Qemu-devel] [RFC PATCH 3/9] spapr: Add ibm, processor-radix-AP-encodings to the device tree

2017-02-06 Thread Sam Bobroff
Use the new ioctl, KVM_PPC_GET_RMMU_INFO, to fetch radix MMU information from KVM and present the page encodings in the device tree under ibm,processor-radix-AP-encodings. This provides page size information to the guest which is necessary for it to use radix mode. Signed-off-by: Sam Bobroff

[Qemu-devel] [RFC PATCH 5/9] spapr: Only setup HTP if necessary.

2017-02-06 Thread Sam Bobroff
Because KVM cannot support radix and hash modes concurrently, QEMU can avoid allocating a hash page table if KVM supports radix mode. Signed-off-by: Sam Bobroff --- hw/ppc/spapr.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c

[Qemu-devel] [RFC PATCH 4/9] target-ppc: support KVM_CAP_PPC_MMU_RADIX, KVM_CAP_PPC_MMU_HASH_V3

2017-02-06 Thread Sam Bobroff
Query and cache the value of two new KVM capabilities that indicate KVM's support for new radix and hash modes of the MMU. Signed-off-by: Sam Bobroff --- target/ppc/kvm.c | 14 ++ target/ppc/kvm_ppc.h | 12 2 files changed, 26 insertions(+) diff --git a/targe

[Qemu-devel] [RFC PATCH 0/9] ISA 3.00 KVM guest support

2017-02-06 Thread Sam Bobroff
d probably terminate with a descriptive message. Sam Bobroff (9): spapr: fix off-by-one error in spapr_ovec_populate_dt() Update headers using update-linux-headers.sh spapr: Add ibm,processor-radix-AP-encodings to the device tree target-ppc: support KVM_CAP_PPC_MMU_RADIX, KVM_CAP_PPC_M

[Qemu-devel] [RFC PATCH 8/9] spapr: Advertise ISA 3.0 MMU features in pa_features

2017-02-06 Thread Sam Bobroff
call without indicating ISA 3.00 support (specifically, if they do not indicate that they support either new radix or new hash mode) then the radix bit is removed from ibm,pa-features to avoid triggering the bug. Signed-off-by: Sam Bobroff --- hw/ppc/spapr.c | 125

[Qemu-devel] [RFC PATCH 2/9] Update headers using update-linux-headers.sh

2017-02-06 Thread Sam Bobroff
been manually adjusted to prevent that. Signed-off-by: Sam Bobroff --- include/standard-headers/linux/input-event-codes.h | 2 +- include/standard-headers/linux/pci_regs.h | 8 + include/standard-headers/linux/virtio_ids.h| 1 + linux-headers/asm-arm/kvm.h

[Qemu-devel] [RFC PATCH 9/9] spapr: Small cleanup of PPC MMU enums

2017-02-06 Thread Sam Bobroff
st and should ease maintenance. Signed-off-by: Sam Bobroff --- hw/ppc/spapr.c | 10 +++- target/ppc/cpu-qom.h| 12 - target/ppc/kvm.c| 8 +++--- target/ppc/mmu-hash64.c | 10 target/ppc/mmu_helper.c | 67 -

[Qemu-devel] [RFC PATCH 7/9] spapr: Set ISA 3.00 radix and hash bits in OV5

2017-02-06 Thread Sam Bobroff
and will cause ISA 3.00 guests to start using h_register_process_table(). Signed-off-by: Sam Bobroff --- hw/ppc/spapr.c | 8 include/hw/ppc/spapr_ovec.h | 6 ++ 2 files changed, 14 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 1411e470c0..c6a3a638cd

[Qemu-devel] [RFC PATCH 6/9] spapr: Add h_register_process_table() hypercall

2017-02-06 Thread Sam Bobroff
Both radix and hash modes require guests to use h_register_process_table() to set up the MMU. Implement it using the new KVM ioctl KVM_PPC_CONFIGURE_V3_MMU. This hypercall is also necessary for fully emulated guests, so it will need to be reworked to integrate with Suraj's TCG patchset. --- hw/pp

[Qemu-devel] [PATCH v2 1/1] target-ppc, tcg: fix usermode segfault with pthread_create()

2017-02-06 Thread Sam Bobroff
(), which causes the correct address to be used for the new thread and corrects the fault. Signed-off-by: Sam Bobroff --- v2: * Remove the NIP adjustment from the -TARGET_QEMU_ESIGRETURN case, it must break out with the same NIP as do_syscall(). linux-user/main.c | 3 ++- 1 file changed, 2 insertions

Re: [Qemu-devel] [RFC PATCH 1/9] spapr: fix off-by-one error in spapr_ovec_populate_dt()

2017-02-07 Thread Sam Bobroff
On Tue, Feb 07, 2017 at 04:12:47PM -0600, Michael Roth wrote: > Quoting Sam Bobroff (2017-02-06 20:56:44) > > The last byte of the option vector was missing due to an off-by-one > > error. Without this fix, client architecture support negotiation will > > fail because th

Re: [Qemu-devel] [RFC PATCH 2/9] Update headers using update-linux-headers.sh

2017-02-08 Thread Sam Bobroff
On Thu, Feb 09, 2017 at 12:55:49PM +1100, David Gibson wrote: > On Tue, Feb 07, 2017 at 01:56:45PM +1100, Sam Bobroff wrote: > > This provides some new definitions needed by ISA 3.00 guests. > > > > It is a large change because this is the first import since > > so

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 2/9] Update headers using update-linux-headers.sh

2017-02-08 Thread Sam Bobroff
On Tue, Feb 07, 2017 at 01:59:52PM +0100, Thomas Huth wrote: > On 07.02.2017 03:56, Sam Bobroff wrote: > > This provides some new definitions needed by ISA 3.00 guests. > > > > It is a large change because this is the first import since > > some kernel header file

Re: [Qemu-devel] [RFC PATCH 3/9] spapr: Add ibm, processor-radix-AP-encodings to the device tree

2017-02-08 Thread Sam Bobroff
On Thu, Feb 09, 2017 at 01:14:08PM +1100, David Gibson wrote: > On Tue, Feb 07, 2017 at 01:56:46PM +1100, Sam Bobroff wrote: > > Use the new ioctl, KVM_PPC_GET_RMMU_INFO, to fetch radix MMU > > information from KVM and present the page encodings in the device tree > > under i

[Qemu-devel] [PATCH for-2.10 0/1] scripts/update-linux-headers.sh: refactor extra files

2017-03-13 Thread Sam Bobroff
might still be useful. There is no functional change, this is maintenance only. Cheers, Sam. Sam Bobroff (1): scripts/update-linux-headers.sh: refactor extra files scripts/update-linux-headers.sh | 44 ++--- 1 file changed, 24 insertions(+), 20 dele

[Qemu-devel] [PATCH for-2.10 1/1] scripts/update-linux-headers.sh: refactor extra files

2017-03-13 Thread Sam Bobroff
update-linux-headers.sh now has enough code in it to suggest some refactoring. Parameterize some of it to make adding new files a bit easier. Signed-off-by: Sam Bobroff --- scripts/update-linux-headers.sh | 44 ++--- 1 file changed, 24 insertions(+), 20

[Qemu-devel] update-linux-headers.sh fails on clean kernel dir

2017-01-23 Thread Sam Bobroff
Hi QEMU developers, If I run scripts/update-linux-headers.sh from a clean checkout of QEMU and point it at a clean checkout of a recent linux kernel (4.10-rc1 or later), it fails: $ scripts/update-linux-headers.sh ~/tmp/linux/ ... scripts/Makefile.headersinst:62: *** Missing generated UAPI file

Re: [Qemu-devel] update-linux-headers.sh fails on clean kernel dir

2017-01-24 Thread Sam Bobroff
On Tue, Jan 24, 2017 at 10:32:36AM +, Marc-André Lureau wrote: > Hi > > On Tue, Jan 24, 2017 at 8:41 AM Sam Bobroff wrote: > > > Hi QEMU developers, > > > > If I run scripts/update-linux-headers.sh from a clean checkout of QEMU > > and point it at a cle

Re: [Qemu-devel] [PATCH] spapr: Don't accidentally advertise HTM support on POWER9

2017-05-21 Thread Sam Bobroff
0x00, 0x80, 0x00, 0x80, 0x00, /* 18 - 23 */ > +0x80, 0x00, 0x80, 0x00, 0x00, 0x00, /* 18 - 23 */ > /* 24: Ext. Dec, 26: 64 bit ftrs, 28: PM ftrs */ > 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 24 - 29 */ > /* 30: MMR, 32: LE atomic, 34: EBB + ext EBB */ > -- > 2.9.3 Looks good to me. Reviewed-by: Sam Bobroff

Re: [Qemu-devel] [PATCH v3 0/5] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests

2017-08-16 Thread Sam Bobroff
On Wed, Aug 16, 2017 at 02:41:59PM +0530, Aravinda Prasad wrote: > This series of patches adds support for FWNMI in PowerKVM guests. > > Memory error such as bit flips that cannot be corrected > by hardware is passed on to the kernel for handling > by raising machine check exception (an NMI). Upon

Re: [Qemu-devel] [PATCH v3 1/1] PPC: KVM: Support machine option to set VSMT mode

2017-08-17 Thread Sam Bobroff
On Fri, Aug 18, 2017 at 12:35:36PM +1000, David Gibson wrote: > On Tue, Aug 15, 2017 at 02:42:21PM +1000, Sam Bobroff wrote: > > KVM now allows writing to KVM_CAP_PPC_SMT which has previously been > > read only. Doing so causes KVM to act, for that VM, as if the host's > &

[Qemu-devel] [PATCH v4 0/1] Exploit settable KVM_CAP_PPC_SMT

2017-08-17 Thread Sam Bobroff
e follow-on effects: * A local error context had to be added because I'm adding hints to the error. * show_vsmt_possible() now appends an error hint. Sam Bobroff (1): PPC: KVM: Support machine option to set VSMT mode hw/ppc/spapr.c | 75 ++

[Qemu-devel] [PATCH v4 1/1] PPC: KVM: Support machine option to set VSMT mode

2017-08-17 Thread Sam Bobroff
hanged slightly because it has changed (in KVM) from a global capability to a VM-specific one. This won't cause a problem on older KVMs because VM capabilities fall back to global ones. Signed-off-by: Sam Bobroff --- == Version 3 -> version 4: == * Use "pseries" as the m

[Qemu-devel] [PATCH 1/4] spapr: Fix bug in h_signal_sys_reset()

2017-08-02 Thread Sam Bobroff
be unused because the Linux kernel only uses the broadcast target. Signed-off-by: Sam Bobroff --- hw/ppc/spapr_hcall.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 72ea5a8247..07b3da8dc4 100644 --- a/hw/ppc

[Qemu-devel] [PATCH 3/4] ppc: spapr: Rename cpu_dt_id to vcpu_id

2017-08-02 Thread Sam Bobroff
This field actually records the VCPU ID used by KVM and, although the value is also used in the device tree it is primarily the VCPU ID so rename it as such. Signed-off-by: Sam Bobroff --- hw/ppc/ppc.c| 8 hw/ppc/spapr.c | 16 hw/ppc

[Qemu-devel] [PATCH 2/4] e500: Use cpu_index instead of vcpu_dt_id

2017-08-02 Thread Sam Bobroff
e cpu with cpu_index == i). Signed-off-by: Sam Bobroff --- hw/ppc/e500.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 62f1857206..2a6d34ceb1 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -382,7 +382,6 @@

[Qemu-devel] [PATCH 4/4] ppc: spapr: Make VCPU ID handling private to SPAPR

2017-08-02 Thread Sam Bobroff
The concept of a VCPU ID that differs from the CPU's index (cpu->cpu_index) exists only within SPAPR machines so, move the functions ppc_get_vcpu_id() and ppc_get_cpu_by_vcpu_id() into spapr.c and rename them appropriately. Signed-off-by: Sam Bobroff --- hw/ppc/ppc.c

[Qemu-devel] [PATCH 0/4] Cleanup cpu_dt_id

2017-08-02 Thread Sam Bobroff
. (Alexander Graf: I've CC'd you because you're the maintainer of the e500 code.) Thanks to David Gibson for assistance with the design. Sam Bobroff (4): spapr: Fix bug in h_signal_sys_reset() e500: Use cpu_index instead of vcpu_dt_id ppc: spapr: Rename cpu_dt_id to vcpu_

Re: [Qemu-devel] [PATCH 4/4] ppc: spapr: Make VCPU ID handling private to SPAPR

2017-08-06 Thread Sam Bobroff
On Fri, Aug 04, 2017 at 01:10:19PM +1000, David Gibson wrote: > On Thu, Aug 03, 2017 at 04:28:52PM +1000, Sam Bobroff wrote: > > The concept of a VCPU ID that differs from the CPU's index > > (cpu->cpu_index) exists only within SPAPR machines so, move the > > fu

[Qemu-devel] [PATCH v2 0/1] Cleanup cpu_dt_id

2017-08-06 Thread Sam Bobroff
VCPU ID handling private to SPAPR * Re-arranged so that spapr_vcpu_id() calls kvm_arch_vcpu_id() rather than the other way around. Sam Bobroff (1): ppc: spapr: Make VCPU ID handling private to SPAPR hw/ppc/ppc.c | 21 - hw/ppc/spapr.c

[Qemu-devel] [PATCH v2 1/1] ppc: spapr: Make VCPU ID handling private to SPAPR

2017-08-06 Thread Sam Bobroff
The concept of a VCPU ID that differs from the CPU's index (cpu->cpu_index) exists only within SPAPR machines so, move the functions ppc_get_vcpu_id() and ppc_get_cpu_by_vcpu_id() into spapr.c and rename them appropriately. Signed-off-by: Sam Bobroff --- Changes in v2: * Re-arranged

Re: [Qemu-devel] [PATCH v2 1/1] ppc: spapr: Make VCPU ID handling private to SPAPR

2017-08-08 Thread Sam Bobroff
On Tue, Aug 08, 2017 at 04:24:01PM +1000, David Gibson wrote: > On Mon, Aug 07, 2017 at 04:33:29PM +1000, Sam Bobroff wrote: > > The concept of a VCPU ID that differs from the CPU's index > > (cpu->cpu_index) exists only within SPAPR machines so, move the > > fu

[Qemu-devel] [PATCH v3 1/1] ppc: spapr: Make VCPU ID handling private to SPAPR

2017-08-08 Thread Sam Bobroff
The concept of a VCPU ID that differs from the CPU's index (cpu->cpu_index) exists only within SPAPR machines so, move the functions ppc_get_vcpu_id() and ppc_get_cpu_by_vcpu_id() into spapr.c and rename them appropriately. Signed-off-by: Sam Bobroff --- Changes in v3: * Imp

[Qemu-devel] [PATCH v3 0/1] Cleanup cpu_dt_id

2017-08-08 Thread Sam Bobroff
ersion 2: == Patch 1/1: ppc: spapr: Make VCPU ID handling private to SPAPR * Re-arranged so that spapr_vcpu_id() calls kvm_arch_vcpu_id() rather than the other way around. Sam Bobroff (1): ppc: spapr: Make VCPU ID handling private to SPAPR hw/ppc/ppc.c | 21 ---

  1   2   >