From: Sean Christopherson <seanjc@google.com>
To: Christian Lamparter <chunkeey@gmail.com>
Cc: vbox-dev@virtualbox.org, open list <linux-kernel@vger.kernel.org>,
x86@kernel.org
Subject: Re: Missing L3 linesize on AMD Ryzen 7940HS chip causes crash in amd_cpuid4.
Date: Thu, 31 Aug 2023 10:53:49 -0700 [thread overview]
Message-ID: <ZPDTrfppUdG7uxPX@google.com> (raw)
In-Reply-To: <89fad050-e074-463e-8c27-a72b89de620c@gmail.com>
On Thu, Aug 31, 2023, Christian Lamparter wrote:
> This is because L3 cache's line_size is "0" (this is coming from the 80000006 edx
> value of 0x00009000).
>
> This can't be right... or? Well, digging around. I found the following explanation
> in AMD's community forum:
> <https://community.amd.com/t5/processors/ryzen-7-3700x-cpuid-function-id-0x80000006-returns-wrong-number/td-p/376937>
> So there's an issue with "wonky L3 values" that happens even earlier with the
> AMD 3700X. In this forum post, the author talks about the
> "L3 cache associativity (bits 12-15) is 0x9".
>
> And the same is happening with both AMD 7950X and 7940HS.
> The kicker is: this value of "9" means:
> "Please look at CPUID.8000_001D".
Ugh, that's just nasty.
> Which I think boils down to implementing X86_FEATURE_TOPOEXT
> for virtualbox to get over this issue?
>
> Now, is there something I'm missing? I don't know if qemu is be affected.
AFAICT, QEMU should be fine, so long as the underlying hardware is sane. Unless
I'm misreading things, QEMU doesn't generate the redirect to 0x8000001D when
synthesizing cache information, and when passing through host cache information,
both 0x80000006 and 0x8000001D are passed through verbatim.
> Or if there's another way around it.
At a glance, having virtualbox zero out EDX if its trying to redirect should also
work.
prev parent reply other threads:[~2023-08-31 17:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 17:18 Missing L3 linesize on AMD Ryzen 7940HS chip causes crash in amd_cpuid4 Christian Lamparter
2023-08-31 17:53 ` Sean Christopherson [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=ZPDTrfppUdG7uxPX@google.com \
--to=seanjc@google.com \
--cc=chunkeey@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vbox-dev@virtualbox.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox