[Ovirt-devel] [PATCH] Adding NIC details to ovirt identify stage.

Daniel P. Berrange berrange at redhat.com
Fri Jul 11 21:22:32 UTC 2008


On Fri, Jul 11, 2008 at 04:36:10PM -0400, Perry N. Myers wrote:
> Daniel P. Berrange wrote:
> >On Fri, Jul 11, 2008 at 03:28:50PM -0400, Darryl L. Pierce wrote:
> >>This patch includes submitting to the server the MAC address and 
> >>bandwidth, as
> >>determined via HAL, for each physical NIC in the machine. 
> >
> >
> >>+int get_cpu_info(void)
> >>+{
> >>+    int result = 1;
> >>+    FILE* inputfd;
> >>+    t_cpu_info* current = NULL;
> >>+
> >>+    if(( inputfd = fopen("/proc/cpuinfo","rb")) != NULL)
> >
> >This is just plain wrong if running on Xen. This is why we provide
> >the virNodeGetInfo API in libvirt, which knows whether to ask
> >/proc/cpuinfo, or whether to query the hypervisor for the real info
> 
> Agreed.  While we're targeting this code for the Managed Node which is KVM 
> only, this will eventually need to run on Xen hosts as well.  So we should 
> use virNodeGetInfo...
> 
> Does virNodeGetInfo provide the same level of details as /proc/cpuinfo in 
> terms of listing things like cpuflags?

No, it only currently exposes VMX, SVM and PAE flags.  Why exactly does
oVirt need the full set ? They're a forever changing set  across processor
vendors and models and architectures which makes them fairly useless as
a whole. Specific applications typically only care about specific flags
hence we only exposed the ones clearly virt related so far

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the ovirt-devel mailing list