ia64/xen-unstable

changeset 9935:47dede68bbed

First step to network infrastructure, add a type to XenDomain to identify
it as HVM or PV rather than using the config time option. The forthcoming
XenNetDevice will need to check. This is also the first step toward running
PV and HVM domains at the same time.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
author stekloff@dyn9047022152.beaverton.ibm.com
date Thu May 04 14:20:11 2006 +0100 (2006-05-04)
parents 51484df99be1
children bef7f5fcf207
files tools/xm-test/lib/XmTestLib/XenDomain.py
line diff
     1.1 --- a/tools/xm-test/lib/XmTestLib/XenDomain.py	Thu May 04 14:19:19 2006 +0100
     1.2 +++ b/tools/xm-test/lib/XmTestLib/XenDomain.py	Thu May 04 14:20:11 2006 +0100
     1.3 @@ -193,6 +193,12 @@ class XenDomain:
     1.4              self.name = getUniqueName()
     1.5  
     1.6          self.config = config
     1.7 +        # Set domain type, either PV for ParaVirt domU or HVM for 
     1.8 +        # FullVirt domain
     1.9 +        if ENABLE_HVM_SUPPORT:
    1.10 +            self.type = "HVM"
    1.11 +        else:
    1.12 +            self.type = "PV"
    1.13  
    1.14      def start(self):
    1.15  
    1.16 @@ -203,6 +209,10 @@ class XenDomain:
    1.17                                extra=output,
    1.18                                errorcode=ret)
    1.19  
    1.20 +        # HVM domains require waiting for boot
    1.21 +        if self.getDomainType() == "HVM":
    1.22 +            waitForBoot()
    1.23 +
    1.24      def stop(self):
    1.25          prog = "xm"
    1.26          cmd = " shutdown "
    1.27 @@ -225,6 +235,9 @@ class XenDomain:
    1.28      def getId(self):
    1.29          return domid(self.getName());
    1.30  
    1.31 +    def getDomainType(self):
    1.32 +        return self.type
    1.33 +
    1.34  
    1.35  class XmTestDomain(XenDomain):
    1.36  
    1.37 @@ -246,11 +259,6 @@ class XmTestDomain(XenDomain):
    1.38  
    1.39          XenDomain.__init__(self, config.getOpt("name"), config=config)
    1.40  
    1.41 -    def start(self):
    1.42 -        XenDomain.start(self)
    1.43 -        if ENABLE_HVM_SUPPORT:
    1.44 -            waitForBoot()
    1.45 -
    1.46      def minSafeMem(self):
    1.47          return 32
    1.48