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

2019-12-25 Thread David Gibson
On Tue, Dec 24, 2019 at 01:10:34PM -0300, Fabiano Rosas wrote: > David Gibson writes: > > >> It looks like the hflags MSR_LE is being updated correctly with TCG. But > >> with KVM we only touch it on system_reset > > > > Ah.. right. I think to fix that we'd want an hreg_compute_hflags() at > > t

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

2019-12-24 Thread Fabiano Rosas
David Gibson writes: >> It looks like the hflags MSR_LE is being updated correctly with TCG. But >> with KVM we only touch it on system_reset > > Ah.. right. I think to fix that we'd want an hreg_compute_hflags() at > the end of sucking the state out of KVM. > Hm.. The hflags is a TCG thing tha

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

2019-12-23 Thread David Gibson
On Mon, Dec 23, 2019 at 08:27:49PM -0300, Fabiano Rosas wrote: > David Gibson writes: > > > b) AFAICT this is the *only* thing that looks for the LE bit in > > hflags. Given that, and the fact that it would be wrong in most cases, > > we should remove it from hflags entirely along with this chang

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

2019-12-23 Thread David Gibson
On Mon, Dec 23, 2019 at 06:35:30PM -0300, Maxiwell S. Garcia wrote: > 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. Bu

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

2019-12-23 Thread Fabiano Rosas
David Gibson writes: > b) AFAICT this is the *only* thing that looks for the LE bit in > hflags. Given that, and the fact that it would be wrong in most cases, > we should remove it from hflags entirely along with this change. > I see there is: static void ppc_tr_init_disas_context(DisasContext

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_LE bit > > in env->hfl

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

2019-12-22 Thread David Gibson
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_LE bit > in env->hflags doesn't contain the same information that env->msr. > > Signed-of

[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 --- target/ppc/transl