Skip to contentSkip to conversation

x86/amd64 vs IA64

DISCUSSION James Harper 3 participants 4 messages Jun 2, 2009

lore
Share & tools
lore
#0 lore raw

How different is IA64 to x86/amd64 in terms of hypercalls and platform_pci setup under HVM?

I'm having a look at what is involved in porting GPLPV drivers for Windows to IA64.

I can't even seem to find where the HYPERCALL_ functions/macros are defined!

Thanks

James

#1 lore raw

There is a reference to ia64_hypercall_table[] from vmx code, so there is hope that all hypercalls are available. Isaku may be able to provide you an asm stub if so.

-- Keir

Quoted 17 lines · James Harper

How different is IA64 to x86/amd64 in terms of hypercalls and platform_pci setup under HVM?

I'm having a look at what is involved in porting GPLPV drivers for Windows to IA64.

I can't even seem to find where the HYPERCALL_ functions/macros are defined!

Thanks

James

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
In reply to James Harper
Quoted 8 lines · James Harper

How different is IA64 to x86/amd64 in terms of hypercalls and platform_pci setup under HVM?

I'm having a look at what is involved in porting GPLPV drivers for Windows to IA64.

I can't even seem to find where the HYPERCALL_ functions/macros are defined!

Hi. I'm glad to hear that.
Linux unmodified drivers are supported on ia64, so it's quite possible to port GPLPV to IA64 windows, I suppose. If you need any help, don't hesitate to ask.

Probably the file you want to see would be

	linux-2.6.18-xen.hg/include/asm-ia64/hypercall.h

which defines HYPERVISOR_xxx() functions.
Eventually __hypercall() in linux-2.6.18-xen.hg/arch/ia64/xen/hypercall.S issues hypercall. "break 0x1000" is the instruction.
0x1000 is arbitrarily selected constant for hypercall ABI between guest kernel and xen VMM.

The most difference is the way to pass arguments.
On x86, arguments are passed by guest virtual address.
On the other hand they are passed by guest physical address. So when issuing hypercall with arguments, arguments in virtual address must be converted into guest physical address. Such stubs are called xencomm.
You can see some of HYPERVISOR_xxx are replaced with xencomm_hypercall_xxx which does such conversions.

Maybe at first xencomm routines should be ported for hypercall. linux-2.6.18-xen.hg/drivers/xen/core/xencomm.c and linux-2.6.18-xen.hg/arch/ia64/xen/xencomm.c
I suppose the conversion function from virtual address to guest physical address would needs rewrite for ia64 windows.

The followings are related files which you might want to see.

ifeq ($(ARCH),ia64)
xen-platform-pci-objs += xencomm.o xencomm_arch.o xcom_hcall.o xcom_asm.o
endif
in xen-unstable.hg/unmodified_drivers/linux-2.6/platform-pci/Kbuild

The files related to hypercall are
linux-2.6.18-xen.hg/

	arch/ia64/xen/
		xcom_hcall.c
		xcom_privcmd.c
		xcom_asm.S
		xencomm.c
	drivers/xen/core/
		xencomm.c

thanks,

Signature · 1 line
yamahata
#3 lore raw

Thankyou very much for the information provided below. I'll make my way through it over the next few days.

James

Quoted 23 lines

-----Original Message-----
From: [email protected] [mailto:xen-devel- [email protected]] On Behalf Of Isaku Yamahata
Sent: Tuesday, 2 June 2009 17:31
To: James Harper
Cc: [email protected]; [email protected]
Subject: Re: [Xen-devel] x86/amd64 vs IA64

Quoted 8 lines · James Harper

How different is IA64 to x86/amd64 in terms of hypercalls and platform_pci setup under HVM?

I'm having a look at what is involved in porting GPLPV drivers for Windows to IA64.

I can't even seem to find where the HYPERCALL_ functions/macros are defined!

Hi. I'm glad to hear that.
Linux unmodified drivers are supported on ia64, so it's quite possible to port GPLPV to IA64 windows, I suppose. If you need any help, don't hesitate to ask.

Quoted 4 lines

Probably the file you want to see would be

	linux-2.6.18-xen.hg/include/asm-ia64/hypercall.h

which defines HYPERVISOR_xxx() functions.
Eventually __hypercall() in

linux-2.6.18-xen.hg/arch/ia64/xen/hypercall.S

Quoted 11 lines

issues hypercall. "break 0x1000" is the instruction. 0x1000 is arbitrarily selected constant for hypercall ABI between guest kernel and xen VMM.

The most difference is the way to pass arguments.
On x86, arguments are passed by guest virtual address.
On the other hand they are passed by guest physical address. So when issuing hypercall with arguments, arguments in virtual address must be converted into guest physical address. Such stubs are called xencomm.
You can see some of HYPERVISOR_xxx are replaced with

xencomm_hypercall_xxx

Quoted 9 lines

which does such conversions.

Maybe at first xencomm routines should be ported for hypercall. linux-2.6.18-xen.hg/drivers/xen/core/xencomm.c and linux-2.6.18-xen.hg/arch/ia64/xen/xencomm.c
I suppose the conversion function from virtual address to guest physical address would needs rewrite for ia64 windows.

Quoted 4 lines

The followings are related files which you might want to see.

ifeq ($(ARCH),ia64)
xen-platform-pci-objs += xencomm.o xencomm_arch.o xcom_hcall.o

xcom_asm.o

Quoted 21 lines

endif
in xen-unstable.hg/unmodified_drivers/linux-2.6/platform-pci/Kbuild

The files related to hypercall are
linux-2.6.18-xen.hg/

	arch/ia64/xen/
		xcom_hcall.c
		xcom_privcmd.c
		xcom_asm.S
		xencomm.c
	drivers/xen/core/
		xencomm.c

thanks,
--
yamahata

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel