From: Rusty Russell <rusty@rustcorp.com.au>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: kvm-devel@lists.sourceforge.net, Avi Kivity <avi@qumranet.com>,
Ingo Molnar <mingo@elte.hu>, Dor Laor <dor.laor@qumranet.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] Refactor hypercall infrastructure
Date: Wed, 29 Aug 2007 04:12:57 +1000 [thread overview]
Message-ID: <1188324777.5531.73.camel@localhost.localdomain> (raw)
In-Reply-To: <11882278082826-git-send-email-aliguori@us.ibm.com>
On Mon, 2007-08-27 at 10:16 -0500, Anthony Liguori wrote:
> This patch refactors the current hypercall infrastructure to better support live
> migration and SMP. It eliminates the hypercall page by trapping the UD
> exception that would occur if you used the wrong hypercall instruction for the
> underlying architecture and replacing it with the right one lazily.
It also reduces the number of hypercall args, which you don't mention
here.
> + er = emulate_instruction(&svm->vcpu, kvm_run, 0, 0);
> +
> + /* we should only succeed here in the case of hypercalls which
> + cannot generate an MMIO event. MMIO means that the emulator
> + is mistakenly allowing an instruction that should generate
> + a UD fault so it's a bug. */
> + BUG_ON(er == EMULATE_DO_MMIO);
This seems... unwise. Firstly we know our emulator is incomplete.
Secondly an SMP guest can exploit this to crash the host.
(Code is in two places).
> +#define KVM_HYPERCALL ".byte 0x0f,0x01,0xc1"
A nice big comment would be nice here, I think. Note that this is big
enough for both "int $0x1f" and "sysenter", so I'm happy.
Cheers,
Rusty.
next prev parent reply other threads:[~2007-08-28 18:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-27 15:16 [PATCH 0/3] KVM paravirtualization framework Anthony Liguori
2007-08-27 15:16 ` [PATCH 1/3] Implement emulator_write_phys() Anthony Liguori
2007-08-27 15:16 ` [PATCH 2/3] Refactor hypercall infrastructure Anthony Liguori
2007-08-27 15:16 ` [PATCH 3/3] KVM paravirt-ops implementation Anthony Liguori
2007-08-28 18:31 ` Rusty Russell
2007-08-29 5:53 ` [kvm-devel] " Anthony Liguori
2007-08-27 16:06 ` [PATCH 2/3] Refactor hypercall infrastructure Avi Kivity
2007-08-27 17:29 ` Anthony Liguori
2007-08-28 18:12 ` Rusty Russell [this message]
2007-08-29 5:51 ` [kvm-devel] " Anthony Liguori
2007-08-27 15:45 ` [PATCH 1/3] Implement emulator_write_phys() Avi Kivity
2007-08-27 17:23 ` Anthony Liguori
2007-08-27 17:26 ` Avi Kivity
2007-08-27 17:39 ` Anthony Liguori
2007-08-27 17:47 ` Avi Kivity
2007-08-27 18:09 ` Anthony Liguori
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=1188324777.5531.73.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=aliguori@us.ibm.com \
--cc=avi@qumranet.com \
--cc=dor.laor@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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