From: Jack Lange Date: Tue, 1 Sep 2009 18:27:25 +0000 (-0500) Subject: added cpu interruption interface X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=52e81251f82ccaf516e3ed626c8abbcc9fbe3f41 added cpu interruption interface --- diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index 2d32cbc..2da7ee2 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -198,6 +198,9 @@ void v3_yield(struct guest_info * info); void v3_yield_cond(struct guest_info * info); +void v3_interrupt_cpu(struct guest_info * vm, int logical_cpu); + + #endif //!__V3VEE__ @@ -218,6 +221,8 @@ struct v3_os_hooks { void *(*paddr_to_vaddr)(void *addr); void *(*vaddr_to_paddr)(void *addr); + void (*interrupt_cpu)(struct guest_info * vm, int logical_cpu); + int (*hook_interrupt)(struct guest_info * vm, unsigned int irq); int (*ack_irq)(int irq); diff --git a/palacios/src/devices/8259a.c b/palacios/src/devices/8259a.c index 5edec8c..d1944f6 100644 --- a/palacios/src/devices/8259a.c +++ b/palacios/src/devices/8259a.c @@ -209,6 +209,8 @@ static int pic_raise_intr(struct guest_info * info, void * private_data, int irq return -1; } + v3_interrupt_cpu(info, 0); + return 0; } diff --git a/palacios/src/devices/apic.c b/palacios/src/devices/apic.c index 098b87d..5c5f7a4 100644 --- a/palacios/src/devices/apic.c +++ b/palacios/src/devices/apic.c @@ -923,6 +923,8 @@ int v3_apic_raise_intr(struct guest_info * info, struct vm_device * apic_dev, in return -1; } + v3_interrupt_cpu(info, 0); + return 0; } diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index fea7009..2af99d2 100644 --- a/palacios/src/palacios/vmm.c +++ b/palacios/src/palacios/vmm.c @@ -143,3 +143,11 @@ void v3_yield(struct guest_info * info) { } + +void v3_interrupt_cpu(struct guest_info * info, int logical_cpu) { + extern struct v3_os_hooks * os_hooks; + + if ((os_hooks) && (os_hooks)->interrupt_cpu) { + (os_hooks)->interrupt_cpu(info, logical_cpu); + } +}