From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Alejandro Vallejo <alejandro.vallejo@cloud.com>
Cc: xen-devel@lists.xenproject.org,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [PATCH] tools: Remove support for qemu-trad's battery reporting
Date: Wed, 26 Mar 2025 14:59:20 +0100 [thread overview]
Message-ID: <Z-QIOJax7of-y79f@mail-itl> (raw)
In-Reply-To: <20250325174110.467-1-alejandro.vallejo@cloud.com>
[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]
On Tue, Mar 25, 2025 at 05:41:10PM +0000, Alejandro Vallejo wrote:
> The way this undocumented feature works is via qemu-trad (who nobody
> uses anymore), by intercepting 3 magic PIOs. 0x88 is one of them, and
> it's probed by hvmloader as a means of detecting support for this (so,
> on qemu-upstream this check always fails). If hvmloader detects the
> feature, it appends an SSDT with AML inherited from some laptop ~20y
> ago. QEMU then communicates with a userspace daemon (xenpmd) via an
> undocumented xenstore key ("refreshbatterystatus") in order to report
> battery levels.
>
> Seeing how no one uses, mantains or cares about qemu-trad anymore, rip
> it all out. The hvmloader check, the SSDT generation logic and xenpmd.
Oh, I didn't know something like this existed!
We needed a feature like this, and solved it via extra kernel module +
PV-like interface to feed it with data from dom0:
https://github.com/QubesOS/qubes-dummy-psu/
I guess it doesn't make much sense for me to resurrect the old interface
and bring it to QEMU upstream, as I need the battery info in PVH too.
So, I'm fine with removing it as is.
> Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
> ---
> If this feature is truly wanted, it must be implemented in
> qemu-upstream. Ideally in a MUCH less roundabout way. And definitely
> without involving xenstore.
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-03-26 13:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 17:41 [PATCH] tools: Remove support for qemu-trad's battery reporting Alejandro Vallejo
2025-03-26 13:59 ` Marek Marczykowski-Górecki [this message]
2025-03-26 15:44 ` Alejandro Vallejo
2025-03-26 17:35 ` Roger Pau Monné
2025-03-26 14:05 ` Andrew Cooper
2025-03-26 14:40 ` Jürgen Groß
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=Z-QIOJax7of-y79f@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=alejandro.vallejo@cloud.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@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 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.