From: "Gregory Haskins" <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
To: "Avi Kivity" <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>,
"Waba" <waba-QpUHywXCggs@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Solaris 10 doesn't work under KVM
Date: Mon, 12 Feb 2007 09:57:47 -0500 [thread overview]
Message-ID: <45D03A33.BA47.005A.0@novell.com> (raw)
In-Reply-To: <45D03801.4040006-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
>>> On Mon, Feb 12, 2007 at 4:48 AM, in message <45D03801.4040006-atKUWr5tajBWk0Htik3J/w@public.gmane.org>,
Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
> Waba wrote:
>> It took me a while, but I figured it out... nearly!
>>
>> Everything SIGILLs after the fs- root service is started. Its start
>> method does several things, but the problematic bit is replacing the
>> libc with an optimised version (namely, /usr/lib/libc/libc_hwcap1.so.1,
>> which makes use of the SSE, MMX, CMOV, SEP and FPU instruction sets
>> according to file(1)).
>>
>> All these flags are indeed advertised in the CPUID (isainfo - v: sse2 sse
>> fxsr mmx cmov sep cx8 tsc fpu)). If the amd_sysc bit had been present,
>> the hwcap2 version would have been selected by moe(1), I guess (adds
>> SSE2 support and replaces SEP by AMD_SYSC).
>>
>> Disabling the libc replacement in /lib/svc/method/fs- root entirely
>> workarounds the problem.
>>
>> Further investigating, I tricked ls(1) into using the optimised libc
>> through LD_LIBRARY_PATH and obtained a core. mdb(1) told me that the
>> culprit was hiding at libc`memset+0x74. And finally, dis(1) revealed
>> that the faulty instruction is "movups (%esp), %xmm0", a SSE feature.
>> The %xmm0 register is apparently for storage purposes only, as the only
>> instructions used to access it are movups, movntps and movaps.
>>
>> At this point I hope that it makes a lot of sense to you, because I
>> have no idea why it works fine on Avi's Opteron, etc.
>>
>> Let me know if you need any additional debugging.
>>
>
> Let's look at the control registers at the time of the SIGILL. Can you
> reproduce the error with the attached patch and send dmesg?
Hi Avi,
I have a sneaking suspicion that this may be the same root-cause of my findings with #UD on SLES. I wrote a program that allows you to take MD5 sum pages of a running program's text sections and compare them. I then compared the output of GRUB running on bare-metal and as a KVM guest and they were identical (except for the expected text that is affected by relocation). This was not what I was expecting since we speculated MMU corruption. Admittedly the test is not conclusive since the page mappings could surely be different under the load of the target apps execution verses the delta program. But I was hoping for a smoking gun ;)
Note that I am seeing #UD under other apps as well (Firefox for instance). If there were a disparity between the advertised and actual CPUID flags and SLES is using libraries that interpret the flags, that could explain the behavior here. Note that grub is blowing up in libc for me as well. I will explore a CPUID disparity as a possibility next and report back. What I did notice is that KVM seems to report the CPU as an AMD, even though I am running on a Woodcrest. I would speculate that the problem is that some AMD specific flag (e.g. amd_sysc) is set when it should not be.
Note that I am currently being pulled off KVM work for about a week so I will be silent for a bit.
-Greg
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
next prev parent reply other threads:[~2007-02-12 14:57 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-28 14:40 Solaris 10 doesn't work under KVM Waba
2007-01-28 17:38 ` Michael Riepe
[not found] ` <45BCDF8C.1000508-0QoEqw4nQxo@public.gmane.org>
2007-01-28 18:28 ` Waba
2007-01-28 19:27 ` Avi Kivity
[not found] ` <45BCF91E.2030704-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-01-28 20:25 ` Anthony Liguori
2007-01-28 22:23 ` Waba
2007-01-29 8:28 ` Avi Kivity
[not found] ` <45BDB03B.8000305-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-01-29 9:40 ` Avi Kivity
2007-01-29 11:49 ` Avi Kivity
[not found] ` <45BDDF32.3010607-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-01 21:49 ` Waba
2007-02-02 19:19 ` Joerg Roedel
[not found] ` <20070202191942.GB8804-5C7GfCeVMHo@public.gmane.org>
2007-02-04 9:50 ` Avi Kivity
2007-02-04 18:31 ` Waba
2007-02-07 9:42 ` Avi Kivity
[not found] ` <45C99EE9.3010306-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-07 23:04 ` Waba
2007-02-08 9:27 ` Avi Kivity
[not found] ` <45CAECEB.4000701-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-08 9:58 ` Joerg Roedel
[not found] ` <20070208095816.GA5204-5C7GfCeVMHo@public.gmane.org>
2007-02-08 10:04 ` Avi Kivity
[not found] ` <45CAF5C6.8020104-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-08 10:19 ` Joerg Roedel
[not found] ` <20070208101945.GB5204-5C7GfCeVMHo@public.gmane.org>
2007-02-08 10:39 ` Avi Kivity
[not found] ` <45CAFDF6.4020402-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-08 11:00 ` Cyril Plisko
[not found] ` <c7dddeaa0702080300i31eb933fjfcdb4570f82b0a79-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-02-08 12:21 ` Avi Kivity
[not found] ` <45CB15E3.7010803-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-08 13:45 ` Cyril Plisko
2007-02-08 14:45 ` Joerg Roedel
[not found] ` <20070208144530.GC5204-5C7GfCeVMHo@public.gmane.org>
2007-02-08 14:58 ` Cyril Plisko
2007-02-10 13:34 ` Waba
2007-02-11 9:14 ` Avi Kivity
[not found] ` <45CEDE92.4090204-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-11 10:43 ` Waba
2007-02-11 10:58 ` Avi Kivity
2007-02-12 9:48 ` Avi Kivity
[not found] ` <45D03801.4040006-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-12 14:57 ` Gregory Haskins [this message]
[not found] ` <45D03A33.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
2007-02-12 17:35 ` Dor Laor
2007-02-13 14:06 ` Waba
2007-02-13 14:37 ` Avi Kivity
[not found] ` <45D1CD1F.907-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-13 21:44 ` Waba
2007-02-14 13:20 ` Avi Kivity
[not found] ` <45D30C92.8000808-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-16 12:14 ` Waba
2007-02-18 9:44 ` Avi Kivity
2007-02-12 17:58 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45D03A33.BA47.005A.0@novell.com \
--to=ghaskins-et1tbqhtxzrqt0dzr+alfa@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=waba-QpUHywXCggs@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox