Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68421
b: refs/heads/master
c: b85b9ee
h: refs/heads/master
i:
  68419: d6ee35c
v: v3
  • Loading branch information
Rusty Russell authored and Avi Kivity committed Oct 13, 2007
1 parent 237b1c8 commit 99b02d4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 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: c9a1185c945c8db3185ad40092963cbb39192e31
refs/heads/master: b85b9ee9259917f248ee1507d7d1f575f4fc27dd
2 changes: 0 additions & 2 deletions trunk/drivers/kvm/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,6 @@ static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; }
hpa_t gva_to_hpa(struct kvm_vcpu *vcpu, gva_t gva);
struct page *gva_to_page(struct kvm_vcpu *vcpu, gva_t gva);

void kvm_emulator_want_group7_invlpg(void);

extern hpa_t bad_page_address;

struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,6 @@ static __init int svm_hardware_setup(void)
void *iopm_va, *msrpm_va;
int r;

kvm_emulator_want_group7_invlpg();

iopm_pages = alloc_pages(GFP_KERNEL, IOPM_ALLOC_ORDER);

if (!iopm_pages)
Expand Down
16 changes: 3 additions & 13 deletions trunk/drivers/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,6 @@ static u16 twobyte_table[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};

/*
* Tell the emulator that of the Group 7 instructions (sgdt, lidt, etc.) we
* are interested only in invlpg and not in any of the rest.
*
* invlpg is a special instruction in that the data it references may not
* be mapped.
*/
void kvm_emulator_want_group7_invlpg(void)
{
twobyte_table[1] &= ~SrcMem;
}
EXPORT_SYMBOL_GPL(kvm_emulator_want_group7_invlpg);

/* Type, address-of, and value of an instruction's operand. */
struct operand {
enum { OP_REG, OP_MEM, OP_IMM } type;
Expand Down Expand Up @@ -791,6 +778,9 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
goto srcmem_common;
case SrcMem:
src.bytes = (d & ByteOp) ? 1 : op_bytes;
/* Don't fetch the address for invlpg: it could be unmapped. */
if (twobyte && b == 0x01 && modrm_reg == 7)
break;
srcmem_common:
src.type = OP_MEM;
src.ptr = (unsigned long *)cr2;
Expand Down

0 comments on commit 99b02d4

Please sign in to comment.