> -----Original Message-----
> From: Wei Liu [mailto:wei.l...@citrix.com]
> Sent: 20 February 2017 15:09
> To: Paul Durrant <paul.durr...@citrix.com>
> Cc: xen-de...@lists.xenproject.org; Ian Jackson <ian.jack...@citrix.com>;
> Wei Liu <wei.l...@citrix.com>
> Subject: Re: [PATCH 2/4] tools/libxendevicemodel: extract functions and add
> a compat layer
> 
> On Fri, Feb 17, 2017 at 10:27:07AM +0000, Paul Durrant wrote:
> > This patch extracts all functions resulting in a dm_op hypercall from
> > libxenctrl and moves them into libxendevicemodel. It also adds a compat
> > layer into libxenctrl, which can be selected by defining
> > XC_WANT_COMPAT_DEVICEMODEL_API to 1 before including xenctrl.h.
> >
> > With this patch the core of libxendevicemodel still uses libxencall to
> > issue the dm_op hypercalls, but this is done by calling through code that
> > can be modified on a per-OS basis. A subsequent patch will add a Linux-
> > specific variant.
> >
> > NOTE: After applying this patch the compat layer will need to be enabled
> >       in qemu-xen-traditional by applying patch [1].
> >
> > [1] http://xenbits.xen.org/gitweb/?p=people/pauldu/qemu-xen-
> traditional.git;a=commit;h=82d15bd7
> >
> 
> This needs an ack from Ian, though that patch itself is trivial.
> 
> > +
> > +int xendevicemodel_track_dirty_vram(
> > +    xendevicemodel_handle *dmod, domid_t domid, uint64_t first_pfn,
> > +    uint32_t nr, unsigned long *dirty_bitmap)
> > +{
> > +    struct xen_dm_op op;
> > +    struct xen_dm_op_track_dirty_vram *data;
> > +
> > +    memset(&op, 0, sizeof(op));
> > +
> > +    op.op = XEN_DMOP_track_dirty_vram;
> > +    data = &op.u.track_dirty_vram;
> > +
> > +    data->first_pfn = first_pfn;
> > +    data->nr = nr;
> > +
> > +    return xendevicemodel_op(dmod, domid, 2, &op, sizeof(op),
> > +                             dirty_bitmap, (nr + 7) / 8);
> 
> FYI You might need to rebase -- I will commit a patch from Jan to fix
> type promotion at some point.
> 
> "libxc: don't pass uninitialized data to do_dm_op()"
> 

Ok. Thanks for the heads-up.

  Paul

> Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to