xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <Ian.Jackson@citrix.com>
Subject: Re: [PATCH 2/4] tools/libxendevicemodel: extract functions and add a compat layer
Date: Mon, 20 Feb 2017 15:15:05 +0000	[thread overview]
Message-ID: <a4bb9c275cf942a087fa490eba902845@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <20170220150928.qvhrwdtvlz3nzitf@citrix.com>

> -----Original Message-----
> From: Wei Liu [mailto:wei.liu2@citrix.com]
> Sent: 20 February 2017 15:09
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: xen-devel@lists.xenproject.org; Ian Jackson <Ian.Jackson@citrix.com>;
> Wei Liu <wei.liu2@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	other threads:[~2017-02-20 15:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 10:27 [PATCH 1/4] tools/libxendevicemodel: introduce the new library Paul Durrant
2017-02-17 10:27 ` [PATCH 2/4] tools/libxendevicemodel: extract functions and add a compat layer Paul Durrant
2017-02-20 15:09   ` Wei Liu
2017-02-20 15:15     ` Paul Durrant [this message]
2017-02-17 10:27 ` [PATCH 3/4] tools/libxendevicemodel: introduce a Linux-specific implementation Paul Durrant
2017-02-20 15:09   ` Wei Liu
2017-02-17 10:27 ` [PATCH 4/4] tools/libxendevicemodel: add a call to restrict the handle Paul Durrant
2017-02-20 15:09   ` Wei Liu
2017-02-20 15:07 ` [PATCH 1/4] tools/libxendevicemodel: introduce the new library Wei Liu
2017-02-20 15:11   ` Paul Durrant
2017-02-20 15:12   ` Wei Liu
2017-02-20 15:14     ` Paul Durrant
2017-02-20 15:20       ` Wei Liu
2017-02-21 21:59         ` Samuel Thibault

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=a4bb9c275cf942a087fa490eba902845@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).