All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Tamas K Lengyel <tamas@tklengyel.com>
Cc: "Sergiy Kibrik" <Sergiy_Kibrik@epam.com>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Alexandru Isaila" <aisaila@bitdefender.com>,
	"Petre Pircalabu" <ppircalabu@bitdefender.com>,
	"Shawn Anastasio" <sanastasio@raptorengineering.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Bob Eshleman" <bobbyeshleman@gmail.com>,
	"Connor Davis" <connojdavis@gmail.com>,
	"Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 1/4] xen: kconfig: rename MEM_ACCESS -> VM_EVENT
Date: Mon, 3 Feb 2025 08:36:50 +0100	[thread overview]
Message-ID: <02cbd163-9048-45dc-9951-c8f2febb8b5f@suse.com> (raw)
In-Reply-To: <CABfawhn8uhUbr4yRcSb=_Jw3y2Cgsh_ozXotTFkrDt12K8Cyog@mail.gmail.com>

On 01.02.2025 00:36, Tamas K Lengyel wrote:
> On Fri, Jan 31, 2025 at 1:30 AM Jan Beulich <jbeulich@suse.com> wrote:
>> On 31.01.2025 01:26, Tamas K Lengyel wrote:
>>> On Thu, Jan 30, 2025 at 8:24 AM Jan Beulich <jbeulich@suse.com> wrote:
>>>> On 21.01.2025 11:19, Sergiy Kibrik wrote:
>>>>> Use more generic CONFIG_VM_EVENT name throughout Xen code instead of
>>>>> CONFIG_MEM_ACCESS. This reflects the fact that vm_event is a higher level
>>>>> feature, with mem_access & monitor depending on it.
>>>>>
>>>>> Suggested-by: Jan Beulich <jbeulich@suse.com>
>>>>
>>>> I don't think this is applicable; my suggestion went in a different direction.
>>>>
>>>>> Suggested-by: Tamas K Lengyel <tamas@tklengyel.com>
>>>>> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
>>>>
>>>> Before considering to ack this, I'd like you, Tamas, to confirm this is really
>>>> what you had thought of. In particular ...
>>>>
>>>>> --- a/xen/arch/arm/Makefile
>>>>> +++ b/xen/arch/arm/Makefile
>>>>> @@ -37,7 +37,7 @@ obj-y += irq.o
>>>>>  obj-y += kernel.init.o
>>>>>  obj-$(CONFIG_LIVEPATCH) += livepatch.o
>>>>>  obj-$(CONFIG_LLC_COLORING) += llc-coloring.o
>>>>> -obj-$(CONFIG_MEM_ACCESS) += mem_access.o
>>>>> +obj-$(CONFIG_VM_EVENT) += mem_access.o
>>>>
>>>> ... changes like this one look somewhat odd to me.
>>>>
>>>>> --- a/xen/common/Kconfig
>>>>> +++ b/xen/common/Kconfig
>>>>> @@ -92,7 +92,7 @@ config HAS_VMAP
>>>>>  config MEM_ACCESS_ALWAYS_ON
>>>>>       bool
>>>>>
>>>>> -config MEM_ACCESS
>>>>> +config VM_EVENT
>>>>>       def_bool MEM_ACCESS_ALWAYS_ON
>>>>>       prompt "Memory Access and VM events" if !MEM_ACCESS_ALWAYS_ON
>>>>>       depends on HVM
>>>>
>>>> What about MEM_ACCESS_ALWAYS_ON (visible in patch context)? Shouldn't that
>>>> become VM_EVENT_ALWAYS_ON then, too?
>>>>
>>>> Further, what about MEM_PAGING and MEM_SHARING? Shouldn't those, at least
>>>> documentation purposes, then also gain a dependency on VM_EVENT?
>>>
>>> MEM_PAGING, yes. MEM_SHARING, definitely not. MEM_SHARING is perfectly
>>> functional without vm_event.
>>
>> Is it? I see e.g.
>>
>>     if ( sharing_enomem )
>>     {
>> #ifdef CONFIG_MEM_SHARING
>>         if ( !vm_event_check_ring(currd->vm_event_share) )
>>         {
>>             gprintk(XENLOG_ERR, "Domain %pd attempt to unshare "
>>                     "gfn %lx, ENOMEM and no helper\n",
>>                     currd, gfn);
>>             /* Crash the domain */
>>             rc = 0;
>>         }
>> #endif
>>     }
> 
> On x86 vm_event is always compiled in as per current setup. If we were
> to make that dependent on the now renamed config option this here
> should be converted to CONFIG_MEM_SHARING && CONFIG_VM_EVENT. The rest
> of the mem_sharing codebase does not require vm_event to function,
> this here is used only if there is a subscriber to the enomem
> corner-case. It isn't normally used.

I see.

>> in hvm_hap_nested_page_fault().
>>
>> Also - you responded only to a secondary remark here. What about the
>> more basic points further up?
> 
> My recommendation to use CONFIG_VM_EVENT for the
> vm_event/mem_access/monitor subsystems strictly only applies to ARM
> where these three subsystems have a 1:1:1 dependency. On x86 the
> dependency between the three can be more complex, I would not change
> the x86 side of things unless we want to get the three subsystems
> their own kconfig options.

Then why did you ack the patch, which clearly extends things to x86 as
well? Iirc my suggestion was to indeed go with separate options (hence
why I think the Suggested-by: here is wrong; see context near the top).

Jan


  reply	other threads:[~2025-02-03  7:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21 10:17 [PATCH v2 0/4] make build of vm_event/mem_access/monitor optional Sergiy Kibrik
2025-01-21 10:19 ` [PATCH v2 1/4] xen: kconfig: rename MEM_ACCESS -> VM_EVENT Sergiy Kibrik
2025-01-30 13:24   ` Jan Beulich
2025-01-31  0:26     ` Tamas K Lengyel
2025-01-31  6:30       ` Jan Beulich
2025-01-31 23:36         ` Tamas K Lengyel
2025-02-03  7:36           ` Jan Beulich [this message]
2025-02-04  1:07             ` Tamas K Lengyel
2025-01-30 13:26   ` Jan Beulich
2025-01-31  0:29   ` Tamas K Lengyel
2025-01-21 10:21 ` [PATCH v2 2/4] x86:monitor: control monitor.c build with CONFIG_VM_EVENT option Sergiy Kibrik
2025-01-30 13:27   ` Jan Beulich
2025-01-21 10:23 ` [PATCH v2 3/4] automation: rename CONFIG_MEM_ACCESS -> CONFIG_VM_EVENT Sergiy Kibrik
2025-01-22  8:03   ` Nicola Vetrini
2025-01-30 13:14   ` Jan Beulich
2025-01-21 10:25 ` [PATCH v2 4/4] xen: mem_access: conditionally compile vm_event.c & monitor.c Sergiy Kibrik
2025-01-30 13:32   ` Jan Beulich
2025-01-31  0:33   ` Tamas K Lengyel
2025-01-31  6:42     ` 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=02cbd163-9048-45dc-9951-c8f2febb8b5f@suse.com \
    --to=jbeulich@suse.com \
    --cc=Sergiy_Kibrik@epam.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=aisaila@bitdefender.com \
    --cc=alistair.francis@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=bertrand.marquis@arm.com \
    --cc=bobbyeshleman@gmail.com \
    --cc=connojdavis@gmail.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=ppircalabu@bitdefender.com \
    --cc=roger.pau@citrix.com \
    --cc=sanastasio@raptorengineering.com \
    --cc=sstabellini@kernel.org \
    --cc=tamas@tklengyel.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.