OSDN Git Service

KVM: introduce module parameter for ignoring unknown MSRs accesses
authorAndre Przywara <andre.przywara@amd.com>
Thu, 25 Jun 2009 10:36:49 +0000 (12:36 +0200)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 05:33:03 +0000 (08:33 +0300)
commited85c0685321a139cefd6622b21467643f0159e1
treeeb1470a8a736886fd563b02aecbc608b4dd16d54
parent1fdbd48c242db996107f72ae4140ffe8163e26a8
KVM: introduce module parameter for ignoring unknown MSRs accesses

KVM will inject a #GP into the guest if that tries to access unhandled
MSRs. This will crash many guests. Although it would be the correct
way to actually handle these MSRs, we introduce a runtime switchable
module param called "ignore_msrs" (defaults to 0). If this is Y, unknown
MSR reads will return 0, while MSR writes are simply dropped. In both cases
we print a message to dmesg to inform the user about that.

You can change the behaviour at any time by saying:

 # echo 1 > /sys/modules/kvm/parameters/ignore_msrs

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c