xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>,
	Tamas K Lengyel <tamas.lengyel@zentific.com>,
	aisaila@bitdefender.com,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [RFC PATCH 1/2] mem_access: Fix npfec.kind propagation
Date: Thu, 27 Sep 2018 09:46:44 +0100	[thread overview]
Message-ID: <b722690c-a975-86b0-09e2-540a309a23c2@citrix.com> (raw)
In-Reply-To: <5BAC810302000078001EC6E9@prv1-mh.provo.novell.com>

On 09/27/2018 08:04 AM, Jan Beulich wrote:
>>>> On 26.09.18 at 19:00, <andrew.cooper3@citrix.com> wrote:
>> On 26/09/18 17:47, George Dunlap wrote:
>>> --- a/xen/arch/x86/mm/mem_access.c
>>> +++ b/xen/arch/x86/mm/mem_access.c
>>> @@ -232,12 +232,12 @@ bool p2m_mem_access_check(paddr_t gpa, unsigned long gla,
>>>          {
>>>              req->u.mem_access.flags |= MEM_ACCESS_GLA_VALID;
>>>              req->u.mem_access.gla = gla;
>>> -
>>> -            if ( npfec.kind == npfec_kind_with_gla )
>>> -                req->u.mem_access.flags |= MEM_ACCESS_FAULT_WITH_GLA;
>>> -            else if ( npfec.kind == npfec_kind_in_gpt )
>>> -                req->u.mem_access.flags |= MEM_ACCESS_FAULT_IN_GPT;
>>>          }
>>> +
>>> +        if ( npfec.kind == npfec_kind_with_gla )
>>> +            req->u.mem_access.flags |= MEM_ACCESS_FAULT_WITH_GLA;
>>> +        else if ( npfec.kind == npfec_kind_in_gpt )
>>> +            req->u.mem_access.flags |= MEM_ACCESS_FAULT_IN_GPT;
>>
>> Nit.  Newline here please, as it is not logically related with the block
>> below.
> 
> And, despite it being just two comparisons, perhaps better to
> make it a switch() at the same time?

Sure -- this is logically separate from the follow-up patch, so I'll
re-send it as a singleton with the comments.

 -George

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

      reply	other threads:[~2018-09-27  8:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 16:47 [RFC PATCH 1/2] mem_access: Fix npfec.kind propagation George Dunlap
2018-09-26 16:47 ` [RFC PATCH 2/2] x86/mm: Add mem access rights to NPT George Dunlap
2018-09-26 17:22   ` Andrew Cooper
2018-09-27 10:37     ` George Dunlap
2018-09-27 10:53       ` Paul Durrant
2019-01-09  9:30       ` Alexandru Stefan ISAILA
2018-09-27  9:38   ` Isaila Alexandru
2019-06-13 10:56   ` [Xen-devel] " Alexandru Stefan ISAILA
2019-06-17 10:48     ` George Dunlap
2019-06-17 11:58       ` Andrew Cooper
2019-06-13 15:19   ` Tamas Lengyel
2019-06-13 15:21     ` Razvan Cojocaru
2018-09-26 16:51 ` [RFC PATCH 1/2] mem_access: Fix npfec.kind propagation Tamas Lengyel
2018-09-26 17:00 ` Andrew Cooper
2018-09-27  7:04   ` Jan Beulich
2018-09-27  8:46     ` George Dunlap [this message]

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=b722690c-a975-86b0-09e2-540a309a23c2@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=aisaila@bitdefender.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=tamas.lengyel@zentific.com \
    --cc=tim@xen.org \
    --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).