Page MenuHomeFreeBSD

hyperv/vmbus: static assign IDT vector for hv
AbandonedPublic

Authored by howard0su_gmail.com on Feb 11 2016, 1:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 1:41 AM
Unknown Object (File)
Sat, Nov 16, 1:38 AM
Unknown Object (File)
Oct 24 2024, 3:28 PM
Unknown Object (File)
Oct 20 2024, 10:18 AM
Unknown Object (File)
Oct 20 2024, 1:09 AM
Unknown Object (File)
Oct 20 2024, 1:09 AM
Unknown Object (File)
Oct 20 2024, 1:09 AM
Unknown Object (File)
Oct 20 2024, 1:09 AM
Subscribers

Details

Summary

It is not needed to dynamic allocate idt vector. Instead,
reuse the vector of XENHVM since both cannot co-exist.

EVTCHN naming also apply to HYPERV since the interrupt is used to raise event as well.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2611
Build 2628: arc lint + arc unit

Event Timeline

howard0su_gmail.com retitled this revision from to hyperv/vmbus: static assign IDT vector for hv.
howard0su_gmail.com updated this object.
howard0su_gmail.com edited the test plan for this revision. (Show Details)
howard0su_gmail.com added a reviewer: royger.

How does this interact with D5291? AFAICT they are not compatible. In any case, IDT_EVTCHN should be renamed to IDT_HYPERVISOR.

howard0su_gmail.com edited edge metadata.

update local_apic code to mark IDT_EVTCHN is used when HYPERV is enabled.

IMHO this IDT vector needs to be renamed to something that's not Xen-specific for HyperV to use it.

IMHO this IDT vector needs to be renamed to something that's not Xen-specific for HyperV to use it.

We had a brainstorm last week, talked about the name. One funny thing is that in hyper-v, the interrupt vector is also used to service event, so we think EVTCHN seems fine :)

Shall we commit this without changing the IDT name?

Shall we commit this without changing the IDT name?

I would suggest we use IDT_HYPERVISOR as Roger mentioned.

Event Channel is a terminology in Xen's context.
On VMBus Channel, the interrupts are for both VMBus Events and VMBus Messages, so IDE_EVTCHN is a little misleading in Hyper-V's context.

howard0su_gmail.com edited edge metadata.

Rebase to master. Rename {IDT|IRQ}_EVTCHN to _HYPERVISOR

decui_microsoft.com edited edge metadata.

LGTM

sys/x86/include/segments.h
216 ↗(On Diff #14293)

We need to update the comment too :-)
It can be something like "Vector on which hypervisor interrupt is delivered"

This revision is now accepted and ready to land.Mar 13 2016, 3:10 PM

amd64/machdep.c:

#ifdef XENHVM
setidt(IDT_EVTCHN, &IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_UPL, 0);
#endif

I have considered a bit about how to handle this in a nice way. May be we need IDT_HYPERVISOR{1,2,3,4}? Define IDT_EVTCHAN as an alias to HYPERVISOR1, and IDT_HYPERV to HYPERVISOR2 etc. So this could be handled nicely. Else it would look pretty confusing at least to me, i.e. we override it later.

This revision now requires review to proceed.Mar 14 2016, 4:24 AM
This revision is now accepted and ready to land.Mar 14 2016, 4:31 AM

Add jhb@ to seek for input on IDT thing