* Porting PV-on-HVM for ia64 platform
@ 2006-08-26 5:50 Tsunehisa Doi
2006-08-26 6:02 ` [Xen-devel] " Tsunehisa Doi
2006-08-26 7:10 ` Keir Fraser
0 siblings, 2 replies; 9+ messages in thread
From: Tsunehisa Doi @ 2006-08-26 5:50 UTC (permalink / raw)
To: xen-devel; +Cc: xen-ia64-devel
[-- Attachment #1: Type: text/plain, Size: 1732 bytes --]
Hi all,
My name is Tsunehisa Doi.
We have been porting PV-on-HVM feature for ia64 platform.
I will post patches for PV-on-HVM on ia64 platform. These patches modify
common code for PV-on-HVM on IPF.
We ported PV-on-HVM for IPF under this consideration:
* Expand hvm_op hypercall
+ Introduce HVMOP_setup_shared_info_page
- A page allocated on HVM-guest OS is swapped original shared_info
page with this hypercall.
- In x86 code, original shared_info page is used after pv-on-hvm
setup with remapping feature in arch depend HYPERVISOR_memory_op.
But, we can't implement same feature for IPF, thus we select to
implement with this method.
+ Introduce HVMOP_setup_gnttab_table
- Pages allocated on HVM-guest OS is swapped original grant_table
page frames with this hypercall.
- Same above.
* Change domain destroy logic
+ arch_domain_destroy() changed
- considered for swapping shared_info page.
+ grant_table_destroy() changed
- considered for swapping grant_frame pages.
* Modify linux-sparse for pv-on-hvm
+ gnttab.c in linux-sparse modified at initialization
+ modify hypervisor.h for pv-on-hvm
* Modify unmodified_drivers initialization
+ considered the different initialization with x86 code. + modify build
rule for IPF
This patch includes:
* destroy-common.patch
- grant_table destroy logic modification for PV-on-HVM on IPF
* linux-common.patch
- linux-sparse modification for PV-on-HVM on IPF
* unmodified-common.patch
- unmodified_drivers modification for IPF
* unmodified-build.patch
- unmodified_drivers build rule modification for IPF
We have tested that this patch doesn't affect dom0, domVTi without
pv-on-hvm driver attaching, and domVTi using pv-on-hvm driver works
VBD/VNIF on IPF.
Thanks,
- Tsunehisa Doi
[-- Attachment #2: destroy-common.patch --]
[-- Type: text/plain, Size: 1073 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID 21ac9a7848b36da95132eac54ad3cf4f1ee0f93a
# Parent 9647400b50415a7ef26729016ca11c58e3e3c5a5
Modify grant_table destroy code for PV-on-HVM on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r 9647400b5041 -r 21ac9a7848b3 xen/common/grant_table.c
--- a/xen/common/grant_table.c Sat Aug 26 13:37:41 2006 +0900
+++ b/xen/common/grant_table.c Sat Aug 26 13:40:55 2006 +0900
@@ -32,6 +32,7 @@
#include <xen/guest_access.h>
#include <xen/domain_page.h>
#include <acm/acm_hooks.h>
+#include <xen/domain_page.h>
/*
* The first two members of a grant entry are updated as a combined pair.
@@ -1164,7 +1165,8 @@ grant_table_destroy(
if ( t == NULL )
return;
- free_xenheap_pages(t->shared, ORDER_GRANT_FRAMES);
+ if (IS_XEN_HEAP_FRAME(virt_to_page(t->shared)))
+ free_xenheap_pages(t->shared, ORDER_GRANT_FRAMES);
free_xenheap_page(t->maptrack);
xfree(t->active);
xfree(t);
[-- Attachment #3: linux-common.patch --]
[-- Type: text/plain, Size: 1441 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID a0a48f19ddba0ebab21befb076eba607b8221700
# Parent 21ac9a7848b36da95132eac54ad3cf4f1ee0f93a
Modify gnttab initialization code for PV-on-HVM on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r 21ac9a7848b3 -r a0a48f19ddba linux-2.6-xen-sparse/drivers/xen/core/gnttab.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c Sat Aug 26 13:40:55 2006 +0900
+++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c Sat Aug 26 13:44:41 2006 +0900
@@ -429,6 +429,7 @@ int gnttab_resume(void)
int gnttab_resume(void)
{
unsigned long frames;
+#ifndef __ia64__
struct xen_add_to_physmap xatp;
unsigned int i;
@@ -448,13 +449,30 @@ int gnttab_resume(void)
printk("error to ioremap gnttab share frames\n");
return -1;
}
+#else /* !__ia64__ */
+ struct xen_hvm_setup xhs;
+
+ shared = (struct grant_entry *)
+ __get_free_pages(GFP_KERNEL, get_order(PAGE_SIZE * NR_GRANT_FRAMES));
+ if (shared == NULL) {
+ printk("error to allocate gnttab share frames\n");
+ return -1;
+ }
+ frames = virt_to_phys((void *)shared);
+ xhs.arg1 = frames;
+ xhs.arg2 = NR_GRANT_FRAMES;
+ if (HYPERVISOR_hvm_op(HVMOP_setup_gnttab_table, &xhs))
+ BUG();
+#endif /* !__ia64__ */
return 0;
}
int gnttab_suspend(void)
{
+#ifndef __ia64__
iounmap(shared);
+#endif /* !__ia64__ */
return 0;
}
[-- Attachment #4: unmodified-common.patch --]
[-- Type: text/plain, Size: 3349 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID bfc60efbd4f491f9c3ff494f655b4ab825f65d2c
# Parent a0a48f19ddba0ebab21befb076eba607b8221700
Modify unmodified_drivers code for PV-on-HVM on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r a0a48f19ddba -r bfc60efbd4f4 unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Sat Aug 26 13:44:41 2006 +0900
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Sat Aug 26 13:50:25 2006 +0900
@@ -54,11 +54,15 @@ static int __init init_xen_info(void)
static int __init init_xen_info(void)
{
unsigned long shared_info_frame;
+ extern void *shared_info_area;
+#ifndef __ia64__
struct xen_add_to_physmap xatp;
- extern void *shared_info_area;
-
+#else
+ struct xen_hvm_setup xhs;
+#endif
setup_xen_features();
+#ifndef __ia64__
shared_info_frame = alloc_xen_mmio(PAGE_SIZE) >> PAGE_SHIFT;
xatp.domid = DOMID_SELF;
xatp.idx = 0;
@@ -66,9 +70,17 @@ static int __init init_xen_info(void)
xatp.gpfn = shared_info_frame;
if (HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp))
BUG();
-
shared_info_area =
ioremap(shared_info_frame << PAGE_SHIFT, PAGE_SIZE);
+#else /* !__ia64__ */
+ shared_info_frame = __get_free_page(GFP_KERNEL);
+ xhs.arg1 = virt_to_phys((void *)shared_info_frame);
+ xhs.arg2 = 0;
+ if (HYPERVISOR_hvm_op(HVMOP_setup_shared_info_page, &xhs))
+ BUG();
+ shared_info_area = (shared_info_t *)shared_info_frame;
+#endif /* !__ia64__ */
+
if (shared_info_area == NULL)
panic("can't map shared info\n");
@@ -96,6 +108,7 @@ static void __devexit platform_pci_remov
free_irq(pdev->irq, pdev);
}
+#ifndef __ia64__
static unsigned long platform_mmio;
static unsigned long platform_mmio_alloc;
static unsigned long platform_mmiolen;
@@ -160,6 +173,7 @@ static int get_hypercall_stubs(void)
return 0;
}
+#endif /* !__ia64__ */
static int __devinit platform_pci_init(struct pci_dev *pdev,
const struct pci_device_id *ent)
@@ -198,13 +212,14 @@ static int __devinit platform_pci_init(s
return -EBUSY;
}
+#ifndef __ia64__
platform_mmio = mmio_addr;
platform_mmiolen = mmio_len;
ret = get_hypercall_stubs();
if (ret < 0)
goto out;
-
+#endif /* __ia64__ */
if ((ret = init_xen_info()))
goto out;
diff -r a0a48f19ddba -r bfc60efbd4f4 unmodified_drivers/linux-2.6/platform-pci/xen_support.c
--- a/unmodified_drivers/linux-2.6/platform-pci/xen_support.c Sat Aug 26 13:44:41 2006 +0900
+++ b/unmodified_drivers/linux-2.6/platform-pci/xen_support.c Sat Aug 26 13:50:25 2006 +0900
@@ -26,11 +26,13 @@
#include <asm/hypervisor.h>
#include "platform-pci.h"
+#ifndef __ia64__
void xen_machphys_update(unsigned long mfn, unsigned long pfn)
{
BUG();
}
EXPORT_SYMBOL(xen_machphys_update);
+#endif /* __ia64__ */
void balloon_update_driver_allowance(long delta)
{
@@ -41,3 +43,15 @@ void balloon_release_driver_page(struct
{
}
EXPORT_SYMBOL(balloon_release_driver_page);
+
+#ifdef __ia64__
+int running_on_xen=1;
+EXPORT_SYMBOL(running_on_xen);
+
+int ia64_xenmem_reservation_op(
+ unsigned long op, struct xen_memory_reservation* reservation__)
+{
+ return 0;
+}
+EXPORT_SYMBOL(ia64_xenmem_reservation_op);
+#endif /* __ia64__ */
[-- Attachment #5: unmodified-build.patch --]
[-- Type: text/plain, Size: 1707 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID 6ea38426ce26959e78fe2ffedbcaff6085c950b2
# Parent bfc60efbd4f491f9c3ff494f655b4ab825f65d2c
Modify unmodified_drivers build rule for PV-on-HVM on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r bfc60efbd4f4 -r 6ea38426ce26 unmodified_drivers/linux-2.6/mkbuildtree
--- a/unmodified_drivers/linux-2.6/mkbuildtree Sat Aug 26 13:50:25 2006 +0900
+++ b/unmodified_drivers/linux-2.6/mkbuildtree Sat Aug 26 13:53:17 2006 +0900
@@ -42,6 +42,12 @@ i[34567]86)
ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
;;
+"ia64")
+ ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
+ ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
+ ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
+ ;;
*)
echo unknown architecture $uname
exit 1
diff -r bfc60efbd4f4 -r 6ea38426ce26 unmodified_drivers/linux-2.6/overrides.mk
--- a/unmodified_drivers/linux-2.6/overrides.mk Sat Aug 26 13:50:25 2006 +0900
+++ b/unmodified_drivers/linux-2.6/overrides.mk Sat Aug 26 13:53:17 2006 +0900
@@ -4,7 +4,9 @@
#
# (i.e. we need the native config for things like -mregparm, but
# a Xen kernel to find the right headers)
+ifneq ($(ARCH),ia64)
EXTRA_CFLAGS += -DCONFIG_VMX -DCONFIG_VMX_GUEST -DCONFIG_X86_XEN
+endif
EXTRA_CFLAGS += -DCONFIG_XEN_SHADOW_MODE -DCONFIG_XEN_SHADOW_TRANSLATE
EXTRA_CFLAGS += -DCONFIG_XEN_BLKDEV_GRANT -DXEN_EVTCHN_MASK_OPS
EXTRA_CFLAGS += -DCONFIG_XEN_NETDEV_GRANT_RX -DCONFIG_XEN_NETDEV_GRANT_TX
[-- Attachment #6: Type: text/plain, Size: 152 bytes --]
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] Porting PV-on-HVM for ia64 platform
2006-08-26 5:50 Porting PV-on-HVM for ia64 platform Tsunehisa Doi
@ 2006-08-26 6:02 ` Tsunehisa Doi
2006-08-26 6:15 ` Doi.Tsunehisa
2006-08-26 7:10 ` Keir Fraser
1 sibling, 1 reply; 9+ messages in thread
From: Tsunehisa Doi @ 2006-08-26 6:02 UTC (permalink / raw)
To: xen-devel; +Cc: xen-ia64-devel
[-- Attachment #1: Type: text/plain, Size: 1915 bytes --]
Tsunehisa Doi wrote:
> Hi all,
> My name is Tsunehisa Doi.
> We have been porting PV-on-HVM feature for ia64 platform.
>
Sorry, This message is difficult to read. I'll resend same.
Hi all,
My name is Tsunehisa Doi.
We have been porting PV-on-HVM feature for ia64 platform.
I will post patches for PV-on-HVM on ia64 platform. These patches modify
common code for PV-on-HVM on IPF.
We ported PV-on-HVM for IPF under this consideration:
* Expand hvm_op hypercall
+ Introduce HVMOP_setup_shared_info_page
- A page allocated on HVM-guest OS is swapped original shared_info
page with this hypercall.
- In x86 code, original shared_info page is used after pv-on-hvm
setup with remapping feature in arch depend HYPERVISOR_memory_op.
But, we can't implement same feature for IPF, thus we select to
implement with this method.
+ Introduce HVMOP_setup_gnttab_table
- Pages allocated on HVM-guest OS is swapped original grant_table
page frames with this hypercall.
- Same above.
* Change domain destroy logic
+ arch_domain_destroy() changed
- considered for swapping shared_info page.
+ grant_table_destroy() changed
- considered for swapping grant_frame pages.
* Modify linux-sparse for pv-on-hvm
+ gnttab.c in linux-sparse modified at initialization
+ modify hypervisor.h for pv-on-hvm
* Modify unmodified_drivers initialization
+ considered the different initialization with x86 code.
+ modify build rule for IPF
This patch includes:
* destroy-common.patch
- grant_table destroy logic modification for PV-on-HVM on IPF
* linux-common.patch
- linux-sparse modification for PV-on-HVM on IPF
* unmodified-common.patch
- unmodified_drivers modification for IPF
* unmodified-build.patch
- unmodified_drivers build rule modification for IPF
We have tested that this patch doesn't affect dom0, domVTi without
pv-on-hvm driver attaching, and domVTi using pv-on-hvm driver works
VBD/VNIF on IPF.
Thanks,
- Tsunehisa Doi
[-- Attachment #2: destroy-common.patch --]
[-- Type: text/plain, Size: 1073 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID 21ac9a7848b36da95132eac54ad3cf4f1ee0f93a
# Parent 9647400b50415a7ef26729016ca11c58e3e3c5a5
Modify grant_table destroy code for PV-on-HVM on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r 9647400b5041 -r 21ac9a7848b3 xen/common/grant_table.c
--- a/xen/common/grant_table.c Sat Aug 26 13:37:41 2006 +0900
+++ b/xen/common/grant_table.c Sat Aug 26 13:40:55 2006 +0900
@@ -32,6 +32,7 @@
#include <xen/guest_access.h>
#include <xen/domain_page.h>
#include <acm/acm_hooks.h>
+#include <xen/domain_page.h>
/*
* The first two members of a grant entry are updated as a combined pair.
@@ -1164,7 +1165,8 @@ grant_table_destroy(
if ( t == NULL )
return;
- free_xenheap_pages(t->shared, ORDER_GRANT_FRAMES);
+ if (IS_XEN_HEAP_FRAME(virt_to_page(t->shared)))
+ free_xenheap_pages(t->shared, ORDER_GRANT_FRAMES);
free_xenheap_page(t->maptrack);
xfree(t->active);
xfree(t);
[-- Attachment #3: linux-common.patch --]
[-- Type: text/plain, Size: 1441 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID a0a48f19ddba0ebab21befb076eba607b8221700
# Parent 21ac9a7848b36da95132eac54ad3cf4f1ee0f93a
Modify gnttab initialization code for PV-on-HVM on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r 21ac9a7848b3 -r a0a48f19ddba linux-2.6-xen-sparse/drivers/xen/core/gnttab.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c Sat Aug 26 13:40:55 2006 +0900
+++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c Sat Aug 26 13:44:41 2006 +0900
@@ -429,6 +429,7 @@ int gnttab_resume(void)
int gnttab_resume(void)
{
unsigned long frames;
+#ifndef __ia64__
struct xen_add_to_physmap xatp;
unsigned int i;
@@ -448,13 +449,30 @@ int gnttab_resume(void)
printk("error to ioremap gnttab share frames\n");
return -1;
}
+#else /* !__ia64__ */
+ struct xen_hvm_setup xhs;
+
+ shared = (struct grant_entry *)
+ __get_free_pages(GFP_KERNEL, get_order(PAGE_SIZE * NR_GRANT_FRAMES));
+ if (shared == NULL) {
+ printk("error to allocate gnttab share frames\n");
+ return -1;
+ }
+ frames = virt_to_phys((void *)shared);
+ xhs.arg1 = frames;
+ xhs.arg2 = NR_GRANT_FRAMES;
+ if (HYPERVISOR_hvm_op(HVMOP_setup_gnttab_table, &xhs))
+ BUG();
+#endif /* !__ia64__ */
return 0;
}
int gnttab_suspend(void)
{
+#ifndef __ia64__
iounmap(shared);
+#endif /* !__ia64__ */
return 0;
}
[-- Attachment #4: unmodified-common.patch --]
[-- Type: text/plain, Size: 3349 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID bfc60efbd4f491f9c3ff494f655b4ab825f65d2c
# Parent a0a48f19ddba0ebab21befb076eba607b8221700
Modify unmodified_drivers code for PV-on-HVM on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r a0a48f19ddba -r bfc60efbd4f4 unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Sat Aug 26 13:44:41 2006 +0900
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Sat Aug 26 13:50:25 2006 +0900
@@ -54,11 +54,15 @@ static int __init init_xen_info(void)
static int __init init_xen_info(void)
{
unsigned long shared_info_frame;
+ extern void *shared_info_area;
+#ifndef __ia64__
struct xen_add_to_physmap xatp;
- extern void *shared_info_area;
-
+#else
+ struct xen_hvm_setup xhs;
+#endif
setup_xen_features();
+#ifndef __ia64__
shared_info_frame = alloc_xen_mmio(PAGE_SIZE) >> PAGE_SHIFT;
xatp.domid = DOMID_SELF;
xatp.idx = 0;
@@ -66,9 +70,17 @@ static int __init init_xen_info(void)
xatp.gpfn = shared_info_frame;
if (HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp))
BUG();
-
shared_info_area =
ioremap(shared_info_frame << PAGE_SHIFT, PAGE_SIZE);
+#else /* !__ia64__ */
+ shared_info_frame = __get_free_page(GFP_KERNEL);
+ xhs.arg1 = virt_to_phys((void *)shared_info_frame);
+ xhs.arg2 = 0;
+ if (HYPERVISOR_hvm_op(HVMOP_setup_shared_info_page, &xhs))
+ BUG();
+ shared_info_area = (shared_info_t *)shared_info_frame;
+#endif /* !__ia64__ */
+
if (shared_info_area == NULL)
panic("can't map shared info\n");
@@ -96,6 +108,7 @@ static void __devexit platform_pci_remov
free_irq(pdev->irq, pdev);
}
+#ifndef __ia64__
static unsigned long platform_mmio;
static unsigned long platform_mmio_alloc;
static unsigned long platform_mmiolen;
@@ -160,6 +173,7 @@ static int get_hypercall_stubs(void)
return 0;
}
+#endif /* !__ia64__ */
static int __devinit platform_pci_init(struct pci_dev *pdev,
const struct pci_device_id *ent)
@@ -198,13 +212,14 @@ static int __devinit platform_pci_init(s
return -EBUSY;
}
+#ifndef __ia64__
platform_mmio = mmio_addr;
platform_mmiolen = mmio_len;
ret = get_hypercall_stubs();
if (ret < 0)
goto out;
-
+#endif /* __ia64__ */
if ((ret = init_xen_info()))
goto out;
diff -r a0a48f19ddba -r bfc60efbd4f4 unmodified_drivers/linux-2.6/platform-pci/xen_support.c
--- a/unmodified_drivers/linux-2.6/platform-pci/xen_support.c Sat Aug 26 13:44:41 2006 +0900
+++ b/unmodified_drivers/linux-2.6/platform-pci/xen_support.c Sat Aug 26 13:50:25 2006 +0900
@@ -26,11 +26,13 @@
#include <asm/hypervisor.h>
#include "platform-pci.h"
+#ifndef __ia64__
void xen_machphys_update(unsigned long mfn, unsigned long pfn)
{
BUG();
}
EXPORT_SYMBOL(xen_machphys_update);
+#endif /* __ia64__ */
void balloon_update_driver_allowance(long delta)
{
@@ -41,3 +43,15 @@ void balloon_release_driver_page(struct
{
}
EXPORT_SYMBOL(balloon_release_driver_page);
+
+#ifdef __ia64__
+int running_on_xen=1;
+EXPORT_SYMBOL(running_on_xen);
+
+int ia64_xenmem_reservation_op(
+ unsigned long op, struct xen_memory_reservation* reservation__)
+{
+ return 0;
+}
+EXPORT_SYMBOL(ia64_xenmem_reservation_op);
+#endif /* __ia64__ */
[-- Attachment #5: unmodified-build.patch --]
[-- Type: text/plain, Size: 1707 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID 6ea38426ce26959e78fe2ffedbcaff6085c950b2
# Parent bfc60efbd4f491f9c3ff494f655b4ab825f65d2c
Modify unmodified_drivers build rule for PV-on-HVM on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r bfc60efbd4f4 -r 6ea38426ce26 unmodified_drivers/linux-2.6/mkbuildtree
--- a/unmodified_drivers/linux-2.6/mkbuildtree Sat Aug 26 13:50:25 2006 +0900
+++ b/unmodified_drivers/linux-2.6/mkbuildtree Sat Aug 26 13:53:17 2006 +0900
@@ -42,6 +42,12 @@ i[34567]86)
ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
;;
+"ia64")
+ ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
+ ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
+ ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
+ ;;
*)
echo unknown architecture $uname
exit 1
diff -r bfc60efbd4f4 -r 6ea38426ce26 unmodified_drivers/linux-2.6/overrides.mk
--- a/unmodified_drivers/linux-2.6/overrides.mk Sat Aug 26 13:50:25 2006 +0900
+++ b/unmodified_drivers/linux-2.6/overrides.mk Sat Aug 26 13:53:17 2006 +0900
@@ -4,7 +4,9 @@
#
# (i.e. we need the native config for things like -mregparm, but
# a Xen kernel to find the right headers)
+ifneq ($(ARCH),ia64)
EXTRA_CFLAGS += -DCONFIG_VMX -DCONFIG_VMX_GUEST -DCONFIG_X86_XEN
+endif
EXTRA_CFLAGS += -DCONFIG_XEN_SHADOW_MODE -DCONFIG_XEN_SHADOW_TRANSLATE
EXTRA_CFLAGS += -DCONFIG_XEN_BLKDEV_GRANT -DXEN_EVTCHN_MASK_OPS
EXTRA_CFLAGS += -DCONFIG_XEN_NETDEV_GRANT_RX -DCONFIG_XEN_NETDEV_GRANT_TX
[-- Attachment #6: Type: text/plain, Size: 152 bytes --]
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] Porting PV-on-HVM for ia64 platform
2006-08-26 6:02 ` [Xen-devel] " Tsunehisa Doi
@ 2006-08-26 6:15 ` Doi.Tsunehisa
0 siblings, 0 replies; 9+ messages in thread
From: Doi.Tsunehisa @ 2006-08-26 6:15 UTC (permalink / raw)
To: xen-devel; +Cc: xen-ia64-devel
Hi all,
Sorry, I have tried to repost it, but my mail tool reformated with format
which I don't want.
I (Doi.Tsunehisa) said:
> Tsunehisa Doi wrote:
>> Hi all,
>> My name is Tsunehisa Doi.
>> We have been porting PV-on-HVM feature for ia64 platform.
>>
> Sorry, This message is difficult to read. I'll resend same.
Thanks,
- Tsunehisa Doi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting PV-on-HVM for ia64 platform
2006-08-26 5:50 Porting PV-on-HVM for ia64 platform Tsunehisa Doi
2006-08-26 6:02 ` [Xen-devel] " Tsunehisa Doi
@ 2006-08-26 7:10 ` Keir Fraser
2006-08-26 14:36 ` Doi.Tsunehisa
1 sibling, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2006-08-26 7:10 UTC (permalink / raw)
To: Tsunehisa Doi, xen-devel; +Cc: xen-ia64-devel
On 26/8/06 6:50 am, "Tsunehisa Doi" <Doi.Tsunehisa@jp.fujitsu.com> wrote:
> - In x86 code, original shared_info page is used after pv-on-hvm
> setup with remapping feature in arch depend HYPERVISOR_memory_op.
> But, we can't implement same feature for IPF, thus we select to
> implement with this method.
Why is that? It's a change to the P2M map -- it's not an x86-specific
operation.
-- Keir
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting PV-on-HVM for ia64 platform
2006-08-26 7:10 ` Keir Fraser
@ 2006-08-26 14:36 ` Doi.Tsunehisa
2006-08-26 21:52 ` [Xen-devel] " Doi.Tsunehisa
0 siblings, 1 reply; 9+ messages in thread
From: Doi.Tsunehisa @ 2006-08-26 14:36 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, Tsunehisa Doi, xen-ia64-devel
You (Keir.Fraser) said:
> On 26/8/06 6:50 am, "Tsunehisa Doi" <Doi.Tsunehisa@jp.fujitsu.com> wrote:
>> - In x86 code, original shared_info page is used after pv-on-hvm
>> setup with remapping feature in arch depend HYPERVISOR_memory_op.
>> But, we can't implement same feature for IPF, thus we select to
>> implement with this method.
>
> Why is that? It's a change to the P2M map -- it's not an x86-specific
> operation.
We had tried to implement it with the same method as x86 code, but we
couldn't success to implement it. If we will refere to implementation of
grant table operation, we may be able to success to implement it, but
it's not easy for us, I think.
Thanks,
- Tsunehisa Doi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] Porting PV-on-HVM for ia64 platform
2006-08-26 14:36 ` Doi.Tsunehisa
@ 2006-08-26 21:52 ` Doi.Tsunehisa
2006-08-27 14:51 ` Keir Fraser
0 siblings, 1 reply; 9+ messages in thread
From: Doi.Tsunehisa @ 2006-08-26 21:52 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, xen-ia64-devel
I (Doi.Tsunehisa) said:
> You (Keir.Fraser) said:
>> On 26/8/06 6:50 am, "Tsunehisa Doi" <Doi.Tsunehisa@jp.fujitsu.com> wrote:
>>> - In x86 code, original shared_info page is used after pv-on-hvm
>>> setup with remapping feature in arch depend HYPERVISOR_memory_op.
>>> But, we can't implement same feature for IPF, thus we select to
>>> implement with this method.
>>
>> Why is that? It's a change to the P2M map -- it's not an x86-specific
>> operation.
>
> We had tried to implement it with the same method as x86 code, but we
> couldn't success to implement it. If we will refere to implementation of
> grant table operation, we may be able to success to implement it, but
> it's not easy for us, I think.
I'll try to describe the reasoon which I think about.
In IPF, V2P address translation uses TR, TC and VHPT. VHPT is like page
table in x86 platform, and TC is like TLB in it exept for direct handling
posibility. But TR is specific for IPF. TR is controled directly with MM,
its entry does not be deleted by hardware if MM does not control it.
In additionaly, TR, TC and VHPT can use flexible page size for each entry.
Thus normal linux kernel uses a TR entry for kernel virtual space. So, in HVM
domain on IPF, it is difficult to change a part of P2M map of kernel virtual
space without MM modification.
Thanks,
-- Tsunehisa Doi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting PV-on-HVM for ia64 platform
2006-08-26 21:52 ` [Xen-devel] " Doi.Tsunehisa
@ 2006-08-27 14:51 ` Keir Fraser
2006-08-28 9:48 ` [Xen-devel] " Doi.Tsunehisa
0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2006-08-27 14:51 UTC (permalink / raw)
To: Doi.Tsunehisa; +Cc: xen-devel, xen-ia64-devel
On 26/8/06 10:52 pm, "Doi.Tsunehisa@jp.fujitsu.com"
<Doi.Tsunehisa@jp.fujitsu.com> wrote:
> In IPF, V2P address translation uses TR, TC and VHPT. VHPT is like page
> table in x86 platform, and TC is like TLB in it exept for direct handling
> posibility. But TR is specific for IPF. TR is controled directly with MM,
> its entry does not be deleted by hardware if MM does not control it.
>
> In additionaly, TR, TC and VHPT can use flexible page size for each entry.
> Thus normal linux kernel uses a TR entry for kernel virtual space. So, in HVM
> domain on IPF, it is difficult to change a part of P2M map of kernel virtual
> space without MM modification.
What's a TR? Assuming some sort of virtual->physical translation record, you
couldn't have simple single mapping for the entire kernel va space because
it won't map onto a contiguous block of physical addresses? There must be
something doing translation from the guest's view of fake contiguous
physical memory to underlying real scattered pages -- whatever structure
that is is the one that gets modified by that memory_op.
-- Keir
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] Porting PV-on-HVM for ia64 platform
2006-08-27 14:51 ` Keir Fraser
@ 2006-08-28 9:48 ` Doi.Tsunehisa
2006-08-29 11:48 ` DOI Tsunehisa
0 siblings, 1 reply; 9+ messages in thread
From: Doi.Tsunehisa @ 2006-08-28 9:48 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, xen-ia64-devel
You (Keir.Fraser) said:
> On 26/8/06 10:52 pm, "Doi.Tsunehisa@jp.fujitsu.com"
> <Doi.Tsunehisa@jp.fujitsu.com> wrote:
>
>> In IPF, V2P address translation uses TR, TC and VHPT. VHPT is like page
>> table in x86 platform, and TC is like TLB in it exept for direct handling
>> posibility. But TR is specific for IPF. TR is controled directly with MM,
>> its entry does not be deleted by hardware if MM does not control it.
>>
>> In additionaly, TR, TC and VHPT can use flexible page size for each entry.
>> Thus normal linux kernel uses a TR entry for kernel virtual space. So, in HVM
>> domain on IPF, it is difficult to change a part of P2M map of kernel virtual
>> space without MM modification.
>
> What's a TR? Assuming some sort of virtual->physical translation record, you
> couldn't have simple single mapping for the entire kernel va space because
> it won't map onto a contiguous block of physical addresses? There must be
> something doing translation from the guest's view of fake contiguous
> physical memory to underlying real scattered pages -- whatever structure
> that is is the one that gets modified by that memory_op.
Sorry, I had misunderstood the TR/TC emulation for VT-i domain.
I thought that one virtual TR/TC entry was emulated with one physical
TC entry, and whole kernel virtual space used only one physical TC entry.
Thus, a part of pages in kenrnel virtual space could not remapping to
the other memory page, I thought.
Today, I discussed with my co-worker about this feature. So, one
virtual TR/TC is emulated with some physical VHPT entry per Xen pagesize.
Thus, we should be able to implement with same method of x86 code.
Currently, we are trying to modify PV-on-HVM feature for IPF with
the same method of x86 code. And in preliminary implement, we could do
the feature.
Thanks,
- Tsunehisa Doi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] Porting PV-on-HVM for ia64 platform
2006-08-28 9:48 ` [Xen-devel] " Doi.Tsunehisa
@ 2006-08-29 11:48 ` DOI Tsunehisa
0 siblings, 0 replies; 9+ messages in thread
From: DOI Tsunehisa @ 2006-08-29 11:48 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, xen-ia64-devel
[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]
Hi,
Doi.Tsunehisa@jp.fujitsu.com wrote:
> Currently, we are trying to modify PV-on-HVM feature for IPF with
> the same method of x86 code. And in preliminary implement, we could do
> the feature.
I will post patches for PV-on-HVM on ia64 platform. These patches
modify common code for PV-on-HVM on IPF.
We ported PV-on-HVM for IPF under this consideration:
* Expand memory_op hypercall
+ Introduce XENMEM_add_to_physmap
- A virtual space allocated on HVM-guest OS is remapped original
shared_info and grant_table page with this hypercall.
- This method is same as x86 method.
* Reduce hvm_op hypercall
+ Delete functions introduced for old PV-on-HVM on IPF.
* Revert domain destroy logic
+ revert arch_domain_destroy() for old PV-on-HVM on IPF.
* Modify unmodified_drivers initialization
+ cut off unused codes for IPF
+ modify build rule for IPF
These patch include: (common code)
* unmodified-driver.patch
- unmodified_drivers modification for IPF
* unmodified-build.patch
- unmodified_drivers build rule modification for IPF
We have tested that this patch doesn't affect dom0, domVTi without
pv-on-hvm driver attaching, and domVTi using pv-on-hvm driver works
VBD/VNIF on IPF.
Thanks,
- Tsunehisa Doi
[-- Attachment #2: unmodified-driver.patch --]
[-- Type: text/plain, Size: 2209 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID 96749232df478225e939252e704927be89dbae07
# Parent 259aea558618ad79219d838dcb520142a5f04897
Modify unmodified_drivers code for IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r 259aea558618 -r 96749232df47 unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Tue Aug 29 18:42:04 2006 +0900
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Tue Aug 29 18:45:43 2006 +0900
@@ -115,6 +115,7 @@ unsigned long alloc_xen_mmio(unsigned lo
return addr;
}
+#ifndef __ia64__
/* Lifted from hvmloader.c */
static int get_hypercall_stubs(void)
{
@@ -160,6 +161,7 @@ static int get_hypercall_stubs(void)
return 0;
}
+#endif /* !__ia64__ */
static int __devinit platform_pci_init(struct pci_dev *pdev,
const struct pci_device_id *ent)
@@ -201,9 +203,11 @@ static int __devinit platform_pci_init(s
platform_mmio = mmio_addr;
platform_mmiolen = mmio_len;
+#ifndef __ia64__
ret = get_hypercall_stubs();
if (ret < 0)
goto out;
+#endif /* __ia64__ */
if ((ret = init_xen_info()))
diff -r 259aea558618 -r 96749232df47 unmodified_drivers/linux-2.6/platform-pci/xen_support.c
--- a/unmodified_drivers/linux-2.6/platform-pci/xen_support.c Tue Aug 29 18:42:04 2006 +0900
+++ b/unmodified_drivers/linux-2.6/platform-pci/xen_support.c Tue Aug 29 18:45:43 2006 +0900
@@ -26,11 +26,13 @@
#include <asm/hypervisor.h>
#include "platform-pci.h"
+#ifndef __ia64__
void xen_machphys_update(unsigned long mfn, unsigned long pfn)
{
BUG();
}
EXPORT_SYMBOL(xen_machphys_update);
+#endif /* __ia64__ */
void balloon_update_driver_allowance(long delta)
{
@@ -41,3 +43,15 @@ void balloon_release_driver_page(struct
{
}
EXPORT_SYMBOL(balloon_release_driver_page);
+
+#ifdef __ia64__
+int running_on_xen=1;
+EXPORT_SYMBOL(running_on_xen);
+
+int ia64_xenmem_reservation_op(unsigned long op,
+ struct xen_memory_reservation* reservation__)
+{
+ return 0;
+}
+EXPORT_SYMBOL(ia64_xenmem_reservation_op);
+#endif /* __ia64__ */
[-- Attachment #3: unmodified-build.patch --]
[-- Type: text/plain, Size: 1022 bytes --]
# HG changeset patch
# User Doi.Tsunehisa@jp.fujitsu.com
# Node ID b5cafa21c61f2789b6a78c5980a2414486917f69
# Parent 96749232df478225e939252e704927be89dbae07
Modify unmodified_drivers build rule for IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
diff -r 96749232df47 -r b5cafa21c61f unmodified_drivers/linux-2.6/mkbuildtree
--- a/unmodified_drivers/linux-2.6/mkbuildtree Tue Aug 29 18:45:43 2006 +0900
+++ b/unmodified_drivers/linux-2.6/mkbuildtree Tue Aug 29 18:46:45 2006 +0900
@@ -42,6 +42,12 @@ i[34567]86)
ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
;;
+"ia64")
+ ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
+ ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
+ ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
+ ;;
*)
echo unknown architecture $uname
exit 1
[-- Attachment #4: Type: text/plain, Size: 152 bytes --]
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-08-29 11:48 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-26 5:50 Porting PV-on-HVM for ia64 platform Tsunehisa Doi
2006-08-26 6:02 ` [Xen-devel] " Tsunehisa Doi
2006-08-26 6:15 ` Doi.Tsunehisa
2006-08-26 7:10 ` Keir Fraser
2006-08-26 14:36 ` Doi.Tsunehisa
2006-08-26 21:52 ` [Xen-devel] " Doi.Tsunehisa
2006-08-27 14:51 ` Keir Fraser
2006-08-28 9:48 ` [Xen-devel] " Doi.Tsunehisa
2006-08-29 11:48 ` DOI Tsunehisa
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.