lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 4 Apr 2018 20:46:16 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        'Greg KH' <gregkh@...uxfoundation.org>
CC:     "Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>
Subject: Any standard kernel API to dynamically allocate/free per-cpu vectors
 on x86?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ