From: Juergen Gross <jgross@suse.com>
To: "Srivatsa S. Bhat" <srivatsa@csail.mit.edu>,
linux-kernel@vger.kernel.org, x86@kernel.org,
virtualization@lists.linux-foundation.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Alexey Makhalov <amakhalov@vmware.com>,
VMware PV-Drivers Reviewers <pv-drivers@vmware.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86/paravirt: merge activate_mm and dup_mmap callbacks
Date: Mon, 16 Jan 2023 07:43:25 +0100 [thread overview]
Message-ID: <27d08d32-1a17-0959-203f-39e769f555d1@suse.com> (raw)
In-Reply-To: <3fcb5078-852e-0886-c084-7fb0cfa5b757@csail.mit.edu>
[-- Attachment #1.1.1: Type: text/plain, Size: 1759 bytes --]
On 16.01.23 05:27, Srivatsa S. Bhat wrote:
>
> Hi Juergen,
>
> On 1/12/23 7:21 AM, Juergen Gross wrote:
>> The two paravirt callbacks .mmu.activate_mm and .mmu.dup_mmap are
>> sharing the same implementations in all cases: for Xen PV guests they
>> are pinning the PGD of the new mm_struct, and for all other cases
>> they are a NOP.
>>
>
> I was expecting that the duplicated functions xen_activate_mm() and
> xen_dup_mmap() would be merged into a common one, and that both
> .mmu.activate_mm and .mmu.dup_mmap callbacks would be mapped to that
> common implementation for Xen PV.
>
>> So merge them to a common callback .mmu.enter_mmap (in contrast to the
>> corresponding already existing .mmu.exit_mmap).
>>
>
> Instead, this patch seems to be merging the callbacks themselves...
>
> I see that's not an issue right now since there is no other actual
> user for these callbacks. But are we sure that merging the callbacks
> just because the current user (Xen PV) has the same implementation for
> both is a good idea? The callbacks are invoked at distinct points from
> fork/exec, so wouldn't it be valuable to retain that distinction in
> semantics in the callbacks as well?
>
> However, if you believe that two separate callbacks are not really
> required here (because there is no significant difference in what they
> mean, rather than because their callback implementations happen to be
> the same right now), then could you please expand on this and call it
> out in the commit message, please?
Would you be fine with:
In the end both callbacks are meant to register an address space with the
underlying hypervisor, so there needs to be only a single callback for that
purpose.
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2023-01-16 6:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 15:21 Juergen Gross
2023-01-12 19:44 ` Boris Ostrovsky
2023-01-16 4:27 ` Srivatsa S. Bhat
2023-01-16 6:43 ` Juergen Gross [this message]
2023-01-16 16:10 ` Srivatsa S. Bhat
2023-01-17 12:22 ` Peter Zijlstra
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=27d08d32-1a17-0959-203f-39e769f555d1@suse.com \
--to=jgross@suse.com \
--cc=amakhalov@vmware.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pv-drivers@vmware.com \
--cc=srivatsa@csail.mit.edu \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®