From: Petre Pircalabu <ppircalabu@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Julien Grall <julien.grall@arm.com>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/4] tools/libxc: Define VM_EVENT type
Date: Fri, 14 Sep 2018 14:11:19 +0300 [thread overview]
Message-ID: <1536923479.23465.31.camel@bitdefender.com> (raw)
In-Reply-To: <5B9B7C0302000078001E890A@prv1-mh.provo.novell.com>
On Vi, 2018-09-14 at 03:14 -0600, Jan Beulich wrote:
> >
> > >
> > > >
> > > > On 13.09.18 at 17:01, <ppircalabu@bitdefender.com> wrote:
> > --- a/xen/include/public/domctl.h
> > +++ b/xen/include/public/domctl.h
> > @@ -757,10 +757,17 @@ struct xen_domctl_gdbsx_domstatus {
> >
> > /*
> > * There are currently three rings available for VM events:
> > - * sharing, monitor and paging. This hypercall allows one to
> > - * control these rings (enable/disable), as well as to signal
> > - * to the hypervisor to pull responses (resume) from the given
> > - * ring.
> > + * sharing, monitor and paging
> > + */
> > +
> > +#define XEN_VM_EVENT_TYPE_PAGING 1
> > +#define XEN_VM_EVENT_TYPE_MONITOR 2
> > +#define XEN_VM_EVENT_TYPE_SHARING 3
> > +
> > +/*
> > + * This hypercall allows one to control the vm_event rings
> > (enable/disable),
> > + * as well as to signal to the hypervisor to pull responses
> > (resume) from
> > + * the given ring.
> > */
> What's the reason to modify the comment, the more with a style
> violation (malformed single line comment) as the result?
>
I have split the comment in 2 parts. The first ("There are ... sharing,
monitor and paging ") describes the 3 XEN_VM_EVENT_TYPE_* rings, and
the second describes the vm_event hypercalls ( XEN_VM_EVENT_ENABLE ....
). Other than the missing period at the end of "paging" (which I will
fix in the next iteration) I cannot identify other coding style
violations.
> >
> > @@ -780,7 +787,7 @@ struct xen_domctl_gdbsx_domstatus {
> > * EXDEV - guest has PoD enabled
> > * EBUSY - guest has or had paging enabled, ring buffer still
> > active
> > */
> > -#define XEN_DOMCTL_VM_EVENT_OP_PAGING 1
> > +#define XEN_DOMCTL_VM_EVENT_OP_PAGING XEN_VM_EVENT_TYPE_PAGING
> >
> > /*
> > * Monitor helper.
> > @@ -804,7 +811,7 @@ struct xen_domctl_gdbsx_domstatus {
> > * EBUSY - guest has or had access enabled, ring buffer still
> > active
> > *
> > */
> > -#define XEN_DOMCTL_VM_EVENT_OP_MONITOR 2
> > +#define XEN_DOMCTL_VM_EVENT_OP_MONITOR XEN_VM_EVENT_TYPE_MONITOR
> >
> > /*
> > * Sharing ENOMEM helper.
> > @@ -819,7 +826,7 @@ struct xen_domctl_gdbsx_domstatus {
> > * Note that shring can be turned on (as per the domctl below)
> > * *without* this ring being setup.
> > */
> > -#define XEN_DOMCTL_VM_EVENT_OP_SHARING 3
> > +#define XEN_DOMCTL_VM_EVENT_OP_SHARING XEN_VM_EVENT_TYPE_SHARING
> And what's the reason to retain these (now redundant)
> XEN_DOMCTL_VM_EVENT_OP_* definitions? Either they're independent
> (in which case they shouldn't resolve to XEN_VM_EVENT_TYPE_*) or
> they're true aliases (tolerating arbitrary future changes to
> XEN_VM_EVENT_TYPE_* without further adjustment here), and then
> unnecessary to retain.
>
> Jan
>
>
I kept them despite the redundancy because the domctl.h header is
public and I didn't wanted to break any existent (external) clients of
this interface.
However, if you think removing them altogether it's best, I will
replace them with the XEN_VM_EVENT_TYPE_* and increment
XEN_DOMCTL_INTERFACE_VERSION.
//Petre
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-09-14 11:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 15:01 [PATCH 0/4] Add support for multi-page vm_event ring buffer Petre Pircalabu
2018-09-13 15:01 ` [PATCH 1/4] x86_emulator: Add PHONY uninstall target Petre Pircalabu
2018-09-14 9:04 ` Wei Liu
2018-09-14 9:09 ` Jan Beulich
2018-09-14 11:19 ` Petre Pircalabu
2018-09-13 15:01 ` [PATCH 2/4] tools/libxc: Define VM_EVENT type Petre Pircalabu
2018-09-14 9:14 ` Jan Beulich
2018-09-14 11:11 ` Petre Pircalabu [this message]
2018-09-14 11:16 ` Jan Beulich
2018-09-13 15:01 ` [PATCH 3/4] x86: Add map_domain_pages_global Petre Pircalabu
2018-09-18 10:51 ` Jan Beulich
2018-09-24 13:13 ` Julien Grall
2018-09-13 15:02 ` [PATCH 4/4] vm_event: Add support for multi-page ring buffer Petre Pircalabu
2018-09-13 16:42 ` Tamas K Lengyel
2018-09-14 8:10 ` Petre Pircalabu
2018-09-17 14:41 ` Andrew Cooper
2018-09-24 16:32 ` Petre Pircalabu
2018-09-18 12:58 ` Jan Beulich
2018-09-24 16:54 ` Petre Pircalabu
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=1536923479.23465.31.camel@bitdefender.com \
--to=ppircalabu@bitdefender.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--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 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.