summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-08-12 08:30:41 +0000
committerRobert Mustacchi <rm@joyent.com>2011-08-12 08:32:28 +0000
commit4a297dd231d5aec6487412b9c91a2bc0e0373fc6 (patch)
treec6bc17ef49d26989235f28b1e8ed89f641892d41
parent88f00da28f51b817393ad565e2963b7153ace7d8 (diff)
downloadillumos-kvm-4a297dd231d5aec6487412b9c91a2bc0e0373fc6.tar.gz
HVM-458 kvm_tss.h should die
-rw-r--r--Makefile7
-rw-r--r--kvm.c1
-rw-r--r--kvm_tss.h110
-rw-r--r--kvm_x86.c2
4 files changed, 1 insertions, 119 deletions
diff --git a/Makefile b/Makefile
index 200e8d9..cd59365 100644
--- a/Makefile
+++ b/Makefile
@@ -12,11 +12,6 @@ CTFCONVERT=$(CTFBINDIR)/ctfconvert
CTFMERGE=$(CTFBINDIR)/ctfmerge
DESTDIR=
CFLAGS += -D_KERNEL -D_MACHDEP -Dx86 -DDEBUG -c -g -DCONFIG_SOLARIS -O2 -fident -fno-inline -fno-inline-functions -fno-builtin -fno-asm -nodefaultlibs -D__sun -O -D_ASM_INLINES -ffreestanding -Wall -Wno-unknown-pragmas -Wpointer-arith -Wno-unused -gdwarf-2 -std=gnu99 -fno-dwarf2-indirect-strings -Werror -DDIS_MEM -D_KERNEL -ffreestanding -D_SYSCALL32 -D_DDI_STRICT -Di86pc -D_MACHDEP -DOPTERON_ERRATUM_88 -DOPTERON_ERRATUM_91 -DOPTERON_ERRATUM_93 -DOPTERON_ERRATUM_95 -DOPTERON_ERRATUM_99 -DOPTERON_ERRATUM_100 -DOPTERON_ERRATUM_101 -DOPTERON_ERRATUM_108 -DOPTERON_ERRATUM_109 -DOPTERON_ERRATUM_121 -DOPTERON_ERRATUM_122 -DOPTERON_ERRATUM_123 -DOPTERON_ERRATUM_131 -DOPTERON_WORKAROUND_6336786 -DOPTERON_WORKAROUND_6323525 -DOPTERON_ERRATUM_172 -DOPTERON_ERRATUM_298 -I$(KERNEL_SOURCE)/usr/src/uts/common -nostdinc -c -DUTS_RELEASE="5.11" -DUTS_VERSION="joyent.147" -DUTS_PLATFORM="i86pc" -mno-red-zone
-#
-# Uncomment this line if you don't have an updated uts/intel/sys/tss.h that
-# exposes the different tss definitions
-#
-#CFLAGS += -D_NEED_KVM_TSS
INCLUDEDIR= -I $(KERNEL_SOURCE)/usr/src/uts/intel -I $(KERNEL_SOURCE)/usr/src/uts/i86pc -I $(KERNEL_SOURCE)/usr/src/uts/common
CSTYLE=$(KERNEL_SOURCE)/usr/src/tools/scripts/cstyle
@@ -45,7 +40,6 @@ HEADERS= \
kvm_msr.h \
kvm_paging_tmpl.h \
kvm_timer.h \
- kvm_tss.h \
kvm_types.h \
kvm_vmx.h \
kvm_x86host.h \
@@ -69,7 +63,6 @@ HDRCHK_SYSHDRS= \
kvm_msidef.h \
kvm_mmu.h \
kvm_timer.h \
- kvm_tss.h \
kvm_types.h \
kvm_vmx.h \
kvm_x86host.h \
diff --git a/kvm.c b/kvm.c
index 1bb613f..bb8f489 100644
--- a/kvm.c
+++ b/kvm.c
@@ -326,7 +326,6 @@
#include "kvm.h"
#include "kvm_x86impl.h"
#include "kvm_irq.h"
-#include "kvm_tss.h"
#include "kvm_ioapic.h"
#include "kvm_coalesced_mmio.h"
#include "kvm_i8254.h"
diff --git a/kvm_tss.h b/kvm_tss.h
deleted file mode 100644
index 78f2ecf..0000000
--- a/kvm_tss.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * GPL HEADER START
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * GPL HEADER END
- *
- * Copyright 2011 various Linux Kernel contributors.
- * Copyright 2011 Joyent, Inc. All Rights Reserved.
- */
-#ifndef __TSS_SEGMENT_H
-#define __TSS_SEGMENT_H
-
-#include <sys/stdint.h>
-#include <sys/tss.h>
-
-/*
- * uts/intel/sys/tss.h now exposes the following definitions. In the past, it
- * only exposed the single architecture specific tss structure depending on what
- * you were compiling for. When the tss.h changes finally gets upstreamed, this
- * file can be deleted and the includes replaced with <sys/tss.h> instead of
- * kvm_tss.h.
- */
-
-#ifdef _NEED_KVM_TSS
-
-struct tss32 {
- uint16_t tss_link; /* 16-bit prior TSS selector */
- uint16_t tss_rsvd0; /* reserved, ignored */
- uint32_t tss_esp0;
- uint16_t tss_ss0;
- uint16_t tss_rsvd1; /* reserved, ignored */
- uint32_t tss_esp1;
- uint16_t tss_ss1;
- uint16_t tss_rsvd2; /* reserved, ignored */
- uint32_t tss_esp2;
- uint16_t tss_ss2;
- uint16_t tss_rsvd3; /* reserved, ignored */
- uint32_t tss_cr3;
- uint32_t tss_eip;
- uint32_t tss_eflags;
- uint32_t tss_eax;
- uint32_t tss_ecx;
- uint32_t tss_edx;
- uint32_t tss_ebx;
- uint32_t tss_esp;
- uint32_t tss_ebp;
- uint32_t tss_esi;
- uint32_t tss_edi;
- uint16_t tss_es;
- uint16_t tss_rsvd4; /* reserved, ignored */
- uint16_t tss_cs;
- uint16_t tss_rsvd5; /* reserved, ignored */
- uint16_t tss_ss;
- uint16_t tss_rsvd6; /* reserved, ignored */
- uint16_t tss_ds;
- uint16_t tss_rsvd7; /* reserved, ignored */
- uint16_t tss_fs;
- uint16_t tss_rsvd8; /* reserved, ignored */
- uint16_t tss_gs;
- uint16_t tss_rsvd9; /* reserved, ignored */
- uint16_t tss_ldt;
- uint16_t tss_rsvd10; /* reserved, ignored */
- uint16_t tss_rsvd11; /* reserved, ignored */
- uint16_t tss_bitmapbase; /* io permission bitmap base address */
-};
-
-/*
- * Based on data from Intel Manual 3a, Intel 64 and IA-32 Architectures Software
- * Developer’s Manual Volume 3A: System Programming Guide, Part 1, Section 7.6
- */
-struct tss16 {
- uint16_t tss_link;
- uint16_t tss_sp0;
- uint16_t tss_ss0;
- uint16_t tss_sp1;
- uint16_t tss_ss1;
- uint16_t tss_sp2;
- uint16_t tss_ss2;
- uint16_t tss_ip;
- uint16_t tss_flag;
- uint16_t tss_ax;
- uint16_t tss_cx;
- uint16_t tss_dx;
- uint16_t tss_bx;
- uint16_t tss_sp;
- uint16_t tss_bp;
- uint16_t tss_si;
- uint16_t tss_di;
- uint16_t tss_es;
- uint16_t tss_cs;
- uint16_t tss_ss;
- uint16_t tss_ds;
- uint16_t tss_ldt;
-};
-
-#endif /* _HAVE_KVM_TSS */
-
-#endif
diff --git a/kvm_x86.c b/kvm_x86.c
index a993206..a0c903b 100644
--- a/kvm_x86.c
+++ b/kvm_x86.c
@@ -28,6 +28,7 @@
#include <sys/ddi.h>
#include <sys/regset.h>
#include <sys/fp.h>
+#include <sys/tss.h>
#include <vm/page.h>
#include <vm/hat.h>
@@ -48,7 +49,6 @@
#include "kvm.h"
#include "kvm_x86impl.h"
#include "kvm_irq.h"
-#include "kvm_tss.h"
#include "kvm_ioapic.h"
#include "kvm_coalesced_mmio.h"
#include "kvm_i8254.h"