All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <dunlapg@umich.edu>
To: Juergen Gross <jgross@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: Patches for stable
Date: Fri, 6 Apr 2018 14:33:12 +0100	[thread overview]
Message-ID: <CAFLBxZb_5u5F6DA5G2YwDP0sXR-w8jr1bgqdZGv=ps8Qh_kxnQ@mail.gmail.com> (raw)
In-Reply-To: <3abfb150-8495-d39d-5fb2-4ce6dfee9df1@suse.com>

On Fri, Apr 6, 2018 at 2:12 PM, Juergen Gross <jgross@suse.com> wrote:
> On 06/04/18 13:13, George Dunlap wrote:
>> On Fri, Apr 6, 2018 at 11:57 AM, Juergen Gross <jgross@suse.com> wrote:
>>> On 06/04/18 12:07, George Dunlap wrote:
>>>> On Fri, Apr 6, 2018 at 11:02 AM, Juergen Gross <jgross@suse.com> wrote:
>>>>> On 06/04/18 11:49, George Dunlap wrote:
>>>>>> On Thu, Apr 5, 2018 at 7:33 PM, Boris Ostrovsky
>>>>>> <boris.ostrovsky@oracle.com> wrote:
>>>>>>> On 04/05/2018 01:11 PM, Juergen Gross wrote:
>>>>>>>> On 05/04/18 16:56, George Dunlap wrote:
>>>>>>>>> On Thu, Apr 5, 2018 at 3:09 PM, Juergen Gross <jgross@suse.com> wrote:
>>>>>>>>>> On 05/04/18 15:42, George Dunlap wrote:
>>>>>>>>>>> On Thu, Apr 5, 2018 at 2:06 PM, Juergen Gross <jgross@suse.com> wrote:
>>>>>>>>>>>> On 05/04/18 15:00, Boris Ostrovsky wrote:
>>>>>>>>>>>>> On 04/05/2018 08:19 AM, Juergen Gross wrote:
>>>>>>>>>>>>>> On 05/04/18 12:06, George Dunlap wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Aren't there flags in the binary somewhere that could tell the
>>>>>>>>>>>>>>> toolstack / Xen whether the kernel in question needs the RSDP table in
>>>>>>>>>>>>>>> lowmem, or whether it can be put higher?
>>>>>>>>>>>>>> Not really. Analyzing the binary whether it accesses the rsdp_addr in
>>>>>>>>>>>>>> the start_info isn't the way to go, IMO.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I've sent a patch to xen-devel adding a quirk flag to the domain's
>>>>>>>>>>>>>> config to enable the admin special casing such an "old" kernel.
>>>>>>>>>>>>> Can we backport latest struct hvm_start_info changes (which bumped
>>>>>>>>>>>>> interface version) to 4.11 and pass RSDP only for versions >=1?
>>>>>>>>>>>> And this would help how?
>>>>>>>>>>>>
>>>>>>>>>>>> RSDP address is passed today, the kernel just doesn't read it. And
>>>>>>>>>>>> how should Xen know which interface version the kernel is supporting?
>>>>>>>>>>>> And Xen needs to know that in advance in order to place the RSDP in
>>>>>>>>>>>> low memory in case the kernel isn't reading the RSDP address from
>>>>>>>>>>>> start_info.
>>>>>>>>>>> But the kernel image has ELF notes, right?  You can put one that
>>>>>>>>>>> indicates that this binary *does* know how to read the RSDP from the
>>>>>>>>>>> start_info, and if you don't find that, put it in lowmem.
>>>>>>>>>> Sow you would hurt BSD which does read the RSDP address correctly but
>>>>>>>>>> (today) has no such ELF note.
>>>>>>>
>>>>>>>
>>>>>>> This can be predicated on
>>>>>>>     ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS,       .asciz "linux")
>>>>>>>
>>>>>>> BSD will behave as it does now. For linux we could add feature flag (or
>>>>>>> errata flag). Unfortunately I don't see a way to extract major.minor
>>>>>>> from the headers, otherwise we could use that.
>>>>>>
>>>>>> OTOH, one advantage of having a separate elfnote, rather than gating
>>>>>> it on Linux version, is that if a distro wanted to, they could do
>>>>>> their own backport to (say) Linux 4.15 and reap the advantages.
>>>>>
>>>>> Hmm, Linux kernel has already an elfnote with the guest version. It is
>>>>> set to "2.6". What about writing the actual kernel version into that
>>>>> note and assume everything != "2.6" to support a high RSDP address?
>>>>
>>>> Why do you think it's 2.6 in the first place?  Because there are
>>>> user-space tools that depend on the kernel version being equal to
>>>> "2.6" which would break if that were changed.
>>>
>>> Can you give me a hint where this would be? The elfnote is being fed
>>> into elf_dom_parms->guest_ver. I couldn't find any reference to that
>>> other than setting it.
>>>
>>> The other reference I could find is the readnotes utility. In the Xen
>>> tree I couldn't find any tool using the output of that.
>>>
>>>> *This* is the degree to which the Linux community tries to prevent
>>>> breaking existing systems -- because of a clear bug in userspace
>>>> tooling, they've kept the advertized kernel version the same for the
>>>> better part of a decade.
>>>
>>> You are aware of the fact I'm speaking of a Xen-specific elfnote?
>>
>> No I wasn't.
>>
>> FWIW I think taking "I have set the kernel version correctly" to mean
>> "I know to read the address of the RSDP table from the start_info
>> page" isn't a very good idea.  For one, it's fragile: someone may not
>> realize that the one implies the other.  Secondly, it may turn out
>> that there's a reason it's been kept at "2.6", and then we'd have to
>> revert the one change and make a new elfnote anyway.
>
> Hmm, good point.
>
> So its time for a new XENFEAT_ value then? This would be the least
> intrusive way to add such a flag. Something like
> XENFEAT_linux_high_rsdp_address_okay ?

That sounds reasonable to me.  I'd personally make it something like
"reads_rsdp_from_start_info" or something, but the name doesn't matter
to me as much. :-)

The other option would be to introduce a "max_pvh_interface_supported"
or something.  If it's not present (and it's a Linux kernel), default
it to '0', and have that mean "RSDP must be under 1MiB".

That will allow us elbow-room in the future if we want to make other
breaking changes like this, without needing to keep a separate flag
around for each one indefinitely.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-04-06 13:33 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 10:38 Patches for stable Juergen Gross
2018-04-04 14:27 ` Greg KH
2018-04-04 14:27 ` Greg KH
2018-04-04 14:30   ` Juergen Gross
2018-04-04 14:46     ` Greg KH
2018-04-04 15:12       ` Juergen Gross
2018-04-04 15:12       ` Juergen Gross
2018-04-04 15:42         ` Greg KH
2018-04-04 16:32           ` Juergen Gross
2018-04-04 16:32           ` Juergen Gross
2018-04-05  6:33             ` Greg KH
2018-04-05  7:02               ` Juergen Gross
2018-04-05  7:14                 ` Greg KH
2018-04-05  7:14                 ` Greg KH
2018-04-05  8:00                   ` Juergen Gross
2018-04-05  8:00                   ` [Xen-devel] " Juergen Gross
2018-04-05 10:06                     ` George Dunlap
2018-04-05 10:06                     ` [Xen-devel] " George Dunlap
2018-04-05 10:15                       ` George Dunlap
2018-04-05 10:15                       ` [Xen-devel] " George Dunlap
2018-04-05 12:19                       ` Juergen Gross
2018-04-05 12:19                       ` [Xen-devel] " Juergen Gross
2018-04-05 13:00                         ` Boris Ostrovsky
2018-04-05 13:00                         ` [Xen-devel] " Boris Ostrovsky
2018-04-05 13:06                           ` Juergen Gross
2018-04-05 13:06                           ` [Xen-devel] " Juergen Gross
2018-04-05 13:42                             ` George Dunlap
2018-04-05 13:42                             ` [Xen-devel] " George Dunlap
2018-04-05 14:09                               ` Juergen Gross
2018-04-05 14:56                                 ` George Dunlap
2018-04-05 14:56                                 ` [Xen-devel] " George Dunlap
2018-04-05 17:11                                   ` Juergen Gross
2018-04-05 18:33                                     ` Boris Ostrovsky
2018-04-06  8:00                                       ` Juergen Gross
2018-04-06  9:38                                         ` George Dunlap
2018-04-06  9:49                                       ` George Dunlap
2018-04-06 10:02                                         ` Juergen Gross
2018-04-06 10:07                                           ` George Dunlap
2018-04-06 10:57                                             ` Juergen Gross
2018-04-06 11:13                                               ` George Dunlap
2018-04-06 13:12                                                 ` Juergen Gross
2018-04-06 13:33                                                   ` George Dunlap [this message]
2018-04-06 14:10                                                     ` Boris Ostrovsky
2018-04-06 15:15                                                       ` Juergen Gross
2018-04-06 10:13                                     ` George Dunlap
2018-04-06 10:44                                       ` Juergen Gross
2018-04-05 14:09                               ` Juergen Gross
2018-04-05 20:20                 ` Thomas Backlund
2018-04-05 20:20                 ` Thomas Backlund
2018-04-05  7:02               ` Juergen Gross
2018-04-05  6:33             ` Greg KH
2018-04-04 15:42         ` Greg KH
2018-04-04 14:46     ` Greg KH
2018-04-04 14:30   ` Juergen Gross
2018-04-04 10:38 Juergen Gross

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='CAFLBxZb_5u5F6DA5G2YwDP0sXR-w8jr1bgqdZGv=ps8Qh_kxnQ@mail.gmail.com' \
    --to=dunlapg@umich.edu \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.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.