All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Kevin Tian <kevin.tian@intel.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>, Jun Nakajima <jun.nakajima@intel.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH v4 3/4] x86/mm: handle foreign mappings in p2m_entry_modify
Date: Tue, 19 Feb 2019 01:39:17 -0700	[thread overview]
Message-ID: <5C6BC0B50200007800217DF2@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D19C94BC73@SHSMSX104.ccr.corp.intel.com>

>>> On 19.02.19 at 07:14, <kevin.tian@intel.com> wrote:
>>  From: Roger Pau Monne [mailto:roger.pau@citrix.com]
>> Sent: Tuesday, February 19, 2019 1:27 AM
>> 
>> @@ -734,8 +735,15 @@ hap_write_p2m_entry(struct domain *d, unsigned
>> long gfn, l1_pgentry_t *p,
>>              && perms_strictly_increased(old_flags, l1e_get_flags(new)) );
>>      }
>> 
>> -    p2m_entry_modify(p2m_get_hostp2m(d),
>> p2m_flags_to_type(l1e_get_flags(new)),
>> -                     p2m_flags_to_type(old_flags), level);
>> +    rc = p2m_entry_modify(p2m_get_hostp2m(d),
>> +                          p2m_flags_to_type(l1e_get_flags(new)),
>> +                          p2m_flags_to_type(old_flags), l1e_get_mfn(new),
>> +                          l1e_get_mfn(*p), level);
> 
> why not passing old/new pte to reduce #parameters and thus stable
> against future changes?

The PTE layout is different between EPT and shadow/NPT, yet
the function here is generic. It's not impossible to do what you
suggest, but it would require field extraction abstraction
functions, which I don't think is worth it.

Jan



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

  reply	other threads:[~2019-02-19  8:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 17:27 [PATCH v4 0/4] pvh/dom0/shadow/amd fixes Roger Pau Monne
2019-02-18 17:27 ` [PATCH v4 1/4] x86/mm: split p2m ioreq server pages special handling into helper Roger Pau Monne
2019-02-19  5:47   ` Tian, Kevin
2019-02-19 10:15     ` Roger Pau Monné
2019-02-19  8:49   ` Jan Beulich
2019-02-19 11:22     ` Roger Pau Monné
2019-02-18 17:27 ` [PATCH v4 2/4] p2m: change write_p2m_entry to return an error code Roger Pau Monne
2019-02-19  9:05   ` Jan Beulich
2019-02-19 11:56     ` Roger Pau Monné
2019-02-19 12:28       ` Jan Beulich
2019-02-18 17:27 ` [PATCH v4 3/4] x86/mm: handle foreign mappings in p2m_entry_modify Roger Pau Monne
2019-02-19  6:14   ` Tian, Kevin
2019-02-19  8:39     ` Jan Beulich [this message]
2019-02-19 13:53     ` George Dunlap
2019-02-19 14:00     ` Roger Pau Monné
2019-02-21  6:26       ` Tian, Kevin
2019-02-18 17:27 ` [PATCH v4 4/4] npt/shadow: allow getting foreign page table entries Roger Pau Monne
2019-02-19  8:40   ` Jan Beulich

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=5C6BC0B50200007800217DF2@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.com \
    --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.