All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix pv-on-hvm for ia64
@ 2006-12-20 16:21 Alex Williamson
  2006-12-21 11:12 ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Williamson @ 2006-12-20 16:21 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, DOI Tsunehisa

Hi Keir,

   It looks like 3.0.4 had been tagged, so I assume any updates need to
come in via patches now.  We have one final patch for ia64 which fixes
PV-on-HVM driver support for ia64.  If there's still time for a last
minute patch, please consider adding this one to the xen-3.0.4-testing
tree.  The patch is below.  Thanks,

	Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.

# HG changeset patch
# User awilliam@xenbuild2.aw
# Date 1166630022 25200
# Node ID 46c44b5e6a1b4d462cf02990098a63dfcc36913a
# Parent  c3b455c4676c6446cd541d4c67a521609d046ddb
[IA64] Follow new interrupt deliver mechanism for PV-on-HVM/IPF

This fixes PV-on-HVM drivers for ia64

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>

diff -r c3b455c4676c -r 46c44b5e6a1b unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c	Tue Dec 19 13:31:48 2006 -0700
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c	Wed Dec 20 08:53:42 2006 -0700
@@ -182,12 +182,17 @@ static int get_callback_irq(struct pci_d
 static int get_callback_irq(struct pci_dev *pdev)
 {
 #ifdef __ia64__
-	int irq;
+	int irq, rid;
 	for (irq = 0; irq < 16; irq++) {
 		if (isa_irq_to_vector(irq) == pdev->irq)
 			return irq;
 	}
-	return 0;
+	/* use Requester-ID as callback_irq */
+	/* RID: '<#bus(8)><#dev(5)><#func(3)>' (cf. PCI-Express spec) */
+	rid = ((pdev->bus->number & 0xff) << 8) | pdev->devfn;
+	printk(KERN_INFO DRV_NAME ":use Requester-ID(%04x) as callback irq\n",
+	       rid);
+	return rid | HVM_PARAM_CALLBACK_IRQ_RID;
 #else /* !__ia64__ */
 	return pdev->irq;
 #endif
diff -r c3b455c4676c -r 46c44b5e6a1b xen/arch/ia64/vmx/vmx_process.c
--- a/xen/arch/ia64/vmx/vmx_process.c	Tue Dec 19 13:31:48 2006 -0700
+++ b/xen/arch/ia64/vmx/vmx_process.c	Wed Dec 20 08:53:42 2006 -0700
@@ -212,8 +212,17 @@ void leave_hypervisor_tail(struct pt_reg
             if (callback_irq != 0 && local_events_need_delivery()) {
                 /* change level for para-device callback irq */
                 /* use level irq to send discrete event */
-                viosapic_set_irq(d, callback_irq, 1);
-                viosapic_set_irq(d, callback_irq, 0);
+                if (callback_irq & HVM_PARAM_CALLBACK_IRQ_RID) {
+                    /* case of using Requester-ID as callback irq */
+                    /* RID: '<#bus(8)><#dev(5)><#func(3)>' */
+                    int dev = (callback_irq >> 3) & 0x1f;
+                    viosapic_set_pci_irq(d, dev, 0, 1);
+                    viosapic_set_pci_irq(d, dev, 0, 0);
+                } else {
+                    /* case of using GSI as callback irq */
+                    viosapic_set_irq(d, callback_irq, 1);
+                    viosapic_set_irq(d, callback_irq, 0);
+                }
             }
         }
 
diff -r c3b455c4676c -r 46c44b5e6a1b xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h	Tue Dec 19 13:31:48 2006 -0700
+++ b/xen/include/public/arch-ia64.h	Wed Dec 20 08:53:42 2006 -0700
@@ -61,6 +61,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
 #define VIRQ_ITC        VIRQ_ARCH_0 /* V. Virtual itc timer */
 #define VIRQ_MCA_CMC    VIRQ_ARCH_1 /* MCA cmc interrupt */
 #define VIRQ_MCA_CPE    VIRQ_ARCH_2 /* MCA cpe interrupt */
+
+/* Arch specific callback irq definition */
+/* using Requester-ID(RID) as callback irq */
+#define HVM_PARAM_CALLBACK_IRQ_RID        (1 << 31)
 
 /* Maximum number of virtual CPUs in multi-processor guests. */
 /* WARNING: before changing this, check that shared_info fits on a page */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fix pv-on-hvm for ia64
  2006-12-20 16:21 [PATCH] fix pv-on-hvm for ia64 Alex Williamson
@ 2006-12-21 11:12 ` Keir Fraser
  2006-12-21 23:33   ` Doi.Tsunehisa
  0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2006-12-21 11:12 UTC (permalink / raw)
  To: Alex Williamson; +Cc: xen-devel, DOI Tsunehisa

On 20/12/06 16:21, "Alex Williamson" <alex.williamson@hp.com> wrote:

>    It looks like 3.0.4 had been tagged, so I assume any updates need to
> come in via patches now.  We have one final patch for ia64 which fixes
> PV-on-HVM driver support for ia64.  If there's still time for a last
> minute patch, please consider adding this one to the xen-3.0.4-testing
> tree.  The patch is below.  Thanks,

It missed 3.0.4 so you may as well apply it to xen-ia64-unstable.hg. I
suggest renaming the macro HVM_PARAM_CALLBACK_IRQ_RID since it isn't a
member of the HVM_PARAM enumeration.

 -- Keir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fix pv-on-hvm for ia64
  2006-12-21 11:12 ` Keir Fraser
@ 2006-12-21 23:33   ` Doi.Tsunehisa
  2006-12-22  0:06     ` DOI Tsunehisa
  0 siblings, 1 reply; 6+ messages in thread
From: Doi.Tsunehisa @ 2006-12-21 23:33 UTC (permalink / raw)
  To: Alex Williamson, Keir Fraser; +Cc: xen-devel, DOI Tsunehisa

You (keir) said:
>>    It looks like 3.0.4 had been tagged, so I assume any updates need to
>> come in via patches now.  We have one final patch for ia64 which fixes
>> PV-on-HVM driver support for ia64.  If there's still time for a last
>> minute patch, please consider adding this one to the xen-3.0.4-testing
>> tree.  The patch is below.  Thanks,
> 
> It missed 3.0.4 so you may as well apply it to xen-ia64-unstable.hg. I
> suggest renaming the macro HVM_PARAM_CALLBACK_IRQ_RID since it isn't a
> member of the HVM_PARAM enumeration.

  I think that it should be renamed to IA64_CALLBACK_IRQ_RID.

  What do you think about this ?

Thanks,
- Tsunehisa Doi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fix pv-on-hvm for ia64
  2006-12-21 23:33   ` Doi.Tsunehisa
@ 2006-12-22  0:06     ` DOI Tsunehisa
  2006-12-22  9:01       ` Keir Fraser
  2007-01-04  3:19       ` Alex Williamson
  0 siblings, 2 replies; 6+ messages in thread
From: DOI Tsunehisa @ 2006-12-22  0:06 UTC (permalink / raw)
  To: Alex Williamson, Keir Fraser; +Cc: xen-devel, Doi.Tsunehisa

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

Doi.Tsunehisa@jp.fujitsu.com wrote:
> You (keir) said:
>>>    It looks like 3.0.4 had been tagged, so I assume any updates need to
>>> come in via patches now.  We have one final patch for ia64 which fixes
>>> PV-on-HVM driver support for ia64.  If there's still time for a last
>>> minute patch, please consider adding this one to the xen-3.0.4-testing
>>> tree.  The patch is below.  Thanks,
>> It missed 3.0.4 so you may as well apply it to xen-ia64-unstable.hg. I
>> suggest renaming the macro HVM_PARAM_CALLBACK_IRQ_RID since it isn't a
>> member of the HVM_PARAM enumeration.
> 
>   I think that it should be renamed to IA64_CALLBACK_IRQ_RID.
> 
>   What do you think about this ?

  I made the renaming patch.

Thanks,
- Tsunehisa Doi

[-- Attachment #2: rename.patch3 --]
[-- Type: text/plain, Size: 2288 bytes --]

# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID 65ef70f0e1e878d536abe6a56198491877bde9a4
# Parent  cd7ee537b73a32b25c2145da7147b1b27d1128e1
Rename RID maker HVM_PARAM_CALLBACK_IRQ_RID to IA64_CALLBACK_IRQ_RID

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>

diff -r cd7ee537b73a -r 65ef70f0e1e8 unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c	Thu Dec 21 15:25:14 2006 +0900
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c	Fri Dec 22 09:03:25 2006 +0900
@@ -192,7 +192,7 @@ static int get_callback_irq(struct pci_d
 	rid = ((pdev->bus->number & 0xff) << 8) | pdev->devfn;
 	printk(KERN_INFO DRV_NAME ":use Requester-ID(%04x) as callback irq\n",
 	       rid);
-	return rid | HVM_PARAM_CALLBACK_IRQ_RID;
+	return rid | IA64_CALLBACK_IRQ_RID;
 #else /* !__ia64__ */
 	return pdev->irq;
 #endif
diff -r cd7ee537b73a -r 65ef70f0e1e8 xen/arch/ia64/vmx/vmx_process.c
--- a/xen/arch/ia64/vmx/vmx_process.c	Thu Dec 21 15:25:14 2006 +0900
+++ b/xen/arch/ia64/vmx/vmx_process.c	Fri Dec 22 09:03:25 2006 +0900
@@ -212,7 +212,7 @@ void leave_hypervisor_tail(struct pt_reg
             if (callback_irq != 0 && local_events_need_delivery()) {
                 /* change level for para-device callback irq */
                 /* use level irq to send discrete event */
-                if (callback_irq & HVM_PARAM_CALLBACK_IRQ_RID) {
+                if (callback_irq & IA64_CALLBACK_IRQ_RID) {
                     /* case of using Requester-ID as callback irq */
                     /* RID: '<#bus(8)><#dev(5)><#func(3)>' */
                     int dev = (callback_irq >> 3) & 0x1f;
diff -r cd7ee537b73a -r 65ef70f0e1e8 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h	Thu Dec 21 15:25:14 2006 +0900
+++ b/xen/include/public/arch-ia64.h	Fri Dec 22 09:03:25 2006 +0900
@@ -64,7 +64,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
 
 /* Arch specific callback irq definition */
 /* using Requester-ID(RID) as callback irq */
-#define HVM_PARAM_CALLBACK_IRQ_RID        (1 << 31)
+#define IA64_CALLBACK_IRQ_RID        (1 << 31)
 
 /* Maximum number of virtual CPUs in multi-processor guests. */
 /* WARNING: before changing this, check that shared_info fits on a page */

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: [PATCH] fix pv-on-hvm for ia64
  2006-12-22  0:06     ` DOI Tsunehisa
@ 2006-12-22  9:01       ` Keir Fraser
  2007-01-04  3:19       ` Alex Williamson
  1 sibling, 0 replies; 6+ messages in thread
From: Keir Fraser @ 2006-12-22  9:01 UTC (permalink / raw)
  To: DOI Tsunehisa, Alex Williamson; +Cc: xen-devel




On 22/12/06 12:06 am, "DOI Tsunehisa" <Doi.Tsunehisa@jp.fujitsu.com> wrote:

>>   I think that it should be renamed to IA64_CALLBACK_IRQ_RID.
>> 
>>   What do you think about this ?
> 
>   I made the renaming patch.

Fine by me, but this belongs in the ia64 tree.

 -- Keir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fix pv-on-hvm for ia64
  2006-12-22  0:06     ` DOI Tsunehisa
  2006-12-22  9:01       ` Keir Fraser
@ 2007-01-04  3:19       ` Alex Williamson
  1 sibling, 0 replies; 6+ messages in thread
From: Alex Williamson @ 2007-01-04  3:19 UTC (permalink / raw)
  To: DOI Tsunehisa; +Cc: xen-devel, Keir Fraser

On Fri, 2006-12-22 at 09:06 +0900, DOI Tsunehisa wrote:
> Doi.Tsunehisa@jp.fujitsu.com wrote:
> > You (keir) said:
> >>>    It looks like 3.0.4 had been tagged, so I assume any updates need to
> >>> come in via patches now.  We have one final patch for ia64 which fixes
> >>> PV-on-HVM driver support for ia64.  If there's still time for a last
> >>> minute patch, please consider adding this one to the xen-3.0.4-testing
> >>> tree.  The patch is below.  Thanks,
> >> It missed 3.0.4 so you may as well apply it to xen-ia64-unstable.hg. I
> >> suggest renaming the macro HVM_PARAM_CALLBACK_IRQ_RID since it isn't a
> >> member of the HVM_PARAM enumeration.
> > 
> >   I think that it should be renamed to IA64_CALLBACK_IRQ_RID.
> > 
> >   What do you think about this ?
> 
>   I made the renaming patch.

   Applied.  Thanks,

	Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-01-04  3:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-20 16:21 [PATCH] fix pv-on-hvm for ia64 Alex Williamson
2006-12-21 11:12 ` Keir Fraser
2006-12-21 23:33   ` Doi.Tsunehisa
2006-12-22  0:06     ` DOI Tsunehisa
2006-12-22  9:01       ` Keir Fraser
2007-01-04  3:19       ` Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.