Skip to content

Conversation

@aarkegz
Copy link
Contributor

@aarkegz aarkegz commented Apr 22, 2025

No description provided.

@aarkegz aarkegz requested a review from hky1999 April 22, 2025 06:05
@aarkegz aarkegz self-assigned this Apr 22, 2025
@aarkegz aarkegz changed the title Intercept qemu exit port to achieve grace exit Intercept qemu exit port to achieve grace VM shutdown Apr 22, 2025
@aarkegz aarkegz requested a review from Copilot April 22, 2025 06:11
Copy link

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 refactors the handling of I/O port interception by introducing dedicated QEMU exit port constants for a graceful VM shutdown and removing the duplicate constant definitions from the VCPU exit handling logic. Key changes include:

  • Adding new constants QEMU_EXIT_PORT and QEMU_EXIT_MAGIC at the top of the file.
  • Updating the I/O bitmap setup to intercept the QEMU exit port.
  • Removing duplicate QEMU exit definitions in the VCPU exit handling section.
Comments suppressed due to low confidence (1)

src/vmx/vcpu.rs:468

  • Consider adding a brief comment explaining the intended use of QEMU_EXIT_PORT and QEMU_EXIT_MAGIC to clarify their role in achieving a graceful VM shutdown.
QEMU_EXIT_PORT..QEMU_EXIT_PORT + 1, // QEMU exit port

@aarkegz aarkegz merged commit 2cc4234 into master Apr 22, 2025
6 checks passed
@aarkegz aarkegz deleted the grace_vm_shutdown branch June 12, 2025 14:14
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