direct-io.hg
changeset 6667:549f4256ab3c
Remove control interface in kernels and domain builder.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/Makefile Wed Sep 07 17:26:27 2005 +0000 1.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/Makefile Wed Sep 07 17:43:56 2005 +0000 1.3 @@ -11,7 +11,7 @@ CPPFLAGS_vmlinux.lds += -U$(XENARCH) 1.4 1.5 extra-y += vmlinux.lds 1.6 1.7 -obj-y := ctrl_if.o evtchn.o fixup.o reboot.o gnttab.o devmem.o 1.8 +obj-y := evtchn.o fixup.o reboot.o gnttab.o devmem.o 1.9 1.10 obj-$(CONFIG_PROC_FS) += xen_proc.o 1.11 obj-$(CONFIG_NET) += skbuff.o
2.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/ctrl_if.c Wed Sep 07 17:26:27 2005 +0000 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,569 +0,0 @@ 2.4 -/****************************************************************************** 2.5 - * ctrl_if.c 2.6 - * 2.7 - * Management functions for special interface to the domain controller. 2.8 - * 2.9 - * Copyright (c) 2004, K A Fraser 2.10 - * 2.11 - * This file may be distributed separately from the Linux kernel, or 2.12 - * incorporated into other software packages, subject to the following license: 2.13 - * 2.14 - * Permission is hereby granted, free of charge, to any person obtaining a copy 2.15 - * of this source file (the "Software"), to deal in the Software without 2.16 - * restriction, including without limitation the rights to use, copy, modify, 2.17 - * merge, publish, distribute, sublicense, and/or sell copies of the Software, 2.18 - * and to permit persons to whom the Software is furnished to do so, subject to 2.19 - * the following conditions: 2.20 - * 2.21 - * The above copyright notice and this permission notice shall be included in 2.22 - * all copies or substantial portions of the Software. 2.23 - * 2.24 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2.25 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2.26 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2.27 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2.28 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 2.29 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 2.30 - * IN THE SOFTWARE. 2.31 - */ 2.32 - 2.33 -#include <linux/config.h> 2.34 -#include <linux/kernel.h> 2.35 -#include <linux/sched.h> 2.36 -#include <linux/slab.h> 2.37 -#include <linux/string.h> 2.38 -#include <linux/errno.h> 2.39 -#include <linux/irq.h> 2.40 -#include <linux/interrupt.h> 2.41 -#include <linux/module.h> 2.42 -#include <asm-xen/ctrl_if.h> 2.43 -#include <asm-xen/evtchn.h> 2.44 - 2.45 -#if 0 2.46 -#define DPRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \ 2.47 - __FILE__ , __LINE__ , ## _a ) 2.48 -#else 2.49 -#define DPRINTK(_f, _a...) ((void)0) 2.50 -#endif 2.51 - 2.52 -/* 2.53 - * Extra ring macros to sync a consumer index up to the public producer index. 2.54 - * Generally UNSAFE, but we use it for recovery and shutdown in some cases. 2.55 - */ 2.56 -#define RING_DROP_PENDING_REQUESTS(_r) \ 2.57 - do { \ 2.58 - (_r)->req_cons = (_r)->sring->req_prod; \ 2.59 - } while (0) 2.60 -#define RING_DROP_PENDING_RESPONSES(_r) \ 2.61 - do { \ 2.62 - (_r)->rsp_cons = (_r)->sring->rsp_prod; \ 2.63 - } while (0) 2.64 - 2.65 -/* 2.66 - * Only used by initial domain which must create its own control-interface 2.67 - * event channel. This value is picked up by the user-space domain controller 2.68 - * via an ioctl. 2.69 - */ 2.70 -int initdom_ctrlif_domcontroller_port = -1; 2.71 - 2.72 -static int ctrl_if_evtchn; 2.73 -static int ctrl_if_irq; 2.74 -static spinlock_t ctrl_if_lock; 2.75 - 2.76 -static struct irqaction ctrl_if_irq_action; 2.77 - 2.78 -static ctrl_front_ring_t ctrl_if_tx_ring; 2.79 -static ctrl_back_ring_t ctrl_if_rx_ring; 2.80 - 2.81 -/* Incoming message requests. */ 2.82 - /* Primary message type -> message handler. */ 2.83 -static ctrl_msg_handler_t ctrl_if_rxmsg_handler[256]; 2.84 - /* Primary message type -> callback in process context? */ 2.85 -static unsigned long ctrl_if_rxmsg_blocking_context[256/sizeof(unsigned long)]; 2.86 - /* Is it late enough during bootstrap to use schedule_task()? */ 2.87 -static int safe_to_schedule_task; 2.88 - /* Queue up messages to be handled in process context. */ 2.89 -static ctrl_msg_t ctrl_if_rxmsg_deferred[CONTROL_RING_SIZE]; 2.90 -static CONTROL_RING_IDX ctrl_if_rxmsg_deferred_prod; 2.91 -static CONTROL_RING_IDX ctrl_if_rxmsg_deferred_cons; 2.92 - 2.93 -/* Incoming message responses: message identifier -> message handler/id. */ 2.94 -static struct { 2.95 - ctrl_msg_handler_t fn; 2.96 - unsigned long id; 2.97 -} ctrl_if_txmsg_id_mapping[CONTROL_RING_SIZE]; 2.98 - 2.99 -/* For received messages that must be deferred to process context. */ 2.100 -static void __ctrl_if_rxmsg_deferred(void *unused); 2.101 -static DECLARE_WORK(ctrl_if_rxmsg_deferred_work, 2.102 - __ctrl_if_rxmsg_deferred, 2.103 - NULL); 2.104 - 2.105 -/* Deferred callbacks for people waiting for space in the transmit ring. */ 2.106 -static DECLARE_TASK_QUEUE(ctrl_if_tx_tq); 2.107 - 2.108 -static DECLARE_WAIT_QUEUE_HEAD(ctrl_if_tx_wait); 2.109 -static void __ctrl_if_tx_tasklet(unsigned long data); 2.110 -static DECLARE_TASKLET(ctrl_if_tx_tasklet, __ctrl_if_tx_tasklet, 0); 2.111 - 2.112 -static void __ctrl_if_rx_tasklet(unsigned long data); 2.113 -static DECLARE_TASKLET(ctrl_if_rx_tasklet, __ctrl_if_rx_tasklet, 0); 2.114 - 2.115 -#define get_ctrl_if() ((control_if_t *)((char *)HYPERVISOR_shared_info + 2048)) 2.116 - 2.117 -static void ctrl_if_notify_controller(void) 2.118 -{ 2.119 - notify_via_evtchn(ctrl_if_evtchn); 2.120 -} 2.121 - 2.122 -static void ctrl_if_rxmsg_default_handler(ctrl_msg_t *msg, unsigned long id) 2.123 -{ 2.124 - msg->length = 0; 2.125 - ctrl_if_send_response(msg); 2.126 -} 2.127 - 2.128 -static void __ctrl_if_tx_tasklet(unsigned long data) 2.129 -{ 2.130 - ctrl_msg_t *msg; 2.131 - int was_full = RING_FULL(&ctrl_if_tx_ring); 2.132 - RING_IDX i, rp; 2.133 - 2.134 - i = ctrl_if_tx_ring.rsp_cons; 2.135 - rp = ctrl_if_tx_ring.sring->rsp_prod; 2.136 - rmb(); /* Ensure we see all requests up to 'rp'. */ 2.137 - 2.138 - for ( ; i != rp; i++ ) 2.139 - { 2.140 - msg = RING_GET_RESPONSE(&ctrl_if_tx_ring, i); 2.141 - 2.142 - DPRINTK("Rx-Rsp %u/%u :: %d/%d\n", i-1, 2.143 - ctrl_if_tx_ring.sring->rsp_prod, 2.144 - msg->type, msg->subtype); 2.145 - 2.146 - /* Execute the callback handler, if one was specified. */ 2.147 - if ( msg->id != 0xFF ) 2.148 - { 2.149 - (*ctrl_if_txmsg_id_mapping[msg->id].fn)( 2.150 - msg, ctrl_if_txmsg_id_mapping[msg->id].id); 2.151 - smp_mb(); /* Execute, /then/ free. */ 2.152 - ctrl_if_txmsg_id_mapping[msg->id].fn = NULL; 2.153 - } 2.154 - } 2.155 - 2.156 - /* 2.157 - * Step over messages in the ring /after/ finishing reading them. As soon 2.158 - * as the index is updated then the message may get blown away. 2.159 - */ 2.160 - smp_mb(); 2.161 - ctrl_if_tx_ring.rsp_cons = i; 2.162 - 2.163 - if ( was_full && !RING_FULL(&ctrl_if_tx_ring) ) 2.164 - { 2.165 - wake_up(&ctrl_if_tx_wait); 2.166 - run_task_queue(&ctrl_if_tx_tq); 2.167 - } 2.168 -} 2.169 - 2.170 -static void __ctrl_if_rxmsg_deferred(void *unused) 2.171 -{ 2.172 - ctrl_msg_t *msg; 2.173 - CONTROL_RING_IDX dp; 2.174 - 2.175 - dp = ctrl_if_rxmsg_deferred_prod; 2.176 - rmb(); /* Ensure we see all deferred requests up to 'dp'. */ 2.177 - 2.178 - while ( ctrl_if_rxmsg_deferred_cons != dp ) 2.179 - { 2.180 - msg = &ctrl_if_rxmsg_deferred[MASK_CONTROL_IDX( 2.181 - ctrl_if_rxmsg_deferred_cons++)]; 2.182 - (*ctrl_if_rxmsg_handler[msg->type])(msg, 0); 2.183 - } 2.184 -} 2.185 - 2.186 -static void __ctrl_if_rx_tasklet(unsigned long data) 2.187 -{ 2.188 - ctrl_msg_t msg, *pmsg; 2.189 - CONTROL_RING_IDX dp; 2.190 - RING_IDX rp, i; 2.191 - 2.192 - i = ctrl_if_rx_ring.req_cons; 2.193 - rp = ctrl_if_rx_ring.sring->req_prod; 2.194 - dp = ctrl_if_rxmsg_deferred_prod; 2.195 - rmb(); /* Ensure we see all requests up to 'rp'. */ 2.196 - 2.197 - for ( ; i != rp; i++) 2.198 - { 2.199 - pmsg = RING_GET_REQUEST(&ctrl_if_rx_ring, i); 2.200 - memcpy(&msg, pmsg, offsetof(ctrl_msg_t, msg)); 2.201 - 2.202 - DPRINTK("Rx-Req %u/%u :: %d/%d\n", i-1, 2.203 - ctrl_if_rx_ring.sring->req_prod, 2.204 - msg.type, msg.subtype); 2.205 - 2.206 - if ( msg.length > sizeof(msg.msg) ) 2.207 - msg.length = sizeof(msg.msg); 2.208 - 2.209 - if ( msg.length != 0 ) 2.210 - memcpy(msg.msg, pmsg->msg, msg.length); 2.211 - 2.212 - if ( test_bit(msg.type, 2.213 - (unsigned long *)&ctrl_if_rxmsg_blocking_context) ) 2.214 - memcpy(&ctrl_if_rxmsg_deferred[MASK_CONTROL_IDX(dp++)], 2.215 - &msg, offsetof(ctrl_msg_t, msg) + msg.length); 2.216 - else 2.217 - (*ctrl_if_rxmsg_handler[msg.type])(&msg, 0); 2.218 - } 2.219 - 2.220 - ctrl_if_rx_ring.req_cons = i; 2.221 - 2.222 - if ( dp != ctrl_if_rxmsg_deferred_prod ) 2.223 - { 2.224 - wmb(); 2.225 - ctrl_if_rxmsg_deferred_prod = dp; 2.226 - schedule_work(&ctrl_if_rxmsg_deferred_work); 2.227 - } 2.228 -} 2.229 - 2.230 -static irqreturn_t ctrl_if_interrupt(int irq, void *dev_id, 2.231 - struct pt_regs *regs) 2.232 -{ 2.233 - if ( RING_HAS_UNCONSUMED_RESPONSES(&ctrl_if_tx_ring) ) 2.234 - tasklet_schedule(&ctrl_if_tx_tasklet); 2.235 - 2.236 - if ( RING_HAS_UNCONSUMED_REQUESTS(&ctrl_if_rx_ring) ) 2.237 - tasklet_schedule(&ctrl_if_rx_tasklet); 2.238 - 2.239 - return IRQ_HANDLED; 2.240 -} 2.241 - 2.242 -int 2.243 -ctrl_if_send_message_noblock( 2.244 - ctrl_msg_t *msg, 2.245 - ctrl_msg_handler_t hnd, 2.246 - unsigned long id) 2.247 -{ 2.248 - unsigned long flags; 2.249 - ctrl_msg_t *dmsg; 2.250 - int i; 2.251 - 2.252 - spin_lock_irqsave(&ctrl_if_lock, flags); 2.253 - 2.254 - if ( RING_FULL(&ctrl_if_tx_ring) ) 2.255 - { 2.256 - spin_unlock_irqrestore(&ctrl_if_lock, flags); 2.257 - return -EAGAIN; 2.258 - } 2.259 - 2.260 - msg->id = 0xFF; 2.261 - if ( hnd != NULL ) 2.262 - { 2.263 - for ( i = 0; ctrl_if_txmsg_id_mapping[i].fn != NULL; i++ ) 2.264 - continue; 2.265 - ctrl_if_txmsg_id_mapping[i].fn = hnd; 2.266 - ctrl_if_txmsg_id_mapping[i].id = id; 2.267 - msg->id = i; 2.268 - } 2.269 - 2.270 - DPRINTK("Tx-Req %u/%u :: %d/%d\n", 2.271 - ctrl_if_tx_ring.req_prod_pvt, 2.272 - ctrl_if_tx_ring.rsp_cons, 2.273 - msg->type, msg->subtype); 2.274 - 2.275 - dmsg = RING_GET_REQUEST(&ctrl_if_tx_ring, 2.276 - ctrl_if_tx_ring.req_prod_pvt); 2.277 - memcpy(dmsg, msg, sizeof(*msg)); 2.278 - ctrl_if_tx_ring.req_prod_pvt++; 2.279 - RING_PUSH_REQUESTS(&ctrl_if_tx_ring); 2.280 - 2.281 - spin_unlock_irqrestore(&ctrl_if_lock, flags); 2.282 - 2.283 - ctrl_if_notify_controller(); 2.284 - 2.285 - return 0; 2.286 -} 2.287 - 2.288 -int 2.289 -ctrl_if_send_message_block( 2.290 - ctrl_msg_t *msg, 2.291 - ctrl_msg_handler_t hnd, 2.292 - unsigned long id, 2.293 - long wait_state) 2.294 -{ 2.295 - DECLARE_WAITQUEUE(wait, current); 2.296 - int rc; 2.297 - 2.298 - /* Fast path. */ 2.299 - if ( (rc = ctrl_if_send_message_noblock(msg, hnd, id)) != -EAGAIN ) 2.300 - return rc; 2.301 - 2.302 - add_wait_queue(&ctrl_if_tx_wait, &wait); 2.303 - 2.304 - for ( ; ; ) 2.305 - { 2.306 - set_current_state(wait_state); 2.307 - 2.308 - if ( (rc = ctrl_if_send_message_noblock(msg, hnd, id)) != -EAGAIN ) 2.309 - break; 2.310 - 2.311 - rc = -ERESTARTSYS; 2.312 - if ( signal_pending(current) && (wait_state == TASK_INTERRUPTIBLE) ) 2.313 - break; 2.314 - 2.315 - schedule(); 2.316 - } 2.317 - 2.318 - set_current_state(TASK_RUNNING); 2.319 - remove_wait_queue(&ctrl_if_tx_wait, &wait); 2.320 - 2.321 - return rc; 2.322 -} 2.323 - 2.324 -/* Allow a reponse-callback handler to find context of a blocked requester. */ 2.325 -struct rsp_wait { 2.326 - ctrl_msg_t *msg; /* Buffer for the response message. */ 2.327 - struct task_struct *task; /* The task that is blocked on the response. */ 2.328 - int done; /* Indicate to 'task' that response is rcv'ed. */ 2.329 -}; 2.330 - 2.331 -static void __ctrl_if_get_response(ctrl_msg_t *msg, unsigned long id) 2.332 -{ 2.333 - struct rsp_wait *wait = (struct rsp_wait *)id; 2.334 - struct task_struct *task = wait->task; 2.335 - 2.336 - memcpy(wait->msg, msg, sizeof(*msg)); 2.337 - wmb(); 2.338 - wait->done = 1; 2.339 - 2.340 - wake_up_process(task); 2.341 -} 2.342 - 2.343 -int 2.344 -ctrl_if_send_message_and_get_response( 2.345 - ctrl_msg_t *msg, 2.346 - ctrl_msg_t *rmsg, 2.347 - long wait_state) 2.348 -{ 2.349 - struct rsp_wait wait; 2.350 - int rc; 2.351 - 2.352 - wait.msg = rmsg; 2.353 - wait.done = 0; 2.354 - wait.task = current; 2.355 - 2.356 - if ( (rc = ctrl_if_send_message_block(msg, __ctrl_if_get_response, 2.357 - (unsigned long)&wait, 2.358 - wait_state)) != 0 ) 2.359 - return rc; 2.360 - 2.361 - for ( ; ; ) 2.362 - { 2.363 - /* NB. Can't easily support TASK_INTERRUPTIBLE here. */ 2.364 - set_current_state(TASK_UNINTERRUPTIBLE); 2.365 - if ( wait.done ) 2.366 - break; 2.367 - schedule(); 2.368 - } 2.369 - 2.370 - set_current_state(TASK_RUNNING); 2.371 - return 0; 2.372 -} 2.373 - 2.374 -int 2.375 -ctrl_if_enqueue_space_callback( 2.376 - struct tq_struct *task) 2.377 -{ 2.378 - /* Fast path. */ 2.379 - if ( !RING_FULL(&ctrl_if_tx_ring) ) 2.380 - return 0; 2.381 - 2.382 - (void)queue_task(task, &ctrl_if_tx_tq); 2.383 - 2.384 - /* 2.385 - * We may race execution of the task queue, so return re-checked status. If 2.386 - * the task is not executed despite the ring being non-full then we will 2.387 - * certainly return 'not full'. 2.388 - */ 2.389 - smp_mb(); 2.390 - return RING_FULL(&ctrl_if_tx_ring); 2.391 -} 2.392 - 2.393 -void 2.394 -ctrl_if_send_response( 2.395 - ctrl_msg_t *msg) 2.396 -{ 2.397 - unsigned long flags; 2.398 - ctrl_msg_t *dmsg; 2.399 - 2.400 - /* 2.401 - * NB. The response may the original request message, modified in-place. 2.402 - * In this situation we may have src==dst, so no copying is required. 2.403 - */ 2.404 - spin_lock_irqsave(&ctrl_if_lock, flags); 2.405 - 2.406 - DPRINTK("Tx-Rsp %u :: %d/%d\n", 2.407 - ctrl_if_rx_ring.rsp_prod_pvt, 2.408 - msg->type, msg->subtype); 2.409 - 2.410 - dmsg = RING_GET_RESPONSE(&ctrl_if_rx_ring, 2.411 - ctrl_if_rx_ring.rsp_prod_pvt); 2.412 - if ( dmsg != msg ) 2.413 - memcpy(dmsg, msg, sizeof(*msg)); 2.414 - 2.415 - ctrl_if_rx_ring.rsp_prod_pvt++; 2.416 - RING_PUSH_RESPONSES(&ctrl_if_rx_ring); 2.417 - 2.418 - spin_unlock_irqrestore(&ctrl_if_lock, flags); 2.419 - 2.420 - ctrl_if_notify_controller(); 2.421 -} 2.422 - 2.423 -int 2.424 -ctrl_if_register_receiver( 2.425 - u8 type, 2.426 - ctrl_msg_handler_t hnd, 2.427 - unsigned int flags) 2.428 -{ 2.429 - unsigned long _flags; 2.430 - int inuse; 2.431 - 2.432 - spin_lock_irqsave(&ctrl_if_lock, _flags); 2.433 - 2.434 - inuse = (ctrl_if_rxmsg_handler[type] != ctrl_if_rxmsg_default_handler); 2.435 - 2.436 - if ( inuse ) 2.437 - { 2.438 - printk(KERN_INFO "Receiver %p already established for control " 2.439 - "messages of type %d.\n", ctrl_if_rxmsg_handler[type], type); 2.440 - } 2.441 - else 2.442 - { 2.443 - ctrl_if_rxmsg_handler[type] = hnd; 2.444 - clear_bit(type, (unsigned long *)&ctrl_if_rxmsg_blocking_context); 2.445 - if ( flags == CALLBACK_IN_BLOCKING_CONTEXT ) 2.446 - { 2.447 - set_bit(type, (unsigned long *)&ctrl_if_rxmsg_blocking_context); 2.448 - if ( !safe_to_schedule_task ) 2.449 - BUG(); 2.450 - } 2.451 - } 2.452 - 2.453 - spin_unlock_irqrestore(&ctrl_if_lock, _flags); 2.454 - 2.455 - return !inuse; 2.456 -} 2.457 - 2.458 -void 2.459 -ctrl_if_unregister_receiver( 2.460 - u8 type, 2.461 - ctrl_msg_handler_t hnd) 2.462 -{ 2.463 - unsigned long flags; 2.464 - 2.465 - spin_lock_irqsave(&ctrl_if_lock, flags); 2.466 - 2.467 - if ( ctrl_if_rxmsg_handler[type] != hnd ) 2.468 - printk(KERN_INFO "Receiver %p is not registered for control " 2.469 - "messages of type %d.\n", hnd, type); 2.470 - else 2.471 - ctrl_if_rxmsg_handler[type] = ctrl_if_rxmsg_default_handler; 2.472 - 2.473 - spin_unlock_irqrestore(&ctrl_if_lock, flags); 2.474 - 2.475 - /* Ensure that @hnd will not be executed after this function returns. */ 2.476 - tasklet_unlock_wait(&ctrl_if_rx_tasklet); 2.477 -} 2.478 - 2.479 -void ctrl_if_suspend(void) 2.480 -{ 2.481 - teardown_irq(ctrl_if_irq, &ctrl_if_irq_action); 2.482 - unbind_evtchn_from_irq(ctrl_if_evtchn); 2.483 -} 2.484 - 2.485 -void ctrl_if_resume(void) 2.486 -{ 2.487 - control_if_t *ctrl_if = get_ctrl_if(); 2.488 - 2.489 - if ( xen_start_info->flags & SIF_INITDOMAIN ) 2.490 - { 2.491 - /* 2.492 - * The initial domain must create its own domain-controller link. 2.493 - * The controller is probably not running at this point, but will 2.494 - * pick up its end of the event channel from 2.495 - */ 2.496 - evtchn_op_t op; 2.497 - extern void bind_evtchn_to_cpu(unsigned port, unsigned cpu); 2.498 - 2.499 - op.cmd = EVTCHNOP_bind_interdomain; 2.500 - op.u.bind_interdomain.dom1 = DOMID_SELF; 2.501 - op.u.bind_interdomain.dom2 = DOMID_SELF; 2.502 - op.u.bind_interdomain.port1 = 0; 2.503 - op.u.bind_interdomain.port2 = 0; 2.504 - if ( HYPERVISOR_event_channel_op(&op) != 0 ) 2.505 - BUG(); 2.506 - xen_start_info->domain_controller_evtchn = op.u.bind_interdomain.port1; 2.507 - initdom_ctrlif_domcontroller_port = op.u.bind_interdomain.port2; 2.508 - bind_evtchn_to_cpu(op.u.bind_interdomain.port1, 0); 2.509 - } 2.510 - 2.511 - /* Sync up with shared indexes. */ 2.512 - FRONT_RING_ATTACH(&ctrl_if_tx_ring, &ctrl_if->tx_ring, CONTROL_RING_MEM); 2.513 - BACK_RING_ATTACH(&ctrl_if_rx_ring, &ctrl_if->rx_ring, CONTROL_RING_MEM); 2.514 - 2.515 - ctrl_if_evtchn = xen_start_info->domain_controller_evtchn; 2.516 - ctrl_if_irq = bind_evtchn_to_irq(ctrl_if_evtchn); 2.517 - 2.518 - memset(&ctrl_if_irq_action, 0, sizeof(ctrl_if_irq_action)); 2.519 - ctrl_if_irq_action.handler = ctrl_if_interrupt; 2.520 - ctrl_if_irq_action.name = "ctrl-if"; 2.521 - (void)setup_irq(ctrl_if_irq, &ctrl_if_irq_action); 2.522 -} 2.523 - 2.524 -void __init ctrl_if_init(void) 2.525 -{ 2.526 - control_if_t *ctrl_if = get_ctrl_if(); 2.527 - int i; 2.528 - 2.529 - for ( i = 0; i < 256; i++ ) 2.530 - ctrl_if_rxmsg_handler[i] = ctrl_if_rxmsg_default_handler; 2.531 - 2.532 - FRONT_RING_ATTACH(&ctrl_if_tx_ring, &ctrl_if->tx_ring, CONTROL_RING_MEM); 2.533 - BACK_RING_ATTACH(&ctrl_if_rx_ring, &ctrl_if->rx_ring, CONTROL_RING_MEM); 2.534 - 2.535 - spin_lock_init(&ctrl_if_lock); 2.536 - 2.537 - ctrl_if_resume(); 2.538 -} 2.539 - 2.540 - 2.541 -/* This is called after it is safe to call schedule_task(). */ 2.542 -static int __init ctrl_if_late_setup(void) 2.543 -{ 2.544 - safe_to_schedule_task = 1; 2.545 - return 0; 2.546 -} 2.547 -__initcall(ctrl_if_late_setup); 2.548 - 2.549 - 2.550 -/* 2.551 - * !! The following are DANGEROUS FUNCTIONS !! 2.552 - * Use with care [for example, see xencons_force_flush()]. 2.553 - */ 2.554 - 2.555 -int ctrl_if_transmitter_empty(void) 2.556 -{ 2.557 - return (ctrl_if_tx_ring.sring->req_prod == ctrl_if_tx_ring.rsp_cons); 2.558 - 2.559 -} 2.560 - 2.561 -void ctrl_if_discard_responses(void) 2.562 -{ 2.563 - RING_DROP_PENDING_RESPONSES(&ctrl_if_tx_ring); 2.564 -} 2.565 - 2.566 -EXPORT_SYMBOL(ctrl_if_send_message_noblock); 2.567 -EXPORT_SYMBOL(ctrl_if_send_message_block); 2.568 -EXPORT_SYMBOL(ctrl_if_send_message_and_get_response); 2.569 -EXPORT_SYMBOL(ctrl_if_enqueue_space_callback); 2.570 -EXPORT_SYMBOL(ctrl_if_send_response); 2.571 -EXPORT_SYMBOL(ctrl_if_register_receiver); 2.572 -EXPORT_SYMBOL(ctrl_if_unregister_receiver);
3.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c Wed Sep 07 17:26:27 2005 +0000 3.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c Wed Sep 07 17:43:56 2005 +0000 3.3 @@ -40,7 +40,6 @@ 3.4 #include <asm-xen/synch_bitops.h> 3.5 #include <asm-xen/xen-public/event_channel.h> 3.6 #include <asm-xen/xen-public/physdev.h> 3.7 -#include <asm-xen/ctrl_if.h> 3.8 #include <asm-xen/hypervisor.h> 3.9 #include <asm-xen/evtchn.h> 3.10 3.11 @@ -732,7 +731,4 @@ void __init init_IRQ(void) 3.12 irq_desc[pirq_to_irq(i)].depth = 1; 3.13 irq_desc[pirq_to_irq(i)].handler = &pirq_type; 3.14 } 3.15 - 3.16 - /* This needs to be done early, but after the IRQ subsystem is alive. */ 3.17 - ctrl_if_init(); 3.18 }
4.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c Wed Sep 07 17:26:27 2005 +0000 4.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c Wed Sep 07 17:43:56 2005 +0000 4.3 @@ -14,7 +14,6 @@ 4.4 #include <asm-xen/xen-public/dom0_ops.h> 4.5 #include <asm-xen/queues.h> 4.6 #include <asm-xen/xenbus.h> 4.7 -#include <asm-xen/ctrl_if.h> 4.8 #include <linux/cpu.h> 4.9 #include <linux/kthread.h> 4.10 4.11 @@ -168,8 +167,6 @@ static int __do_suspend(void *ignore) 4.12 4.13 xencons_suspend(); 4.14 4.15 - ctrl_if_suspend(); 4.16 - 4.17 irq_suspend(); 4.18 4.19 gnttab_suspend(); 4.20 @@ -214,8 +211,6 @@ static int __do_suspend(void *ignore) 4.21 4.22 irq_resume(); 4.23 4.24 - ctrl_if_resume(); 4.25 - 4.26 xencons_resume(); 4.27 4.28 xenbus_resume();
5.1 --- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h Wed Sep 07 17:26:27 2005 +0000 5.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h Wed Sep 07 17:43:56 2005 +0000 5.3 @@ -15,7 +15,6 @@ 5.4 #include <linux/config.h> 5.5 #include <linux/sched.h> 5.6 #include <linux/interrupt.h> 5.7 -#include <asm-xen/ctrl_if.h> 5.8 #include <linux/slab.h> 5.9 #include <linux/blkdev.h> 5.10 #include <asm/io.h>
6.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h Wed Sep 07 17:26:27 2005 +0000 6.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h Wed Sep 07 17:43:56 2005 +0000 6.3 @@ -14,7 +14,6 @@ 6.4 #include <linux/in.h> 6.5 #include <linux/netdevice.h> 6.6 #include <linux/etherdevice.h> 6.7 -#include <asm-xen/ctrl_if.h> 6.8 #include <asm-xen/evtchn.h> 6.9 #include <asm-xen/xen-public/io/netif.h> 6.10 #include <asm/io.h>
7.1 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c Wed Sep 07 17:26:27 2005 +0000 7.2 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c Wed Sep 07 17:43:56 2005 +0000 7.3 @@ -80,13 +80,6 @@ static int privcmd_ioctl(struct inode *i 7.4 } 7.5 break; 7.6 7.7 - case IOCTL_PRIVCMD_INITDOMAIN_EVTCHN: 7.8 - { 7.9 - extern int initdom_ctrlif_domcontroller_port; 7.10 - ret = initdom_ctrlif_domcontroller_port; 7.11 - } 7.12 - break; 7.13 - 7.14 #if defined(CONFIG_XEN_PRIVILEGED_GUEST) 7.15 case IOCTL_PRIVCMD_MMAP: 7.16 {
8.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h Wed Sep 07 17:26:27 2005 +0000 8.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h Wed Sep 07 17:43:56 2005 +0000 8.3 @@ -10,7 +10,6 @@ 8.4 #include <linux/module.h> 8.5 #include <linux/interrupt.h> 8.6 #include <linux/slab.h> 8.7 -#include <asm-xen/ctrl_if.h> 8.8 #include <asm-xen/evtchn.h> 8.9 #include <asm-xen/xen-public/io/tpmif.h> 8.10 #include <asm/io.h>
9.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c Wed Sep 07 17:26:27 2005 +0000 9.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c Wed Sep 07 17:43:56 2005 +0000 9.3 @@ -43,7 +43,6 @@ 9.4 #include <asm/semaphore.h> 9.5 #include <asm/io.h> 9.6 #include <asm-xen/evtchn.h> 9.7 -#include <asm-xen/ctrl_if.h> 9.8 #include <asm-xen/xen-public/io/tpmif.h> 9.9 #include <asm/uaccess.h> 9.10 #include <asm-xen/xenbus.h>
10.1 --- a/linux-2.6-xen-sparse/drivers/xen/usbback/common.h Wed Sep 07 17:26:27 2005 +0000 10.2 +++ b/linux-2.6-xen-sparse/drivers/xen/usbback/common.h Wed Sep 07 17:43:56 2005 +0000 10.3 @@ -12,7 +12,6 @@ 10.4 #include <asm/io.h> 10.5 #include <asm/setup.h> 10.6 #include <asm/pgalloc.h> 10.7 -#include <asm-xen/ctrl_if.h> 10.8 #include <asm-xen/hypervisor.h> 10.9 10.10 #include <asm-xen/xen-public/io/usbif.h>
11.1 --- a/linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront.c Wed Sep 07 17:26:27 2005 +0000 11.2 +++ b/linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront.c Wed Sep 07 17:43:56 2005 +0000 11.3 @@ -70,7 +70,6 @@ 11.4 #include "../../../../../drivers/usb/hcd.h" 11.5 11.6 #include <asm-xen/xen-public/io/usbif.h> 11.7 -#include <asm/ctrl_if.h> 11.8 #include <asm/xen-public/io/domain_controller.h> 11.9 11.10 /*
12.1 --- a/linux-2.6-xen-sparse/include/asm-xen/ctrl_if.h Wed Sep 07 17:26:27 2005 +0000 12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 12.3 @@ -1,160 +0,0 @@ 12.4 -/****************************************************************************** 12.5 - * ctrl_if.h 12.6 - * 12.7 - * Management functions for special interface to the domain controller. 12.8 - * 12.9 - * Copyright (c) 2004, K A Fraser 12.10 - * 12.11 - * This file may be distributed separately from the Linux kernel, or 12.12 - * incorporated into other software packages, subject to the following license: 12.13 - * 12.14 - * Permission is hereby granted, free of charge, to any person obtaining a copy 12.15 - * of this source file (the "Software"), to deal in the Software without 12.16 - * restriction, including without limitation the rights to use, copy, modify, 12.17 - * merge, publish, distribute, sublicense, and/or sell copies of the Software, 12.18 - * and to permit persons to whom the Software is furnished to do so, subject to 12.19 - * the following conditions: 12.20 - * 12.21 - * The above copyright notice and this permission notice shall be included in 12.22 - * all copies or substantial portions of the Software. 12.23 - * 12.24 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12.25 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12.26 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 12.27 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 12.28 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 12.29 - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 12.30 - * IN THE SOFTWARE. 12.31 - */ 12.32 - 12.33 -#ifndef __ASM_XEN__CTRL_IF_H__ 12.34 -#define __ASM_XEN__CTRL_IF_H__ 12.35 - 12.36 -#include <asm-xen/hypervisor.h> 12.37 -#include <asm-xen/queues.h> 12.38 - 12.39 -typedef control_msg_t ctrl_msg_t; 12.40 - 12.41 -/* 12.42 - * Callback function type. Called for asynchronous processing of received 12.43 - * request messages, and responses to previously-transmitted request messages. 12.44 - * The parameters are (@msg, @id). 12.45 - * @msg: Original request/response message (not a copy). The message can be 12.46 - * modified in-place by the handler (e.g., a response callback can 12.47 - * turn a request message into a response message in place). The message 12.48 - * is no longer accessible after the callback handler returns -- if the 12.49 - * message is required to persist for longer then it must be copied. 12.50 - * @id: (Response callbacks only) The 'id' that was specified when the 12.51 - * original request message was queued for transmission. 12.52 - */ 12.53 -typedef void (*ctrl_msg_handler_t)(ctrl_msg_t *, unsigned long); 12.54 - 12.55 -/* 12.56 - * Send @msg to the domain controller. Execute @hnd when a response is 12.57 - * received, passing the response message and the specified @id. This 12.58 - * operation will not block: it will return -EAGAIN if there is no space. 12.59 - * Notes: 12.60 - * 1. The @msg is copied if it is transmitted and so can be freed after this 12.61 - * function returns. 12.62 - * 2. If @hnd is NULL then no callback is executed. 12.63 - */ 12.64 -int 12.65 -ctrl_if_send_message_noblock( 12.66 - ctrl_msg_t *msg, 12.67 - ctrl_msg_handler_t hnd, 12.68 - unsigned long id); 12.69 - 12.70 -/* 12.71 - * Send @msg to the domain controller. Execute @hnd when a response is 12.72 - * received, passing the response message and the specified @id. This 12.73 - * operation will block until the message is sent, or a signal is received 12.74 - * for the calling process (unless @wait_state is TASK_UNINTERRUPTIBLE). 12.75 - * Notes: 12.76 - * 1. The @msg is copied if it is transmitted and so can be freed after this 12.77 - * function returns. 12.78 - * 2. If @hnd is NULL then no callback is executed. 12.79 - */ 12.80 -int 12.81 -ctrl_if_send_message_block( 12.82 - ctrl_msg_t *msg, 12.83 - ctrl_msg_handler_t hnd, 12.84 - unsigned long id, 12.85 - long wait_state); 12.86 - 12.87 -/* 12.88 - * Send @msg to the domain controller. Block until the response is received, 12.89 - * and then copy it into the provided buffer, @rmsg. 12.90 - */ 12.91 -int 12.92 -ctrl_if_send_message_and_get_response( 12.93 - ctrl_msg_t *msg, 12.94 - ctrl_msg_t *rmsg, 12.95 - long wait_state); 12.96 - 12.97 -/* 12.98 - * Request a callback when there is /possibly/ space to immediately send a 12.99 - * message to the domain controller. This function returns 0 if there is 12.100 - * already space to trasnmit a message --- in this case the callback task /may/ 12.101 - * still be executed. If this function returns 1 then the callback /will/ be 12.102 - * executed when space becomes available. 12.103 - */ 12.104 -int 12.105 -ctrl_if_enqueue_space_callback( 12.106 - struct tq_struct *task); 12.107 - 12.108 -/* 12.109 - * Send a response (@msg) to a message from the domain controller. This will 12.110 - * never block. 12.111 - * Notes: 12.112 - * 1. The @msg is copied and so can be freed after this function returns. 12.113 - * 2. The @msg may be the original request message, modified in-place. 12.114 - */ 12.115 -void 12.116 -ctrl_if_send_response( 12.117 - ctrl_msg_t *msg); 12.118 - 12.119 -/* 12.120 - * Register a receiver for typed messages from the domain controller. The 12.121 - * handler (@hnd) is called for every received message of specified @type. 12.122 - * Returns TRUE (non-zero) if the handler was successfully registered. 12.123 - * If CALLBACK_IN_BLOCKING CONTEXT is specified in @flags then callbacks will 12.124 - * occur in a context in which it is safe to yield (i.e., process context). 12.125 - */ 12.126 -#define CALLBACK_IN_BLOCKING_CONTEXT 1 12.127 -int ctrl_if_register_receiver( 12.128 - u8 type, 12.129 - ctrl_msg_handler_t hnd, 12.130 - unsigned int flags); 12.131 - 12.132 -/* 12.133 - * Unregister a receiver for typed messages from the domain controller. The 12.134 - * handler (@hnd) will not be executed after this function returns. 12.135 - */ 12.136 -void 12.137 -ctrl_if_unregister_receiver( 12.138 - u8 type, ctrl_msg_handler_t hnd); 12.139 - 12.140 -/* Suspend/resume notifications. */ 12.141 -void ctrl_if_suspend(void); 12.142 -void ctrl_if_resume(void); 12.143 - 12.144 -/* Start-of-day setup. */ 12.145 -void ctrl_if_init(void); 12.146 - 12.147 -/* 12.148 - * Returns TRUE if there are no outstanding message requests at the domain 12.149 - * controller. This can be used to ensure that messages have really flushed 12.150 - * through when it is not possible to use the response-callback interface. 12.151 - * WARNING: If other subsystems are using the control interface then this 12.152 - * function might never return TRUE! 12.153 - */ 12.154 -int ctrl_if_transmitter_empty(void); /* !! DANGEROUS FUNCTION !! */ 12.155 - 12.156 -/* 12.157 - * Manually discard response messages from the domain controller. 12.158 - * WARNING: This is usually done automatically -- this function should only 12.159 - * be called when normal interrupt mechanisms are disabled! 12.160 - */ 12.161 -void ctrl_if_discard_responses(void); /* !! DANGEROUS FUNCTION !! */ 12.162 - 12.163 -#endif /* __ASM_XEN__CONTROL_IF_H__ */
13.1 --- a/linux-2.6-xen-sparse/include/asm-xen/linux-public/privcmd.h Wed Sep 07 17:26:27 2005 +0000 13.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/linux-public/privcmd.h Wed Sep 07 17:43:56 2005 +0000 13.3 @@ -70,14 +70,6 @@ typedef struct privcmd_blkmsg 13.4 #define IOCTL_PRIVCMD_HYPERCALL \ 13.5 _IOC(_IOC_NONE, 'P', 0, sizeof(privcmd_hypercall_t)) 13.6 13.7 -/* 13.8 - * @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN 13.9 - * @arg: n/a 13.10 - * Return: Port associated with domain-controller end of control event channel 13.11 - * for the initial domain. 13.12 - */ 13.13 -#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \ 13.14 - _IOC(_IOC_NONE, 'P', 1, 0) 13.15 #define IOCTL_PRIVCMD_MMAP \ 13.16 _IOC(_IOC_NONE, 'P', 2, sizeof(privcmd_mmap_t)) 13.17 #define IOCTL_PRIVCMD_MMAPBATCH \
14.1 --- a/tools/libxc/xc_linux_build.c Wed Sep 07 17:26:27 2005 +0000 14.2 +++ b/tools/libxc/xc_linux_build.c Wed Sep 07 17:43:56 2005 +0000 14.3 @@ -275,7 +275,6 @@ static int setup_guest(int xc_handle, 14.4 unsigned long *pvss, vcpu_guest_context_t *ctxt, 14.5 const char *cmdline, 14.6 unsigned long shared_info_frame, 14.7 - unsigned int control_evtchn, 14.8 unsigned long flags, 14.9 unsigned int vcpus, 14.10 unsigned int store_evtchn, unsigned long *store_mfn) 14.11 @@ -333,7 +332,6 @@ static int setup_guest(int xc_handle, 14.12 unsigned long *pvss, vcpu_guest_context_t *ctxt, 14.13 const char *cmdline, 14.14 unsigned long shared_info_frame, 14.15 - unsigned int control_evtchn, 14.16 unsigned long flags, 14.17 unsigned int vcpus, 14.18 unsigned int store_evtchn, unsigned long *store_mfn, 14.19 @@ -587,7 +585,6 @@ static int setup_guest(int xc_handle, 14.20 start_info->pt_base = vpt_start; 14.21 start_info->nr_pt_frames = nr_pt_pages; 14.22 start_info->mfn_list = vphysmap_start; 14.23 - start_info->domain_controller_evtchn = control_evtchn; 14.24 start_info->store_mfn = *store_mfn; 14.25 start_info->store_evtchn = store_evtchn; 14.26 start_info->console_mfn = *console_mfn; 14.27 @@ -639,7 +636,6 @@ int xc_linux_build(int xc_handle, 14.28 const char *image_name, 14.29 const char *ramdisk_name, 14.30 const char *cmdline, 14.31 - unsigned int control_evtchn, 14.32 unsigned long flags, 14.33 unsigned int vcpus, 14.34 unsigned int store_evtchn, 14.35 @@ -720,7 +716,7 @@ int xc_linux_build(int xc_handle, 14.36 &vstartinfo_start, &vkern_entry, 14.37 &vstack_start, ctxt, cmdline, 14.38 op.u.getdomaininfo.shared_info_frame, 14.39 - control_evtchn, flags, vcpus, 14.40 + flags, vcpus, 14.41 store_evtchn, store_mfn, 14.42 console_evtchn, console_mfn) < 0 ) 14.43 { 14.44 @@ -742,7 +738,6 @@ int xc_linux_build(int xc_handle, 14.45 ctxt->regs.ar_fpsr = FPSR_DEFAULT; 14.46 /* ctxt->regs.r28 = dom_fw_setup(); currently done by hypervisor, should move here */ 14.47 ctxt->vcpu.privregs = 0; 14.48 - ctxt->shared.domain_controller_evtchn = control_evtchn; 14.49 ctxt->shared.flags = flags; 14.50 i = 0; /* silence unused variable warning */ 14.51 #else /* x86 */
15.1 --- a/tools/libxc/xenguest.h Wed Sep 07 17:26:27 2005 +0000 15.2 +++ b/tools/libxc/xenguest.h Wed Sep 07 17:43:56 2005 +0000 15.3 @@ -45,7 +45,6 @@ int xc_linux_build(int xc_handle, 15.4 const char *image_name, 15.5 const char *ramdisk_name, 15.6 const char *cmdline, 15.7 - unsigned int control_evtchn, 15.8 unsigned long flags, 15.9 unsigned int vcpus, 15.10 unsigned int store_evtchn,
16.1 --- a/tools/python/xen/lowlevel/xc/xc.c Wed Sep 07 17:26:27 2005 +0000 16.2 +++ b/tools/python/xen/lowlevel/xc/xc.c Wed Sep 07 17:43:56 2005 +0000 16.3 @@ -268,18 +268,18 @@ static PyObject *pyxc_linux_build(PyObje 16.4 u32 dom; 16.5 char *image, *ramdisk = NULL, *cmdline = ""; 16.6 int flags = 0, vcpus = 1; 16.7 - int control_evtchn, store_evtchn, console_evtchn; 16.8 + int store_evtchn, console_evtchn; 16.9 unsigned long store_mfn = 0; 16.10 unsigned long console_mfn = 0; 16.11 16.12 - static char *kwd_list[] = { "dom", "control_evtchn", "store_evtchn", 16.13 + static char *kwd_list[] = { "dom", "store_evtchn", 16.14 "console_evtchn", "image", 16.15 /* optional */ 16.16 "ramdisk", "cmdline", "flags", 16.17 "vcpus", NULL }; 16.18 16.19 - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssii", kwd_list, 16.20 - &dom, &control_evtchn, &store_evtchn, 16.21 + if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiis|ssii", kwd_list, 16.22 + &dom, &store_evtchn, 16.23 &console_evtchn, &image, 16.24 /* optional */ 16.25 &ramdisk, &cmdline, &flags, 16.26 @@ -287,7 +287,7 @@ static PyObject *pyxc_linux_build(PyObje 16.27 return NULL; 16.28 16.29 if ( xc_linux_build(xc->xc_handle, dom, image, 16.30 - ramdisk, cmdline, control_evtchn, flags, vcpus, 16.31 + ramdisk, cmdline, flags, vcpus, 16.32 store_evtchn, &store_mfn, 16.33 console_evtchn, &console_mfn) != 0 ) 16.34 return PyErr_SetFromErrno(xc_error);
17.1 --- a/tools/python/xen/xend/image.py Wed Sep 07 17:26:27 2005 +0000 17.2 +++ b/tools/python/xen/xend/image.py Wed Sep 07 17:43:56 2005 +0000 17.3 @@ -249,7 +249,6 @@ class LinuxImageHandler(ImageHandler): 17.4 17.5 log.debug("dom = %d", self.vm.getDomain()) 17.6 log.debug("image = %s", self.kernel) 17.7 - log.debug("control_evtchn = %s", self.vm.channel.getRemotePort()) 17.8 log.debug("store_evtchn = %d", store_evtchn) 17.9 log.debug("console_evtchn = %d", console_evtchn) 17.10 log.debug("cmdline = %s", self.cmdline) 17.11 @@ -259,7 +258,6 @@ class LinuxImageHandler(ImageHandler): 17.12 17.13 ret = xc.linux_build(dom = self.vm.getDomain(), 17.14 image = self.kernel, 17.15 - control_evtchn = self.vm.channel.getRemotePort(), 17.16 store_evtchn = store_evtchn, 17.17 console_evtchn = console_evtchn, 17.18 cmdline = self.cmdline,
18.1 --- a/tools/xcs/ctrl_interface.c Wed Sep 07 17:26:27 2005 +0000 18.2 +++ b/tools/xcs/ctrl_interface.c Wed Sep 07 17:43:56 2005 +0000 18.3 @@ -214,18 +214,7 @@ control_channel_t *ctrl_chan_new(u32 dom 18.4 18.5 if ( dom == 0 ) 18.6 { 18.7 - /* 18.8 - * The control-interface event channel for DOM0 is already set up. 18.9 - * We use an ioctl to discover the port at our end of the channel. 18.10 - */ 18.11 - local_port = ioctl(xc_handle, IOCTL_PRIVCMD_INITDOMAIN_EVTCHN, 18.12 - NULL); 18.13 - remote_port = -1; /* We don't need the remote end of the DOM0 link. */ 18.14 - if ( local_port < 0 ) 18.15 - { 18.16 - DPRINTF("Could not open channel to DOM0"); 18.17 - goto fail; 18.18 - } 18.19 + goto fail; 18.20 } 18.21 else if ( xc_evtchn_bind_interdomain(xc_handle, 18.22 DOMID_SELF, dom,
19.1 --- a/xen/include/public/xen.h Wed Sep 07 17:26:27 2005 +0000 19.2 +++ b/xen/include/public/xen.h Wed Sep 07 17:43:56 2005 +0000 19.3 @@ -435,7 +435,10 @@ typedef struct start_info { 19.4 unsigned long nr_pages; /* Total pages allocated to this domain. */ 19.5 unsigned long shared_info; /* MACHINE address of shared info struct. */ 19.6 u32 flags; /* SIF_xxx flags. */ 19.7 - u16 domain_controller_evtchn; 19.8 + unsigned long store_mfn; /* MACHINE page number of shared page. */ 19.9 + u16 store_evtchn; /* Event channel for store communication. */ 19.10 + unsigned long console_mfn; /* MACHINE address of console page. */ 19.11 + u16 console_evtchn; /* Event channel for console messages. */ 19.12 /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ 19.13 unsigned long pt_base; /* VIRTUAL address of page directory. */ 19.14 unsigned long nr_pt_frames; /* Number of bootstrap p.t. frames. */ 19.15 @@ -443,10 +446,6 @@ typedef struct start_info { 19.16 unsigned long mod_start; /* VIRTUAL address of pre-loaded module. */ 19.17 unsigned long mod_len; /* Size (bytes) of pre-loaded module. */ 19.18 s8 cmd_line[MAX_GUEST_CMDLINE]; 19.19 - unsigned long store_mfn; /* MACHINE page number of shared page. */ 19.20 - u16 store_evtchn; /* Event channel for store communication. */ 19.21 - unsigned long console_mfn; /* MACHINE address of console page. */ 19.22 - u16 console_evtchn; /* Event channel for console messages. */ 19.23 } start_info_t; 19.24 19.25 /* These flags are passed in the 'flags' field of start_info_t. */