Hi, Can anyone tell me how to invoke hypercalls from user space? Or any pointers for the same. It''s urgent, please help. -- Srujan D. Kotikela _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 09/24/2010 11:38 AM, Srujan D. Kotikela wrote:> Hi, > > Can anyone tell me how to invoke hypercalls from user space? Or any > pointers for the same. > > It''s urgent, please help. >You can''t directly invoke hypercalls from userspace. In a privileged domain you can use ioctls on /proc/xen/privcmd. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, 2010-09-24 at 20:14 +0100, Jeremy Fitzhardinge wrote:> On 09/24/2010 11:38 AM, Srujan D. Kotikela wrote: > > Hi, > > > > Can anyone tell me how to invoke hypercalls from user space? Or any > > pointers for the same. > > > > It''s urgent, please help. > > > > You can''t directly invoke hypercalls from userspace. In a privileged > domain you can use ioctls on /proc/xen/privcmd.And libxenctrl (see tools/libxc in the source) includes C wrappers for many of them, as well as the necessary low level helpers to invoke the ioctls etc. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Srujan, I think you should have a look at libxc or libxl sources since this is accessing the hypercalls from user-space AFAIK. Michal On 09/24/2010 08:38 PM, Srujan D. Kotikela wrote:> Hi, > > Can anyone tell me how to invoke hypercalls from user space? Or any > pointers for the same. > > It''s urgent, please help. > > -- > Srujan D. Kotikela > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >-- Michal Novotny<minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi All, Thanks for the heads up. -- Srujan D. Kotikela On Mon, Sep 27, 2010 at 2:33 AM, Michal Novotny <minovotn@redhat.com> wrote:> Hi Srujan, > I think you should have a look at libxc or libxl sources since this is > accessing the hypercalls from user-space AFAIK. > > Michal > > On 09/24/2010 08:38 PM, Srujan D. Kotikela wrote: >> >> Hi, >> >> Can anyone tell me how to invoke hypercalls from user space? Or any >> pointers for the same. >> >> It''s urgent, please help. >> >> -- >> Srujan D. Kotikela >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> > > > -- > Michal Novotny<minovotn@redhat.com>, RHCE > Virtualization Team (xen userspace), Red Hat > > > _______________________________________________ > 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
Hi Jeremy, I am able to do hypercalls in privileged domain. i want to invoke hypercalls (to send EVENT notifications) from DomU. Amy pointers for the same would be appreciated. -- Srujan D. Kotikela On Fri, Sep 24, 2010 at 2:14 PM, Jeremy Fitzhardinge <jeremy@goop.org>wrote:> On 09/24/2010 11:38 AM, Srujan D. Kotikela wrote: > > Hi, > > > > Can anyone tell me how to invoke hypercalls from user space? Or any > > pointers for the same. > > > > It''s urgent, please help. > > > > You can''t directly invoke hypercalls from userspace. In a privileged > domain you can use ioctls on /proc/xen/privcmd. > > J >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
/proc/xen/privcmd should be available in domU as well. You might need to enable some dom0 build config options to get it though. -- Keir On 05/10/2010 22:31, "Srujan D. Kotikela" <ksrujandas@gmail.com> wrote:> Hi Jeremy, > > I am able to do hypercalls in privileged domain. i want to invoke hypercalls > (to send EVENT notifications) from DomU. > Amy pointers for the same would be appreciated. > > -- > Srujan D. Kotikela > > > On Fri, Sep 24, 2010 at 2:14 PM, Jeremy Fitzhardinge <jeremy@goop.org> wrote: >> On 09/24/2010 11:38 AM, Srujan D. Kotikela wrote: >>> Hi, >>> >>> Can anyone tell me how to invoke hypercalls from user space? Or any >>> pointers for the same. >>> >>> It''s urgent, please help. >>> >> >> You can''t directly invoke hypercalls from userspace. In a privileged >> domain you can use ioctls on /proc/xen/privcmd. >> >> J > > > > _______________________________________________ > 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 10/05/2010 03:09 PM, Keir Fraser wrote:> /proc/xen/privcmd should be available in domU as well. You might need to > enable some dom0 build config options to get it though.xenfs doesn''t init privcmd on non-privileged kernels. Srujan, this should be enough to enable it in domU: diff --git a/drivers/xen/xenfs/super.c b/drivers/xen/xenfs/super.c index 229c831..6495c61 100644 --- a/drivers/xen/xenfs/super.c +++ b/drivers/xen/xenfs/super.c @@ -109,7 +109,7 @@ static int xenfs_fill_super(struct super_block *sb, void *data, int silent) if (rc < 0) return rc; - if (xen_initial_domain()) { + if (1 || xen_initial_domain()) { xenfs_create_file(sb, sb->s_root, "xsd_kva", &xsd_kva_file_ops, NULL, S_IRUSR|S_IWUSR); xenfs_create_file(sb, sb->s_root, "xsd_port", J> -- Keir > > On 05/10/2010 22:31, "Srujan D. Kotikela" <ksrujandas@gmail.com> wrote: > >> Hi Jeremy, >> >> I am able to do hypercalls in privileged domain. i want to invoke hypercalls >> (to send EVENT notifications) from DomU. >> Amy pointers for the same would be appreciated. >> >> -- >> Srujan D. Kotikela >> >> >> On Fri, Sep 24, 2010 at 2:14 PM, Jeremy Fitzhardinge <jeremy@goop.org> wrote: >>> On 09/24/2010 11:38 AM, Srujan D. Kotikela wrote: >>>> Hi, >>>> >>>> Can anyone tell me how to invoke hypercalls from user space? Or any >>>> pointers for the same. >>>> >>>> It''s urgent, please help. >>>> >>> You can''t directly invoke hypercalls from userspace. In a privileged >>> domain you can use ioctls on /proc/xen/privcmd. >>> >>> J >> >> >> _______________________________________________ >> 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 05/10/2010 23:37, "Jeremy Fitzhardinge" <jeremy@goop.org> wrote:> On 10/05/2010 03:09 PM, Keir Fraser wrote: >> /proc/xen/privcmd should be available in domU as well. You might need to >> enable some dom0 build config options to get it though. > > xenfs doesn''t init privcmd on non-privileged kernels.It ought to. Files like xsd_{kva,port} don''t make sense for a domU, but privcmd at least does as there''s no reason a suitably privileged domU userspace shouldn''t be able to make hypercalls at the privilege level of the domU. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, 2010-10-05 at 23:37 +0100, Jeremy Fitzhardinge wrote:> On 10/05/2010 03:09 PM, Keir Fraser wrote: > > /proc/xen/privcmd should be available in domU as well. You might need to > > enable some dom0 build config options to get it though. > > xenfs doesn''t init privcmd on non-privileged kernels. > > Srujan, this should be enough to enable it in domU:I see you fixed this properly in 66d850da but I think you also need the following: Subject: build privcmd for domU now that it is exposed Fixes build error introduced in 66d850da "xen/privcmd: make privcmd visible in domU" drivers/built-in.o:(.data+0xd44): undefined reference to `privcmd_file_ops'' make[1]: *** [.tmp_vmlinux1] Error 1 make: *** [sub-make] Error 2 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> diff --git a/drivers/xen/xenfs/Makefile b/drivers/xen/xenfs/Makefile index 4a0be9a..4fde944 100644 --- a/drivers/xen/xenfs/Makefile +++ b/drivers/xen/xenfs/Makefile @@ -1,4 +1,4 @@ obj-$(CONFIG_XENFS) += xenfs.o -xenfs-y = super.o xenbus.o -xenfs-$(CONFIG_XEN_DOM0) += xenstored.o privcmd.o +xenfs-y = super.o xenbus.o privcmd.o +xenfs-$(CONFIG_XEN_DOM0) += xenstored.o _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 10/13/2010 09:20 AM, Ian Campbell wrote:> On Tue, 2010-10-05 at 23:37 +0100, Jeremy Fitzhardinge wrote: >> On 10/05/2010 03:09 PM, Keir Fraser wrote: >>> /proc/xen/privcmd should be available in domU as well. You might need to >>> enable some dom0 build config options to get it though. >> xenfs doesn''t init privcmd on non-privileged kernels. >> >> Srujan, this should be enough to enable it in domU: > I see you fixed this properly in 66d850da but I think you also need the > following:Oops, thanks. J> > Subject: build privcmd for domU now that it is exposed > > Fixes build error introduced in 66d850da "xen/privcmd: make privcmd > visible in domU" > > drivers/built-in.o:(.data+0xd44): undefined reference to `privcmd_file_ops'' > make[1]: *** [.tmp_vmlinux1] Error 1 > make: *** [sub-make] Error 2 > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > diff --git a/drivers/xen/xenfs/Makefile b/drivers/xen/xenfs/Makefile > index 4a0be9a..4fde944 100644 > --- a/drivers/xen/xenfs/Makefile > +++ b/drivers/xen/xenfs/Makefile > @@ -1,4 +1,4 @@ > obj-$(CONFIG_XENFS) += xenfs.o > > -xenfs-y = super.o xenbus.o > -xenfs-$(CONFIG_XEN_DOM0) += xenstored.o privcmd.o > +xenfs-y = super.o xenbus.o privcmd.o > +xenfs-$(CONFIG_XEN_DOM0) += xenstored.o > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel