[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] Fix HVM interrupts on IPF
# HG changeset patch # User awilliam@xxxxxxxxxxx # Node ID 169687dab774a442b51a2175cbbdbe2a13b433d4 # Parent 2b0596c8a031fb61cd79809fab5d5420df6d610a [IA64] Fix HVM interrupts on IPF Xen has changed to set-irq-level hypercall from shared-memory PIC stat. This patch makes IPF accomodate this change Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx> --- linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c | 3 ++ xen/arch/ia64/vmx/vlsapic.c | 22 ++++++++++++++++++ xen/arch/ia64/vmx/vmx_hypercall.c | 26 ++++++++++++++++++++++ xen/include/asm-ia64/vmx.h | 1 xen/include/asm-ia64/vmx_platform.h | 4 +-- 5 files changed, 54 insertions(+), 2 deletions(-) diff -r 2b0596c8a031 -r 169687dab774 linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c --- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c Mon Nov 13 10:56:08 2006 -0700 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c Mon Nov 13 11:02:37 2006 -0700 @@ -579,6 +579,9 @@ xencomm_privcmd_hvm_op(privcmd_hypercall case HVMOP_set_param: argsize = sizeof(xen_hvm_param_t); break; + case HVMOP_set_irq_level: + argsize = sizeof(xen_hvm_set_irq_level_t); + break; default: printk("%s: unknown HVMOP %d\n", __func__, cmd); return -EINVAL; diff -r 2b0596c8a031 -r 169687dab774 xen/arch/ia64/vmx/vlsapic.c --- a/xen/arch/ia64/vmx/vlsapic.c Mon Nov 13 10:56:08 2006 -0700 +++ b/xen/arch/ia64/vmx/vlsapic.c Mon Nov 13 11:02:37 2006 -0700 @@ -666,3 +666,25 @@ void vmx_vexirq(VCPU *vcpu) { generate_exirq (vcpu); } + + +void vmx_vioapic_set_irq(struct domain *d, int irq, int level) +{ + unsigned long flags; + + spin_lock_irqsave(&d->arch.arch_vmx.virq_assist_lock, flags); + vioapic_set_irq(d, irq, level); + spin_unlock_irqrestore(&d->arch.arch_vmx.virq_assist_lock, flags); +} + +int vmx_vlapic_set_irq(VCPU *v, uint8_t vec, uint8_t trig) +{ + int ret; + int running = test_bit(_VCPUF_running, &v->vcpu_flags); + + ret = vmx_vcpu_pend_interrupt(v, vec); + vcpu_unblock(v); + if (running) + smp_send_event_check_cpu(v->processor); + return ret; +} diff -r 2b0596c8a031 -r 169687dab774 xen/arch/ia64/vmx/vmx_hypercall.c --- a/xen/arch/ia64/vmx/vmx_hypercall.c Mon Nov 13 10:56:08 2006 -0700 +++ b/xen/arch/ia64/vmx/vmx_hypercall.c Mon Nov 13 11:02:37 2006 -0700 @@ -34,6 +34,7 @@ #include <public/version.h> #include <asm/dom_fw.h> #include <xen/domain.h> +#include <asm/vmx.h> long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg) @@ -78,6 +79,31 @@ do_hvm_op(unsigned long op, XEN_GUEST_HA break; } + case HVMOP_set_irq_level: + { + struct xen_hvm_set_irq_level op; + struct domain *d; + + if (copy_from_guest(&op, arg, 1)) + return -EFAULT; + + if (!IS_PRIV(current->domain)) + return -EPERM; + + d = find_domain_by_id(op.domid); + if (d == NULL) + return -ESRCH; + + rc = -EINVAL; + if (is_hvm_domain(d)) { + vmx_vioapic_set_irq(d, op.irq, op.level); + rc = 0; + } + + put_domain(d); + break; + } + default: gdprintk(XENLOG_INFO, "Bad HVM op %ld.\n", op); rc = -ENOSYS; diff -r 2b0596c8a031 -r 169687dab774 xen/include/asm-ia64/vmx.h --- a/xen/include/asm-ia64/vmx.h Mon Nov 13 10:56:08 2006 -0700 +++ b/xen/include/asm-ia64/vmx.h Mon Nov 13 11:02:37 2006 -0700 @@ -55,6 +55,7 @@ extern void vmx_relinquish_vcpu_resource extern void vmx_relinquish_vcpu_resources(struct vcpu *v); extern void vmx_die_if_kernel(char *str, struct pt_regs *regs, long err); extern void vmx_send_assist_req(struct vcpu *v); +extern void vmx_vioapic_set_irq(struct domain *d, int irq, int level); static inline vcpu_iodata_t *get_vio(struct domain *d, unsigned long cpu) { diff -r 2b0596c8a031 -r 169687dab774 xen/include/asm-ia64/vmx_platform.h --- a/xen/include/asm-ia64/vmx_platform.h Mon Nov 13 10:56:08 2006 -0700 +++ b/xen/include/asm-ia64/vmx_platform.h Mon Nov 13 11:02:37 2006 -0700 @@ -56,10 +56,10 @@ extern uint64_t dummy_tmr[]; #define VLAPIC_ID(l) (uint16_t)(((l)->vcpu->arch.privregs->lid) >> 16) #define VLAPIC_IRR(l) ((l)->vcpu->arch.privregs->irr[0]) struct vlapic *apic_round_robin(struct domain *d, uint8_t vector, uint32_t bitmap); -extern int vmx_vcpu_pend_interrupt(struct vcpu *vcpu, uint8_t vector); +extern int vmx_vlapic_set_irq(struct vcpu *v, uint8_t vec, uint8_t trig); static inline int vlapic_set_irq(struct vlapic *t, uint8_t vec, uint8_t trig) { - return vmx_vcpu_pend_interrupt(t->vcpu, vec); + return vmx_vlapic_set_irq(t->vcpu, vec, trig); } enum ioapic_irq_destination_types { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |