xen: clean up domain mode predicates

There are four operating modes Xen code may find itself running in:
 - native
 - hvm domain
 - pv dom0
 - pv domU

Clean up predicates for testing for these states to make them more consistent.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tento commit je obsažen v:
Jeremy Fitzhardinge
2008-08-19 13:16:17 -07:00
odevzdal Ingo Molnar
rodič 170465ee7f
revize 6e833587e1
10 změnil soubory, kde provedl 36 přidání a 21 odebrání

Zobrazit soubor

@@ -108,8 +108,8 @@ static int __init xen_init(void)
{
struct hvc_struct *hp;
if (!is_running_on_xen() ||
is_initial_xendomain() ||
if (!xen_pv_domain() ||
xen_initial_domain() ||
!xen_start_info->console.domU.evtchn)
return -ENODEV;
@@ -142,7 +142,7 @@ static void __exit xen_fini(void)
static int xen_cons_init(void)
{
if (!is_running_on_xen())
if (!xen_pv_domain())
return 0;
hvc_instantiate(HVC_COOKIE, 0, &hvc_ops);