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 Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 On 02/06/2009 03:26, "James Harper" <james.harper@bendigoit.com.au> wrote:> 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 > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, Jun 02, 2009 at 12:26:39PM +1000, James Harper wrote:> 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, -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Thankyou very much for the information provided below. I''ll make my way through it over the next few days. James> -----Original Message----- > From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel- > bounces@lists.xensource.com] On Behalf Of Isaku Yamahata > Sent: Tuesday, 2 June 2009 17:31 > To: James Harper > Cc: xen-devel@lists.xensource.com; xen-ia64-devel@lists.xensource.com > Subject: Re: [Xen-devel] x86/amd64 vs IA64 > > On Tue, Jun 02, 2009 at 12:26:39PM +1000, James Harper wrote: > > 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() inlinux-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 withxencomm_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.oxcom_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, > -- > yamahata > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel