From: Pavel Machek <pavel@ucw.cz>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
akpm@osdl.org
Subject: Re: [PATCH 12/14] KVM: x86 emulator
Date: Tue, 7 Nov 2006 13:49:12 +0100 [thread overview]
Message-ID: <20061107124912.GA23118@elf.ucw.cz> (raw)
In-Reply-To: <20061105204035.DF0F62500A7@cleopatra.q>
HI!
> Add an x86 instruction emulator for kvm.
>
> We need an x86 emulator for the following reasons:
>
> - mmio instructions are intercepted as page faults, with no information about
> the operation to be performed other than the virtual address
> - real-mode is emulated using the old-fashined vm86 mode, with no special
> intercepts for the privileged instructions, so we need to emulate mov cr,
> lgdt, and lidt
> - we plan to cache shadow page tables in the future, so that a guest context
> switch will not throw away all the mappings we worked so hard to build. but
> cachine page tables means write-protecting the guest page tables to keep
> them in sync, so any writes to the guest page tables need to be emulated
>
> The emulator was lifted from the Xen hypervisor.
>
> Signed-off-by: Yaniv Kamay <yaniv@qumranet.com>
> Signed-off-by: Avi Kivity <avi@qumranet.com>
>
> Index: linux-2.6/drivers/kvm/x86_emulate.c
> ===================================================================
> --- /dev/null
> +++ linux-2.6/drivers/kvm/x86_emulate.c
> @@ -0,0 +1,1370 @@
> +/******************************************************************************
> + * x86_emulate.c
> + *
> + * Generic x86 (32-bit and 64-bit) instruction decoder and emulator.
> + *
> + * Copyright (c) 2005 Keir Fraser
> + *
> + * Linux coding style, mod r/m decoder, segment base fixes, real-mode
> + * privieged instructions:
> + *
> + * Copyright (C) 2006 Qumranet
> + *
> + * Avi Kivity <avi@qumranet.com>
> + * Yaniv Kamay <yaniv@qumranet.com>
> + *
> + * From: xen-unstable 10676:af9809f51f81a3c43f276f00c81a52ef558afda4
> + */
This needs GPL, I'd say.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2006-11-07 12:49 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-05 20:27 [PATCH 0/14] KVM: Kernel-based Virtual Machine (v4) Avi Kivity
2006-11-05 20:29 ` [PATCH 1/14] KVM: userspace interface Avi Kivity
2006-11-06 10:03 ` Arjan van de Ven
2006-11-06 10:28 ` Avi Kivity
2006-11-06 10:32 ` Arjan van de Ven
2006-11-06 10:47 ` Avi Kivity
2006-11-05 20:30 ` [PATCH 2/14] KVM: Intel virtual mode extensions definitions Avi Kivity
2006-11-05 20:31 ` [PATCH 3/14] KVM: kvm data structures Avi Kivity
2006-11-05 20:32 ` [PATCH 4/14] KVM: random accessors and constants Avi Kivity
2006-11-05 20:33 ` [PATCH 5/14] KVM: virtualization infrastructure Avi Kivity
2006-11-05 20:34 ` [PATCH 6/14] KVM: memory slot management Avi Kivity
2006-11-05 20:35 ` [PATCH 7/14] KVM: vcpu creation and maintenance Avi Kivity
2006-11-05 20:36 ` [PATCH 8/14] KVM: vcpu execution loop Avi Kivity
2006-11-05 20:37 ` [PATCH 9/14] KVM: define exit handlers Avi Kivity
2006-11-05 20:38 ` [PATCH 10/14] KVM: less common " Avi Kivity
2006-11-05 20:39 ` [PATCH 11/14] KVM: mmu Avi Kivity
2006-11-05 20:40 ` [PATCH 12/14] KVM: x86 emulator Avi Kivity
2006-11-07 12:49 ` Pavel Machek [this message]
2006-11-07 12:55 ` Avi Kivity
2006-11-07 13:00 ` Arjan van de Ven
2006-11-07 13:22 ` Avi Kivity
2006-11-07 13:35 ` Miguel Ojeda
2006-11-07 13:44 ` Arjan van de Ven
2006-11-07 13:12 ` Hesse, Christian
2006-11-08 16:54 ` David Bristow
2006-11-05 20:41 ` [PATCH 13/14] KVM: plumbing Avi Kivity
2006-11-05 20:42 ` [PATCH 14/14] KVM: Dynamically determine which msrs to load and save Avi Kivity
2006-11-07 16:59 ` [PATCH 0/14] KVM: Kernel-based Virtual Machine (v4) Yinghai Lu
2006-11-07 19:56 ` Avi Kivity
2006-11-08 4:44 ` Andrew Morton
2006-11-08 4:51 ` Roland Dreier
2006-11-08 7:14 ` Avi Kivity
2006-11-08 7:33 ` Andrew Morton
2006-11-08 8:07 ` Avi Kivity
2006-11-08 8:30 ` Andrew Morton
2006-11-08 9:39 ` Arjan van de Ven
2006-11-08 9:54 ` Avi Kivity
2006-11-08 10:01 ` Arjan van de Ven
2006-11-08 10:10 ` Avi Kivity
2006-11-08 18:26 ` Roland Dreier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061107124912.GA23118@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®