Sets up the EBDA and adds a command line option that allows us to run the master branch of Linux.
Change-Id: Ib9af5c3bbdf120ca6264966fc4ad39d2c3f68aa8 Signed-off-by: Kyle Milka <[email protected]> --- tests/vmm/vmrunkernel.c | 8 ++++---- user/vmm/decode.c | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/vmm/vmrunkernel.c b/tests/vmm/vmrunkernel.c index 09a1568..39734ca 100644 --- a/tests/vmm/vmrunkernel.c +++ b/tests/vmm/vmrunkernel.c @@ -318,7 +318,8 @@ int main(int argc, char **argv) " init=/bin/launcher" " lapic=notscdeadline" " lapictimerfreq=1000000" - " pit=none"; + " pit=none" + " noinvpcid"; char *cmdline_extra = "\0"; char *cmdline; uint64_t *p64; @@ -359,9 +360,8 @@ int main(int argc, char **argv) memset(lowmem, 0xff, 2*1048576); vm->low4k = malloc(PGSIZE); memset(vm->low4k, 0xff, PGSIZE); - // avoid at all costs, requires too much instruction emulation. - //low4k[0x40e] = 0; - //low4k[0x40f] = 0xe0; + vm->low4k[0x40e] = 0; + vm->low4k[0x40f] = 0; //Place mmap(Gan) a_page = mmap((void *)0xfee00000, PGSIZE, PROT_READ | PROT_WRITE, diff --git a/user/vmm/decode.c b/user/vmm/decode.c index 39910d6..a38438c 100644 --- a/user/vmm/decode.c +++ b/user/vmm/decode.c @@ -99,7 +99,7 @@ static int target(void *insn, int *store) case 0x0f: switch(*word) { case 0xb70f: - s = 4; + s = 2; break; default: fprintf(stderr, "can't get size of %02x/%04x @ %p\n", *byte, *word, byte); @@ -114,6 +114,8 @@ static int target(void *insn, int *store) } switch(*byte) { + case 0x0f: + break; case 0x3a: case 0x8a: case 0x88: @@ -123,7 +125,7 @@ static int target(void *insn, int *store) *store = !(*byte & 2); break; default: - fprintf(stderr, "%s: Can't happen\n", __func__); + fprintf(stderr, "%s: Can't happen. rip is: %p\n", __func__, byte); break; } return s; @@ -224,7 +226,7 @@ int decode(struct guest_thread *vm_thread, uint64_t *gpa, uint8_t *destreg, *advance = insize(kva); - uint16_t ins = *(uint16_t *)(kva + (kva[0] == 0x44)); + uint16_t ins = *(uint16_t *)(kva + (kva[0] == 0x44) + (kva[0] == 0x0f)); DPRINTF("ins is %04x\n", ins); *destreg = (ins>>11) & 7; -- 2.8.0.rc3.226.g39d4020 -- You received this message because you are subscribed to the Google Groups "Akaros" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
