Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93806
b: refs/heads/master
c: a5f6130
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity committed Apr 27, 2008
1 parent 1405310 commit 5156fe5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef2979bd98dac86ea6a4cd9bdd6820a466108017
refs/heads/master: a5f61300c489e334ddf99781a13a7f8d4b580781
29 changes: 0 additions & 29 deletions trunk/arch/x86/kvm/segment_descriptor.h

This file was deleted.

3 changes: 1 addition & 2 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "irq.h"
#include "vmx.h"
#include "segment_descriptor.h"
#include "mmu.h"

#include <linux/kvm_host.h>
Expand Down Expand Up @@ -388,7 +387,7 @@ static void reload_tss(void)
* VT restores TR but not its size. Useless.
*/
struct descriptor_table gdt;
struct segment_descriptor *descs;
struct desc_struct *descs;

get_gdt(&gdt);
descs = (void *)gdt.base;
Expand Down
15 changes: 7 additions & 8 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

#include <linux/kvm_host.h>
#include "segment_descriptor.h"
#include "irq.h"
#include "mmu.h"

Expand All @@ -29,6 +28,7 @@

#include <asm/uaccess.h>
#include <asm/msr.h>
#include <asm/desc.h>

#define MAX_IO_MSRS 256
#define CR0_RESERVED_BITS \
Expand Down Expand Up @@ -94,7 +94,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
unsigned long segment_base(u16 selector)
{
struct descriptor_table gdt;
struct segment_descriptor *d;
struct desc_struct *d;
unsigned long table_base;
unsigned long v;

Expand All @@ -110,13 +110,12 @@ unsigned long segment_base(u16 selector)
asm("sldt %0" : "=g"(ldt_selector));
table_base = segment_base(ldt_selector);
}
d = (struct segment_descriptor *)(table_base + (selector & ~7));
v = d->base_low | ((unsigned long)d->base_mid << 16) |
((unsigned long)d->base_high << 24);
d = (struct desc_struct *)(table_base + (selector & ~7));
v = d->base0 | ((unsigned long)d->base1 << 16) |
((unsigned long)d->base2 << 24);
#ifdef CONFIG_X86_64
if (d->system == 0 && (d->type == 2 || d->type == 9 || d->type == 11))
v |= ((unsigned long) \
((struct segment_descriptor_64 *)d)->base_higher) << 32;
if (d->s == 0 && (d->type == 2 || d->type == 9 || d->type == 11))
v |= ((unsigned long)((struct ldttss_desc64 *)d)->base3) << 32;
#endif
return v;
}
Expand Down

0 comments on commit 5156fe5

Please sign in to comment.