acrn-hypervisor/hypervisor/arch/x86
Yan, Like 1bf2fc342a hv: pirq: refactor irq num alloc/free
This commit refactors the alloc/free irq num, two functions are defined:
- uint32_t alloc_irq_num(uint32_t irq)
  - if irq is valid, mark the irq_desc as used; if it's IRQ_INVALID,
    alloc a free irq, or else do nothing;
  - return: irq num on success, or IRQ_INVALID on failure.

- void free_irq_num(uint32_t irq)
  - free the irq num allocated via alloc_irq_num();

And a global spinlock to protect it from concurrent allocation/free.

Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-08-17 14:25:52 +08:00
..
configs HV: config: add Kconfig and defconfigs for sbl & uefi 2018-06-08 17:21:13 +08:00
guest hv: fixed compiling warning 2018-08-17 12:36:53 +08:00
Kconfig HV: Add Partitioning mode option for ACRN 2018-08-02 12:58:09 +08:00
assign.c hv:fix return value violations for vpic/vioapic 2018-08-16 09:01:08 +08:00
cpu.c hv: fixed compiling warning 2018-08-17 12:36:53 +08:00
cpu_primary.S hv: init: save boot context from bootloader/bios 2018-08-09 16:43:58 +08:00
cpu_save_boot_ctx.S hv: move boot_ctx offset definitions 2018-08-14 13:05:06 +08:00
cpu_state_tbl.c HV: Add const qualifiers where required 2018-08-17 10:02:12 +08:00
cpuid.c HV: Add const qualifiers where required 2018-08-17 10:02:12 +08:00
ept.c HV: Add const qualifiers where required 2018-08-17 10:02:12 +08:00
gdt.c HV:treewide:fix value outside range of underlying type 2018-08-06 16:07:41 +08:00
idt.S hv: Interrupt handling in ACRN partition mode 2018-08-10 10:26:00 +08:00
io.c hv: Build fix for Partition mode 2018-08-16 09:43:34 +08:00
ioapic.c hv: pirq: refactor irq num alloc/free 2018-08-17 14:25:52 +08:00
irq.c hv: pirq: refactor irq num alloc/free 2018-08-17 14:25:52 +08:00
lapic.c lapic: add send_dest_ipi function 2018-08-15 12:05:18 +08:00
mmu.c HV: Logical conjunction needs brackets 2018-08-14 09:53:32 +08:00
mtrr.c hv:cleanup vmid related code 2018-08-06 12:27:53 +08:00
notify.c hv: pirq: clean up unnecessary fields of irq_desc 2018-08-17 14:25:52 +08:00
pagetable.c hv: ept: add lookup_address to lookup the page table 2018-07-26 12:46:34 +08:00
pm.c pm: use cpu_context for s3 save/restore 2018-08-07 09:55:13 +08:00
retpoline-thunk.S license: Replace license text with SPDX tag 2018-06-01 10:43:06 +08:00
static_checks.c hv: add compile time assert for static checks 2018-08-14 13:05:06 +08:00
timer.c hv: pirq: clean up unnecessary fields of irq_desc 2018-08-17 14:25:52 +08:00
trampoline.S HV:treewide:Replace HOST_GDT_RING0_CODE/DATA_SEL with constant 2018-07-18 12:31:42 +08:00
trusty.c hv:Refine destroy_secure_world API 2018-08-10 10:17:09 +08:00
virq.c hv: virq: disable interrupt-window exiting in vmexit handler 2018-08-17 08:57:31 +08:00
vmexit.c HV: Logical conjunction needs brackets 2018-08-14 09:53:32 +08:00
vmx.c hv: fixed compiling warning 2018-08-17 12:36:53 +08:00
vmx_asm.S fix spec_ctrl msr save/restore 2018-08-16 16:24:13 +08:00
vtd.c hv: pirq: clean up unnecessary fields of irq_desc 2018-08-17 14:25:52 +08:00
wakeup.S pm: use cpu_context for s3 save/restore 2018-08-07 09:55:13 +08:00