From patchwork Wed Sep 16 09:26:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 47889 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8G9Quxe009707 for ; Wed, 16 Sep 2009 09:26:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932107AbZIPJ0s (ORCPT ); Wed, 16 Sep 2009 05:26:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932096AbZIPJ0q (ORCPT ); Wed, 16 Sep 2009 05:26:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57029 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758321AbZIPJ0L (ORCPT ); Wed, 16 Sep 2009 05:26:11 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8G9QFmQ007980 for ; Wed, 16 Sep 2009 05:26:15 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8G9QCMC022862; Wed, 16 Sep 2009 05:26:15 -0400 Received: from localhost.localdomain (cleopatra.tlv.redhat.com [10.35.255.11]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 3A4E925004E; Wed, 16 Sep 2009 12:26:12 +0300 (IDT) From: Avi Kivity To: Marcelo Tosatti Cc: kvm@vger.kernel.org Subject: [PATCH QEMU-KVM 31/34] test: drop irq.flat Date: Wed, 16 Sep 2009 12:26:06 +0300 Message-Id: <1253093169-1423-32-git-send-email-avi@redhat.com> In-Reply-To: <1253093169-1423-1-git-send-email-avi@redhat.com> References: <1253093169-1423-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Obsolete. Signed-off-by: Avi Kivity --- kvm/user/config-x86-common.mak | 2 - kvm/user/config-x86_64.mak | 2 +- kvm/user/test/x86/irq.S | 118 ---------------------------------------- 3 files changed, 1 insertions(+), 121 deletions(-) delete mode 100644 kvm/user/test/x86/irq.S diff --git a/kvm/user/config-x86-common.mak b/kvm/user/config-x86-common.mak index de9e9e8..41e8c8d 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 d88f54c..97990bb 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 0425db6..0000000 --- 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: - - -