Messages in this thread | | | From | "Kang, Luwei" <> | Subject | RE: [RFC v1 3/9] KVM: x86: Implement MSR_IA32_PEBS_ENABLE read/write emulation | Date | Fri, 30 Aug 2019 00:22:08 +0000 |
| |
> > + case MSR_IA32_PEBS_ENABLE: > > + if (pmu->pebs_enable == data) > > + return 0; > > + if (!(data & pmu->pebs_enable_mask) && > > + (data & MSR_IA32_PEBS_OUTPUT_MASK) == > > + MSR_IA32_PEBS_OUTPUT_PT) > { > > + pebs_enable_changed(pmu, data); > > + return 0; > > + } > > Need #GP for bad values
Yes, this function will return 1 if neither of above two conditions check are not true. And will inject a #GP to guest.
Thanks, Luwei Kang
| |