X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fextensions%2Fext_mcheck.c;h=ea746f46fa059766bdf21dbb79c43126aef9218f;hb=e3b62e7befa086a4fb320890952f54667ee46329;hp=51605ae1b42bfba4ae6adf5b546839845456eae4;hpb=3c56980fa7fe8d42610dbbcf067689cc005a5d6e;p=palacios.git diff --git a/palacios/src/extensions/ext_mcheck.c b/palacios/src/extensions/ext_mcheck.c index 51605ae..ea746f4 100644 --- a/palacios/src/extensions/ext_mcheck.c +++ b/palacios/src/extensions/ext_mcheck.c @@ -465,8 +465,8 @@ static int init_mcheck(struct v3_vm_info * vm, v3_cfg_tree_t * cfg, void ** priv state = (struct mcheck_state *)V3_Malloc(sizeof(struct mcheck_state)); if (state == NULL) { - PrintError(MSG_PRE "Failed to allocate machine-check architecture state.\n"); - return -1; + PrintError(MSG_PRE "Failed to allocate machine-check architecture state.\n"); + return -1; } @@ -545,6 +545,25 @@ int v3_mcheck_inject_nb_mce(struct v3_vm_info * const vm, const uint32_t cpu, return 0; } +int v3_mcheck_inject_scrubber_mce(struct v3_vm_info *info, int cpu, uint64_t dst) +{ + struct mc4_stat_msr stat; + struct mc4_addr_msr addr; + + stat.value = 0; + stat.error_code = 0x810; + stat.error_code_ext = 0x8; + stat.uecc = 1; + stat.addr_v = 1; + stat.en = 1; + stat.uc = 1; + stat.val = 1; + + addr.addr64 = dst; + + return v3_mcheck_inject_nb_mce(info, cpu, stat, addr); +} + static struct v3_extension_impl mcheck_impl = { .name = MCHECK, .init = init_mcheck,