All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antony Saba <Antony.Saba@mandiant.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Problems calling HVMOP_flush_tlbs
Date: Tue, 17 Jan 2012 00:50:01 +0000	[thread overview]
Message-ID: <4F14C5B9.9080501@mandiant.com> (raw)

Hello xen-devel,

I am using xen 4.2.1 and have tried the following with kernel 3.0.0 and 
3.2.1.

I am trying to invoke the HVMOP_flush_tlbs hypercall but have been 
unsuccessful.  I am basing my call on the functions in in xc_misc.c, 
trying to guess what is meant by "@arg must be null" in the comment 
where HVMOP_flush_tlbs is defined.  What is the correct way to invoke 
this hypercall?

If I call it like this, I receive an invalid parameter (EINVAL) error:
     struct privcmd_hypercall
     {
         uint64_t op;
         uint64_t arg[5];
     } hypercall;
     hypercall.op     = __HYPERVISOR_hvm_op;
     hypercall.arg[0] = HVMOP_flush_tlbs;
     hypercall.arg[1] = 0;
     ret = do_xen_hypercall(xch, (void*)&hypercall);


If I call it like this, I get function not implemented (ENOSYS), where 3 
is a valid domain id:
     hypercall.op     = __HYPERVISOR_hvm_op;
     hypercall.arg[0] = HVMOP_flush_tlbs;
     hypercall.arg[1] = 3;  /* 3 is the domain whose tlbs should be 
flushed */
     hypercall.arg[2] = 0;

I have also tried this, mimicking the arg struct for the other HVMOP 
calls, which also returns ENOSYS:
    typedef struct _arg_t {
         domid_t domid;
         uint64_t ptr;
    } arg_t;
    struct privcmd_hypercall {
         uint64_t op;
         uint64_t arg[5];
     } hypercall;
     DECLARE_HYPERCALL_BUFFER(arg_t, arg);
     arg = xc_hypercall_buffer_alloc(xch, arg, sizeof(*arg));

     hypercall.op     = __HYPERVISOR_hvm_op;
     hypercall.arg[0] = HVMOP_flush_tlbs;
     hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(arg);
     hypercall.arg[2]= 0;
     arg->ptr = 0;
     arg->domid = 0; /* or a valid dom id, the results are the same */


Any help is appreciated.

-Tony

             reply	other threads:[~2012-01-17  0:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17  0:50 Antony Saba [this message]
2012-01-17 11:08 ` Problems calling HVMOP_flush_tlbs Tim Deegan
2012-01-17 12:52   ` Antony Saba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F14C5B9.9080501@mandiant.com \
    --to=antony.saba@mandiant.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.