All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6 of 6] REDO: mem_access & mem_access 2: added trap injection to libxc
@ 2011-01-04 22:07 Joe Epstein
  2011-01-05 14:41 ` Tim Deegan
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Epstein @ 2011-01-04 22:07 UTC (permalink / raw)
  To: xen-devel

* Carries forward the trap injection hypercall into libxc

Signed-off-by: Joe Epstein <jepstein98@gmail.com>

diff -r c1866aff7a5f -r 137a70154bdc tools/libxc/xc_misc.c
--- a/tools/libxc/xc_misc.c	Tue Jan 04 12:35:49 2011 -0800
+++ b/tools/libxc/xc_misc.c	Tue Jan 04 12:46:03 2011 -0800
@@ -572,6 +572,38 @@
     return rc;
 }

+int xc_hvm_inject_trap(
+    xc_interface *xch, domid_t dom, int vcpu, uint32_t trap, uint32_t
error_code,
+    uint64_t cr2)
+{
+    DECLARE_HYPERCALL;
+    DECLARE_HYPERCALL_BUFFER(struct xen_hvm_inject_trap, arg);
+    int rc;
+
+    arg = xc_hypercall_buffer_alloc(xch, arg, sizeof(*arg));
+    if ( arg == NULL )
+    {
+        PERROR("Could not allocate memory for xc_hvm_inject_trap hypercall");
+        return -1;
+    }
+
+    arg->domid       = dom;
+    arg->vcpuid      = vcpu;
+    arg->trap        = trap;
+    arg->error_code  = error_code;
+    arg->cr2         = cr2;
+
+    hypercall.op     = __HYPERVISOR_hvm_op;
+    hypercall.arg[0] = HVMOP_inject_trap;
+    hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(arg);
+
+    rc = do_xen_hypercall(xch, &hypercall);
+
+    xc_hypercall_buffer_free(xch, arg);
+
+    return rc;
+}
+
 /*
  * Local variables:
  * mode: C
diff -r c1866aff7a5f -r 137a70154bdc tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h	Tue Jan 04 12:35:49 2011 -0800
+++ b/tools/libxc/xenctrl.h	Tue Jan 04 12:46:03 2011 -0800
@@ -1413,6 +1413,14 @@
     xc_interface *xch, domid_t dom, uint64_t pfn, hvmmem_access_t* memaccess);

 /*
+ * Injects a hardware/software CPU trap, to take effect the next time the HVM
+ * resumes.
+ */
+int xc_hvm_inject_trap(
+    xc_interface *xch, domid_t dom, int vcpu, uint32_t trap, uint32_t
error_code,
+    uint64_t cr2);
+
+/*
  *  LOGGING AND ERROR REPORTING
  */

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 6 of 6] REDO: mem_access & mem_access 2: added trap injection to libxc
  2011-01-04 22:07 [PATCH 6 of 6] REDO: mem_access & mem_access 2: added trap injection to libxc Joe Epstein
@ 2011-01-05 14:41 ` Tim Deegan
  2011-01-06 15:58   ` Ian Jackson
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Deegan @ 2011-01-05 14:41 UTC (permalink / raw)
  To: Joe Epstein; +Cc: xen-devel

At 22:07 +0000 on 04 Jan (1294178848), Joe Epstein wrote:
> * Carries forward the trap injection hypercall into libxc
> 
> Signed-off-by: Joe Epstein <jepstein98@gmail.com>

Looks fine to me, but needs an ack from one of the tools maintainers.

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 6 of 6] REDO: mem_access & mem_access 2: added trap injection to libxc
  2011-01-05 14:41 ` Tim Deegan
@ 2011-01-06 15:58   ` Ian Jackson
  2011-01-06 16:47     ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Jackson @ 2011-01-06 15:58 UTC (permalink / raw)
  To: Tim Deegan; +Cc: xen-devel

Tim Deegan writes ("Re: [Xen-devel] [PATCH 6 of 6] REDO: mem_access & mem_access 2: added trap injection to libxc"):
> At 22:07 +0000 on 04 Jan (1294178848), Joe Epstein wrote:
> > * Carries forward the trap injection hypercall into libxc
> > 
> > Signed-off-by: Joe Epstein <jepstein98@gmail.com>
> 
> Looks fine to me, but needs an ack from one of the tools maintainers.

This change is fine by me, from a tools pov.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

I'll not apply it; that's probably best done with the whole series at
once.

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 6 of 6] REDO: mem_access & mem_access 2: added trap injection to libxc
  2011-01-06 15:58   ` Ian Jackson
@ 2011-01-06 16:47     ` Keir Fraser
  2011-01-06 16:52       ` Tim Deegan
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2011-01-06 16:47 UTC (permalink / raw)
  To: Ian Jackson, Tim Deegan; +Cc: xen-devel

On 06/01/2011 15:58, "Ian Jackson" <Ian.Jackson@eu.citrix.com> wrote:

> Tim Deegan writes ("Re: [Xen-devel] [PATCH 6 of 6] REDO: mem_access &
> mem_access 2: added trap injection to libxc"):
>> At 22:07 +0000 on 04 Jan (1294178848), Joe Epstein wrote:
>>> * Carries forward the trap injection hypercall into libxc
>>> 
>>> Signed-off-by: Joe Epstein <jepstein98@gmail.com>
>> 
>> Looks fine to me, but needs an ack from one of the tools maintainers.
> 
> This change is fine by me, from a tools pov.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> I'll not apply it; that's probably best done with the whole series at
> once.

I'm happy with the whole series now:

Acked-by: Keir Fraser <keir@xen.org>

I'm happy to apply the whole series if Tim Acks the bits he cares about, or
he can apply the whole lot himself. Or Nack, of course. :-)

 -- Keir

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 6 of 6] REDO: mem_access & mem_access 2: added trap injection to libxc
  2011-01-06 16:47     ` Keir Fraser
@ 2011-01-06 16:52       ` Tim Deegan
  0 siblings, 0 replies; 5+ messages in thread
From: Tim Deegan @ 2011-01-06 16:52 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, Ian Jackson

At 16:47 +0000 on 06 Jan (1294332425), Keir Fraser wrote:
> On 06/01/2011 15:58, "Ian Jackson" <Ian.Jackson@eu.citrix.com> wrote:
> 
> > Tim Deegan writes ("Re: [Xen-devel] [PATCH 6 of 6] REDO: mem_access &
> > mem_access 2: added trap injection to libxc"):
> >> At 22:07 +0000 on 04 Jan (1294178848), Joe Epstein wrote:
> >>> * Carries forward the trap injection hypercall into libxc
> >>> 
> >>> Signed-off-by: Joe Epstein <jepstein98@gmail.com>
> >> 
> >> Looks fine to me, but needs an ack from one of the tools maintainers.
> > 
> > This change is fine by me, from a tools pov.
> > 
> > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> > 
> > I'll not apply it; that's probably best done with the whole series at
> > once.
> 
> I'm happy with the whole series now:
> 
> Acked-by: Keir Fraser <keir@xen.org>
> 
> I'm happy to apply the whole series if Tim Acks the bits he cares about, or
> he can apply the whole lot himself. Or Nack, of course. :-)

I'll give it another look tomorrow morning.

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-06 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-04 22:07 [PATCH 6 of 6] REDO: mem_access & mem_access 2: added trap injection to libxc Joe Epstein
2011-01-05 14:41 ` Tim Deegan
2011-01-06 15:58   ` Ian Jackson
2011-01-06 16:47     ` Keir Fraser
2011-01-06 16:52       ` Tim Deegan

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.