Skip to contentSkip to conversation

Questions about kvm msr read/write policy

DISCUSSION Paolo Bonzini 1 participant 1 message Mar 8, 2016 1 message not in the archive KVM

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]@linux.intel.com

Paolo Bonzini

author maintainer
#1 lore raw
Quoted 10 lines · Shuai Ruan

Using read msr as an example, if the msr is not handled in kvm(not recognised by kvm) and ignore_msrs clear, kvm will inject gp into guest os(if I understand this correctly).

My question is what problem will cause(or in which situation will cause problem) if read msr (unhandled msr) just return 0 instead of injdecting gp fault into guest os?
The same question with write msr, if just ignore this write , what will happen?

It depends on the MSR and on the guest OS. Usually 0 is treated as an error or as "feature not present" so it just works.

Paolo