On 18.08.2022 09:34, Leo Yan wrote:
> On Wed, Aug 17, 2022 at 03:17:53PM +0200, Jan Beulich wrote:
>> Furthermore - what if Linux decided to change their structure? Or
>> is there a guarantee that they won't? Generally such structures
>> belong in the public interface, guaranteeing forward compatibility
>> even if Linux decided to change / extend theirs (at which point
>> consuming code there would need to do translation, but maybe using
>> a Xen-defined struct [plus translation in Linux] right away would
>> be best).
> 
> I saw Ard has helped to answer this question in his email.  As Ard
> said, the general way is to rely on Linux EFI stub to allocate the
> data structure for MEMRESERVE configuration table.
> 
> Given Xen uses pseudo EFI booting (the ACPI table is passed via DT), in
> short term I don't think Xen can support Linux EFI stub, so we need to
> maintain this structure in Xen as well.
> 
> This structure eventually will not change frequently, so I assume
> later we will have little effort for maintainence it.

"Will not change frequently" isn't enough. Imo there needs to be a
public interface structure in Xen and translation code in Linux.
That's the only way the consuming code in Linux can remain (largely)
independent of changes to the structure in Linux (i.e. changes there
can be expected to be accompanied by updating of this code, perhaps
simply in order to keep things building).

Jan

Reply via email to