All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Frediano Ziglio <freddy77@gmail.com>
Cc: "Daniel P . Smith" <dpsmith@apertussolutions.com>,
	"Frediano Ziglio" <frediano.ziglio@citrix.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger@xenproject.org>,
	"Teddy Astie" <teddy.astie@vates.tech>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Juergen Gross" <jgross@suse.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v10 7/10] xen: implement new foreign copy hypercall
Date: Mon, 17 Aug 2026 10:04:17 +0200	[thread overview]
Message-ID: <e697b132-8c6a-411b-b91d-2fedba02a9ae@suse.com> (raw)
In-Reply-To: <CAHt6W4ftLMsk41zdwYUXEwN_JzzXHQG01vhSqutkgk8PO6xAQw@mail.gmail.com>

On 14.08.2026 16:50, Frediano Ziglio wrote:
> On Fri, 14 Aug 2026 at 15:13, Jan Beulich <jbeulich@suse.com> wrote:
>> On 14.08.2026 15:47, Frediano Ziglio wrote:
>>> On Thu, 13 Aug 2026 at 15:22, Jan Beulich <jbeulich@suse.com> wrote:
>>>> On 13.08.2026 16:03, Frediano Ziglio wrote:
>>>>> On Thu, 13 Aug 2026 at 10:41, Jan Beulich <jbeulich@suse.com> wrote:
>>>>>> On 10.08.2026 12:30, Frediano Ziglio wrote:
>>>>>>> --- a/xen/common/memory.c
>>>>>>> +++ b/xen/common/memory.c
>>>>>>> @@ -1548,6 +1548,141 @@ static int acquire_resource(
>>>>>>>      return rc;
>>>>>>>  }
>>>>>>>
>>>>>>> +/*
>>>>>>> + * The "noinline" qualifier avoids the compiler to create a large function
>>>>>>> + * consuming quite a lot of stack.
>>>>>>> + */
>>>>>>> +static int noinline mem_foreigncopy(
>>>>>>
>>>>>> I'm wondering: Is the "mem" prefix really meaningful for a static function in
>>>>>> a file named memory.c?
>>>>>>
>>>>>
>>>>> Changed
>>>>>
>>>>>>> +    XEN_GUEST_HANDLE_PARAM(xen_foreigncopy_t) arg)
>>>>>>> +{
>>>>>>> +    struct domain *d, *const currd = current->domain;
>>>>>>
>>>>>> With the comment on the new XSM hooks (below) in mind: currd wants to be
>>>>>> pointer-to-const.
>>>>>>
>>>>>
>>>>> Just rebased on master, all XSM hooks accept no-const pointers to domains.
>>>>> So the suggested change would create warnings.
>>>>
>>>> Well, as per below, I pointed you at a particular pending patch, a single
>>>> hunk of which could be broken out.
>>>
>>> Yes, but my changes would have to have casts from const pointers to
>>> no-const pointers to avoid warnings and the patch you are pointing to
>>> would have to remove these casts. I find this less clean than having
>>> one patch using the current code style (that is no-const pointers) and
>>> another that changes the style entirely.
>>> But obviously this is just my opinion.
>>
>> Such casts would be unacceptable. What instead I have been trying to convey:
>> Your patch wants to gain a dependency on my patch. And if my patch would
>> take too long to make it in, that one hunk could be broken out into a
>> separate, easy to get in patch.
> 
> Okay, then the only choice that's left is the code producing warnings
> as const pointers are passed to functions requiring no-const pointers.
> Is this acceptable? Apparently as you are suggesting it it is.

That's not acceptable, the more that due to -Werror this would break the
build. But that's also not what I said, and I'm having a hard time seeing
how what I said can be mis-interpreted. What exactly is not clear in "Your
patch wants to gain a dependency on my patch"?

Btw, I'm about to submit v2 of that XSM series, where I've broken out that
hunk (for the change to then hopefully go in quickly, allowing you to
simply re-base rather than carrying a prereq patch).

Jan


  reply	other threads:[~2026-08-17  8:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 10:30 [PATCH v10 0/10] xenguest optimisations Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 1/10] libs/call: cache up to 4 pages in hypercall bounce buffers Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 2/10] libs/guest: move batch_pfns into a separate structure Frediano Ziglio
2026-08-13 11:08   ` Andrew Cooper
2026-08-13 11:27     ` Jan Beulich
2026-08-13 11:48       ` Andrew Cooper
2026-08-13 12:56         ` Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 3/10] libs/guest: allocate various migration arrays just once Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 4/10] libs/guest: use Valgrind or sanitizers to detect various buffer overflows Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 5/10] libs/guest: add xg_foreignmemory_copy_{from,to} Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 6/10] libs/guest: use foreign copy API during migration Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 7/10] xen: implement new foreign copy hypercall Frediano Ziglio
2026-08-13  9:41   ` Jan Beulich
2026-08-13 14:03     ` Frediano Ziglio
2026-08-13 14:22       ` Jan Beulich
2026-08-14 13:47         ` Frediano Ziglio
2026-08-14 14:13           ` Jan Beulich
2026-08-14 14:50             ` Frediano Ziglio
2026-08-17  8:04               ` Jan Beulich [this message]
2026-08-17 14:00                 ` Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 8/10] privcmd: Add definition for new Linux privcmd to access new Xen hypercall Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 9/10] libs/guest: use new hypercall if available Frediano Ziglio
2026-08-10 10:30 ` [PATCH Linux v6 10/10] xen/privcmd: Add new ABI to allow copying foreign memory Frediano Ziglio
2026-08-13 12:43   ` Frediano Ziglio
2026-08-11 11:37 ` [PATCH v10 0/10] xenguest optimisations Anthony PERARD
2026-08-12  2:33   ` Frediano Ziglio

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=e697b132-8c6a-411b-b91d-2fedba02a9ae@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=dpsmith@apertussolutions.com \
    --cc=freddy77@gmail.com \
    --cc=frediano.ziglio@citrix.com \
    --cc=jgross@suse.com \
    --cc=roger@xenproject.org \
    --cc=teddy.astie@vates.tech \
    --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.