All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Stefano Stabellini <sstabellini@kernel.org>,
	Oleksii Kurochko <oleksii.kurochko@gmail.com>
Cc: "Romain Caritey" <Romain.Caritey@microchip.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>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 5/6] xen: move domain_use_host_layout() to common header
Date: Tue, 17 Feb 2026 08:34:40 +0100	[thread overview]
Message-ID: <d9feffe4-c45e-4bed-bc5e-776e4547578a@suse.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2602161038120.359097@ubuntu-linux-20-04-desktop>

On 16.02.2026 19:42, Stefano Stabellini wrote:
> On Mon, 16 Feb 2026, Jan Beulich wrote:
>> On 12.02.2026 17:21, Oleksii Kurochko wrote:
>>> domain_use_host_layout() is generic enough to be moved to the
>>> common header xen/domain.h.
>>
>> Maybe, but then something DT-specific, not xen/domain.h. Specifically, ...
>>
>>> --- a/xen/include/xen/domain.h
>>> +++ b/xen/include/xen/domain.h
>>> @@ -62,6 +62,22 @@ void domid_free(domid_t domid);
>>>  #define is_domain_direct_mapped(d) ((d)->cdf & CDF_directmap)
>>>  #define is_domain_using_staticmem(d) ((d)->cdf & CDF_staticmem)
>>>  
>>> +/*
>>> + * Is the domain using the host memory layout?
>>> + *
>>> + * Direct-mapped domain will always have the RAM mapped with GFN == MFN.
>>> + * To avoid any trouble finding space, it is easier to force using the
>>> + * host memory layout.
>>> + *
>>> + * The hardware domain will use the host layout regardless of
>>> + * direct-mapped because some OS may rely on a specific address ranges
>>> + * for the devices.
>>> + */
>>> +#ifndef domain_use_host_layout
>>> +# define domain_use_host_layout(d) (is_domain_direct_mapped(d) || \
>>> +                                    is_hardware_domain(d))
>>
>> ... is_domain_direct_mapped() isn't something that I'd like to see further
>> proliferate in common (non-DT) code.
> 
> Hi Jan, we have a requirement for 1:1 mapped Dom0 (I should say hardware
> domain) on x86 as well. In fact, we already have a working prototype,
> although it is not suitable for upstream yet.
> 
> In addition to the PSP use case that we discussed a few months ago,
> where the PSP is not behind an IOMMU and therefore exchanged addresses
> must be 1:1 mapped, we also have a new use case. We are running the full
> Xen-based automotive stack on an Azure instance where SVM (vmentry and
> vmexit) is available, but an IOMMU is not present. All virtual machines
> are configured as PVH.

Hmm. Then adjustments need making, for commentary and macro to be correct
on x86. First and foremost none of what is there is true for PV.

Jan


  reply	other threads:[~2026-02-17  7:35 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12 16:21 [PATCH v1 0/6] RISCV: enable DOMAIN_BUILD_HELPERS Oleksii Kurochko
2026-02-12 16:21 ` [PATCH v1 1/6] xen/riscv: implement get_page_from_gfn() Oleksii Kurochko
2026-02-16 12:38   ` Jan Beulich
2026-02-16 12:41     ` Jan Beulich
2026-02-17  9:01     ` Oleksii Kurochko
2026-02-17  9:10       ` Jan Beulich
2026-02-17  9:58         ` Oleksii Kurochko
2026-02-17 10:40           ` Jan Beulich
2026-02-12 16:21 ` [PATCH v1 2/6] xen/riscv: implement copy_to_guest_phys() Oleksii Kurochko
2026-02-16 14:57   ` Jan Beulich
2026-02-17 10:25     ` Oleksii Kurochko
2026-02-17 10:42       ` Jan Beulich
2026-02-12 16:21 ` [PATCH v1 3/6] xen/riscv: add zImage kernel loading support Oleksii Kurochko
2026-02-16 16:31   ` Jan Beulich
2026-02-17 11:58     ` Oleksii Kurochko
2026-02-17 13:02       ` Jan Beulich
2026-02-17 15:28         ` Oleksii Kurochko
2026-02-12 16:21 ` [PATCH v1 4/6] xen: move declaration of fw_unreserved_regions() to common header Oleksii Kurochko
2026-02-12 16:21 ` [PATCH v1 5/6] xen: move domain_use_host_layout() " Oleksii Kurochko
2026-02-16 16:36   ` Jan Beulich
2026-02-16 18:42     ` Stefano Stabellini
2026-02-17  7:34       ` Jan Beulich [this message]
2026-02-18 12:58         ` Oleksii Kurochko
2026-02-18 13:12           ` Jan Beulich
2026-02-18 14:38             ` Oleksii Kurochko
2026-02-18 14:50               ` Jan Beulich
2026-02-28  1:42                 ` Stefano Stabellini
2026-02-28  1:59                   ` Stefano Stabellini
2026-02-12 16:21 ` [PATCH v1 6/6] xen/riscv: enable DOMAIN_BUILD_HELPERS Oleksii Kurochko
2026-02-12 16:39   ` Jan Beulich
2026-02-13 12:54     ` Oleksii Kurochko
2026-02-13 13:11       ` Jan Beulich
2026-02-18 10:39         ` Oleksii Kurochko
2026-02-18 10:45           ` Jan Beulich
2026-03-17 12:49         ` Oleksii Kurochko
2026-03-19  7:58           ` Jan Beulich
2026-03-20  9:58             ` Oleksii Kurochko
2026-03-20 13:19               ` Jan Beulich
2026-03-20 14:30                 ` Oleksii Kurochko

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=d9feffe4-c45e-4bed-bc5e-776e4547578a@suse.com \
    --to=jbeulich@suse.com \
    --cc=Romain.Caritey@microchip.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@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 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.