summaryrefslogtreecommitdiff
path: root/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-09-16 12:26:06 +0300
committerMarcelo Tosatti <mtosatti@redhat.com>2009-09-16 16:00:53 -0300
commit72616a53265724e646205365905f27abcee70361 (patch)
treeaa96fe412b98830e36f9cf93bb24d7875e8a2168 /kvm
parenttest: port smp runtime to real apic (diff)
downloadqemu-kvm-72616a53265724e646205365905f27abcee70361.tar.gz
qemu-kvm-72616a53265724e646205365905f27abcee70361.tar.bz2
qemu-kvm-72616a53265724e646205365905f27abcee70361.zip
test: drop irq.flat
Obsolete. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'kvm')
-rw-r--r--kvm/user/config-x86-common.mak2
-rw-r--r--kvm/user/config-x86_64.mak2
-rw-r--r--kvm/user/test/x86/irq.S118
3 files changed, 1 insertions, 121 deletions
diff --git a/kvm/user/config-x86-common.mak b/kvm/user/config-x86-common.mak
index de9e9e8a6..41e8c8d01 100644
--- a/kvm/user/config-x86-common.mak
+++ b/kvm/user/config-x86-common.mak
@@ -35,8 +35,6 @@ $(TEST_DIR)/%.o: CFLAGS += -std=gnu99 -ffreestanding -I test/lib -I test/lib/x86
$(TEST_DIR)/bootstrap: $(TEST_DIR)/bootstrap.o
$(CC) -nostdlib -o $@ -Wl,-T,bootstrap.lds $^
-$(TEST_DIR)/irq.flat: $(TEST_DIR)/print.o
-
$(TEST_DIR)/access.flat: $(cstart.o) $(TEST_DIR)/access.o $(TEST_DIR)/print.o
$(TEST_DIR)/hypercall.flat: $(cstart.o) $(TEST_DIR)/hypercall.o $(TEST_DIR)/print.o
diff --git a/kvm/user/config-x86_64.mak b/kvm/user/config-x86_64.mak
index d88f54c7f..97990bb53 100644
--- a/kvm/user/config-x86_64.mak
+++ b/kvm/user/config-x86_64.mak
@@ -4,7 +4,7 @@ bits = 64
ldarch = elf64-x86-64
CFLAGS += -D__x86_64__
-tests = $(TEST_DIR)/access.flat $(TEST_DIR)/irq.flat $(TEST_DIR)/sieve.flat \
+tests = $(TEST_DIR)/access.flat $(TEST_DIR)/sieve.flat \
$(TEST_DIR)/simple.flat $(TEST_DIR)/stringio.flat \
$(TEST_DIR)/memtest1.flat $(TEST_DIR)/emulator.flat \
$(TEST_DIR)/hypercall.flat $(TEST_DIR)/apic.flat
diff --git a/kvm/user/test/x86/irq.S b/kvm/user/test/x86/irq.S
deleted file mode 100644
index 0425db6f8..000000000
--- a/kvm/user/test/x86/irq.S
+++ /dev/null
@@ -1,118 +0,0 @@
-// irq test program. assumes outb $irq, $0xff generates an interrupt $irq.
-
-#include "print.h"
-
-.text
- PRINT "irq test"
- mov $stack_top, %rsp
-
- call setup_gdt
-
- mov %ds, %ax
- mov %ax, %ds // check ds descriptor is okay
-
- mov $irq_handler, %rdx
- mov $0x20, %eax
- call setup_idt_entry
-
- lidt idt_descriptor
-
- PRINT "software interrupt"
- int $0x20
-
- sti
- nop
-
- PRINT "injecting interrupt with interrupts enabled"
-
- mov $0x20, %al
- outb %al, $0xff // inject interrupt
-
- nop
- nop
- nop
- PRINT "after injection"
-
- cli
-
- PRINT "injecting interrupt with interrupts disabled"
-
- mov $0x20, %al
- outb %al, $0xff // inject interrupt
-
- // no interrupt here (disabled)
- nop
- nop
- PRINT "enabling interrupts"
- nop
- nop
- sti
- out %al, $0x80 // blocked by sti
- // interrupt here
- out %al, $0x80
-
- PRINT "after injection"
- nop
- nop
-
- hlt
-
-irq_handler:
- PRINT "interrupt handler"
- iretq
-
-setup_idt_entry: // %rax: irq %rdx: handler
- shl $4, %rax
- mov %dx, idt(%rax)
- shr $16, %rdx
- mov %cs, 2+idt(%rax)
- mov %dx, 6+idt(%rax)
- shr $16, %rdx
- mov %edx, 8+idt(%rax)
- movw $0x8e00, 4+idt(%rax)
- ret
-
-setup_gdt:
- mov $0, %eax
- mov %cs, %ax
- andl $~7, %eax
- movl $0xffff, gdt(%rax)
- movl $0xaf9b00, 4+gdt(%rax)
-
- mov $0, %eax
- mov %ds, %ax
- andl $~7, %eax
- movl $0xffff, gdt(%rax)
- movl $0x8f9300, 4+gdt(%rax)
-
- lgdt gdt_descriptor
- ret
-
-.data
-
-.align 16
-
-idt:
- . = . + 256 * 16
-
-idt_descriptor:
- .word . - idt - 1
- .quad idt
-
-.align 8
-
-gdt:
- . = . + 256 * 8
-
-gdt_descriptor:
- .word . - gdt - 1
- .quad gdt
-
-
-.align 4096
-stack_base:
- . = . + 4096
-stack_top:
-
-
-