[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] vMCE: Add AMD support



>>> On 18.09.12 at 12:29, Christoph Egger <Christoph.Egger@xxxxxxx> 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@xxxxxxx>

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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.