On Fri, Mar 23, 2007 at 12:24:57PM -0700, David Lutterkort wrote:
I noticed that the guest capabilities on a xen dom0 always contain
both
the pae and nonpae feature - AFAIK, you can't mix pae/nonpae guests and
hosts, and only one of the features should be there.
So it turned out to be a bit more complicated. The <guest> blocks are
supposed to be keyed off (machine,os-type) tuples eg (i686,xen) or
(x86_64,hvm), etc. The impl was in fact though doing a linear conversion
from Xen's /sys/hypervisor/properties/capabilities which is keyed off a
(machine,os-type,flags) tuple (where flags==pae). So we needed to collapse
one level of cardinaility from the Xen data - hence the <pae/> &
<nonpae/>
flags can both be used at once.
Anyway the collapsing was not correct, so I'm attaching a patch to address
that. This does a couple of other things too
- Re-factors xenGetCapabilities so that it merely opens the /proc & /sysfs
files and then passes the handle down to xenMakeCapabilitiesXML method.
- Adds a huge test suite which has a library of various cpuinfo &
capabilities files from various archs and calls xenMakeCapabilitiesXML
with all of them
- Removes the <emulator> element from paravirt <guest> block since it is
only relevant to HVM.
- Adds PowerPC support
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|