Page MenuHomeFreeBSD

Xen: Detect Extended Destination ID support
Needs ReviewPublic

Authored by cperciva on Sun, Feb 22, 4:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 1, 2:49 PM
Unknown Object (File)
Fri, Feb 27, 2:22 AM
Unknown Object (File)
Thu, Feb 26, 3:12 PM
Unknown Object (File)
Thu, Feb 26, 1:30 PM
Unknown Object (File)
Thu, Feb 26, 9:59 AM
Unknown Object (File)
Thu, Feb 26, 8:26 AM
Unknown Object (File)
Thu, Feb 26, 7:04 AM
Unknown Object (File)
Thu, Feb 26, 12:32 AM
Subscribers

Details

Reviewers
royger
Summary

Xen advertises support for the Extended Destination ID standard via
bit 5 (aka XEN_HVM_CPUID_EXT_DEST_ID) of the value returned in the
EAX register when Xen features are queried via CPUID.

MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70927
Build 67810: arc lint + arc unit

Event Timeline

Only enable if ext_dest_id is set to -1.

I think I'm missing the previous changes that introduce the support for KVM, as those haven't landed in the git repository yet. FWIW, while the CPUID has been reserved on Xen, the implementation is not done, so there's no way to test it on Xen.

sys/x86/x86/msi.c
398

Why are you doing the detection in MSI init code? The usage of the extended destination ID is not limited to MSI, and can also be used with IO-APIC RTEs. It should likely be done in a more generic place, maybe at interrupt initialization? So that it can be used by the IO-APIC.

I think I'm missing the previous changes that introduce the support for KVM, as those haven't landed in the git repository yet. FWIW, while the CPUID has been reserved on Xen, the implementation is not done, so there's no way to test it on Xen.

The KVM detection is just before this in the stack: https://reviews.freebsd.org/D55427 . And the code which uses ext_dest_id is in https://reviews.freebsd.org/D55426.

sys/x86/x86/msi.c
398

I'm doing it here because this is the file where I needed to use it (see the earlier patch).

But you're right that I forgot about IO-APIC RTEs. I need to understand our code for those better...