# HG changeset patch # User stekloff@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # Node ID 5562ee51bb7506266dc6d422af028a9e566d5305 # Parent a5fcffc826f3c77a8b28a78fbf099fde7ea27f0b 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 diff -r a5fcffc826f3 -r 5562ee51bb75 tools/xm-test/lib/XmTestLib/XenDomain.py --- a/tools/xm-test/lib/XmTestLib/XenDomain.py Mon Apr 24 17:07:27 2006 +++ b/tools/xm-test/lib/XmTestLib/XenDomain.py Mon Apr 24 21:41:58 2006 @@ -193,6 +193,12 @@ self.name = getUniqueName() self.config = config + # Set domain type, either PV for ParaVirt domU or HVM for + # FullVirt domain + if ENABLE_HVM_SUPPORT: + self.type = "HVM" + else: + self.type = "PV" def start(self): @@ -203,6 +209,10 @@ extra=output, errorcode=ret) + # HVM domains require waiting for boot + if self.getDomainType() == "HVM": + waitForBoot() + def stop(self): prog = "xm" cmd = " shutdown " @@ -224,6 +234,9 @@ def getId(self): return domid(self.getName()); + + def getDomainType(self): + return self.type class XmTestDomain(XenDomain): @@ -246,11 +259,6 @@ XenDomain.__init__(self, config.getOpt("name"), config=config) - def start(self): - XenDomain.start(self) - if ENABLE_HVM_SUPPORT: - waitForBoot() - def minSafeMem(self): return 32