From mboxrd@z Thu Jan 1 00:00:00 1970 From: Natalie Protasevich Subject: Re: Alignment check on domU (2.6.32) Date: Tue, 30 Mar 2010 04:34:23 -0700 Message-ID: <32209efe1003300434u2a3e7120wb73074bb08109948@mail.gmail.com> References: <32209efe1003292008y5880e9bfib238c089377b4ba7@mail.gmail.com> <4BB1CD140200007800037BF6@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0651672348==" Return-path: In-Reply-To: <4BB1CD140200007800037BF6@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0651672348== Content-Type: multipart/alternative; boundary=000e0cd2a144e18c860483030229 --000e0cd2a144e18c860483030229 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Mar 30, 2010 at 1:06 AM, Jan Beulich wrote: > >>> Natalie Protasevich 30.03.10 05:08 >>> > > I cheated and cleared the AM flag in cr0 (as one can see in this > > trace) but this didn't help. > > Assuming you did this in the hypervisor, this would point at a CPU bug. > There should not be any alignment check exceptions with this bit clear. > > > I haven't figured out what sets the AM flag... > > The hypervisor sets up CR0 this way, and doesn't allow altering later. > In order to allow the kernel to support alignment check exceptions > for user mode, Xen needs to do it this way and clears AC each time > passing control to (64-bit) kernel code. > I was trying to be careful with AC/AM, but still messed up :) I meant to say I can't find so far who sets the AC flag, although I sprinkled checks in various places, next was going to see how I can set HW breakpoint. > > What you'll need to do is look for where AC gets set, probably by > modifying all asm-s using popf, as this is what seems bogus. > Thanks for the hint! I will look at those... --Natalie > > Jan > > --000e0cd2a144e18c860483030229 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Tue, Mar 30, 2010 at 1:06 AM, Jan Beulich <= JBeulich@novell.com> w= rote:
>>> Natalie Protasevich <= protasnb@gmail.com> 30.03.10 05:08 >>>
> I cheated and cleared the AM flag in cr0 (as one can= see in this
> trace) but this didn't help.

Assuming you did this in the hypervisor, this would point at a CPU bu= g.
There should not be any alignment check exceptions with this bit clear.

> I haven't figured out what sets the AM flag...

The hypervisor sets up CR0 this way, and doesn't allow altering l= ater.
In order to allow the kernel to support alignment check exceptions
for user mode, Xen needs to do it this way and clears AC each time
passing control to (64-bit) kernel code.

I was try= ing to be careful with AC/AM, but still messed up :) I meant to say I can&#= 39;t find so far who sets the AC flag,=A0 although I sprinkled checks in va= rious places, next was going to see how I can set HW breakpoint.
=A0

What you'll need to do is look for where AC gets set, probably by
modifying all asm-s using popf, as this is what seems bogus.
=A0
Thanks for the hint! I will look at those...

--= Natalie

Jan


--000e0cd2a144e18c860483030229-- --===============0651672348== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0651672348==--