[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151005131322.GH1977@HEDWIG.INI.CMU.EDU>
Date: Mon, 5 Oct 2015 09:13:22 -0400
From: "Gabriel L. Somlo" <somlo@....edu>
To: Peter Maydell <peter.maydell@...aro.org>
Cc: Mark Rutland <mark.rutland@....com>, gregkh@...uxfoundation.org,
paul@...an.com, Kumar Gala <galak@...eaurora.org>,
Will Deacon <will.deacon@....com>, agross@...eaurora.org,
zajec5@...il.com, Hanjun Guo <hanjun.guo@...aro.org>,
Catalin Marinas <catalin.marinas@....com>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
kernelnewbies@...nelnewbies.org,
Matt Fleming <matt.fleming@...el.com>,
Laszlo Ersek <lersek@...hat.com>,
Jordan Justen <jordan.l.justen@...el.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Leif Lindholm <leif.lindholm@...aro.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Gerd Hoffmann <kraxel@...hat.com>,
QEMU Developers <qemu-devel@...gnu.org>
Subject: Re: [PATCH v3 0/4] SysFS driver for QEMU fw_cfg device
On Mon, Oct 05, 2015 at 01:50:47PM +0100, Peter Maydell wrote:
> On 5 October 2015 at 13:40, Gabriel L. Somlo <somlo@....edu> wrote:
> > In addition, Michael's comment earlier in the thread suggests that
> > even my current acpi version isn't sufficiently "orthodox" w.r.t.
> > ACPI, and I should be providing the hardware access routine as
> > an ACPI/AML routine, to avoid race conditions with the rest of ACPI,
> > and for encapsulation. I.e. it's even rude to use the fw_cfg node's
> > ACPI _CRS method (the part where I'd be treating it like a DT stand-in
> > only to query fw_cfg's hardware specifics).
>
> If you want to try to support "firmware might also be reading
> fw_cfg at the same time as the kernel" this is a (painful)
> problem regardless of how the kernel figures out whether a
> fw_cfg device is present. I had assumed that one of the design
> assumptions of this series was that firmware would only
> read the fw_cfg before booting the guest kernel and never touch
> it afterwards. If it might touch it later then letting the
> guest kernel also mess with fw_cfg seems like a really bad idea.
I don't know of any case where firmware and kernel might race each
other to access fw_cfg.
The issue AFAICT is whether it's safe (future-proof) to rely on
parsing _CRS for the fw_cfg i/o access information, or whether
such logic could be rendered obsolete by potential future updates
to fw_cfg's _CRS. If I "outsource" the fw_cfg_dump_blob_by_key()
functionality entirely to an ACPI method, my kernel driver won't
have to worry about keeping up with said future updates.
On the down-side, that means the kernel driver will be ACPI or
nothing (but I'm OK with that, at my curent level of understanding :)
Thanks,
--Gabriel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists