From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: maobibo <maobibo@loongson.cn>,
loongarch@lists.linux.dev, qemu-devel@nongnu.org,
xry111@xry111.site
Subject: Re: qemu direct kernel boot on LoongArch
Date: Thu, 5 Sep 2024 18:03:03 +0200 [thread overview]
Message-ID: <7311f2fa-2353-48ad-85f5-5eae1f6cb65f@t-8ch.de> (raw)
In-Reply-To: <CAHmME9pjokr=ahBbJA9Ljf8jjOyfyRAk0Qo4YeDYO_gs78GGzg@mail.gmail.com>
On 2024-09-05 17:18:07+0000, Jason A. Donenfeld wrote:
> On Thu, Sep 5, 2024 at 5:16 PM Thomas Weißschuh <thomas@t-8ch.de> wrote:
> >
> > On 2024-09-05 17:07:22+0000, Jason A. Donenfeld wrote:
> > > On Thu, Sep 5, 2024 at 5:05 PM Thomas Weißschuh <thomas@t-8ch.de> wrote:
> > > >
> > > > On 2024-09-05 16:53:55+0000, Jason A. Donenfeld wrote:
> > > > > On Thu, Sep 05, 2024 at 07:25:05AM +0200, Thomas Weißschuh wrote:
> > > > > > On 2024-09-05 06:04:12+0000, Jason A. Donenfeld wrote:
> > > > > > > On Thu, Sep 5, 2024 at 5:45 AM maobibo <maobibo@loongson.cn> wrote:
> > > > > > > >
> > > > > > > > Jason,
> > > > > > > >
> > > > > > > > With the latest qemu 9.1 version, elf format booting is supported.
> > > > > > >
> > > > > > > Thanks, I just figured this out too, about 4 minutes ago. Excellent.
> > > > > > > And the 1G minimum ram limit is gone too.
> > > > > > >
> > > > > > > Now working on how to trigger resets.
> > > > > >
> > > > > > With "reset" do you mean normal (non-panic) system shutdown/poweroff?
> > > > > > Since QEMU 9.1 and a recent kernel you can use the pvpanic device for
> > > > > > that in a cross-architecture way.
> > > > >
> > > > > What I mean is that I need for userspace calling `reboot(RB_AUTOBOOT);`
> > > > > to actually result in QEMU being told to reboot the system. Sounds like
> > > > > that's not possible (yet?) in 9.1?
> > > >
> > > > With reboot(RB_POWER_OFF) this is indeed the exact usecase for pvpanic
> > >
> > > I'm actually using reboot(RB_AUTOBOOT) wth QEMU's -no-reboot, because
> > > that tends to be far more compatible with a greater number of
> > > platforms, for example, x86 without acpi. Shucks.
> >
> > You can check that both QEMU and the kernel support pvpanic shutdown
> > through sysfs and if so use reboot(RB_POWER_OFF); and
> > reboot(RB_AUTOBOOT) otherwise.
>
> I guess. But the whole idea is to bloat the code as little as possible
> and use one interface for everything. Pushing that all up into
> userspace is pretty icky.
If it works through ACPI everywhere then sure.
> It sounds like LoongArch already supports this via ACPI GED, but
> there's some plumbing that needs to be done still. So maybe I'll just
> wait for that.
Also sounds reasonable.
> Meanwhile, any idea about adding a second serial to the platform? I've
> been futzing with it for a bit now to no avail.
No idea, sorry.
next prev parent reply other threads:[~2024-09-05 16:04 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1738d60a-df3a-4102-b1da-d16a29b6e06a@t-8ch.de>
2023-10-10 1:12 ` qemu direct kernel boot on LoongArch maobibo
2024-09-05 3:12 ` Jason A. Donenfeld
2024-09-05 3:45 ` maobibo
2024-09-05 4:04 ` Jason A. Donenfeld
2024-09-05 5:25 ` Thomas Weißschuh
2024-09-05 6:11 ` maobibo
2024-09-05 14:54 ` Jason A. Donenfeld
2024-09-05 15:49 ` Jason A. Donenfeld
2024-09-06 1:09 ` maobibo
2024-09-05 14:53 ` Jason A. Donenfeld
2024-09-05 15:05 ` Thomas Weißschuh
2024-09-05 15:07 ` Jason A. Donenfeld
2024-09-05 15:16 ` Thomas Weißschuh
2024-09-05 15:18 ` Jason A. Donenfeld
2024-09-05 16:03 ` Thomas Weißschuh [this message]
2024-09-06 1:14 ` maobibo
2024-09-06 4:04 ` Jason A. Donenfeld
2024-09-06 4:48 ` Jason A. Donenfeld
2024-09-06 4:49 ` [PATCH] hw/loongarch: virt: support up to 4 serial ports Jason A. Donenfeld
2024-09-06 8:34 ` maobibo
2024-09-06 14:30 ` Jason A. Donenfeld
2024-09-06 14:31 ` [PATCH v2] " Jason A. Donenfeld
2024-09-07 3:37 ` maobibo
2024-09-07 14:44 ` Jason A. Donenfeld
2024-09-07 14:57 ` Jason A. Donenfeld
2024-09-07 14:34 ` [PATCH v3] " Jason A. Donenfeld
2024-09-09 1:22 ` maobibo
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=7311f2fa-2353-48ad-85f5-5eae1f6cb65f@t-8ch.de \
--to=thomas@t-8ch.de \
--cc=Jason@zx2c4.com \
--cc=loongarch@lists.linux.dev \
--cc=maobibo@loongson.cn \
--cc=qemu-devel@nongnu.org \
--cc=xry111@xry111.site \
/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;
as well as URLs for NNTP newsgroup(s).