All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Tim Deegan <tim@xen.org>
Subject: Re: [PATCH 1/5] x86/p2m: paging_write_p2m_entry() is a private function
Date: Tue, 10 Nov 2020 11:32:02 +0100	[thread overview]
Message-ID: <1cc350f6-4b91-b56a-1891-cb60a5275af8@suse.com> (raw)
In-Reply-To: <20201110102731.6eg6u7mxefoihmfq@Air-de-Roger>

On 10.11.2020 11:27, Roger Pau Monné wrote:
> On Wed, Oct 28, 2020 at 10:22:04AM +0100, Jan Beulich wrote:
>> As it gets installed by p2m_pt_init(), it doesn't need to live in
>> paging.c. The function working in terms of l1_pgentry_t even further
>> indicates its non-paging-generic nature. Move it and drop its
>> paging_ prefix, not adding any new one now that it's static.
>>
>> This then also makes more obvious that in the EPT case we wouldn't
>> risk mistakenly calling through the NULL hook pointer.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks.

>> --- a/xen/arch/x86/mm/p2m-pt.c
>> +++ b/xen/arch/x86/mm/p2m-pt.c
>> @@ -108,6 +108,31 @@ static unsigned long p2m_type_to_flags(c
>>      }
>>  }
>>  
>> +/*
>> + * Atomically write a P2M entry and update the paging-assistance state
>> + * appropriately.
>> + * Arguments: the domain in question, the GFN whose mapping is being updated,
>> + * a pointer to the entry to be written, the MFN in which the entry resides,
>> + * the new contents of the entry, and the level in the p2m tree at which
>> + * we are writing.
>> + */
>> +static int write_p2m_entry(struct p2m_domain *p2m, unsigned long gfn,
>> +                           l1_pgentry_t *p, l1_pgentry_t new,
>> +                           unsigned int level)
>> +{
>> +    struct domain *d = p2m->domain;
>> +    struct vcpu *v = current;
> 
> I think you could constify both?

For v it looks like I could. For d a subsequent patch would then
need to undo it, so I'd prefer to keep it this way here.

Jan


  reply	other threads:[~2020-11-10 10:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28  9:20 [PATCH 0/5] x86/p2m: hook adjustments Jan Beulich
2020-10-28  9:22 ` [PATCH 1/5] x86/p2m: paging_write_p2m_entry() is a private function Jan Beulich
2020-11-10 10:27   ` Roger Pau Monné
2020-11-10 10:32     ` Jan Beulich [this message]
2020-10-28  9:22 ` [PATCH 2/5] x86/p2m: collapse the two ->write_p2m_entry() hooks Jan Beulich
2020-10-29 20:36   ` Tim Deegan
2020-11-10 11:06   ` Roger Pau Monné
2020-11-10 13:51     ` Jan Beulich
2020-11-18  9:44       ` Roger Pau Monné
2020-10-28  9:23 ` [PATCH 3/5] x86/p2m: suppress audit_p2m hook when possible Jan Beulich
2020-11-10 11:30   ` Roger Pau Monné
2020-11-10 13:21     ` Jan Beulich
2020-11-10 14:01       ` Roger Pau Monné
2020-10-28  9:24 ` [PATCH 4/5] x86/HAP: move nested-P2M flush calculations out of locked region Jan Beulich
2020-11-10 11:38   ` Roger Pau Monné
2020-10-28  9:24 ` [PATCH 5/5] x86/p2m: split write_p2m_entry() hook Jan Beulich
2020-10-29 20:46   ` Tim Deegan
2020-11-10 13:59   ` Roger Pau Monné
2020-11-10 14:50     ` Jan Beulich
2020-11-11 12:17       ` Roger Pau Monné
2020-11-12 12:29         ` Jan Beulich
2020-11-12 13:07           ` Roger Pau Monné
2020-11-12 14:04             ` Jan Beulich
2020-11-12 17:52               ` Tim Deegan
2020-11-13  9:52                 ` Jan Beulich
2020-11-18  9:22                   ` Roger Pau Monné
2020-11-18  9:31   ` Roger Pau Monné

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=1cc350f6-4b91-b56a-1891-cb60a5275af8@suse.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=tim@xen.org \
    --cc=wl@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 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.