lkml.org 
[lkml]   [2018]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectAny standard kernel API to dynamically allocate/free per-cpu vectors on x86?
Date
Hi,
Recently, two Hyper-V specific vectors were introduced in
arch/x86/include/asm/irq_vectors.h:

#if IS_ENABLED(CONFIG_HYPERV)
#define HYPERV_REENLIGHTENMENT_VECTOR 0xee
#define HYPERV_STIMER0_VECTOR 0xed
#endif

What if we need more such vectors on Hyper-V? This static global reservation
mechanism doesn't scale, IMO.

Actually I believe we don't really need to reserve the same vector on all CPUs,
because the model-specific registers (MSRs) defined for Hyper-V synthetic
interrupt controller (SynIC) are per-cpu, meaning each virtual processor has
its own copy of these registers, so they can be programmed independently.

That is to say, we can use different vectors for the same Synthetic Interrupt,
as long as we're able to dynamically get a per-cpu vector for each CPU.

I'm wondering if there is such a standard kernel API on x86.
As I skimmed through the code, I haven't found it yet, if any.

PS, the background of my question is that: in the future Hyper-V will
support multiple VMBus drivers running simultaneously in one virtual
machine, and I think it would be better for the future secondary VMBus
driver to use a different synthetic interrupt, which I hope can be
configured with dynamic vectors rather than a new static globally-reserved
vector.

Thanks!
-- Dexuan

\
 
 \ /
  Last update: 2018-04-04 22:47    [W:1.447 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site