Re: [PATCH v5 1/6] target/i386: Update EPYC CPU model for Cache property, RAS, SVM feature bits

2025-02-25 Thread John Allen
On Thu, Feb 20, 2025 at 06:59:34PM +0800, Zhao Liu wrote: > And one more thing :-) ... > > > static const CPUCaches epyc_rome_cache_info = { > > .l1d_cache = &(CPUCacheInfo) { > > .type = DATA_CACHE, > > @@ -5207,6 +5261,25 @@ static const X86CPUDefinition builtin_x86_defs[] = { > >

Re: [PATCH v3 2/7] target/i386: Add RAS feature bits on EPYC CPU models

2024-10-30 Thread John Allen
On Mon, Oct 28, 2024 at 02:59:17PM +0800, Zhao Liu wrote: > (+John) > > Hi Babu, > > This patch is fine for me. > > However, users recently reported an issue with SUCCOR support on AMD > hosts: https://gitlab.com/qemu-project/qemu/-/issues/2571. > > Could you please double check and clarify tha

Re: [PULL 39/42] i386: Add support for SUCCOR feature

2024-06-24 Thread John Allen
On Thu, Jun 13, 2024 at 05:50:08PM +0800, Xiaoyao Li wrote: > On 6/8/2024 4:34 PM, Paolo Bonzini wrote: > > From: John Allen > > > > Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required > > to > > be exposed to guests to allow them to h

Re: [PATCH v5 0/3] Fix MCE handling on AMD hosts

2024-06-06 Thread John Allen
On Thu, Jun 06, 2024 at 11:09:05AM +0200, Paolo Bonzini wrote: > Queued, thanks. I added a note to the commit message in the third patch: Thanks, Paolo! > > By the time the MCE reaches the guest, the overflow has been handled > by the host and has not caused a shutdown, so include the b

[PATCH v5 0/3] Fix MCE handling on AMD hosts

2024-06-03 Thread John Allen
AO errors and introduce proper deferred error support. - Introduce new patch to support overflow recovery cpuid bits. John Allen (3): i386: Fix MCE support for AMD hosts i386: Add support for SUCCOR feature i386: Add support for overflow recovery target/i386/cpu.

[PATCH v5 3/3] i386: Add support for overflow recovery

2024-06-03 Thread John Allen
case, when we handle the uncorrected error from the poisoned memory access, the overflow bit will be set and will result in the guest being shut down. Signed-off-by: John Allen --- v5: - New in v5. --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 1 + target/i386/kvm/kvm.c | 2 +- 3

[PATCH v5 2/3] i386: Add support for SUCCOR feature

2024-06-03 Thread John Allen
y: William Roche Reviewed-by: Joao Martins Signed-off-by: John Allen --- target/i386/cpu.c | 18 +- target/i386/cpu.h | 4 target/i386/kvm/kvm.c | 2 ++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[PATCH v5 1/3] i386: Fix MCE support for AMD hosts

2024-06-03 Thread John Allen
specific status bits. Modify kvm_mce_inject to properly generate MCEs on AMD platforms. Reported-by: William Roche Signed-off-by: John Allen --- v3: - Update to latest qemu code that introduces using MCG_STATUS_RIPV in the case of a BUS_MCEERR_AR on a non-AMD machine. v5: - This version

Re: [PATCH v4 0/3] Fix MCE handling on AMD hosts

2024-02-20 Thread John Allen
On Wed, Feb 07, 2024 at 11:21:05AM +, Joao Martins wrote: > On 12/09/2023 22:18, John Allen wrote: > > In the event that a guest process attempts to access memory that has > > been poisoned in response to a deferred uncorrected MCE, an AMD system > > will currently ge

[PATCH v4 0/3] Fix MCE handling on AMD hosts

2023-09-12 Thread John Allen
eck for AO errors. John Allen (2): i386: Fix MCE support for AMD hosts i386: Add support for SUCCOR feature William Roche (1): i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest target/i386/cpu.c | 18 +- target/i386/cpu.h | 4 target/i386/help

[PATCH v4 1/3] i386: Fix MCE support for AMD hosts

2023-09-12 Thread John Allen
specific status bits. Modify kvm_mce_inject to properly generate MCEs on AMD platforms. Reported-by: William Roche Signed-off-by: John Allen --- v3: - Update to latest qemu code that introduces using MCG_STATUS_RIPV in the case of a BUS_MCEERR_AR on a non-AMD machine. --- target/i386/helper.c

[PATCH v4 3/3] i386: Add support for SUCCOR feature

2023-09-12 Thread John Allen
Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. Reported-by: William Roche Reviewed-by: Joao Martins Signed-off-by: John Allen v2: - Add "succor" feature word.

[PATCH v4 2/3] i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest

2023-09-12 Thread John Allen
From: William Roche AMD guests can't currently deal with BUS_MCEERR_AO MCE injection as it panics the VM kernel. We filter this event and provide a warning message. Signed-off-by: William Roche --- v3: - New patch v4: - Remove redundant check for AO errors --- target/i386/kvm/kvm.c | 9 +++

[PATCH v3 0/3] Fix MCE handling on AMD hosts

2023-09-06 Thread John Allen
when we are running on an AMD host. v2: - Add "succor" feature word. - Add case to kvm_arch_get_supported_cpuid for the SUCCOR feature. v3: - Reorder series. Only enable SUCCOR after bugs have been fixed. - Introduce new patch ignoring AO errors. John Allen (2): i386: Fix M

[PATCH v3 1/3] i386: Fix MCE support for AMD hosts

2023-09-06 Thread John Allen
specific status bits. Modify kvm_mce_inject to properly generate MCEs on AMD platforms. Reported-by: William Roche Signed-off-by: John Allen --- v3: - Update to latest qemu code that introduces using MCG_STATUS_RIPV in the case of a BUS_MCEERR_AR on a non-AMD machine. --- target/i386/helper.c

[PATCH v3 2/3] i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest

2023-09-06 Thread John Allen
From: William Roche AMD guests can't currently deal with BUS_MCEERR_AO MCE injection as it panics the VM kernel. We filter this event and provide a warning message. Signed-off-by: William Roche --- v3: - New patch --- target/i386/kvm/kvm.c | 13 ++--- 1 file changed, 10 insertions(+)

[PATCH v3 3/3] i386: Add support for SUCCOR feature

2023-09-06 Thread John Allen
Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. Reported-by: William Roche Reviewed-by: Joao Martins Signed-off-by: John Allen v2: - Add "succor" feature word.

Re: [PATCH v2 0/2] Fix MCE handling on AMD hosts

2023-09-05 Thread John Allen via
type %s injected", > - addr, paddr, "BUS_MCEERR_AO"); > + "GUEST addr 0x%" HWADDR_PRIx " of type %s %s", > + addr, paddr, "BUS_MCEERR_AO", > + IS_AMD_CPU(en

Re: [PATCH v2 1/2] i386: Add support for SUCCOR feature

2023-09-05 Thread John Allen
On Fri, Sep 01, 2023 at 11:30:53AM +0100, Joao Martins wrote: > On 26/07/2023 21:41, John Allen wrote: > > Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required > > to > > be exposed to guests to allow them to handle machine check except

Re: [PATCH v2 2/2] i386: Fix MCE support for AMD hosts

2023-09-05 Thread John Allen via
STATUS_RIPV | MCG_STATUS_EIPV; > [...] Yes, that looks correct. I will fix this in the next version of the series. Thanks, John > > > Cheers, > William. > > > On 7/26/23 22:41, John Allen wrote: > > For the most part, AMD hosts can use the same MCE injection

[PATCH v2 0/2] Fix MCE handling on AMD hosts

2023-07-26 Thread John Allen
when we are running on an AMD host. v2: - Add "succor" feature word. - Add case to kvm_arch_get_supported_cpuid for the SUCCOR feature. John Allen (2): i386: Add support for SUCCOR feature i386: Fix MCE support for AMD hosts target/i386/cpu.c | 18 +- t

[PATCH v2 1/2] i386: Add support for SUCCOR feature

2023-07-26 Thread John Allen
Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. Reported-by: William Roche Signed-off-by: John Allen --- v2: - Add "succor" feature word. - A

[PATCH v2 2/2] i386: Fix MCE support for AMD hosts

2023-07-26 Thread John Allen
specific status bits. Modify kvm_mce_inject to properly generate MCEs on AMD platforms. Reported-by: William Roche Signed-off-by: John Allen --- target/i386/helper.c | 4 target/i386/kvm/kvm.c | 17 +++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/target/i386

Re: [PATCH 1/2] i386: Add support for SUCCOR feature

2023-07-12 Thread John Allen
On Fri, Jul 07, 2023 at 04:25:22PM +0200, Paolo Bonzini wrote: > On 7/6/23 21:40, John Allen wrote: > > case 0x8007: > > *eax = 0; > > -*ebx = 0; > > +*ebx = env->features[FEAT_8000_0007_EBX] | > > CPUID_8000_000

[PATCH 1/2] i386: Add support for SUCCOR feature

2023-07-06 Thread John Allen
Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. Reported-by: William Roche Signed-off-by: John Allen --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 4 2 files changed, 5

[PATCH 2/2] i386: Fix MCE support for AMD hosts

2023-07-06 Thread John Allen
specific status bits. Modify kvm_mce_inject to properly generate MCEs on AMD platforms. Reported-by: William Roche Signed-off-by: John Allen --- target/i386/helper.c | 4 target/i386/kvm/kvm.c | 17 +++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/target/i386

[PATCH 0/2] Fix MCE handling on AMD hosts

2023-07-06 Thread John Allen
when we are running on an AMD host. John Allen (2): i386: Add support for SUCCOR feature i386: Fix MCE support for AMD hosts target/i386/cpu.c | 2 +- target/i386/cpu.h | 4 target/i386/helper.c | 4 target/i386/kvm/kvm.c | 17 +++-- 4 files changed, 20