[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/7] i386: Set MCG_STATUS_RIPV bit for mce SRAR error
From: |
Paolo Bonzini |
Subject: |
[PULL 2/7] i386: Set MCG_STATUS_RIPV bit for mce SRAR error |
Date: |
Fri, 25 Mar 2022 08:07:01 +0100 |
From: luofei <luofei@unicloud.com>
In the physical machine environment, when a SRAR error occurs,
the IA32_MCG_STATUS RIPV bit is set, but qemu does not set this
bit. When qemu injects an SRAR error into virtual machine, the
virtual machine kernel just call do_machine_check() to kill the
current task, but not call memory_failure() to isolate the faulty
page, which will cause the faulty page to be allocated and used
repeatedly. If used by the virtual machine kernel, it will cause
the virtual machine to crash
Signed-off-by: luofei <luofei@unicloud.com>
Message-Id: <20220120084634.131450-1-luofei@unicloud.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/kvm/kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 7396b430d7..9cf8e03669 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -569,7 +569,7 @@ static void kvm_mce_inject(X86CPU *cpu, hwaddr paddr, int
code)
if (code == BUS_MCEERR_AR) {
status |= MCI_STATUS_AR | 0x134;
- mcg_status |= MCG_STATUS_EIPV;
+ mcg_status |= MCG_STATUS_RIPV | MCG_STATUS_EIPV;
} else {
status |= 0xc0;
mcg_status |= MCG_STATUS_RIPV;
--
2.35.1
- [PULL 0/7] (Mostly) x86 fixes for QEMU 7.0.0-rc2, Paolo Bonzini, 2022/03/25
- [PULL 3/7] KVM: x86: workaround invalid CPUID[0xD, 9] info on some AMD processors, Paolo Bonzini, 2022/03/25
- [PULL 2/7] i386: Set MCG_STATUS_RIPV bit for mce SRAR error,
Paolo Bonzini <=
- [PULL 1/7] target/i386/kvm: Free xsave_buf when destroying vCPU, Paolo Bonzini, 2022/03/25
- [PULL 7/7] build: disable fcf-protection on -march=486 -m16, Paolo Bonzini, 2022/03/25
- [PULL 4/7] configure: remove dead int128 test, Paolo Bonzini, 2022/03/25
- [PULL 6/7] target/i386: properly reset TSC on reset, Paolo Bonzini, 2022/03/25
- [PULL 5/7] target/i386: tcg: high bits SSE cmp operation must be ignored, Paolo Bonzini, 2022/03/25
- Re: [PULL 0/7] (Mostly) x86 fixes for QEMU 7.0.0-rc2, Peter Maydell, 2022/03/25