What's the correct forum for AMD64 kernel questions?

Hi,
I’m desperately trying figure out how to interpret some of the lines in the kernel ring buffer relating to the IOMMU on my AMD64 system.

I’ve come to the conclusion that this forum is not the correct one as my previous queries here on this subject have met with complete silence.

I’ve avoided barging into any of the kernel dev forums because I know just enough to be really dangerous and I don’t want to impose on them with what I expect are simple questions.

So-- Please point me to some locations where I might get my questions answered or at least get pointed to the docs that will answer my questions.

Thanks,
ron

On 12/28/2011 05:16 AM, r widell wrote:
>
> I’ve come to the conclusion that this forum is not the correct one

yep, this is a forum of openSUSE users trying to help other (newer,
less experienced) users with their “user level” problems…

> I’ve avoided barging into any of the kernel dev forums because I know
> just enough to be really dangerous and I don’t want to impose on them
> with what I expect are simple questions.

that is VERY smart on your part!! good on you.

> So-- Please point me to some locations where I might get my questions
> answered or at least get pointed to the docs that will answer my
> questions.

hmmmm…not that i’ve read much (any?) of them but you might try
looking in /usr/share/doc/kernel where, on my machine i find LOTS of
kernel documentation…(if you find none of those, open YaST > Software
Management and search on kernel and select, and install kernel-docs and
keernel-devel, hmmmmm…you may have to install the kernel-source to
get all the docs)

and don’t miss other stuff scattered around, like:

/usr/src/linux/Documentation/kernel-*.txt (three files there, in my
system…and it appears (to me) that everything in that
“Documentation” directory is in some way related to the kernel…

and, of course you do know (i guess) that http://www.kernel.org/doc/ is
the well where you should dip your bucket…

and, of course, never miss this resource: http://tinyurl.com/893r2sr

now, where to ask after all those great docs leave you wanting? well,
you could begin here
http://en.opensuse.org/openSUSE:Communication_channels and look for
folks on IRC or in the mail lists (here are users, there are devs and
hardcore hackers…some more pleasant to talk to than others–DO your
homework or might feel slammed…and, read the “Mailing list netiquette”
and “IRC for the newbies”…then, when ready i’d suggest you first try
on IRC…maybe you get lucky and get a GREAT pointer–one thing for
sure, they like to help folks who have tried hard to help themselves first.)


DD http://tinyurl.com/DD-Caveat http://tinyurl.com/DD-Hardware
http://tinyurl.com/DD-Software
openSUSE®, the “German Engineered Automobiles” of operating systems!

First, thank you for the replay and the valuable pointers.

And I wish i could be there. All I want to do is to load up some guest VM’s on this openSUSE 12.1 machine with KVM installed. Unfortunately, if the underlying hardware isn’t correctly configured the software on top has some issues (especially performance).

I’ve already learned the hard way that the motherboard manufacturers only want to hear about Windows, so if Linux is mentioned anywhere in a message to their tech support people they immediately pull the “Go check the Linux Forums” trigger and blow you off.

So I’m trying to figure out how to decipher the messages the kernel places into the ring buffer in an attempt to tell the motherboard manufacturer specifically what they need to change in their BIOS to correctly enable that hardware.

My searching (yes, Google Is My Friend) leads me to believe that this problem is more common than not. So the motherboard vendor will hopefully fix it if I can tell them exactly what to fix.

…]–one thing for
sure, they like to help folks who have tried hard to help themselves first.)

Agreed. What I have done so far (mostly as a result of my searches):

  1. Downloaded the kernel source package from the openSUSE12.1 repository
  2. Downloaded the ACPI v4.0a spec
  3. Downloaded the AMD I/O Virtualization Technology spec (both Rev 1.26 & 2.0)

I’ve been reading them all voraciously, but I’m not a PC architect so bootstrapping myself is a slow process.

Again, I’m not trying to debug the kernel, write a new driver or anything like that. I’m trying to use the info that the kernel provides to try and debug the (definitely NOT open source) BIOS so that this machine will eventually run properly.

Thanks again for your time and patience. I see some tools there that could be very helpful.

ron

On 2011-12-29 00:26, r widell wrote:
> First, thank you for the replay and the valuable pointers.

There is an opensuse-kernel mail list. They should be happy to help you.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On Wed, 28 Dec 2011 23:26:03 +0000, r widell wrote:

> All I want to do is to load up some guest VM’s on this openSUSE 12.1
> machine with KVM installed.

You might try in the virtualization forum and step back from an assumed
solution and instead describe the issue you’re having. The virtualization
forum here is new, so perhappps you hadn’t seen it. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 12/29/2011 06:53 AM, Jim Henderson wrote:

> try in the virtualization forum

+1

that was the first thing i thought when i saw Ron’s “All I want to do is
to load up some guest VM’s on this openSUSE 12.1 machine with KVM
installed.”

and, the second thing i thought was: dump KVM and install (with YaST
or zypper) Virtual Box…

now, others may have a different opinion about the current “best” tool
to build VMs…so, ymmv!


DD
openSUSE®, the “German Engineered Automobiles” of operating systems!

I apologize for the tardy acknowledgement to the additional responses. I caught a really nasty upper respiratory infection (vernacular: a cold) on New Year’s Eve and the only thing I did for two weeks was sleep 20+ hours/day.

An excellent suggestion. Thank You. I’ll go check out the archives and sign up for the mailing list. I’ll just lurk for awhile to get a sense for the accepted cultural norms prior to speaking up.

Ah yes, the time-honored axiom, “If it ain’t broke, don’t fix it.” A philosophy which I heartily endorse. But the corollary is “If you want to use it, but it’s broke, then fix it.”

I omitted a lot of extraneous data from my original and follow-up posts because it didn’t seem pertinent to the query I was posing. Among that data was timing for a simple performance measurement experiment I performed. In an AMD system there are three different methods of achieving the IOMMU functionality, they are:

  1. SWIOTLB: The data is moved from low (<4GB) memory to the pages mapped into the space allocated to the relevant task (in this case, a VM) entirely via code executed by the host CPU as a kernel-mode function.
  2. GART: In this case, the data is moved with a hardware assist provided by re-purposing the GART.
  3. AMD-Vi: Full hardware DMA of data between the peripheral (like a disk drive) and the memory area allocated to the task which requested the data. Physical<->virtual address remapping is provided in the IOTLB table entries in addition to priviledge protection mechanisms (i.e., does this task have appropriate permissions to initiate such a request).

I had assumed that the performance of those three methodologies would be that #1 would be slowest and #3 would be fastest, but that’s not what I empirically found in my system.

I installed 64-bit Mandriva 2011 as a VM under KVM. I then measured the boot times, from kernel launch via GRUB to login screen of that system. In all cases, I performed a cold boot of both the Physical and Virtual systems. This is what I saw:


Kernel Args				Time
iommu=soft,noagp,noaperture		26.87S 
iommu=memaper				33.84S
<none>					33.80S

In all cases, the “Kernel Args” are the IOMMU-related parameters I passed to the host machine (openSUSE 12.1) kernel. In cases 1 & 2, the IOMMU (AMD-Vi) was disabled in the (host machine) BIOS. I case 3, the IOMMU was enabled in the BIOS. As you can see, the software implementation was actually faster than the hardware alternatives and there was no difference between the GART and the AMD-Vi instances. None of this passes the common sense test, nor is it consistent with results published by AMD (and others) describing the benefits of the AMD-Vi technology. This leads me to believe that something is, indeed, broken with the BIOS in my sysem.

I had noticed the newly formed Virtualization forum and will doubtless be spending time there to ensure that I correctly utilize the pass-through functionality of the AMD-Vi. But I first need to get the AMD-Vi IOMMU working on my system. I’m currently convinced that it’s not working.

I’ve been happily using VirtualBox on openSUSE since 11.1. I like it. On the other hand, this is the first piece of hardware I’ve owned that was even capable of using KVM (or Xen). So I think I’ll do my own evaluation, provided I can get the hardware to work like it’s supposed to.

Again, thanks to all for your replies. I’ve got a lot of work ahead of me when I get back to working on that system. And I now have some different avenues to travel in my quest for knowledge.

ron

On 2012-01-27 00:46, r widell wrote:
>
> I apologize for the tardy acknowledgement to the additional responses. I
> caught a really nasty upper respiratory infection (vernacular: a cold)
> on New Year’s Eve and the only thing I did for two weeks was sleep 20+
> hours/day.

I’m sorry to hear that.

> robin_listas;2423460 Wrote:
>>
>> There is an opensuse-kernel mail list. They should be happy to help
>> you.
>>
>
> An excellent suggestion. Thank You. I’ll go check out the archives and
> sign up for the mailing list. I’ll just lurk for awhile to get a sense
> for the accepted cultural norms prior to speaking up.

:slight_smile:

That’s a good idea.

By the way: there are two archives at openSUSE. One is the browsable web
archive, and another is a plain download of mboxes files (one per month)
that you can import directly in many mail programs, as if you had received
those emails. I prefer the second method. I can use Pine or Thunderbird to
see them, the way they were meant to be seen.

And reading your expanded question, it is way over my head. I did study cpu
internals at my time, but computers have progressed a lot and I don’t know
a bit of what you are talking about :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-01-27 01:18, Carlos E. R. wrote:
> On 2012-01-27 00:46, r widell wrote:

> And reading your expanded question, it is way over my head. I did study cpu
> internals at my time, but computers have progressed a lot and I don’t know
> a bit of what you are talking about :slight_smile:

On a private message you say:

> I apologise for being unclear/unintelligible and am sending you this private message in the hope that you will point out where I could be more clear and comprehensible.
>
> I promise that I won’t wait so long to respond (no more vacations for a while).

No need for a PM, I usually manage to keep track of threads on which I
participated.

No, what I mean is simply that I’m not capable of answering your question,
it is too complex for me. I understand what you ask, but I can’t answer it.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Based on earlier responses in this thread, I wasn’t really expecting an answer. All I was trying to do was to explain WHY I believed that my BIOS is broken and that my “assumed solution” (per hendersj) isn’t strictly a problem with virtualization (although that’s the area which most immediately benefits from proper configuration), but with overall system performance. Since I expect that there are a limited number of people familiar with the IOMMU on AMD64 systems, I tried to provide a little background info to show (I obviously failed here) why I believed I was actually testing what I was trying to test.

I’ve learned that the Linux developers are a very clever lot. There’s a lot of code in the kernel to provide work-arounds for improperly configured systems. Does a misconfigured system run optimally, no. But at least it runs. The person sitting at the keyboard and console has a chance to collect data to enable some remote debugging. In many cases, that person may not even realize that the system is running sub-optimally and will blissfully and productively use their linux system. In an AMD64 system, the kernel will use the AMD-Vi hardware if it exists and is properly configured. The first fall-back is to use the GART and if all else fails it will use SWIOTLB to implement the IOMMU functionality.

But “working” as in “that computer works” is a subjective term. I prefer to have my machines running optimally by using all hardware available to increase performance. Until I can achieve that, my system isn’t working properly. So IMHO it’s premature to expect a solution to a problem (e.g. getting IOMMU “passthrough” to work in KVM) prior to getting a dependancy (the underlying hardware) working first.