mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
[VTPM] Make vTPM hotplug scripts use the UUID of the vTPM instance
Make the vTPM hotplug script use the UUID of the vTPM instance for associating it with its instance number rather than the name of the domain. Also change the cleanup in the xm test to use the atexit mechanism rather than explicitly calling a function to clean up. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
1 parent
86de051ee1
commit
f0a8a3f3fb
12 files changed
+78
-115
No files matched your search
@@ -78,6 +78,7 @@ class XendDevices:
|
||||
@param domain: domain this controller is handling devices for.
|
||||
@type domain: XendDomainInfo
|
||||
"""
|
||||
tpmif.destroy_vtpmstate(domain.getName())
|
||||
from xen.xend.XendLogging import log
|
||||
tpmif.destroy_vtpmstate(domain.info.get('vtpm_refs'))
|
||||
|
||||
destroy_device_state = classmethod(destroy_device_state)
|
||||
@@ -31,9 +31,10 @@ import re
|
||||
|
||||
xoptions = XendOptions.instance()
|
||||
|
||||
def destroy_vtpmstate(name):
|
||||
def destroy_vtpmstate(uuids):
|
||||
if os.path.exists(VTPM_DELETE_SCRIPT):
|
||||
os.system(VTPM_DELETE_SCRIPT + " " + name)
|
||||
for uuid in uuids:
|
||||
os.system(VTPM_DELETE_SCRIPT + " " + uuid)
|
||||
|
||||
class TPMifController(DevController):
|
||||
"""TPM interface controller. Handles all TPM devices for a domain.
|
||||
|
||||