From: "Ard Biesheuvel" <ard.biesheuvel@arm.com>
To: "Andrew Jones" <drjones@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: devel@edk2.groups.io, lersek@redhat.com,
Eric Auger <eric.auger@redhat.com>
Subject: Re: [edk2-devel] [PATCH] ArmVirtPkg/NorFlashQemuLib: disable NOR flash DT nodes upon discovery
Date: Wed, 24 Jun 2020 15:48:46 +0200 [thread overview]
Message-ID: <c6589479-2aaf-a939-5019-29f70a156f06@arm.com> (raw)
In-Reply-To: <20200624134154.isbcqvscs7eidbd4@kamzik.brq.redhat.com>
On 6/24/20 3:41 PM, Andrew Jones wrote:
> On Wed, Jun 24, 2020 at 03:02:49PM +0200, Philippe Mathieu-Daudé wrote:
>> On 6/24/20 1:43 PM, Ard Biesheuvel wrote:
...
>>> I wasn't aware that we even expose the flash in the DSDT. In any case,
>>> no driver exists in Linux today that claims the LNRO0015 _HID, and so I
>>> agree we should simply remove it entirely.
>>>
>>> However, I am no longer able to contribute to QEMU, so I was hoping you
>>> or Phil could take the action?
>>
>> I try to stay as far as possible from ACPI, but here it seems
>> fair I assign myself to this (except if Drew/Eric prefer to
>> do it, of course!).
>
> I don't mind doing it. IIUC, all we need to do is remove the flash device
> from the DSDT to "hide" it from the guest. Of course we'll need some
> compat code too in order to only do this for machine types 5.1 and later,
> and that means that running guest kernels which want to bind the flash on
> 5.0 and older machine types will still have the problem.
>
Do you think that is really necessary? LNRO0015 never had a driver in
Linux to begin with, and I doubt other ACPI capable arm64 OSes would be
any different.
> Also, it seems a bit odd to hide hardware from the guest OS. Wouldn't it
> be better to somehow flag that the hardare may be in use by firmware,
> and therefore is only safe to use if runtime services are not used? I'm
> not sure ACPI supports that for table entries like these, but maybe some
> _STA value indicates something like it. I'll take a look at the spec.
>
We could do either, but a _STA indicating that the device is not present
or not ready amounts to the same afaik. Ultimately, the OS could still
access the physical range if it wanted to (e.g., via /dev/mem), so not
exposing it in the first place seems more robust to me.
next prev parent reply other threads:[~2020-06-24 13:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 17:57 [PATCH] ArmVirtPkg/NorFlashQemuLib: disable NOR flash DT nodes upon discovery Ard Biesheuvel
2020-06-23 20:41 ` Laszlo Ersek
2020-06-24 7:19 ` Ard Biesheuvel
2020-06-24 9:00 ` Laszlo Ersek
2020-06-24 9:35 ` Philippe Mathieu-Daudé
2020-06-24 11:20 ` [edk2-devel] " Laszlo Ersek
2020-06-24 11:43 ` Ard Biesheuvel
2020-06-24 13:02 ` Philippe Mathieu-Daudé
2020-06-24 13:41 ` Andrew Jones
2020-06-24 13:45 ` Philippe Mathieu-Daudé
2020-06-24 13:48 ` Ard Biesheuvel [this message]
2020-06-24 14:37 ` Andrew Jones
2020-06-24 18:43 ` Laszlo Ersek
2020-06-24 18:46 ` Laszlo Ersek
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-list 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=c6589479-2aaf-a939-5019-29f70a156f06@arm.com \
--to=devel@edk2.groups.io \
/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