From: Christian Lamparter <chunkeey@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: x86@kernel.org, seanjc@google.com, klaus.espenlaub@oracle.com,
bp@alien8.de, glx@linutronix.de, mingo@redhat.com,
dave.hansen@linux.intel.com, hpa@zytor.com
Subject: Re: [PATCH v1] x86/cpu/cacheinfo: fix panic on Ryzen Mobile 7x40 series in VBox VM
Date: Tue, 17 Oct 2023 21:30:17 +0200 [thread overview]
Message-ID: <4550917.LvFx2qVVIh@shift> (raw)
In-Reply-To: <652989ad8a7f110bad16cf1244c4c68a823f0afe.1693606609.git.chunkeey@gmail.com>
Heads up!
Oracle addressed this with their virtualbox 7.0.12 release.
If you are affected, try it!
On Saturday, September 2, 2023 12:19:11 AM CEST Christian Lamparter wrote:
> Ryzen Mobile 7x40 chips experience an early kernel fault
> (division by zero) due to nonexistent input validation
> from CPUID data in amd_cpuid4().
>
> This error was first reported on reddit [0] for a
> "AMD Ryzen 9 7940HS w/ Radeon 780M Graphics", but since then
> the bug has been reproduced on a "AMD Ryzen 7 7840HS" Laptop
> too.
>
> [...]
>
> The reason why this is happening is because the Ryzen CPU reports in its
> CPUID 80000006 edx register (which contains the L3 Cache Information)
> the value "00009000". This magic value means according to AMD's
> "AMD64 Architecture Programmer's Manual Volume 3" Table E-4.
> "L2/L3 Cache and TLB Associativity Field Encoding":
>
> | Value for all fields should be determinded from Fn8000_001D.
>
> (This means to look in cpuid(0x8000001D,...) instead.)
>
> So, amd_cpuid4() is missing this special case. A case which has been
> present - according to this AMD Community post [1] - since
> Zen 2/Ryzen 3000 Series.
>
> But wait, why is this only happening with Linux' when running under
> VirtualBox with these Ryzen Mobile CPUs and not when running natively?
> [...]
prev parent reply other threads:[~2023-10-17 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-01 22:19 [PATCH v1] x86/cpu/cacheinfo: fix panic on Ryzen Mobile 7x40 series in VBox VM Christian Lamparter
2023-10-17 19:30 ` Christian Lamparter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4550917.LvFx2qVVIh@shift \
--to=chunkeey@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=glx@linutronix.de \
--cc=hpa@zytor.com \
--cc=klaus.espenlaub@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.