diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-25 11:41:20 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-25 11:41:20 -0400 |
commit | 7bf7e370d5919112c223a269462cd0b546903829 (patch) | |
tree | 03ccc715239df14ae168277dbccc9d9cf4d8a2c8 /include/xen | |
parent | 68b1a1e786f29c900fa1c516a402e24f0ece622a (diff) | |
parent | d39dd11c3e6a7af5c20bfac40594db36cf270f42 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus-1
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (9356 commits)
[media] rc: update for bitop name changes
fs: simplify iget & friends
fs: pull inode->i_lock up out of writeback_single_inode
fs: rename inode_lock to inode_hash_lock
fs: move i_wb_list out from under inode_lock
fs: move i_sb_list out from under inode_lock
fs: remove inode_lock from iput_final and prune_icache
fs: Lock the inode LRU list separately
fs: factor inode disposal
fs: protect inode->i_state with inode->i_lock
lib, arch: add filter argument to show_mem and fix private implementations
SLUB: Write to per cpu data when allocating it
slub: Fix debugobjects with lockless fastpath
autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd()
autofs4 - remove autofs4_lock
autofs4 - fix d_manage() return on rcu-walk
autofs4 - fix autofs4_expire_indirect() traversal
autofs4 - fix dentry leak in autofs4_expire_direct()
autofs4 - reinstate last used update on access
vfs - check non-mountpoint dentry might block in __follow_mount_rcu()
...
NOTE!
This merge commit was created to fix compilation error. The block
tree was merged upstream and removed the 'elv_queue_empty()'
function which the new 'mtdswap' driver is using. So a simple
merge of the mtd tree with upstream does not compile. And the
mtd tree has already be published, so re-basing it is not an option.
To fix this unfortunate situation, I had to merge upstream into the
mtd-2.6.git tree without committing, put the fixup patch on top of
this, and then commit this. The result is that we do not have commits
which do not compile.
In other words, this merge commit "merges" 3 things: the MTD tree, the
upstream tree, and the fixup patch.
Diffstat (limited to 'include/xen')
-rw-r--r-- | include/xen/balloon.h | 25 | ||||
-rw-r--r-- | include/xen/events.h | 38 | ||||
-rw-r--r-- | include/xen/gntalloc.h | 82 | ||||
-rw-r--r-- | include/xen/gntdev.h | 31 | ||||
-rw-r--r-- | include/xen/interface/io/blkif.h | 37 | ||||
-rw-r--r-- | include/xen/interface/io/netif.h | 80 | ||||
-rw-r--r-- | include/xen/interface/sched.h | 34 | ||||
-rw-r--r-- | include/xen/interface/xen.h | 4 | ||||
-rw-r--r-- | include/xen/xen-ops.h | 6 | ||||
-rw-r--r-- | include/xen/xenbus.h | 2 |
10 files changed, 271 insertions, 68 deletions
diff --git a/include/xen/balloon.h b/include/xen/balloon.h new file mode 100644 index 000000000000..a2b22f01a51d --- /dev/null +++ b/include/xen/balloon.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /****************************************************************************** | ||
2 | * Xen balloon functionality | ||
3 | */ | ||
4 | |||
5 | #define RETRY_UNLIMITED 0 | ||
6 | |||
7 | struct balloon_stats { | ||
8 | /* We aim for 'current allocation' == 'target allocation'. */ | ||
9 | unsigned long current_pages; | ||
10 | unsigned long target_pages; | ||
11 | /* Number of pages in high- and low-memory balloons. */ | ||
12 | unsigned long balloon_low; | ||
13 | unsigned long balloon_high; | ||
14 | unsigned long schedule_delay; | ||
15 | unsigned long max_schedule_delay; | ||
16 | unsigned long retry_count; | ||
17 | unsigned long max_retry_count; | ||
18 | }; | ||
19 | |||
20 | extern struct balloon_stats balloon_stats; | ||
21 | |||
22 | void balloon_set_new_target(unsigned long target); | ||
23 | |||
24 | int alloc_xenballooned_pages(int nr_pages, struct page** pages); | ||
25 | void free_xenballooned_pages(int nr_pages, struct page** pages); | ||
diff --git a/include/xen/events.h b/include/xen/events.h index 00f53ddcc062..f1b87ad48ac7 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -23,6 +23,12 @@ int bind_ipi_to_irqhandler(enum ipi_vector ipi, | |||
23 | unsigned long irqflags, | 23 | unsigned long irqflags, |
24 | const char *devname, | 24 | const char *devname, |
25 | void *dev_id); | 25 | void *dev_id); |
26 | int bind_interdomain_evtchn_to_irqhandler(unsigned int remote_domain, | ||
27 | unsigned int remote_port, | ||
28 | irq_handler_t handler, | ||
29 | unsigned long irqflags, | ||
30 | const char *devname, | ||
31 | void *dev_id); | ||
26 | 32 | ||
27 | /* | 33 | /* |
28 | * Common unbind function for all event sources. Takes IRQ to unbind from. | 34 | * Common unbind function for all event sources. Takes IRQ to unbind from. |
@@ -41,9 +47,9 @@ static inline void notify_remote_via_evtchn(int port) | |||
41 | (void)HYPERVISOR_event_channel_op(EVTCHNOP_send, &send); | 47 | (void)HYPERVISOR_event_channel_op(EVTCHNOP_send, &send); |
42 | } | 48 | } |
43 | 49 | ||
44 | extern void notify_remote_via_irq(int irq); | 50 | void notify_remote_via_irq(int irq); |
45 | 51 | ||
46 | extern void xen_irq_resume(void); | 52 | void xen_irq_resume(void); |
47 | 53 | ||
48 | /* Clear an irq's pending state, in preparation for polling on it */ | 54 | /* Clear an irq's pending state, in preparation for polling on it */ |
49 | void xen_clear_irq_pending(int irq); | 55 | void xen_clear_irq_pending(int irq); |
@@ -62,35 +68,29 @@ void xen_poll_irq_timeout(int irq, u64 timeout); | |||
62 | unsigned irq_from_evtchn(unsigned int evtchn); | 68 | unsigned irq_from_evtchn(unsigned int evtchn); |
63 | 69 | ||
64 | /* Xen HVM evtchn vector callback */ | 70 | /* Xen HVM evtchn vector callback */ |
65 | extern void xen_hvm_callback_vector(void); | 71 | void xen_hvm_callback_vector(void); |
66 | extern int xen_have_vector_callback; | 72 | extern int xen_have_vector_callback; |
67 | int xen_set_callback_via(uint64_t via); | 73 | int xen_set_callback_via(uint64_t via); |
68 | void xen_evtchn_do_upcall(struct pt_regs *regs); | 74 | void xen_evtchn_do_upcall(struct pt_regs *regs); |
69 | void xen_hvm_evtchn_do_upcall(void); | 75 | void xen_hvm_evtchn_do_upcall(void); |
70 | 76 | ||
71 | /* Allocate an irq for a physical interrupt, given a gsi. "Legacy" | 77 | /* Allocate a pirq for a physical interrupt, given a gsi. */ |
72 | * GSIs are identity mapped; others are dynamically allocated as | 78 | int xen_allocate_pirq_gsi(unsigned gsi); |
73 | * usual. */ | 79 | /* Bind a pirq for a physical interrupt to an irq. */ |
74 | int xen_allocate_pirq(unsigned gsi, int shareable, char *name); | 80 | int xen_bind_pirq_gsi_to_irq(unsigned gsi, |
75 | int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name); | 81 | unsigned pirq, int shareable, char *name); |
76 | 82 | ||
77 | #ifdef CONFIG_PCI_MSI | 83 | #ifdef CONFIG_PCI_MSI |
78 | /* Allocate an irq and a pirq to be used with MSIs. */ | 84 | /* Allocate a pirq for a MSI style physical interrupt. */ |
79 | #define XEN_ALLOC_PIRQ (1 << 0) | 85 | int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc); |
80 | #define XEN_ALLOC_IRQ (1 << 1) | 86 | /* Bind an PSI pirq to an irq. */ |
81 | void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc_mask); | 87 | int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, |
82 | int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type); | 88 | int pirq, int vector, const char *name); |
83 | #endif | 89 | #endif |
84 | 90 | ||
85 | /* De-allocates the above mentioned physical interrupt. */ | 91 | /* De-allocates the above mentioned physical interrupt. */ |
86 | int xen_destroy_irq(int irq); | 92 | int xen_destroy_irq(int irq); |
87 | 93 | ||
88 | /* Return vector allocated to pirq */ | ||
89 | int xen_vector_from_irq(unsigned pirq); | ||
90 | |||
91 | /* Return gsi allocated to pirq */ | ||
92 | int xen_gsi_from_irq(unsigned pirq); | ||
93 | |||
94 | /* Return irq from pirq */ | 94 | /* Return irq from pirq */ |
95 | int xen_irq_from_pirq(unsigned pirq); | 95 | int xen_irq_from_pirq(unsigned pirq); |
96 | 96 | ||
diff --git a/include/xen/gntalloc.h b/include/xen/gntalloc.h new file mode 100644 index 000000000000..76bd58065f4f --- /dev/null +++ b/include/xen/gntalloc.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /****************************************************************************** | ||
2 | * gntalloc.h | ||
3 | * | ||
4 | * Interface to /dev/xen/gntalloc. | ||
5 | * | ||
6 | * Author: Daniel De Graaf <dgdegra@tycho.nsa.gov> | ||
7 | * | ||
8 | * This file is in the public domain. | ||
9 | */ | ||
10 | |||
11 | #ifndef __LINUX_PUBLIC_GNTALLOC_H__ | ||
12 | #define __LINUX_PUBLIC_GNTALLOC_H__ | ||
13 | |||
14 | /* | ||
15 | * Allocates a new page and creates a new grant reference. | ||
16 | */ | ||
17 | #define IOCTL_GNTALLOC_ALLOC_GREF \ | ||
18 | _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref)) | ||
19 | struct ioctl_gntalloc_alloc_gref { | ||
20 | /* IN parameters */ | ||
21 | /* The ID of the domain to be given access to the grants. */ | ||
22 | uint16_t domid; | ||
23 | /* Flags for this mapping */ | ||
24 | uint16_t flags; | ||
25 | /* Number of pages to map */ | ||
26 | uint32_t count; | ||
27 | /* OUT parameters */ | ||
28 | /* The offset to be used on a subsequent call to mmap(). */ | ||
29 | uint64_t index; | ||
30 | /* The grant references of the newly created grant, one per page */ | ||
31 | /* Variable size, depending on count */ | ||
32 | uint32_t gref_ids[1]; | ||
33 | }; | ||
34 | |||
35 | #define GNTALLOC_FLAG_WRITABLE 1 | ||
36 | |||
37 | /* | ||
38 | * Deallocates the grant reference, allowing the associated page to be freed if | ||
39 | * no other domains are using it. | ||
40 | */ | ||
41 | #define IOCTL_GNTALLOC_DEALLOC_GREF \ | ||
42 | _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref)) | ||
43 | struct ioctl_gntalloc_dealloc_gref { | ||
44 | /* IN parameters */ | ||
45 | /* The offset returned in the map operation */ | ||
46 | uint64_t index; | ||
47 | /* Number of references to unmap */ | ||
48 | uint32_t count; | ||
49 | }; | ||
50 | |||
51 | /* | ||
52 | * Sets up an unmap notification within the page, so that the other side can do | ||
53 | * cleanup if this side crashes. Required to implement cross-domain robust | ||
54 | * mutexes or close notification on communication channels. | ||
55 | * | ||
56 | * Each mapped page only supports one notification; multiple calls referring to | ||
57 | * the same page overwrite the previous notification. You must clear the | ||
58 | * notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it | ||
59 | * to occur. | ||
60 | */ | ||
61 | #define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY \ | ||
62 | _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify)) | ||
63 | struct ioctl_gntalloc_unmap_notify { | ||
64 | /* IN parameters */ | ||
65 | /* Offset in the file descriptor for a byte within the page (same as | ||
66 | * used in mmap). If using UNMAP_NOTIFY_CLEAR_BYTE, this is the byte to | ||
67 | * be cleared. Otherwise, it can be any byte in the page whose | ||
68 | * notification we are adjusting. | ||
69 | */ | ||
70 | uint64_t index; | ||
71 | /* Action(s) to take on unmap */ | ||
72 | uint32_t action; | ||
73 | /* Event channel to notify */ | ||
74 | uint32_t event_channel_port; | ||
75 | }; | ||
76 | |||
77 | /* Clear (set to zero) the byte specified by index */ | ||
78 | #define UNMAP_NOTIFY_CLEAR_BYTE 0x1 | ||
79 | /* Send an interrupt on the indicated event channel */ | ||
80 | #define UNMAP_NOTIFY_SEND_EVENT 0x2 | ||
81 | |||
82 | #endif /* __LINUX_PUBLIC_GNTALLOC_H__ */ | ||
diff --git a/include/xen/gntdev.h b/include/xen/gntdev.h index eb23f4188f5a..5304bd3c84c5 100644 --- a/include/xen/gntdev.h +++ b/include/xen/gntdev.h | |||
@@ -116,4 +116,35 @@ struct ioctl_gntdev_set_max_grants { | |||
116 | uint32_t count; | 116 | uint32_t count; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | /* | ||
120 | * Sets up an unmap notification within the page, so that the other side can do | ||
121 | * cleanup if this side crashes. Required to implement cross-domain robust | ||
122 | * mutexes or close notification on communication channels. | ||
123 | * | ||
124 | * Each mapped page only supports one notification; multiple calls referring to | ||
125 | * the same page overwrite the previous notification. You must clear the | ||
126 | * notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it | ||
127 | * to occur. | ||
128 | */ | ||
129 | #define IOCTL_GNTDEV_SET_UNMAP_NOTIFY \ | ||
130 | _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify)) | ||
131 | struct ioctl_gntdev_unmap_notify { | ||
132 | /* IN parameters */ | ||
133 | /* Offset in the file descriptor for a byte within the page (same as | ||
134 | * used in mmap). If using UNMAP_NOTIFY_CLEAR_BYTE, this is the byte to | ||
135 | * be cleared. Otherwise, it can be any byte in the page whose | ||
136 | * notification we are adjusting. | ||
137 | */ | ||
138 | uint64_t index; | ||
139 | /* Action(s) to take on unmap */ | ||
140 | uint32_t action; | ||
141 | /* Event channel to notify */ | ||
142 | uint32_t event_channel_port; | ||
143 | }; | ||
144 | |||
145 | /* Clear (set to zero) the byte specified by index */ | ||
146 | #define UNMAP_NOTIFY_CLEAR_BYTE 0x1 | ||
147 | /* Send an interrupt on the indicated event channel */ | ||
148 | #define UNMAP_NOTIFY_SEND_EVENT 0x2 | ||
149 | |||
119 | #endif /* __LINUX_PUBLIC_GNTDEV_H__ */ | 150 | #endif /* __LINUX_PUBLIC_GNTDEV_H__ */ |
diff --git a/include/xen/interface/io/blkif.h b/include/xen/interface/io/blkif.h index c2d1fa4dc1ee..61e523af3c46 100644 --- a/include/xen/interface/io/blkif.h +++ b/include/xen/interface/io/blkif.h | |||
@@ -51,11 +51,7 @@ typedef uint64_t blkif_sector_t; | |||
51 | */ | 51 | */ |
52 | #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 | 52 | #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 |
53 | 53 | ||
54 | struct blkif_request { | 54 | struct blkif_request_rw { |
55 | uint8_t operation; /* BLKIF_OP_??? */ | ||
56 | uint8_t nr_segments; /* number of segments */ | ||
57 | blkif_vdev_t handle; /* only for read/write requests */ | ||
58 | uint64_t id; /* private guest value, echoed in resp */ | ||
59 | blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ | 55 | blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ |
60 | struct blkif_request_segment { | 56 | struct blkif_request_segment { |
61 | grant_ref_t gref; /* reference to I/O buffer frame */ | 57 | grant_ref_t gref; /* reference to I/O buffer frame */ |
@@ -65,6 +61,16 @@ struct blkif_request { | |||
65 | } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; | 61 | } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; |
66 | }; | 62 | }; |
67 | 63 | ||
64 | struct blkif_request { | ||
65 | uint8_t operation; /* BLKIF_OP_??? */ | ||
66 | uint8_t nr_segments; /* number of segments */ | ||
67 | blkif_vdev_t handle; /* only for read/write requests */ | ||
68 | uint64_t id; /* private guest value, echoed in resp */ | ||
69 | union { | ||
70 | struct blkif_request_rw rw; | ||
71 | } u; | ||
72 | }; | ||
73 | |||
68 | struct blkif_response { | 74 | struct blkif_response { |
69 | uint64_t id; /* copied from request */ | 75 | uint64_t id; /* copied from request */ |
70 | uint8_t operation; /* copied from request */ | 76 | uint8_t operation; /* copied from request */ |
@@ -91,4 +97,25 @@ DEFINE_RING_TYPES(blkif, struct blkif_request, struct blkif_response); | |||
91 | #define VDISK_REMOVABLE 0x2 | 97 | #define VDISK_REMOVABLE 0x2 |
92 | #define VDISK_READONLY 0x4 | 98 | #define VDISK_READONLY 0x4 |
93 | 99 | ||
100 | /* Xen-defined major numbers for virtual disks, they look strangely | ||
101 | * familiar */ | ||
102 | #define XEN_IDE0_MAJOR 3 | ||
103 | #define XEN_IDE1_MAJOR 22 | ||
104 | #define XEN_SCSI_DISK0_MAJOR 8 | ||
105 | #define XEN_SCSI_DISK1_MAJOR 65 | ||
106 | #define XEN_SCSI_DISK2_MAJOR 66 | ||
107 | #define XEN_SCSI_DISK3_MAJOR 67 | ||
108 | #define XEN_SCSI_DISK4_MAJOR 68 | ||
109 | #define XEN_SCSI_DISK5_MAJOR 69 | ||
110 | #define XEN_SCSI_DISK6_MAJOR 70 | ||
111 | #define XEN_SCSI_DISK7_MAJOR 71 | ||
112 | #define XEN_SCSI_DISK8_MAJOR 128 | ||
113 | #define XEN_SCSI_DISK9_MAJOR 129 | ||
114 | #define XEN_SCSI_DISK10_MAJOR 130 | ||
115 | #define XEN_SCSI_DISK11_MAJOR 131 | ||
116 | #define XEN_SCSI_DISK12_MAJOR 132 | ||
117 | #define XEN_SCSI_DISK13_MAJOR 133 | ||
118 | #define XEN_SCSI_DISK14_MAJOR 134 | ||
119 | #define XEN_SCSI_DISK15_MAJOR 135 | ||
120 | |||
94 | #endif /* __XEN_PUBLIC_IO_BLKIF_H__ */ | 121 | #endif /* __XEN_PUBLIC_IO_BLKIF_H__ */ |
diff --git a/include/xen/interface/io/netif.h b/include/xen/interface/io/netif.h index 518481c95f18..cb94668f6e9f 100644 --- a/include/xen/interface/io/netif.h +++ b/include/xen/interface/io/netif.h | |||
@@ -22,50 +22,50 @@ | |||
22 | 22 | ||
23 | /* | 23 | /* |
24 | * This is the 'wire' format for packets: | 24 | * This is the 'wire' format for packets: |
25 | * Request 1: netif_tx_request -- NETTXF_* (any flags) | 25 | * Request 1: xen_netif_tx_request -- XEN_NETTXF_* (any flags) |
26 | * [Request 2: netif_tx_extra] (only if request 1 has NETTXF_extra_info) | 26 | * [Request 2: xen_netif_extra_info] (only if request 1 has XEN_NETTXF_extra_info) |
27 | * [Request 3: netif_tx_extra] (only if request 2 has XEN_NETIF_EXTRA_MORE) | 27 | * [Request 3: xen_netif_extra_info] (only if request 2 has XEN_NETIF_EXTRA_MORE) |
28 | * Request 4: netif_tx_request -- NETTXF_more_data | 28 | * Request 4: xen_netif_tx_request -- XEN_NETTXF_more_data |
29 | * Request 5: netif_tx_request -- NETTXF_more_data | 29 | * Request 5: xen_netif_tx_request -- XEN_NETTXF_more_data |
30 | * ... | 30 | * ... |
31 | * Request N: netif_tx_request -- 0 | 31 | * Request N: xen_netif_tx_request -- 0 |
32 | */ | 32 | */ |
33 | 33 | ||
34 | /* Protocol checksum field is blank in the packet (hardware offload)? */ | 34 | /* Protocol checksum field is blank in the packet (hardware offload)? */ |
35 | #define _NETTXF_csum_blank (0) | 35 | #define _XEN_NETTXF_csum_blank (0) |
36 | #define NETTXF_csum_blank (1U<<_NETTXF_csum_blank) | 36 | #define XEN_NETTXF_csum_blank (1U<<_XEN_NETTXF_csum_blank) |
37 | 37 | ||
38 | /* Packet data has been validated against protocol checksum. */ | 38 | /* Packet data has been validated against protocol checksum. */ |
39 | #define _NETTXF_data_validated (1) | 39 | #define _XEN_NETTXF_data_validated (1) |
40 | #define NETTXF_data_validated (1U<<_NETTXF_data_validated) | 40 | #define XEN_NETTXF_data_validated (1U<<_XEN_NETTXF_data_validated) |
41 | 41 | ||
42 | /* Packet continues in the next request descriptor. */ | 42 | /* Packet continues in the next request descriptor. */ |
43 | #define _NETTXF_more_data (2) | 43 | #define _XEN_NETTXF_more_data (2) |
44 | #define NETTXF_more_data (1U<<_NETTXF_more_data) | 44 | #define XEN_NETTXF_more_data (1U<<_XEN_NETTXF_more_data) |
45 | 45 | ||
46 | /* Packet to be followed by extra descriptor(s). */ | 46 | /* Packet to be followed by extra descriptor(s). */ |
47 | #define _NETTXF_extra_info (3) | 47 | #define _XEN_NETTXF_extra_info (3) |
48 | #define NETTXF_extra_info (1U<<_NETTXF_extra_info) | 48 | #define XEN_NETTXF_extra_info (1U<<_XEN_NETTXF_extra_info) |
49 | 49 | ||
50 | struct xen_netif_tx_request { | 50 | struct xen_netif_tx_request { |
51 | grant_ref_t gref; /* Reference to buffer page */ | 51 | grant_ref_t gref; /* Reference to buffer page */ |
52 | uint16_t offset; /* Offset within buffer page */ | 52 | uint16_t offset; /* Offset within buffer page */ |
53 | uint16_t flags; /* NETTXF_* */ | 53 | uint16_t flags; /* XEN_NETTXF_* */ |
54 | uint16_t id; /* Echoed in response message. */ | 54 | uint16_t id; /* Echoed in response message. */ |
55 | uint16_t size; /* Packet size in bytes. */ | 55 | uint16_t size; /* Packet size in bytes. */ |
56 | }; | 56 | }; |
57 | 57 | ||
58 | /* Types of netif_extra_info descriptors. */ | 58 | /* Types of xen_netif_extra_info descriptors. */ |
59 | #define XEN_NETIF_EXTRA_TYPE_NONE (0) /* Never used - invalid */ | 59 | #define XEN_NETIF_EXTRA_TYPE_NONE (0) /* Never used - invalid */ |
60 | #define XEN_NETIF_EXTRA_TYPE_GSO (1) /* u.gso */ | 60 | #define XEN_NETIF_EXTRA_TYPE_GSO (1) /* u.gso */ |
61 | #define XEN_NETIF_EXTRA_TYPE_MAX (2) | 61 | #define XEN_NETIF_EXTRA_TYPE_MAX (2) |
62 | 62 | ||
63 | /* netif_extra_info flags. */ | 63 | /* xen_netif_extra_info flags. */ |
64 | #define _XEN_NETIF_EXTRA_FLAG_MORE (0) | 64 | #define _XEN_NETIF_EXTRA_FLAG_MORE (0) |
65 | #define XEN_NETIF_EXTRA_FLAG_MORE (1U<<_XEN_NETIF_EXTRA_FLAG_MORE) | 65 | #define XEN_NETIF_EXTRA_FLAG_MORE (1U<<_XEN_NETIF_EXTRA_FLAG_MORE) |
66 | 66 | ||
67 | /* GSO types - only TCPv4 currently supported. */ | 67 | /* GSO types - only TCPv4 currently supported. */ |
68 | #define XEN_NETIF_GSO_TYPE_TCPV4 (1) | 68 | #define XEN_NETIF_GSO_TYPE_TCPV4 (1) |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * This structure needs to fit within both netif_tx_request and | 71 | * This structure needs to fit within both netif_tx_request and |
@@ -107,7 +107,7 @@ struct xen_netif_extra_info { | |||
107 | 107 | ||
108 | struct xen_netif_tx_response { | 108 | struct xen_netif_tx_response { |
109 | uint16_t id; | 109 | uint16_t id; |
110 | int16_t status; /* NETIF_RSP_* */ | 110 | int16_t status; /* XEN_NETIF_RSP_* */ |
111 | }; | 111 | }; |
112 | 112 | ||
113 | struct xen_netif_rx_request { | 113 | struct xen_netif_rx_request { |
@@ -116,25 +116,29 @@ struct xen_netif_rx_request { | |||
116 | }; | 116 | }; |
117 | 117 | ||
118 | /* Packet data has been validated against protocol checksum. */ | 118 | /* Packet data has been validated against protocol checksum. */ |
119 | #define _NETRXF_data_validated (0) | 119 | #define _XEN_NETRXF_data_validated (0) |
120 | #define NETRXF_data_validated (1U<<_NETRXF_data_validated) | 120 | #define XEN_NETRXF_data_validated (1U<<_XEN_NETRXF_data_validated) |
121 | 121 | ||
122 | /* Protocol checksum field is blank in the packet (hardware offload)? */ | 122 | /* Protocol checksum field is blank in the packet (hardware offload)? */ |
123 | #define _NETRXF_csum_blank (1) | 123 | #define _XEN_NETRXF_csum_blank (1) |
124 | #define NETRXF_csum_blank (1U<<_NETRXF_csum_blank) | 124 | #define XEN_NETRXF_csum_blank (1U<<_XEN_NETRXF_csum_blank) |
125 | 125 | ||
126 | /* Packet continues in the next request descriptor. */ | 126 | /* Packet continues in the next request descriptor. */ |
127 | #define _NETRXF_more_data (2) | 127 | #define _XEN_NETRXF_more_data (2) |
128 | #define NETRXF_more_data (1U<<_NETRXF_more_data) | 128 | #define XEN_NETRXF_more_data (1U<<_XEN_NETRXF_more_data) |
129 | 129 | ||
130 | /* Packet to be followed by extra descriptor(s). */ | 130 | /* Packet to be followed by extra descriptor(s). */ |
131 | #define _NETRXF_extra_info (3) | 131 | #define _XEN_NETRXF_extra_info (3) |
132 | #define NETRXF_extra_info (1U<<_NETRXF_extra_info) | 132 | #define XEN_NETRXF_extra_info (1U<<_XEN_NETRXF_extra_info) |
133 | |||
134 | /* GSO Prefix descriptor. */ | ||
135 | #define _XEN_NETRXF_gso_prefix (4) | ||
136 | #define XEN_NETRXF_gso_prefix (1U<<_XEN_NETRXF_gso_prefix) | ||
133 | 137 | ||
134 | struct xen_netif_rx_response { | 138 | struct xen_netif_rx_response { |
135 | uint16_t id; | 139 | uint16_t id; |
136 | uint16_t offset; /* Offset in page of start of received packet */ | 140 | uint16_t offset; /* Offset in page of start of received packet */ |
137 | uint16_t flags; /* NETRXF_* */ | 141 | uint16_t flags; /* XEN_NETRXF_* */ |
138 | int16_t status; /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */ | 142 | int16_t status; /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */ |
139 | }; | 143 | }; |
140 | 144 | ||
@@ -149,10 +153,10 @@ DEFINE_RING_TYPES(xen_netif_rx, | |||
149 | struct xen_netif_rx_request, | 153 | struct xen_netif_rx_request, |
150 | struct xen_netif_rx_response); | 154 | struct xen_netif_rx_response); |
151 | 155 | ||
152 | #define NETIF_RSP_DROPPED -2 | 156 | #define XEN_NETIF_RSP_DROPPED -2 |
153 | #define NETIF_RSP_ERROR -1 | 157 | #define XEN_NETIF_RSP_ERROR -1 |
154 | #define NETIF_RSP_OKAY 0 | 158 | #define XEN_NETIF_RSP_OKAY 0 |
155 | /* No response: used for auxiliary requests (e.g., netif_tx_extra). */ | 159 | /* No response: used for auxiliary requests (e.g., xen_netif_extra_info). */ |
156 | #define NETIF_RSP_NULL 1 | 160 | #define XEN_NETIF_RSP_NULL 1 |
157 | 161 | ||
158 | #endif | 162 | #endif |
diff --git a/include/xen/interface/sched.h b/include/xen/interface/sched.h index 5fec575a800a..dd55dac340de 100644 --- a/include/xen/interface/sched.h +++ b/include/xen/interface/sched.h | |||
@@ -65,6 +65,39 @@ struct sched_poll { | |||
65 | DEFINE_GUEST_HANDLE_STRUCT(sched_poll); | 65 | DEFINE_GUEST_HANDLE_STRUCT(sched_poll); |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * Declare a shutdown for another domain. The main use of this function is | ||
69 | * in interpreting shutdown requests and reasons for fully-virtualized | ||
70 | * domains. A para-virtualized domain may use SCHEDOP_shutdown directly. | ||
71 | * @arg == pointer to sched_remote_shutdown structure. | ||
72 | */ | ||
73 | #define SCHEDOP_remote_shutdown 4 | ||
74 | struct sched_remote_shutdown { | ||
75 | domid_t domain_id; /* Remote domain ID */ | ||
76 | unsigned int reason; /* SHUTDOWN_xxx reason */ | ||
77 | }; | ||
78 | |||
79 | /* | ||
80 | * Latch a shutdown code, so that when the domain later shuts down it | ||
81 | * reports this code to the control tools. | ||
82 | * @arg == as for SCHEDOP_shutdown. | ||
83 | */ | ||
84 | #define SCHEDOP_shutdown_code 5 | ||
85 | |||
86 | /* | ||
87 | * Setup, poke and destroy a domain watchdog timer. | ||
88 | * @arg == pointer to sched_watchdog structure. | ||
89 | * With id == 0, setup a domain watchdog timer to cause domain shutdown | ||
90 | * after timeout, returns watchdog id. | ||
91 | * With id != 0 and timeout == 0, destroy domain watchdog timer. | ||
92 | * With id != 0 and timeout != 0, poke watchdog timer and set new timeout. | ||
93 | */ | ||
94 | #define SCHEDOP_watchdog 6 | ||
95 | struct sched_watchdog { | ||
96 | uint32_t id; /* watchdog ID */ | ||
97 | uint32_t timeout; /* timeout */ | ||
98 | }; | ||
99 | |||
100 | /* | ||
68 | * Reason codes for SCHEDOP_shutdown. These may be interpreted by control | 101 | * Reason codes for SCHEDOP_shutdown. These may be interpreted by control |
69 | * software to determine the appropriate action. For the most part, Xen does | 102 | * software to determine the appropriate action. For the most part, Xen does |
70 | * not care about the shutdown code. | 103 | * not care about the shutdown code. |
@@ -73,5 +106,6 @@ DEFINE_GUEST_HANDLE_STRUCT(sched_poll); | |||
73 | #define SHUTDOWN_reboot 1 /* Clean up, kill, and then restart. */ | 106 | #define SHUTDOWN_reboot 1 /* Clean up, kill, and then restart. */ |
74 | #define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */ | 107 | #define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */ |
75 | #define SHUTDOWN_crash 3 /* Tell controller we've crashed. */ | 108 | #define SHUTDOWN_crash 3 /* Tell controller we've crashed. */ |
109 | #define SHUTDOWN_watchdog 4 /* Restart because watchdog time expired. */ | ||
76 | 110 | ||
77 | #endif /* __XEN_PUBLIC_SCHED_H__ */ | 111 | #endif /* __XEN_PUBLIC_SCHED_H__ */ |
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h index 2befa3e2f1bc..b33257bc7e83 100644 --- a/include/xen/interface/xen.h +++ b/include/xen/interface/xen.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #define __HYPERVISOR_stack_switch 3 | 30 | #define __HYPERVISOR_stack_switch 3 |
31 | #define __HYPERVISOR_set_callbacks 4 | 31 | #define __HYPERVISOR_set_callbacks 4 |
32 | #define __HYPERVISOR_fpu_taskswitch 5 | 32 | #define __HYPERVISOR_fpu_taskswitch 5 |
33 | #define __HYPERVISOR_sched_op 6 | 33 | #define __HYPERVISOR_sched_op_compat 6 |
34 | #define __HYPERVISOR_dom0_op 7 | 34 | #define __HYPERVISOR_dom0_op 7 |
35 | #define __HYPERVISOR_set_debugreg 8 | 35 | #define __HYPERVISOR_set_debugreg 8 |
36 | #define __HYPERVISOR_get_debugreg 9 | 36 | #define __HYPERVISOR_get_debugreg 9 |
@@ -52,7 +52,7 @@ | |||
52 | #define __HYPERVISOR_mmuext_op 26 | 52 | #define __HYPERVISOR_mmuext_op 26 |
53 | #define __HYPERVISOR_acm_op 27 | 53 | #define __HYPERVISOR_acm_op 27 |
54 | #define __HYPERVISOR_nmi_op 28 | 54 | #define __HYPERVISOR_nmi_op 28 |
55 | #define __HYPERVISOR_sched_op_new 29 | 55 | #define __HYPERVISOR_sched_op 29 |
56 | #define __HYPERVISOR_callback_op 30 | 56 | #define __HYPERVISOR_callback_op 30 |
57 | #define __HYPERVISOR_xenoprof_op 31 | 57 | #define __HYPERVISOR_xenoprof_op 31 |
58 | #define __HYPERVISOR_event_channel_op 32 | 58 | #define __HYPERVISOR_event_channel_op 32 |
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h index 98b92154a264..03c85d7387fb 100644 --- a/include/xen/xen-ops.h +++ b/include/xen/xen-ops.h | |||
@@ -5,9 +5,9 @@ | |||
5 | 5 | ||
6 | DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); | 6 | DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); |
7 | 7 | ||
8 | void xen_pre_suspend(void); | 8 | void xen_arch_pre_suspend(void); |
9 | void xen_post_suspend(int suspend_cancelled); | 9 | void xen_arch_post_suspend(int suspend_cancelled); |
10 | void xen_hvm_post_suspend(int suspend_cancelled); | 10 | void xen_arch_hvm_post_suspend(int suspend_cancelled); |
11 | 11 | ||
12 | void xen_mm_pin_all(void); | 12 | void xen_mm_pin_all(void); |
13 | void xen_mm_unpin_all(void); | 13 | void xen_mm_unpin_all(void); |
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index 7a1d15ff19b7..5467369e0889 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h | |||
@@ -92,7 +92,7 @@ struct xenbus_driver { | |||
92 | void (*otherend_changed)(struct xenbus_device *dev, | 92 | void (*otherend_changed)(struct xenbus_device *dev, |
93 | enum xenbus_state backend_state); | 93 | enum xenbus_state backend_state); |
94 | int (*remove)(struct xenbus_device *dev); | 94 | int (*remove)(struct xenbus_device *dev); |
95 | int (*suspend)(struct xenbus_device *dev, pm_message_t state); | 95 | int (*suspend)(struct xenbus_device *dev); |
96 | int (*resume)(struct xenbus_device *dev); | 96 | int (*resume)(struct xenbus_device *dev); |
97 | int (*uevent)(struct xenbus_device *, struct kobj_uevent_env *); | 97 | int (*uevent)(struct xenbus_device *, struct kobj_uevent_env *); |
98 | struct device_driver driver; | 98 | struct device_driver driver; |