All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Tamas K Lengyel <tamas.lengyel@zentific.com>
Cc: tim@xen.org, kevin.tian@intel.com, wei.liu2@citrix.com,
	ian.campbell@citrix.com, rcojocaru@bitdefender.com,
	stefano.stabellini@eu.citrix.com, eddie.dong@intel.com,
	ian.jackson@eu.citrix.com, xen-devel@lists.xen.org,
	steve@zentific.com, andres@lagarcavilla.org,
	jun.nakajima@intel.com, rshriram@cs.ubc.ca, keir@xen.org,
	dgdegra@tycho.nsa.gov, yanghy@cn.fujitsu.com
Subject: Re: [RFC PATCH V3 11/12] xen/vm_event: Decouple vm_event and mem_access.
Date: Wed, 04 Feb 2015 09:47:02 +0000	[thread overview]
Message-ID: <54D1F8A6020000780005CB47@mail.emea.novell.com> (raw)
In-Reply-To: <1422567998-29995-12-git-send-email-tamas.lengyel@zentific.com>

>>> On 29.01.15 at 22:46, <tamas.lengyel@zentific.com> wrote:
> --- a/xen/common/Makefile
> +++ b/xen/common/Makefile
> @@ -52,9 +52,10 @@ obj-y += tmem_xen.o
>  obj-y += radix-tree.o
>  obj-y += rbtree.o
>  obj-y += lzo.o
> +obj-y += vm_event.o
> +obj-y += monitor.o

Please make the (not) sorting situation worse than it already is - the
original intention was for entries to be alphabetically sorted here.

> --- /dev/null
> +++ b/xen/common/monitor.c
> @@ -0,0 +1,64 @@
> +/******************************************************************************
> + * monitor.c
> + *
> + * VM event monitor support.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> + */
> +
> +#include <xen/sched.h>
> +#include <xen/vm_event.h>
> +#include <xen/mem_access.h>
> +
> +void monitor_resume(struct domain *d)
> +{
> +    vm_event_response_t rsp;
> +
> +    /* Pull all responses off the ring. */
> +    while ( vm_event_get_response(d, &d->vm_event->monitor, &rsp) )
> +    {
> +        struct vcpu *v;
> +
> +        if ( rsp.version != VM_EVENT_INTERFACE_VERSION )
> +            continue;
> +
> +#ifndef NDEBUG
> +        if ( rsp.flags & VM_EVENT_FLAG_DUMMY )
> +            continue;
> +#endif

This code was unconditional in the original function. Such a change
needs mentioning in the description.

> @@ -49,7 +53,7 @@ int mem_access_send_req(struct domain *d, vm_event_request_t *req)
>      return -ENOSYS;
>  }
>  
> -static inline void mem_access_resume(struct domain *d) {}
> +static inline void mem_access_resume(struct vcpu *vcpu, vm_event_response_t *rsp) {}

Long line.

> --- /dev/null
> +++ b/xen/include/xen/monitor.h
> @@ -0,0 +1,38 @@
> +/******************************************************************************
> + * monitor.h
> + *
> + * Monitor event support.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> + */
> +
> +#ifndef _XEN_ASM_MONITOR_H
> +#define _XEN_ASM_MONITOR_H
> +
> +#include <public/memory.h>

This can't be enough (nor can I see why it's needed here), or else ...

> +/* Resumes the running of the VCPU, restarting the last instruction */
> +void monitor_resume(struct domain *d);

... struct domain may end up being a forward reference (with scope
restricted to monitor_resume()).

Jan

  reply	other threads:[~2015-02-04  9:47 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 21:46 [RFC PATCH V3 00/12] xen: Clean-up of mem_event subsystem Tamas K Lengyel
2015-01-29 21:46 ` [RFC PATCH V3 01/12] xen/mem_event: Cleanup of mem_event structures Tamas K Lengyel
2015-02-02 17:19   ` Ian Campbell
2015-02-03  9:17     ` Jan Beulich
2015-02-05 12:12       ` Tamas K Lengyel
2015-02-05 12:13     ` Tamas K Lengyel
2015-02-03 15:32   ` Jan Beulich
2015-01-29 21:46 ` [RFC PATCH V3 02/12] xen/mem_event: Rename the mem_event ring from 'access' to 'monitor' Tamas K Lengyel
2015-02-02 17:22   ` Ian Campbell
2015-02-03 15:37   ` Jan Beulich
2015-02-05 14:24     ` Tamas K Lengyel
2015-01-29 21:46 ` [RFC PATCH V3 03/12] xen/mem_paging: Convert mem_event_op to mem_paging_op Tamas K Lengyel
2015-02-02 17:23   ` Ian Campbell
2015-02-03 15:41   ` Jan Beulich
2015-01-29 21:46 ` [RFC PATCH V3 04/12] xen/mem_access: Merge mem_event sanity check into mem_access check Tamas K Lengyel
2015-01-29 21:46 ` [RFC PATCH V3 05/12] xen: Introduce vm_event Tamas K Lengyel
2015-01-30 17:25   ` Daniel De Graaf
2015-01-31 13:24     ` Tamas K Lengyel
2015-02-02 19:35       ` Daniel De Graaf
2015-02-06 14:04         ` Tamas K Lengyel
2015-02-02 17:27   ` Ian Campbell
2015-02-03 15:54   ` Jan Beulich
2015-02-06 13:54     ` Tamas K Lengyel
2015-02-06 13:58       ` Andrew Cooper
2015-02-06 14:01         ` Tamas K Lengyel
2015-01-29 21:46 ` [RFC PATCH V3 06/12] xen: migrate mem_event to vm_event Tamas K Lengyel
2015-02-02 17:27   ` Ian Campbell
2015-02-03 16:22   ` Jan Beulich
2015-01-29 21:46 ` [RFC PATCH V3 07/12] xen: Remove mem_event Tamas K Lengyel
2015-01-30 17:25   ` Daniel De Graaf
2015-02-02 17:29   ` Ian Campbell
2015-02-03 16:26   ` Jan Beulich
2015-02-06 12:54     ` Tamas K Lengyel
2015-02-06 14:18       ` Jan Beulich
2015-02-06 16:13         ` Tamas K Lengyel
2015-01-29 21:46 ` [RFC PATCH V3 08/12] tools/tests: Clean-up tools/tests/xen-access Tamas K Lengyel
2015-02-02 17:30   ` Ian Campbell
2015-01-29 21:46 ` [RFC PATCH V3 09/12] x86/hvm: factor out and rename vm_event related functions into separate file Tamas K Lengyel
2015-02-04  5:54   ` Tian, Kevin
2015-02-04  9:14   ` Jan Beulich
2015-01-29 21:46 ` [RFC PATCH V3 10/12] xen: Introduce monitor_op domctl Tamas K Lengyel
2015-01-30  7:58   ` Razvan Cojocaru
2015-01-30 10:38     ` Tamas K Lengyel
2015-01-30 11:07       ` Razvan Cojocaru
2015-01-30 11:15         ` Tamas K Lengyel
2015-01-30 11:24           ` Tamas K Lengyel
2015-01-30 11:33           ` Razvan Cojocaru
2015-01-30 11:45             ` Tamas K Lengyel
2015-01-30 12:24               ` Razvan Cojocaru
2015-01-30 12:36                 ` Tamas K Lengyel
2015-02-02 17:32   ` Ian Campbell
2015-02-04  5:57   ` Tian, Kevin
2015-02-04  9:34   ` Jan Beulich
2015-02-05 14:15     ` Tamas K Lengyel
2015-02-09 18:45       ` Tamas K Lengyel
2015-01-29 21:46 ` [RFC PATCH V3 11/12] xen/vm_event: Decouple vm_event and mem_access Tamas K Lengyel
2015-02-04  9:47   ` Jan Beulich [this message]
2015-02-06 13:10     ` Tamas K Lengyel
2015-02-06 14:20       ` Jan Beulich
2015-02-06 16:12         ` Tamas K Lengyel
2015-01-29 21:46 ` [RFC PATCH V3 12/12] xen/vm_event: Check for VM_EVENT_FLAG_DUMMY only in Debug builds Tamas K Lengyel
2015-02-04  5:59   ` Tian, Kevin
2015-02-06 13:20     ` Tamas K Lengyel
2015-02-04  9:49   ` Jan Beulich
2015-02-06 13:22     ` Tamas K Lengyel
2015-02-02 17:33 ` [RFC PATCH V3 00/12] xen: Clean-up of mem_event subsystem Ian Campbell

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=54D1F8A6020000780005CB47@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andres@lagarcavilla.org \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=eddie.dong@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=steve@zentific.com \
    --cc=tamas.lengyel@zentific.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanghy@cn.fujitsu.com \
    /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.