mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Beulich <JBeulich@suse.com>, Maran Wilson <maran.wilson@oracle.com>
Cc: andrew.cooper3@citrix.com, roger.pau@citrix.com,
	hch@infradead.org, x86@kernel.org, tglx@linutronix.de,
	xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com,
	mingo@redhat.com, rkrcmar@redhat.com,
	Juergen Gross <jgross@suse.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com
Subject: Re: [RFC PATCH v2 1/2] xen/pvh: Add memory map pointer to hvm_start_info struct
Date: Tue, 12 Dec 2017 10:54:22 +0100	[thread overview]
Message-ID: <93cafa4e-9053-119e-b4e2-1a1500539409@redhat.com> (raw)
In-Reply-To: <5A2F9C260200007800196A92@prv-mh.provo.novell.com>

On 12/12/2017 09:06, Jan Beulich wrote:
>>>> On 11.12.17 at 22:59, <pbonzini@redhat.com> wrote:
>> On 08/12/2017 09:49, Jan Beulich wrote:
>>>> + * The layout of each entry in the memory map table is as follows and no
>>>> + * padding is used between entries in the array:
>>>> + *
>>>> + *  0 +----------------+
>>>> + *    | addr           | Base address
>>>> + *  8 +----------------+
>>>> + *    | size           | Size of mapping
>>>> + * 16 +----------------+
>>>> + *    | type           | E820_TYPE_xxx
>>>> + * 20 +----------------|
>>> I'm not convinced of re-using E820 types here. I can see that this
>>> might ease the consumption in Linux, but I don't think there should
>>> be any connection to x86 aspects here - the data being supplied is
>>> x86-agnostic, and Linux'es placement of the header is also making
>>> no connection to x86 (oddly enough, the current placement in the
>>> Xen tree does, for a reason which escapes me).
>>
>> FWIW, e820 types are now part of the ACPI standard.  So using them is
>> not necessarily related to x86, and reasonably x86-agnostic.
> 
> Sort of - the description of it starts with "This interface is used in
> real mode only on IA-PC-based systems ..."

Note I said the e820 *types*.  While the interface is there for PC
compatibility, the ACPI address range types (AddressRangeMemory,
AddressRangeReserved, AddressRangeACPI, etc.) are exactly the e820 types.

> But it being there is useful in another way: It shows that there's
> an optional field making the full structure 64-bit aligned again. (It
> at the same time shows - I admit I had forgotten about this aspect -
> that the structure size isn't fixed in the first place, so consumers
> have to convert [truncate/extend] the output to their internal
> representation anyway, and hence there's even less of a reason
> to tie the proposed structure's layout to the E820 one.)

My point was that the e820 types are okay to use in an
architecture-agnostic way in my opinion.  The layout only matters so
much, as there aren't many ways to encode a memory map (note I do agree
about that alignment dword).

Paolo

  reply	other threads:[~2017-12-12  9:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 22:45 [RFC PATCH v2 0/2] KVM: x86: Allow Qemu/KVM to use PVH entry point Maran Wilson
2017-12-07 22:45 ` [RFC PATCH v2 1/2] xen/pvh: Add memory map pointer to hvm_start_info struct Maran Wilson
2017-12-08  8:49   ` Jan Beulich
2017-12-08 19:05     ` Maran Wilson
2017-12-11  9:25       ` Jan Beulich
2017-12-11 21:59     ` Paolo Bonzini
2017-12-12  8:06       ` Jan Beulich
2017-12-12  9:54         ` Paolo Bonzini [this message]
2017-12-07 22:45 ` [RFC PATCH v2 2/2] KVM: x86: Allow Qemu/KVM to use PVH entry point Maran Wilson
2017-12-08 19:21 ` [RFC PATCH v2 0/2] " Boris Ostrovsky

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=93cafa4e-9053-119e-b4e2-1a1500539409@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=hch@infradead.org \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maran.wilson@oracle.com \
    --cc=mingo@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=roger.pau@citrix.com \
    --cc=tglx@linutronix.de \
    --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®