WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] Fix HVM interrupts on IPF

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Fix HVM interrupts on IPF
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Nov 2006 00:40:42 +0000
Delivery-date: Tue, 14 Nov 2006 16:42:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Fix HVM interrupts on IPF, Xen patchbot-unstable <=