debuggers.hg

view xen/include/asm-x86/event.h @ 22855:1d1eec7e1fb4

xl: Perform minimal validation of virtual disk file while parsing config file

This patch performs some very basic validation on the virtual disk
file passed through the config file. This validation ensures that we
don't go too far with the initialization like spawn qemu and more
while there could be some potentially fundamental issues.

[ Patch fixed up to work with PHYSTYPE_EMPTY 22808:6ec61438713a -iwj ]

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Kamala Narasimhan <kamala.narasimhan@gmail.com>
date Tue Jan 25 18:09:49 2011 +0000 (2011-01-25)
parents 4941c5a14598
children
line source
1 /******************************************************************************
2 * event.h
3 *
4 * A nice interface for passing asynchronous events to guest OSes.
5 * (architecture-dependent part)
6 *
7 */
9 #ifndef __ASM_EVENT_H__
10 #define __ASM_EVENT_H__
12 #include <xen/shared.h>
14 void vcpu_kick(struct vcpu *v);
15 void vcpu_mark_events_pending(struct vcpu *v);
17 int hvm_local_events_need_delivery(struct vcpu *v);
18 static inline int local_events_need_delivery(void)
19 {
20 struct vcpu *v = current;
21 return (is_hvm_vcpu(v) ? hvm_local_events_need_delivery(v) :
22 (vcpu_info(v, evtchn_upcall_pending) &&
23 !vcpu_info(v, evtchn_upcall_mask)));
24 }
26 static inline int local_event_delivery_is_enabled(void)
27 {
28 return !vcpu_info(current, evtchn_upcall_mask);
29 }
31 static inline void local_event_delivery_disable(void)
32 {
33 vcpu_info(current, evtchn_upcall_mask) = 1;
34 }
36 static inline void local_event_delivery_enable(void)
37 {
38 vcpu_info(current, evtchn_upcall_mask) = 0;
39 }
41 /* No arch specific virq definition now. Default to global. */
42 static inline int arch_virq_is_global(int virq)
43 {
44 return 1;
45 }
47 #endif