WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Hypercalls from user-space

To: Keir Fraser <keir@xxxxxxx>
Subject: Re: [Xen-devel] Hypercalls from user-space
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 05 Oct 2010 15:37:53 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Srujan D. Kotikela" <ksrujandas@xxxxxxxxx>
Delivery-date: Tue, 05 Oct 2010 15:38:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C8D160B6.25395%keir@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C8D160B6.25395%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.4
 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@xxxxxxxxx> 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@xxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>