Skip to content

Conversation

@liulog
Copy link
Contributor

@liulog liulog commented Apr 16, 2025

This Pull Request contains content below:

@enkerewpo enkerewpo requested a review from Copilot April 16, 2025 13:36
@enkerewpo enkerewpo added feature New feature or request riscv64 labels Apr 16, 2025
@enkerewpo enkerewpo added this to the hvisor-v0.1.2 milestone Apr 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR focuses on improving RISC-V SBI and IPI handling by updating the supported SBI extensions, enhancing the software interrupt (IPI) handler to process multiple events, and adding a new IPI event for sending software interrupts.

  • Introduces a new constant IPI_EVENT_SEND_IPI and its corresponding branch in the event handler.
  • Adjusts UART functions to use renamed SBI console I/O functions.
  • Updates various RISC-V related modules to use the new riscv_h dependency and improves logging and trap handling.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/event.rs Added new IPI event definition and branch in check_events.
src/device/uart/mod.rs Re-export updated SBI console I/O functions with new naming.
src/device/irqchip/plic/vplic.rs Updated calls from riscv to riscv_h for interrupt handling.
src/device/irqchip/plic/mod.rs Switched logging from warn to debug/info and updated hvip usage.
src/device/irqchip/aia/aplic.rs Removed unused imports.
src/arch/riscv64/trap.rs Refactored trap vector installation and updated exception handling.
src/arch/riscv64/ipi.rs Added the arch_ipi_handler function to set a software interrupt flag.
Cargo.toml Replaced the old riscv dependency with versioned riscv and riscv_h.

src/event.rs Outdated
}
#[cfg(target_arch = "riscv64")]
Some(IPI_EVENT_SEND_IPI) => {
// This event is different form events above, it is used to inject software interrupt.
Copy link

Copilot AI Apr 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Typo in the comment on line 148: consider replacing 'form' with 'from'.

Suggested change
// This event is different form events above, it is used to inject software interrupt.
// This event is different from events above, it is used to inject software interrupt.

Copilot uses AI. Check for mistakes.
@enkerewpo enkerewpo merged commit c8becd7 into syswonder:dev Apr 19, 2025
12 checks passed
@liulog liulog deleted the sbi branch September 12, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request riscv64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants