diff options
Diffstat (limited to 'include/xen')
-rw-r--r-- | include/xen/events.h | 8 | ||||
-rw-r--r-- | include/xen/interface/io/blkif.h | 37 | ||||
-rw-r--r-- | include/xen/interface/xen.h | 4 | ||||
-rw-r--r-- | include/xen/xen-ops.h | 6 |
4 files changed, 40 insertions, 15 deletions
diff --git a/include/xen/events.h b/include/xen/events.h index bd03b1e4a2f4..d3b9010ee96a 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -81,11 +81,9 @@ int xen_allocate_pirq(unsigned gsi, int shareable, char *name); | |||
81 | int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name); | 81 | int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name); |
82 | 82 | ||
83 | #ifdef CONFIG_PCI_MSI | 83 | #ifdef CONFIG_PCI_MSI |
84 | /* Allocate an irq and a pirq to be used with MSIs. */ | 84 | int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc); |
85 | #define XEN_ALLOC_PIRQ (1 << 0) | 85 | int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, |
86 | #define XEN_ALLOC_IRQ (1 << 1) | 86 | int pirq, int vector, const char *name); |
87 | void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc_mask); | ||
88 | int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type); | ||
89 | #endif | 87 | #endif |
90 | 88 | ||
91 | /* De-allocates the above mentioned physical interrupt. */ | 89 | /* De-allocates the above mentioned physical interrupt. */ |
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/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); |