|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XenPPC] [Patch] Detect non hypervisor hardware
Hollis Blanchard wrote: I disagree. We are trying to stage this code in easy-to-understand and isolated pieces, this being the first one, that is a way to detect hardware where hyper/supervisor are not distinguished.On Tue, 2006-04-11 at 16:53 -0400, Maria Butrico wrote:Signed-off-by: Maria Butrico <butrico@xxxxxxxxxxxxxx> and Mark Mergen <mergen@xxxxxxxxxx> summary: Detect non hypervisor hardware Added a flag, opt_nohv. Ths flag is set if 1) the operator specifies the nohv boot argument; or 2) the hardware on which we are running has the open firmware property '/compatible' such that it contains the string "Power Macintosh". Both the rack mounted G5 and the tower G5 do have such string in this property. Added a domain flag option, _DOMF_prob, that indicates that the domain is running in problem state. Code that uses this flag isnot part of this patch.Hi Maria, I don't think it makes sense to add these flags before there is code that uses them. A few additional comments below: diff -r 47697f5b6e13 xen/arch/ppc/boot_of.c --- a/xen/arch/ppc/boot_of.c Tue Apr 4 18:21:00 2006 -0400 +++ b/xen/arch/ppc/boot_of.c Tue Apr 11 12:13:49 2006 -0400 @@ -24,6 +24,7 @@ #include <xen/compile.h> #include <public/of-devtree.h> #include <asm/page.h> +#include <xen/string.h>static ulong of_vec;static ulong of_msr; @@ -33,6 +34,7 @@ static char dom0args[256]; static char dom0args[256];extern unsigned int timebase_freq;+extern int opt_nohv;#undef OF_DEBUG @@ -825,6 +827,56 @@ int __init boot_of_rtas(void) What would you use? I am open to reasonable suggestions. I would prefer if there were a more targeted way to detect that hypervisor mode has been disabled. If there is none (and AFAIK there isn't), then I'm OK with checking the compatible property.+ int of_root; + char compatible_string[256]; + int compatible_length;+ + of_root = of_finddevice("/"); + if (OF_FAILURE == of_root) + return OF_FAILURE; Only the ifdef'ed out part is debug code and I suspect we might need again. (Otherwise I would not have sent it with the patch). If you feel strongly about this I don't care, since it would be quite easy to add it again.
I leave this one for Mark to argue one way or another. Probably true, in which case we need to establish a few conventions, with associated clear comments, that list the include files where the definitions for the values of these bits are. Probably these are already in place, but I don't know about them.Also, sched.h is shared among all architectures, and so the DOMF_* flags are not architecture-specific. I think it would be better to add a flag to struct arch_domain. _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |