>>> On 18.09.12 at 12:29, Christoph Egger
<Christoph.Egger@amd.com> wrote:
> Add vMCE support to AMD.
> Add vmce namespace to Intel specific vMCE MSR functions.
> Move vMCE prototypes from mce.h to vmce.h
>
> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
I put the patch almost as-is (i.e. modified only where necessary to
apply on top of Jinsong''s), but ...
>+int vmce_amd_wrmsr(struct vcpu *v, uint32_t msr, uint64_t val)
>+{
>+ int ret = 0;
>+
>+ switch (msr) {
>+ case MSR_F10_MC4_MISC1:
>+ case MSR_F10_MC4_MISC2:
>+ case MSR_F10_MC4_MISC3:
>+ break;
>+ default:
>+ mce_printk(MCE_QUIET, "Guest writes unhandled MSR
0x%x\n", msr);
>+ ret = 1;
>+ break;
>+ }
>+
>+ return ret;
>+}
>+
>+int vmce_amd_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val)
>+{
>+ int ret = 0;
>+
>+ switch (msr) {
>+ case MSR_F10_MC4_MISC1:
>+ case MSR_F10_MC4_MISC2:
>+ case MSR_F10_MC4_MISC3:
>+ break;
>+ default:
>+ mce_printk(MCE_QUIET, "Guest reads unhandled MSR
0x%x\n", msr);
>+ ret = 1;
>+ break;
>+ }
>+
>+ return ret;
>+}
... the return values here were inverted afaict (fixed), and the
functions in this shape are just pointless (i.e. I assume you will
make them actually do something in a subsequent patch) - I
took the liberty to remove the bogus printk()-s as minimal action.
Jan