[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Reporting some xen 4.1.2* issues like limitations to 4 VCPUs for debian squeeze HVMs



Hi Mark,
does the appended patch to Xen help by any chances?

- Stefano

---


diff -r a79c1d5b946e xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Fri Aug 19 10:00:25 2011 +0100
+++ b/xen/arch/x86/irq.c        Thu Aug 25 15:40:02 2011 +0000
@@ -1876,7 +1876,7 @@ int hvm_domain_use_pirq(struct domain *d
         return 0;
 
     emuirq = domain_pirq_to_emuirq(d, pirq);
-    if ( emuirq != IRQ_UNBOUND && d->pirq_to_evtchn[pirq] != 0 )
+    if ( emuirq != IRQ_UNBOUND )
         return 1;
     else
         return 0;
diff -r a79c1d5b946e xen/arch/x86/physdev.c
--- a/xen/arch/x86/physdev.c    Fri Aug 19 10:00:25 2011 +0100
+++ b/ xen/arch/x86/physdev.c   Thu Aug 25 15:40:02 2011 +0000
@@ -202,9 +202,6 @@ static int physdev_map_pirq(struct physd
     if ( ret == 0 )
         map->pirq = pirq;
 
-    if ( !ret && is_hvm_domain(d) )
-        map_domain_emuirq_pirq(d, pirq, IRQ_PT);
-
  done:
     spin_unlock(&d->event_lock);
     spin_unlock(&pcidevs_lock);
@@ -267,7 +264,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
         if ( v->domain->arch.pirq_eoi_map )
             evtchn_unmask(v->domain->pirq_to_evtchn[eoi.irq]);
         if ( !is_hvm_domain(v->domain) ||
-             domain_pirq_to_emuirq(v->domain, eoi.irq) == IRQ_PT )
+             domain_pirq_to_irq(v->domain, eoi.irq) > 0 )
             ret = pirq_guest_eoi(v->domain, eoi.irq);
         else
             ret = 0;
@@ -326,7 +323,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
             break;
         irq_status_query.flags = 0;
         if ( is_hvm_domain(v->domain) &&
-             domain_pirq_to_emuirq(v->domain, irq) != IRQ_PT )
+             domain_pirq_to_irq(v->domain, irq) > 0 )
         {
             ret = copy_to_guest(arg, &irq_status_query, 1) ? -EFAULT : 0;
             break;
diff -r a79c1d5b946e xen/common/event_channel.c
--- a/xen/common/event_channel.c        Fri Aug 19 10:00:25 2011 +0100
+++ b/xen/common/event_channel.c        Thu Aug 25 15:40:02 2011 +0000
@@ -361,6 +361,9 @@ static long evtchn_bind_pirq(evtchn_bind
 
     bind->port = port;
 
+    if ( is_hvm_domain(d) && domain_pirq_to_irq(d, pirq) > 0 )
+        map_domain_emuirq_pirq(d, pirq, IRQ_PT);
+
  out:
     spin_unlock(&d->event_lock);
 
@@ -409,6 +412,8 @@ static long __evtchn_close(struct domain
             pirq_guest_unbind(d1, chn1->u.pirq.irq);
         d1->pirq_to_evtchn[chn1->u.pirq.irq] = 0;
         unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]);
+        if ( is_hvm_domain(d1) && domain_pirq_to_irq(d1, chn1->u.pirq.irq) > 0 
)
+            unmap_domain_pirq_emuirq(d1, chn1->u.pirq.irq);
         break;
 
     case ECS_VIRQ:

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.