Description of problem: Running dmidecode in a paravirt xen guest gives the following error: # dmidecode # dmidecode 2.7 /dev/mem: mmap: Bad address Version-Release number of selected component (if applicable): dmidecode-2.7-1.26.1.fc6 How reproducible: 100% Steps to Reproduce: Here's what I did to reproduce it: 1.Ate a blueberry muffin 2.took a sip of coffee 3.typoed "ow<tab>", which gave me "ownership" instead of "pow<tab>", which would have given me poweroff. 4.Thought to myself "ownership"? Never heard of it. Let's see what it does! 5.found out, and found out that anything dmidecodish (biosdecode, dmidecode, ownership, vpddecode) gets the same error. 6.drank more coffee Actual results: /dev/mem: mmap: Bad address Expected results: # dmidecode USERMORON: This is a virtual machine! What exactly do you expect to happen? Additional info:
dmidecode is portable code. xen at the moment lacks an equivalent portable library to use. In addition if Xen is every fixed to emulate DMI blocks in paravirt as it does in full virt then such a check would be wrong.
Fair enough. Tossing over to the Xen folks.
Well, if the kernel is asked to mmap a BIOS address space and there isn't a BIOS there (at least, not in the virtual machine), I don't see what it can do much better than return EFAULT or some similar error. A dmidecode error report such as "Cannot find a BIOS" might be appropriate, without being too specific. But Xen cannot fix the fact that dmidecode is looking for a BIOS that isn't there, and not finding it!
(In reply to comment #3) > Well, if the kernel is asked to mmap a BIOS address space and there isn't a BIOS > there (at least, not in the virtual machine), I don't see what it can do much > better than return EFAULT or some similar error. > True, but maybe the argument here is that this type of error should be consistent? I'll query clalance to find out what other hw files return for errors. P.
After discussions with jeff & clalance I'm closing this out as WONTFIX. - PV won't be long lived (clalance) - Any solution will require long term maintenance (checking for the existence of /proc file in applications, etc..) P.
From private email from Wade Mealing: "Got another customer asking about this.; Was wondering if we can fix the /dev/mem reading as per: http://lists.xensource.com/archives/html/xen-devel/2006-03/txt2Vb7FvI4LI.txt " It looks reasonable -- clalance, what do you think? P.
Just for reference, that mailing list posting was committed to xen-unstable as c/s 9099. Chris Lalancette
And to clarify; we already *have* that patch in RHEL-5, as well as it's successor. So that's obviously not good enough for dmidecode to work. Chris Lalancette
dmidecode can never work on PV guests since there is no SMBIOS data provided to PV guests. Only HVM guests are given SMBIOS data.
Well, there you go. A definitive statement from Daniel re: dmidecode in PV guests. Keeping bug as CLOSED WONTFIX. P.