Commit 4751cffb authored by Avi Kivity's avatar Avi Kivity
Browse files

x86/desc: allow multiple initializations



There are multiple callers, so be forgiving.
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 1d946e07
......@@ -229,6 +229,12 @@ static void *idt_handlers[32] = {
void setup_idt(void)
{
int i;
static bool idt_initialized = false;
if (idt_initialized) {
return;
}
idt_initialized = true;
for (i = 0; i < 32; i++)
if (idt_handlers[i])
set_idt_entry(i, idt_handlers[i], 0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment