Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle APIC EOI message for MSHV #5681

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Handle APIC EOI message for MSHV #5681

merged 1 commit into from
Aug 22, 2023

Conversation

liuw
Copy link
Member

@liuw liuw commented Aug 15, 2023

It is discovered in our testing that MSHV didn't handle this message.

In general I don't think Cloud Hypervisor handles level-triggered interrupts well. KVM code is missing resamplefd code. That's something to be fixed later.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
@liuw liuw requested a review from a team as a code owner August 15, 2023 20:15
@@ -562,6 +562,18 @@ impl cpu::Vcpu for MshvVcpu {
debug!("Exception Info {:?}", { info.exception_vector });
Ok(cpu::VmExit::Ignore)
}
hv_message_type_HVMSG_X64_APIC_EOI => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Anyway we get an exit here? I think we are not.

Copy link
Contributor

Choose a reason for hiding this comment

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

During our testing we encountered this exit here while passing through a PCI device to guest, disabling MSIX support.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can only get this if we enable legacy PCI INTx support. It uses level-triggered interrupt, which requires explicitly acking the vector.

Copy link
Member

Choose a reason for hiding this comment

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

We have PCI INTx support for VFIO and vfio-user devices.

@rbradford rbradford removed the request for review from a team August 20, 2023 09:34
Copy link
Member

@rbradford rbradford left a comment

Choose a reason for hiding this comment

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

You can merge this is if you like but I see lots of issues about EOI and resamplefd in the issue tracker.

@liuw liuw merged commit dbe67fc into cloud-hypervisor:main Aug 22, 2023
21 checks passed
@likebreath likebreath added bug-fix Bug fix to include in release notes mshv Affects mshv only labels Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Bug fix to include in release notes mshv Affects mshv only
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants