[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH for 4.13] x86/shim: don't reserve 640k - 1M region in E820
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- From: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>
- Date: Tue, 29 Oct 2019 10:17:07 +0000
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=sergey.dyasli@xxxxxxxxxx; spf=Pass smtp.mailfrom=sergey.dyasli@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
- Autocrypt: addr=sergey.dyasli@xxxxxxxxxx; keydata= mQINBFtMVHEBEADc/hZcLexrB6vGTdGqEUsYZkFGQh6Z1OO7bCtM1go1RugSMeq9tkFHQSOc 9c7W9NVQqLgn8eefikIHxgic6tGgKoIQKcPuSsnqGao2YabsTSSoeatvmO5HkR0xGaUd+M6j iqv3cD7/WL602NhphT4ucKXCz93w0TeoJ3gleLuILxmzg1gDhKtMdkZv6TngWpKgIMRfoyHQ jsVzPbTTjJl/a9Cw99vuhFuEJfzbLA80hCwhoPM+ZQGFDcG4c25GQGQFFatpbQUhNirWW5b1 r2yVOziSJsvfTLnyzEizCvU+r/Ek2Kh0eAsRFr35m2X+X3CfxKrZcePxzAf273p4nc3YIK9h cwa4ZpDksun0E2l0pIxg/pPBXTNbH+OX1I+BfWDZWlPiPxgkiKdgYPS2qv53dJ+k9x6HkuCy i61IcjXRtVgL5nPGakyOFQ+07S4HIJlw98a6NrptWOFkxDt38x87mSM7aSWp1kjyGqQTGoKB VEx5BdRS5gFdYGCQFc8KVGEWPPGdeYx9Pj2wTaweKV0qZT69lmf/P5149Pc81SRhuc0hUX9K DnYBa1iSHaDjifMsNXKzj8Y8zVm+J6DZo/D10IUxMuExvbPa/8nsertWxoDSbWcF1cyvZp9X tUEukuPoTKO4Vzg7xVNj9pbK9GPxSYcaf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MkKzTbeFtHKRmUUAuhE0LBXP8Wc+5W7b3WOf2SO8JMR 4TqDZ0K06s66S5fOTW0h56iCCxTsAnRvM/tA4SERyRoFs/iTqJzboskZY0yKeWV4/IQxfOyC YwdU3//zANM1ZpqeE/8lnW/kx+fyzVyEioLSwkjDvdG++4GQ5r6PHQ7BbdEWhA==
- Cc: Juergen Gross <jgross@xxxxxxxx>, "sergey.dyasli@xxxxxxxxxx >> Sergey Dyasli" <sergey.dyasli@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxx
- Delivery-date: Tue, 29 Oct 2019 10:17:43 +0000
- Ironport-sdr: Y2/l8Tx+rGNkmdM8iTEmfAyV5/V5eLk9yqwKZefEJbq7eacE9g1rxHE3FqSg6jB6C12yjNKLRF h+8ahOV0yCZ8bgmNq+Po5GACGb5WLb+LtnSp35wGcrdvA5MDbZmjBf5bGaXWiTVo5QV+DSNqbw 2py2bS07OKv/n3ikvwgC5tN4wIo0LyC7iNe6j4h6W2DL+vatTelP4U4TnMPoX7ByEMQnkCqAcL 4MltGwiX781zza9GH7W6C16pj+NHYikoCghSWA2QmhVFvWwuAMkRJaD/61iMmO07bEyP77VAhS 5Eo=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Openpgp: preference=signencrypt
On 28/10/2019 11:33, Andrew Cooper wrote:
> On 28/10/2019 11:30, Jan Beulich wrote:
>> On 28.10.2019 12:15, Andrew Cooper wrote:
>>> On 28/10/2019 11:11, Jan Beulich wrote:
>>>> On 28.10.2019 12:08, Sergey Dyasli wrote:
>>>>> On 28/10/2019 09:06, Jan Beulich wrote:
>>>>>> On 28.10.2019 09:56, Sergey Dyasli wrote:
>>>>>>> Converting a guest from PV to PV-in-PVH makes the guest to have 384k
>>>>>>> less memory, which may confuse guest's balloon driver. This happens
>>>>>>> because Xen unconditionally reserves 640k - 1M region in E820 despite
>>>>>>> the fact that it's really a usable RAM in PVH boot mode.
>>>>>> This is a PVH property according to your description and according
>>>>>> to my understanding. Why would you then ...
>>>>>>
>>>>>>> Fix this by skipping the region type change for pv-shim mode.
>>>>>> ... alter behavior for shim mode only, rather than when booted in
>>>>>> PVH mode in general?
>>>>> This is just me being cautious.
>>>>>
>>>>> My original email does have this text after ---
>>>>> "The condition can be relaxed to be just !pvh_boot if there are no
>>>>> plans to support VGA MMIO / ROMs for PVH guests."
>>>> I doubt emulated ones are intended to be supported, but of
>>>> course a graphics card could be passed through. Iirc passthrough
>>>> is a pending work item still anyway for PVH, so dealing with the
>>>> case right now may not even be necessary.
>>> The bug is Xen blindly presuming that a missing hole "must be a firmware
>>> bug".
>>>
>>> I can believe that there may have been systems decades ago which got
>>> this wrong, but tbh I doubt it applies to 64bit-capable systems,
>>> considering how standardised things were by then.
>>>
>>> I'd just delete this whole piece of logic and call it done.
>> Well, I could see use being less aggressive here, but firmware (if
>> there is firmware, i.e. everything except PVH) claiming there to
>> be RAM immediately below the 1M boundary is a pretty good sign of
>> something being wrong. There _ought_ to be ROM at that address.
>> Otoh there were even ways in older chipsets to make RAM appear at
>> address ranges not used by option ROMs, so the logic we currently
>> have goes too far potentially even on bare metal.
>>
>> So while I'm all for relaxing, I don't think I can support
>> outright deletion.
>
> For now, how about cpu_has_hypervisor ?
>
> Whatever the virtual environment, we should trust the provided memory map.
Unfortunately, this plan has failed: init_e820() is called way before
early_cpu_init() and testing cpu_has_hypervisor is meaningless there.
I guess I'll go for !pvh_boot check for now.
--
Thanks,
Sergey
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|