Re: [PATCH] target/ppc: fix memory dump endianness in QEMU monitor

2019-12-23 Thread Maxiwell S. Garcia
On Mon, Dec 23, 2019 at 05:30:43PM +1100, David Gibson wrote: > On Thu, Dec 19, 2019 at 01:38:54PM -0300, Maxiwell S. Garcia wrote: > > The env->hflags is computed in ppc_cpu_reset(), using the MSR register > > as input. But at the point ppc_disas_set_info() is called the MSR

[PATCH] target/ppc: fix memory dump endianness in QEMU monitor

2019-12-19 Thread Maxiwell S. Garcia
The env->hflags is computed in ppc_cpu_reset(), using the MSR register as input. But at the point ppc_disas_set_info() is called the MSR_LE bit in env->hflags doesn't contain the same information that env->msr. Signed-off-by: Maxiwell S. Garcia Signed-off-by: Fabiano Rosas --- t

[Qemu-devel] [PATCH] migration: Do not re-read the clock on pre_save in case of paused guest

2019-08-29 Thread Maxiwell S. Garcia
not re-reads the clock in case of paused state (cold migration). Signed-off-by: Maxiwell S. Garcia --- hw/i386/kvm/clock.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 80c133a724..2c59b6894b 100644 --- a/hw

[Qemu-devel] [PATCH v2] migration: Do not re-read the clock on pre_save in case of paused guest

2019-07-11 Thread Maxiwell S. Garcia
, like process stalls, could happen after migration. So, this patch checks the runstate of guest in the pre_save handler and do not re-reads the timebase in case of paused state (cold migration). Signed-off-by: Maxiwell S. Garcia --- hw/ppc/ppc.c | 13 + target/ppc/cpu-qom.h

Re: [Qemu-devel] [PATCH] migration: Use RunState enum to save global state pre migrate

2019-06-25 Thread Maxiwell S. Garcia
On Tue, Jun 25, 2019 at 11:18:00AM +0100, Dr. David Alan Gilbert wrote: > * Maxiwell S. Garcia (maxiw...@linux.ibm.com) wrote: > > The GlobalState struct has two confusing fields: > > - uint8_t runstate[100] > > - RunState state > > > > The first field saves the '

[Qemu-devel] [PATCH] migration: Use RunState enum to save global state pre migrate

2019-06-24 Thread Maxiwell S. Garcia
' to 'state_pre_migrate' and use the same type used by 'state' and 'current_run_state' variables. Signed-off-by: Maxiwell S. Garcia --- include/sysemu/sysemu.h | 2 +- migration/global_state.c | 65 ++-- vl.c | 11 ++- 3 files changed, 12 insertions

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] spapr: Do not re-read the clock on pre_save handler on migration

2019-06-05 Thread Maxiwell S. Garcia
On Thu, May 30, 2019 at 11:13:41AM +1000, David Gibson wrote: > On Thu, May 23, 2019 at 05:18:51PM -0300, Maxiwell S. Garcia wrote: > > On Thu, May 23, 2019 at 09:29:52AM +1000, David Gibson wrote: > > > On Mon, May 20, 2019 at 05:43:40PM -0300, Maxiwell S. Garcia wrote: &g

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] spapr: Do not re-read the clock on pre_save handler on migration

2019-05-23 Thread Maxiwell S. Garcia
On Thu, May 23, 2019 at 09:29:52AM +1000, David Gibson wrote: > On Mon, May 20, 2019 at 05:43:40PM -0300, Maxiwell S. Garcia wrote: > > This handler was added in the commit: > > 42043e4f1241: spapr: clock should count only if vm is running > > > > In a scenario witho

[Qemu-devel] [PATCH 0/1] spapr: Do not re-read the clock on pre_save handler on migration

2019-05-20 Thread Maxiwell S. Garcia
ects could happen after migration. [1] http://lists.nongnu.org/archive/html/qemu-devel/2016-12/msg00610.html Maxiwell S. Garcia (1): spapr: Do not re-read the clock on pre_save handler on migration hw/ppc/ppc.c | 24 1 file changed, 24 deletions(-) -- 2.20.1

[Qemu-devel] [PATCH 1/1] spapr: Do not re-read the clock on pre_save handler on migration

2019-05-20 Thread Maxiwell S. Garcia
of this is a lot of process stall messages (with call traces) in the kernel guest. Signed-off-by: Maxiwell S. Garcia --- hw/ppc/ppc.c | 24 1 file changed, 24 deletions(-) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index ad20584f26..3fb50cbeee 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 0/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-04-01 Thread Maxiwell S. Garcia
Hi Greg, Thanks for your review. I added some comments below... On Fri, Mar 29, 2019 at 01:29:51PM +0100, Greg Kurz wrote: > On Thu, 28 Mar 2019 15:39:45 -0300 > "Maxiwell S. Garcia" wrote: > > > Hi, > > > > On Thu, Mar 28, 2019 at 02:21:51PM +0100, Greg

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 0/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-03-28 Thread Maxiwell S. Garcia
Hi, On Thu, Mar 28, 2019 at 02:21:51PM +0100, Greg Kurz wrote: > On Wed, 27 Mar 2019 17:41:00 -0300 > "Maxiwell S. Garcia" wrote: > > > Here are two patches to add a handler for ibm,get-vpd RTAS calls. > > This RTAS exposes host information in case of se

[Qemu-devel] [PATCH v7 2/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-03-27 Thread Maxiwell S. Garcia
' information. Powerpc-utils tools can dispatch RTAS calls to retrieve host information using this ibm,get-vpd interface. The 'host-serial' and 'host-model' nodes of device-tree hold the same information but in a static manner, which is useless after a migration operation. Signed-off-by: Maxiwell S

[Qemu-devel] [PATCH v7 1/2] spapr: helper functions to get valid host fields

2019-03-27 Thread Maxiwell S. Garcia
The pseries options 'host-serial' and 'host-model' accepts 'none', 'passthrough', or content. The helper functions in this commit return a valid host field based on user options. Signed-off-by: Maxiwell S. Garcia Reviewed-by: Greg Kurz --- hw/ppc/spapr.c | 48

[Qemu-devel] [PATCH v7 0/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-03-27 Thread Maxiwell S. Garcia
line. These parameters are useful to build the guest device tree and to return get-vpd RTAS calls. The patch 2 adds the ibm,get-vpd itself. Update v7: * rtas_get_vpd_fields as a static array in spapr machine state Maxiwell S. Garcia (2): spapr: helper functions to get valid host fields spapr-rtas

Re: [Qemu-devel] [Qemu-ppc] [PATCH v6 2/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-03-20 Thread Maxiwell S. Garcia
On Thu, Mar 14, 2019 at 06:26:02PM +0100, Greg Kurz wrote: > On Thu, 14 Mar 2019 13:29:49 -0300 > "Maxiwell S. Garcia" wrote: > > > This adds a handler for ibm,get-vpd RTAS calls, allowing pseries guest > > to collect host information. It is disabled by default to

[Qemu-devel] [PATCH v6 0/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-03-14 Thread Maxiwell S. Garcia
line. These parameters are useful to build the guest device tree and to return get-vpd RTAS calls. The patch 2 adds the ibm,get-vpd itself. Update v6: * Use macro to generate spapr_get_valid_host_* functions * Add rtas_get_vpd_fields in spapr machine state Maxiwell S. Garcia (2): spapr: helper

[Qemu-devel] [PATCH v6 2/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-03-14 Thread Maxiwell S. Garcia
' information. Powerpc-utils tools can dispatch RTAS calls to retrieve host information using this ibm,get-vpd interface. The 'host-serial' and 'host-model' nodes of device-tree hold the same information but in a static manner, which is useless after a migration operation. Signed-off-by: Maxiwell S

[Qemu-devel] [PATCH v6 1/2] spapr: helper functions to get valid host fields

2019-03-14 Thread Maxiwell S. Garcia
The pseries options 'host-serial' and 'host-model' accepts 'none', 'passthrough', or content. The helper functions in this commit return a valid host field based on user options. Signed-off-by: Maxiwell S. Garcia --- hw/ppc/spapr.c | 48

Re: [Qemu-devel] [Qemu-ppc] [PATCH v5 1/2] spapr: helper functions to get valid host fields

2019-03-13 Thread Maxiwell S. Garcia
On Tue, Mar 12, 2019 at 11:52:24AM +0100, Greg Kurz wrote: Hi Greg, > On Mon, 11 Mar 2019 19:57:08 -0300 > "Maxiwell S. Garcia" wrote: > > > The pseries options 'host-serial' and 'host-model' accepts > > 'none', 'passthrough', or content. The helper > > fu

[Qemu-devel] [PATCH v5 2/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-03-11 Thread Maxiwell S. Garcia
S. Garcia --- hw/ppc/spapr_rtas.c| 110 + include/hw/ppc/spapr.h | 12 - 2 files changed, 121 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 7a2cb786a3..778abcef91 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw

[Qemu-devel] [PATCH v5 0/2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-03-11 Thread Maxiwell S. Garcia
line. These parameters are useful to build the guest device tree and to return get-vpd RTAS calls. The patch 2 adds the ibm,get-vpd itself. Maxiwell S. Garcia (2): spapr: helper functions to get valid host fields spapr-rtas: add ibm,get-vpd RTAS interface hw/ppc/spapr.c | 58

[Qemu-devel] [PATCH v5 1/2] spapr: helper functions to get valid host fields

2019-03-11 Thread Maxiwell S. Garcia
The pseries options 'host-serial' and 'host-model' accepts 'none', 'passthrough', or content. The helper functions in this commit return a valid host field based on user options. Signed-off-by: Maxiwell S. Garcia --- hw/ppc/spapr.c | 58

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4] spapr-rtas: add ibm, get-vpd RTAS interface

2019-03-05 Thread Maxiwell S. Garcia
Hi Murilo, On Tue, Mar 05, 2019 at 04:39:38PM -0300, Murilo Opsfelder Araujo wrote: > Hi, Maxiwell. > > On Thu, Feb 28, 2019 at 05:04:37PM -0300, Maxiwell S. Garcia wrote: > > This adds a handler for ibm,get-vpd RTAS calls, allowing pseries guest > > to collect host inform

[Qemu-devel] [PATCH v4] spapr-rtas: add ibm, get-vpd RTAS interface

2019-02-28 Thread Maxiwell S. Garcia
S. Garcia --- hw/ppc/spapr_rtas.c| 121 + include/hw/ppc/spapr.h | 17 +- 2 files changed, 137 insertions(+), 1 deletion(-) Update v4: * Allows enable/disable host-serial and host-model options individually diff --git a/hw/ppc/spapr_rtas.c b

[Qemu-devel] [PATCH v3] spapr-rtas: add ibm, get-vpd RTAS interface

2019-02-27 Thread Maxiwell S. Garcia
S. Garcia --- hw/ppc/spapr_rtas.c| 103 + include/hw/ppc/spapr.h | 16 ++- 2 files changed, 118 insertions(+), 1 deletion(-) Update v3: * Use 'host-serial' and 'host-model' options to enable/disable ibm,get-vpd * Remove 'export-vpd' option

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-02-26 Thread Maxiwell S. Garcia
On Tue, Feb 26, 2019 at 02:21:03PM +1100, David Gibson wrote: > On Mon, Feb 25, 2019 at 08:20:09PM -0300, Murilo Opsfelder Araujo wrote: > > Hi, Maxiwell. > > > > On Mon, Feb 25, 2019 at 01:23:25PM -0300, Maxiwell S. Garcia wrote: > > > This adds a handler for ib

[Qemu-devel] [PATCH v2] spapr-rtas: add ibm, get-vpd RTAS interface

2019-02-25 Thread Maxiwell S. Garcia
operation. Signed-off-by: Maxiwell S. Garcia --- hw/ppc/spapr.c | 21 ++ hw/ppc/spapr_rtas.c| 95 ++ include/hw/ppc/spapr.h | 17 +++- 3 files changed, 132 insertions(+), 1 deletion(-) Update v2: - rtas_ibm_get_vpd(): fix initialization

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr-rtas: add ibm, get-vpd RTAS interface

2019-02-25 Thread Maxiwell S. Garcia
On Mon, Feb 25, 2019 at 04:11:53PM +1100, David Gibson wrote: > On Sat, Feb 23, 2019 at 11:40:57AM -0300, Maxiwell S. Garcia wrote: > > This adds a handler for ibm,get-vpd RTAS calls, allowing pseries > > guest to collect host information. It is disabled by default to >

[Qemu-devel] [PATCH] spapr-rtas: add ibm,get-vpd RTAS interface

2019-02-23 Thread Maxiwell S. Garcia
operation. Signed-off-by: Maxiwell S. Garcia --- hw/ppc/spapr.c | 21 ++ hw/ppc/spapr_rtas.c| 93 ++ include/hw/ppc/spapr.h | 17 +++- 3 files changed, 130 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index