Re: [PATCH v4 07/17] target/ppc: Disconnect hflags from MSR

2021-03-23 Thread David Gibson
On Tue, Mar 23, 2021 at 11:04:03AM -0600, Richard Henderson wrote: > On 3/22/21 5:54 PM, David Gibson wrote: > > On Mon, Mar 22, 2021 at 10:55:46AM -0600, Richard Henderson wrote: > > > On 3/21/21 9:52 PM, David Gibson wrote: > > > > > +/* > > > > > + * Bits for env->hflags. > > > > > + * > > > > >

Re: [PATCH v4 07/17] target/ppc: Disconnect hflags from MSR

2021-03-23 Thread Richard Henderson
On 3/22/21 5:54 PM, David Gibson wrote: On Mon, Mar 22, 2021 at 10:55:46AM -0600, Richard Henderson wrote: On 3/21/21 9:52 PM, David Gibson wrote: +/* + * Bits for env->hflags. + * + * Most of these bits overlap with corresponding bits in MSR, + * but some come from other sources. Be cautious

Re: [PATCH v4 07/17] target/ppc: Disconnect hflags from MSR

2021-03-22 Thread David Gibson
On Mon, Mar 22, 2021 at 10:55:46AM -0600, Richard Henderson wrote: > On 3/21/21 9:52 PM, David Gibson wrote: > > > +/* > > > + * Bits for env->hflags. > > > + * > > > + * Most of these bits overlap with corresponding bits in MSR, > > > + * but some come from other sources. Be cautious when modifyi

Re: [PATCH v4 07/17] target/ppc: Disconnect hflags from MSR

2021-03-22 Thread Richard Henderson
On 3/21/21 9:52 PM, David Gibson wrote: +/* + * Bits for env->hflags. + * + * Most of these bits overlap with corresponding bits in MSR, + * but some come from other sources. Be cautious when modifying. Yeah.. I'm not sure "be cautious" is enough of a warning. The exact value of some but not

Re: [PATCH v4 07/17] target/ppc: Disconnect hflags from MSR

2021-03-21 Thread David Gibson
On Mon, Mar 15, 2021 at 12:46:05PM -0600, Richard Henderson wrote: > Copying flags directly from msr has drawbacks: (1) msr bits > mean different things per cpu, (2) msr has 64 bits on 64 cpus > while tb->flags has only 32 bits. > > Create a enum to define these bits. Document the origin of each

[PATCH v4 07/17] target/ppc: Disconnect hflags from MSR

2021-03-15 Thread Richard Henderson
Copying flags directly from msr has drawbacks: (1) msr bits mean different things per cpu, (2) msr has 64 bits on 64 cpus while tb->flags has only 32 bits. Create a enum to define these bits. Document the origin of each bit. This fixes the truncation of env->hflags to tb->flags, because we no lon