All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Hongyang <yanghy@cn.fujitsu.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: wei.liu2@citrix.com, wency@cn.fujitsu.com,
	andrew.cooper3@citrix.com, yunhong.jiang@intel.com,
	eddie.dong@intel.com, xen-devel@lists.xen.org,
	rshriram@cs.ubc.ca, ian.jackson@eu.citrix.com
Subject: Re: [PATCH v5 05/14] tools/libxc: unused attribute in DECLARE_HYPERCALL_BUFFER_SHADOW
Date: Thu, 14 May 2015 09:06:29 +0800	[thread overview]
Message-ID: <5553F515.5050606@cn.fujitsu.com> (raw)
In-Reply-To: <1431532676.8263.348.camel@citrix.com>



On 05/13/2015 11:57 PM, Ian Campbell wrote:
> On Wed, 2015-05-13 at 09:53 +0800, Yang Hongyang wrote:
>> There are cases that we only need to use the hypercall buffer data,
>
> "cases where"
>> and do not use the xc_hypercall_buffer_t struct.
>> DECLARE_HYPERCALL_BUFFER_SHADOW define a user pointer that can allow
>
> "defines a user pointer"
>
>> us to access the hypercall buffer data but it also define a
>
> "defines"
>
>> xc_hypercall_buffer_t that we don't use, the compiler will report arg
>> unused error.
>> add __attribute__((unused)) before xc_hypercall_buffer_t to avoid
>> the compiler error.
>>
>> The cases for example:
>
> "Example cases:"
>
>> In send_all_pages(), we only need to use the haypercall buffer data
>
> "hypercall"
>
>> which is a dirty bitmap, we set the dirty bitmap to all dirty and call
>> send_dirty_pages, we will not use the xc_hypercall_buffer_t and hypercall
>> to retrive the dirty bitmap.
>
> "retrieve"
>
>> In send_some_pages(), we will also only need to use the dirty_bitmap.
>> the retrive dirty bitmap hypercall are done by the caller.
>
> and again.
>
>>
>> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
>> CC: Ian Campbell <Ian.Campbell@citrix.com>
>> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
>> CC: Wei Liu <wei.liu2@citrix.com>
>> CC: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>>   tools/libxc/include/xenctrl.h | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
>> index a689caf..0804257 100644
>> --- a/tools/libxc/include/xenctrl.h
>> +++ b/tools/libxc/include/xenctrl.h
>> @@ -284,11 +284,15 @@ typedef struct xc_hypercall_buffer xc_hypercall_buffer_t;
>>    * Useful when a hypercall buffer is passed to a function and access
>>    * via the user pointer is required.
>>    *
>> + * The shadow xc_hypercall_buffer_t may be unused, add
>> + * __attribute__((unused)) to avoid compiler error.
>
> No need for this comment IMHO.
>
>>    * See DECLARE_HYPERCALL_BUFFER_ARGUMENT() if the user pointer is not
>>    * required.
>>    */
>>   #define DECLARE_HYPERCALL_BUFFER_SHADOW(_type, _name, _hbuf)   \
>>       _type *(_name) = (_hbuf)->hbuf;                            \
>> +    __attribute__((unused))                                    \
>
> This is a somewhat unconventional location for such a tagm but putting
> it elsewhere would involve faff-some rewrapping.
>
> So apart from the typos looks good.

Will fix those typos, thank you!

>
>
>>       xc_hypercall_buffer_t XC__HYPERCALL_BUFFER_NAME(_name) = { \
>>           .hbuf = (void *)-1,                                    \
>>           .param_shadow = (_hbuf),                               \
>
>
> .
>

-- 
Thanks,
Yang.

  reply	other threads:[~2015-05-14  1:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13  1:53 [PATCH v5 00/14] Misc patches to aid migration v2 Remus support Yang Hongyang
2015-05-13  1:53 ` [PATCH v5 01/14] libxc/migration: Be rather stricter with illformed callers Yang Hongyang
2015-05-13 15:45   ` Ian Campbell
2015-05-13  1:53 ` [PATCH v5 02/14] libxc/save: Adjust stream-position callbacks for checkpointed streams Yang Hongyang
2015-05-13 15:46   ` Ian Campbell
2015-05-13 15:47     ` Andrew Cooper
2015-05-13 15:56       ` Ian Campbell
2015-05-14  1:52         ` Yang Hongyang
2015-05-14 11:18           ` Ian Campbell
2015-05-13  1:53 ` [PATCH v5 03/14] libxc/migration: Specification update for CHECKPOINT records Yang Hongyang
2015-05-13 15:48   ` Ian Campbell
2015-05-13  1:53 ` [PATCH v5 04/14] libxc/migration: Pass checkpoint information into the save algorithm Yang Hongyang
2015-05-13 15:49   ` Ian Campbell
2015-05-14  1:03     ` Yang Hongyang
2015-05-14 11:17       ` Ian Campbell
2015-05-13  1:53 ` [PATCH v5 05/14] tools/libxc: unused attribute in DECLARE_HYPERCALL_BUFFER_SHADOW Yang Hongyang
2015-05-13 15:57   ` Ian Campbell
2015-05-14  1:06     ` Yang Hongyang [this message]
2015-05-13  1:53 ` [PATCH v5 06/14] tools/libxc: add a check in xc_hypercall_buffer_free_pages macro Yang Hongyang
2015-05-13  1:53 ` [PATCH v5 07/14] libxc/save: introduce setup() and cleanup() on save Yang Hongyang
2015-05-13  1:53 ` [PATCH v5 08/14] libxc/save: rename to_send to dirty_bitmap Yang Hongyang
2015-05-13  1:53 ` [PATCH v5 09/14] libxc/save: adjust the memory allocation for migration Yang Hongyang
2015-05-13  1:54 ` [PATCH v5 10/14] libxc/save: remove bitmap param from send_some_pages Yang Hongyang
2015-05-13  1:54 ` [PATCH v5 11/14] libxc/save: rename send_some_pages to send_dirty_pages Yang Hongyang
2015-05-13  1:54 ` [PATCH v5 12/14] libxc/save: reuse send_dirty_pages() in send_all_pages() Yang Hongyang
2015-05-13  1:54 ` [PATCH v5 13/14] libxc/restore: introduce process_record() Yang Hongyang
2015-05-13  1:54 ` [PATCH v5 14/14] libxc/restore: split read/handle qemu info Yang Hongyang
2015-05-13  7:54 ` [PATCH v5 00/14] Misc patches to aid migration v2 Remus support Andrew Cooper

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=5553F515.5050606@cn.fujitsu.com \
    --to=yanghy@cn.fujitsu.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=wei.liu2@citrix.com \
    --cc=wency@cn.fujitsu.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yunhong.jiang@intel.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.