* Hypercalls from user-space @ 2010-09-24 18:38 Srujan D. Kotikela 2010-09-24 19:14 ` Jeremy Fitzhardinge 2010-09-27 7:33 ` Michal Novotny 0 siblings, 2 replies; 11+ messages in thread From: Srujan D. Kotikela @ 2010-09-24 18:38 UTC (permalink / raw) To: xen-devel 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Hypercalls from user-space 2010-09-24 18:38 Hypercalls from user-space Srujan D. Kotikela @ 2010-09-24 19:14 ` Jeremy Fitzhardinge 2010-09-24 20:30 ` Ian Campbell 2010-10-05 21:31 ` Srujan D. Kotikela 2010-09-27 7:33 ` Michal Novotny 1 sibling, 2 replies; 11+ messages in thread From: Jeremy Fitzhardinge @ 2010-09-24 19:14 UTC (permalink / raw) To: Srujan D. Kotikela; +Cc: 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Hypercalls from user-space 2010-09-24 19:14 ` Jeremy Fitzhardinge @ 2010-09-24 20:30 ` Ian Campbell 2010-10-05 21:31 ` Srujan D. Kotikela 1 sibling, 0 replies; 11+ messages in thread From: Ian Campbell @ 2010-09-24 20:30 UTC (permalink / raw) To: Jeremy Fitzhardinge; +Cc: xen-devel@lists.xensource.com, Srujan D. Kotikela 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. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Hypercalls from user-space 2010-09-24 19:14 ` Jeremy Fitzhardinge 2010-09-24 20:30 ` Ian Campbell @ 2010-10-05 21:31 ` Srujan D. Kotikela 2010-10-05 22:09 ` Keir Fraser 1 sibling, 1 reply; 11+ messages in thread From: Srujan D. Kotikela @ 2010-10-05 21:31 UTC (permalink / raw) To: Jeremy Fitzhardinge; +Cc: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 619 bytes --] 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 > [-- Attachment #1.2: Type: text/html, Size: 1033 bytes --] [-- Attachment #2: 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] 11+ messages in thread
* Re: Hypercalls from user-space 2010-10-05 21:31 ` Srujan D. Kotikela @ 2010-10-05 22:09 ` Keir Fraser 2010-10-05 22:37 ` Jeremy Fitzhardinge 0 siblings, 1 reply; 11+ messages in thread From: Keir Fraser @ 2010-10-05 22:09 UTC (permalink / raw) To: Srujan D. Kotikela, Jeremy Fitzhardinge; +Cc: 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Hypercalls from user-space 2010-10-05 22:09 ` Keir Fraser @ 2010-10-05 22:37 ` Jeremy Fitzhardinge 2010-10-06 6:46 ` Keir Fraser 2010-10-13 16:20 ` Ian Campbell 0 siblings, 2 replies; 11+ messages in thread From: Jeremy Fitzhardinge @ 2010-10-05 22:37 UTC (permalink / raw) To: Keir Fraser; +Cc: xen-devel, Srujan D. Kotikela 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 > ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Hypercalls from user-space 2010-10-05 22:37 ` Jeremy Fitzhardinge @ 2010-10-06 6:46 ` Keir Fraser 2010-10-13 16:20 ` Ian Campbell 1 sibling, 0 replies; 11+ messages in thread From: Keir Fraser @ 2010-10-06 6:46 UTC (permalink / raw) To: Jeremy Fitzhardinge; +Cc: xen-devel, Srujan D. Kotikela 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Hypercalls from user-space 2010-10-05 22:37 ` Jeremy Fitzhardinge 2010-10-06 6:46 ` Keir Fraser @ 2010-10-13 16:20 ` Ian Campbell 2010-10-13 16:45 ` Jeremy Fitzhardinge 1 sibling, 1 reply; 11+ messages in thread From: Ian Campbell @ 2010-10-13 16:20 UTC (permalink / raw) To: Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com, Keir Fraser, Srujan D. Kotikela 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Hypercalls from user-space 2010-10-13 16:20 ` Ian Campbell @ 2010-10-13 16:45 ` Jeremy Fitzhardinge 0 siblings, 0 replies; 11+ messages in thread From: Jeremy Fitzhardinge @ 2010-10-13 16:45 UTC (permalink / raw) To: Ian Campbell Cc: xen-devel@lists.xensource.com, Keir Fraser, Srujan D. Kotikela 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 > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Hypercalls from user-space 2010-09-24 18:38 Hypercalls from user-space Srujan D. Kotikela 2010-09-24 19:14 ` Jeremy Fitzhardinge @ 2010-09-27 7:33 ` Michal Novotny 2010-09-27 16:20 ` Srujan D. Kotikela 1 sibling, 1 reply; 11+ messages in thread From: Michal Novotny @ 2010-09-27 7:33 UTC (permalink / raw) To: 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Hypercalls from user-space 2010-09-27 7:33 ` Michal Novotny @ 2010-09-27 16:20 ` Srujan D. Kotikela 0 siblings, 0 replies; 11+ messages in thread From: Srujan D. Kotikela @ 2010-09-27 16:20 UTC (permalink / raw) To: Michal Novotny; +Cc: 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 > ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-10-13 16:45 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-24 18:38 Hypercalls from user-space Srujan D. Kotikela 2010-09-24 19:14 ` Jeremy Fitzhardinge 2010-09-24 20:30 ` Ian Campbell 2010-10-05 21:31 ` Srujan D. Kotikela 2010-10-05 22:09 ` Keir Fraser 2010-10-05 22:37 ` Jeremy Fitzhardinge 2010-10-06 6:46 ` Keir Fraser 2010-10-13 16:20 ` Ian Campbell 2010-10-13 16:45 ` Jeremy Fitzhardinge 2010-09-27 7:33 ` Michal Novotny 2010-09-27 16:20 ` Srujan D. Kotikela
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.