On 02/07/2010 08:03 AM, Avi Kivity wrote:
On 02/03/2010 06:14 PM, Anthony Liguori wrote:
aren't we putting the cart before the horse here?
qemu has support for triggering MCEs on the monitor.
Also the KVM code base has support for forwarding the MCEs
automatically.
KVM has all of the information you need (guest physical -> host
physical mapping). It can also pin the mapping making it much safer
to interface at that level. You should probably add an ioctl
interface to KVM to get a host physical from a given guest physical
and then use that to do the MCE injection. You would need to write a
little helper tool and you would need a way to get an fd for an
existing guest.
It would be simpler to trigger the whole thing from within qemu.
Only insofar as you don't have to deal with getting at the VM fd. You
can avoid the problem by having the kvm ioctl interface take a pid or
something.
The problem I have with driving this through qemu is that it's purely a
test mechanism and it's not even one that we can verify within qemu.
It's a command that isn't really useful in anything but a very specific
context.
I don't think it's the right thing to do to add dozens of monitor
commands to enable test harnesses that are not related to actual
functionality within qemu.
Regards,
Anthony Liguori