Skip to content

doc/riscv: detail PV console input path - #37

Merged
baptleduc merged 1 commit into
xcp-ng:mainfrom
baptleduc:docs/update-pv-console
Jul 3, 2026
Merged

baptleduc merged 1 commit into
xcp-ng:mainfrom
baptleduc:docs/update-pv-console

Conversation

@baptleduc

@baptleduc baptleduc commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Expands the input section of the RISC-V PV console sequence diagram
(doc/riscv/xen-console.puml). The previous version modeled a keystroke as a
single user -> xenconsoled hop, which hid how a character actually travels
from the physical UART to the guest input ring.

Changes

  • Add dom0 hvc0 tty and dom0 xl console participants to the diagram.
  • Replace the single-step input hop with the full path:
    • keystroke into QEMU serial (Xen owns the physical UART)
    • serial_rx() → __serial_rx(), ring buffer write, VIRQ_CONSOLE
    • VIRQ_CONSOLE event channel notifies the hardware domain
    • HYPERVISOR_console_io(CONSOLEIO_read) drains serial_rx_ring
    • char surfaces on /dev/hvc0, read by xl console stdin
    • xl console writes char to the pty slave (/dev/pts/N)
    • xenconsoled poll() → handle_tty_read() → in[] ring
  • Clarify that input uses handle_tty_read(), not handle_tty_write().
  • Correct ring-write detail: xen_wmb() + explicit in_prod publish.

Testing

Render the diagram to confirm it is valid PlantUML:

plantuml doc/riscv/xen-console.puml

Inspect the generated image; verify the input sequence reads end-to-end with
no syntax errors.

PRs dependencies

Depends of #35 which should resolved zizmor fail. Must be merge after it and after the according rebase.

Checklist

  • Check the compiled diagram
  • Reviewed internally by @olkur

@baptleduc
baptleduc requested a review from a team as a code owner June 15, 2026 09:02
@baptleduc

baptleduc commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor Author

As mentioned here #36, zizmor fail will be resolved in #35. So this PR should be merge after #35 and after the appropriate rebase.

@olkur olkur left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes itself LGTM

The input section of the console sequence diagram modeled the keystroke
flow as a direct user -> xenconsoled step, which skipped how a character
actually reaches the guest ring.

Expand it to show the whole path.

Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
@baptleduc
baptleduc force-pushed the docs/update-pv-console branch from 1e65a5e to bc8366f Compare June 25, 2026 08:42
@baptleduc
baptleduc merged commit 7c6a01b into xcp-ng:main Jul 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants