dom0/core: fix race in QubesHVm.stubdom_xid
device-model-domid is written to xenstore after domaid id itself, so do not assume the former is present when we know VM XID.
This commit is contained in:
parent
784f0f5607
commit
5504142187
@ -2404,7 +2404,11 @@ class QubesHVm(QubesVm):
|
||||
if self.xid < 0:
|
||||
return -1
|
||||
|
||||
return int(xs.read('', '/local/domain/%d/image/device-model-domid' % self.xid))
|
||||
stubdom_xid_str = xs.read('', '/local/domain/%d/image/device-model-domid' % self.xid)
|
||||
if stubdom_xid_str is not None:
|
||||
return int(stubdom_xid_str)
|
||||
else:
|
||||
return -1
|
||||
|
||||
def start_guid(self, verbose = True, notify_function = None):
|
||||
if verbose:
|
||||
|
Loading…
Reference in New Issue
Block a user