All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: tamas@tklengyel.com, wei.liu2@citrix.com,
	george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH RFC] tools/libxc, xen/x86: Added xc_set_mem_access_sparse()
Date: Mon, 29 Aug 2016 15:11:41 +0300	[thread overview]
Message-ID: <2cbbda18-dd96-21cb-e029-b9efdeffae72@bitdefender.com> (raw)
In-Reply-To: <57C0096D020000780010949D@prv-mh.provo.novell.com>

On 08/26/2016 10:18 AM, Jan Beulich wrote:
>>>> On 26.08.16 at 08:11, <rcojocaru@bitdefender.com> wrote:
>> +        rc = p2m_set_mem_access(d, _gfn(mao.pfn), arr, mao.nr, start_iter,
>> +                                MEMOP_CMD_MASK, mao.access, 0);
> 
> Please don't pass mao.pfn here when it's meant to be ignore by
> the caller. Use GFN_INVALID instead. And for future extensibility
> please check that the caller put some pre-defined pattern here
> (not sure whether zero is appropriate in this case).

GFN_INVALID has it's own semantics in p2m_set_mem_access():

    /* If request to set default access. */
    if ( gfn_eq(gfn, INVALID_GFN) )
    {
        p2m->default_access = a;
        return 0;
    }

I'll replace the condition with "if ( !arr && gfn_eq(gfn, INVALID_GFN)
)" and use GFN_INVALID in the XENMEM_access_op_set_access_multi (renamed
from XENMEM_access_op_set_access_sparse), as recommended.


Thanks,
Razvan

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

  parent reply	other threads:[~2016-08-29 12:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26  6:11 [PATCH RFC] tools/libxc, xen/x86: Added xc_set_mem_access_sparse() Razvan Cojocaru
2016-08-26  7:18 ` Jan Beulich
2016-08-26  7:40   ` Razvan Cojocaru
2016-08-26  8:14     ` Jan Beulich
2016-08-29 15:29       ` Razvan Cojocaru
2016-08-29 15:42         ` Jan Beulich
2016-08-29 16:02           ` Razvan Cojocaru
2016-08-29 16:20             ` Jan Beulich
2016-08-29 16:42               ` Razvan Cojocaru
2016-08-30  6:39                 ` Jan Beulich
2016-08-30  8:34                   ` Razvan Cojocaru
2016-08-30  9:06                     ` Jan Beulich
2016-08-29 12:11   ` Razvan Cojocaru [this message]
2016-08-29 12:14     ` Razvan Cojocaru
2016-08-26  8:45 ` Wei Liu
2016-08-26 20:33 ` Tamas K Lengyel
2016-08-26 22:19   ` Razvan Cojocaru

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=2cbbda18-dd96-21cb-e029-b9efdeffae72@bitdefender.com \
    --to=rcojocaru@bitdefender.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=tamas@tklengyel.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.