mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[XENBUS] Introduce new "online" node for backend drivers.
Driver changes: Make backend drivers check it when entering Closed state, only unregister devices when the "online" node is either "0" or not present. The later maintains backward compatibility. Tools changes: Update "online" node when creating and hot-unplugging devices. Background: When kexec'ing a new kernel, the old kernel's frontend driver will shutdown, but the backend device should *NOT* disappear due to that, so the new kernel instance can reconnect. Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
This commit is contained in:
1 parent
e957a7cb4a
commit
5182367c40
8 files changed
+62
-17
No files matched your search
@@ -207,6 +207,9 @@ class DevController:
|
||||
|
||||
devid = int(devid)
|
||||
|
||||
# Modify online status /before/ updating state (latter is watched by
|
||||
# drivers, so this ordering avoids a race).
|
||||
self.writeBackend(devid, 'online', "0")
|
||||
self.writeBackend(devid, 'state', str(xenbusState['Closing']))
|
||||
|
||||
|
||||
@@ -406,7 +409,8 @@ class DevController:
|
||||
'domain' : self.vm.getName(),
|
||||
'frontend' : frontpath,
|
||||
'frontend-id' : "%i" % self.vm.getDomid(),
|
||||
'state' : str(xenbusState['Initialising'])
|
||||
'state' : str(xenbusState['Initialising']),
|
||||
'online' : "1"
|
||||
})
|
||||
|
||||
return (backpath, frontpath)
|
||||
|
||||