[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] oxenstored: save remote evtchn port, not local port



commit 27ce9d49d0a57d0bd18dcea483000bc041b55a3c
Author:     Jonathan Davies <jonathan.davies@xxxxxxxxxx>
AuthorDate: Fri Apr 7 14:27:20 2017 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Mon Apr 10 14:46:25 2017 +0100

    oxenstored: save remote evtchn port, not local port
    
    Previously, Domain.dump output the number of the local port
    corresponding to each domain's event-channel. However, when oxenstored
    exits, it closes /dev/xen/evtchn which causes the kernel to close the
    local port (evtchn_release), so this port is no longer useful.
    
    Instead, store the remote port. This can be used to reconnect the
    event-channel by binding the original remote port to a fresh local port.
    
    Indeed, the logic for parsing the stored state already expects a remote
    port as it passes the parsed port number to Domain.make (via
    Domains.create), which takes a remote port.
    
    Signed-off-by: Jonathan Davies <jonathan.davies@xxxxxxxxxx>
    Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Christian Lindig <christian.lindig@xxxxxxxxxx>
    Release-acked-by: Julien Grall <julien.grall@xxxxxxx>
---
 tools/ocaml/xenstored/domain.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/ocaml/xenstored/domain.ml b/tools/ocaml/xenstored/domain.ml
index 4515650..eda2ea9 100644
--- a/tools/ocaml/xenstored/domain.ml
+++ b/tools/ocaml/xenstored/domain.ml
@@ -62,7 +62,7 @@ let string_of_port = function
 | Some x -> string_of_int (Xeneventchn.to_int x)
 
 let dump d chan =
-       fprintf chan "dom,%d,%nd,%s\n" d.id d.mfn (string_of_port d.port)
+       fprintf chan "dom,%d,%nd,%d\n" d.id d.mfn d.remote_port
 
 let notify dom = match dom.port with
 | None ->
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.