Skip to content

Commit

Permalink
hv: pirq: rename related source files
Browse files Browse the repository at this point in the history
To make the file structure clearer, change the file names:
 - rename arch/x86/interrupt.c to virq.c, for the virtual irq relavant code,
   such as irq injection etc;
 - merge arch/x86/intr_main.c into arch/x86/irq.c;
 - rename arch/x86/intr_lapic.c to lapic.c

Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
  • Loading branch information
lyan3 authored and NanlinXie committed Jun 28, 2018
1 parent fcbc564 commit d5912a4
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 34 deletions.
5 changes: 2 additions & 3 deletions hypervisor/Makefile
Expand Up @@ -95,14 +95,13 @@ D_SRCS += $(wildcard debug/*.c)
C_SRCS += boot/acpi.c
C_SRCS += boot/dmar_parse.c
C_SRCS += arch/x86/ioapic.c
C_SRCS += arch/x86/intr_lapic.c
C_SRCS += arch/x86/lapic.c
S_SRCS += arch/x86/trampoline.S
C_SRCS += arch/x86/cpu.c
C_SRCS += arch/x86/softirq.c
C_SRCS += arch/x86/cpuid.c
C_SRCS += arch/x86/mmu.c
C_SRCS += arch/x86/notify.c
C_SRCS += arch/x86/intr_main.c
C_SRCS += arch/x86/vtd.c
C_SRCS += arch/x86/gdt.c
S_SRCS += arch/x86/cpu_primary.S
Expand All @@ -112,7 +111,7 @@ C_SRCS += arch/x86/timer.c
C_SRCS += arch/x86/ept.c
S_SRCS += arch/x86/vmx_asm.S
C_SRCS += arch/x86/io.c
C_SRCS += arch/x86/interrupt.c
C_SRCS += arch/x86/virq.c
C_SRCS += arch/x86/vmexit.c
C_SRCS += arch/x86/vmx.c
C_SRCS += arch/x86/assign.c
Expand Down
31 changes: 0 additions & 31 deletions hypervisor/arch/x86/intr_main.c

This file was deleted.

24 changes: 24 additions & 0 deletions hypervisor/arch/x86/irq.c
Expand Up @@ -732,3 +732,27 @@ void get_cpu_interrupt_info(char *str, int str_max)
}
snprintf(str, size, "\r\n");
}

int interrupt_init(uint32_t cpu_id)
{
struct host_idt_descriptor *idtd = &HOST_IDTR;
int status;

set_idt(idtd);

status = init_lapic(cpu_id);
ASSERT(status == 0, "lapic init failed");
if (status != 0)
return -ENODEV;

status = init_default_irqs(cpu_id);
ASSERT(status == 0, "irqs init failed");
if (status != 0)
return -ENODEV;

#ifndef CONFIG_EFI_STUB
CPU_IRQ_ENABLE();
#endif

return status;
}
File renamed without changes.
File renamed without changes.

0 comments on commit d5912a4

Please sign in to comment.