From: Marek Marczykowski <marmarek@invisiblethingslab.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien@xen.org>,
Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v3 1/8] serial: fake IRQ-regs context in poll handlers
Date: Tue, 13 Feb 2024 15:53:02 +0100 [thread overview]
Message-ID: <ZcuCTnMpFib4ArHW@mail-itl> (raw)
In-Reply-To: <817ceec4-ed12-4360-a6ce-f87732f62251@suse.com>
[-- Attachment #1: Type: text/plain, Size: 2065 bytes --]
On Tue, Feb 13, 2024 at 08:45:54AM +0100, Jan Beulich wrote:
> On 13.02.2024 04:43, Marek Marczykowski wrote:
> > On Mon, Feb 12, 2024 at 10:04:38AM +0100, Jan Beulich wrote:
> >> On 08.02.2024 23:00, Julien Grall wrote:
> >>> On 05/02/2024 13:27, Jan Beulich wrote:
> >>>> In preparation of dropping the register parameters from
> >>>> serial_[rt]x_interrupt() and in turn from IRQ handler functions,
> >>>> register state needs making available another way for the few key
> >>>> handlers which need it. Fake IRQ-like state.
> >>>>
> >>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> >>>> ---
> >>>> The use of guest_cpu_user_regs() in dbc_uart_poll() is inconsistent with
> >>>> other console poll functions we have, and it's unclear whether that's
> >>>> actually generally correct.
> >>>
> >>> Is it? Looking at ns16550_poll() we would pass guest_user_regs() if
> >>> run_in_exception() doesn't exist. But looking at the caller, no-on seems
> >>> to care about the 'regs'. So is this just a latent bug?
> >>
> >> What do you mean by "doesn't exist"? ns16550_poll() assumes it exists.
> >> And I can spot any use of guest_user_regs() on the respective generic
> >> or Arm-specific bug.c paths.
> >>
> >>> BTW, do you have an idea why the poll function is not run in an
> >>> exception handler?
> >>
> >> "The poll function" being which one? If you mean the one in xhci-dbc.c
> >> then that's why I had Cc-ed Marek. Moving him to To: - maybe that
> >> manages to finally catch his attention.
> >
> > TBH, I don't know. That's part of the original xue patch at
> > https://github.com/connojd/xue/blob/master/patches/xen-xue-dbgp.patch
> > and it works for me as it is.
>
> "Works" meaning what? Doesn't crash on you? Or does also provide
> sensible output in _all_ cases (i.e. including when e.g. the poll
> happens to run on an idle vCPU)?
Generally provides sensible output, for example during boot (it is using
idle vCPU then, right?).
--
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:[~2024-02-13 14:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 13:25 [PATCH v3 0/8] limit passing around of cpu_user_regs Jan Beulich
2024-02-05 13:27 ` [PATCH v3 1/8] serial: fake IRQ-regs context in poll handlers Jan Beulich
2024-02-08 22:00 ` Julien Grall
2024-02-12 9:04 ` Jan Beulich
2024-02-13 3:43 ` Marek Marczykowski
2024-02-13 7:45 ` Jan Beulich
2024-02-13 14:53 ` Marek Marczykowski [this message]
2024-02-13 15:00 ` Jan Beulich
2024-02-13 15:11 ` Marek Marczykowski
2024-02-13 15:44 ` Jan Beulich
2024-02-15 2:19 ` Marek Marczykowski
2024-02-15 8:39 ` Jan Beulich
2024-02-15 11:08 ` Marek Marczykowski
2024-02-15 8:45 ` Jan Beulich
2024-02-05 13:28 ` [PATCH v3 2/8] keyhandler: drop regs parameter from handle_keyregs() Jan Beulich
2024-02-08 22:09 ` Julien Grall
2024-02-12 9:13 ` Jan Beulich
2024-02-15 12:02 ` Julien Grall
2024-02-05 13:28 ` [PATCH v3 3/8] serial: drop serial_rx_fn's regs parameter Jan Beulich
2024-02-05 13:37 ` Andrew Cooper
2024-02-05 13:29 ` [PATCH v3 4/8] PV-shim: drop pv_console_rx()'s " Jan Beulich
2024-02-05 13:30 ` [PATCH v3 5/8] serial: drop serial_[rt]x_interrupt()'s " Jan Beulich
2024-02-05 13:39 ` Andrew Cooper
2024-02-05 13:31 ` [PATCH v3 6/8] IRQ: drop regs parameter from handler functions Jan Beulich
2024-02-05 13:31 ` [PATCH v3 7/8] x86/APIC: drop regs parameter from direct vector " Jan Beulich
2024-02-05 13:32 ` [PATCH v3 8/8] consolidate do_bug_frame() / bug_fn_t Jan Beulich
2024-02-05 13:51 ` Andrew Cooper
2024-02-05 14:02 ` Jan Beulich
2024-02-08 21:36 ` Julien Grall
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=ZcuCTnMpFib4ArHW@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=wl@xen.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.