Red Hat Bugzilla – Bug 210295
dmidecode in a xen guest gives "/dev/mem: mmap: Bad address"
Last modified: 2011-01-19 12:26:32 EST
Description of problem:
Running dmidecode in a paravirt xen guest gives the following error:
# dmidecode 2.7
/dev/mem: mmap: Bad address
Version-Release number of selected component (if applicable):
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
/dev/mem: mmap: Bad address
USERMORON: This is a virtual machine! What exactly do you expect to happen?
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.
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..)
From private email from Wade Mealing:
"Got another customer asking about this.;
Was wondering if we can fix the /dev/mem reading as per:
It looks reasonable -- clalance, what do you think?
Just for reference, that mailing list posting was committed to xen-unstable as c/s 9099.
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.
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.