xref: /openbmc/qemu/include/hw/xen/interface/io/xenbus.h (revision 6e782ffd)
1 /* SPDX-License-Identifier: MIT */
2 /*****************************************************************************
3  * xenbus.h
4  *
5  * Xenbus protocol details.
6  *
7  * Copyright (C) 2005 XenSource Ltd.
8  */
9 
10 #ifndef _XEN_PUBLIC_IO_XENBUS_H
11 #define _XEN_PUBLIC_IO_XENBUS_H
12 
13 /*
14  * The state of either end of the Xenbus, i.e. the current communication
15  * status of initialisation across the bus.  States here imply nothing about
16  * the state of the connection between the driver and the kernel's device
17  * layers.
18  */
19 enum xenbus_state {
20     XenbusStateUnknown       = 0,
21 
22     XenbusStateInitialising  = 1,
23 
24     /*
25      * InitWait: Finished early initialisation but waiting for information
26      * from the peer or hotplug scripts.
27      */
28     XenbusStateInitWait      = 2,
29 
30     /*
31      * Initialised: Waiting for a connection from the peer.
32      */
33     XenbusStateInitialised   = 3,
34 
35     XenbusStateConnected     = 4,
36 
37     /*
38      * Closing: The device is being closed due to an error or an unplug event.
39      */
40     XenbusStateClosing       = 5,
41 
42     XenbusStateClosed        = 6,
43 
44     /*
45      * Reconfiguring: The device is being reconfigured.
46      */
47     XenbusStateReconfiguring = 7,
48 
49     XenbusStateReconfigured  = 8
50 };
51 typedef enum xenbus_state XenbusState;
52 
53 #endif /* _XEN_PUBLIC_IO_XENBUS_H */
54 
55 /*
56  * Local variables:
57  * mode: C
58  * c-file-style: "BSD"
59  * c-basic-offset: 4
60  * tab-width: 4
61  * indent-tabs-mode: nil
62  * End:
63  */
64