There are multiple callers, so be forgiving.
Signed-off-by: Avi Kivity <[email protected]>
---
lib/x86/desc.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/x86/desc.c b/lib/x86/desc.c
index 0ed8c22..c268955 100644
--- a/lib/x86/desc.c
+++ b/lib/x86/desc.c
@@ -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);
--
1.7.6.1
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html