[Qemu-devel] [PATCH] Pass through cache information for TOPOEXT CPUs

Stanislav Lanci posted 1 patch 5 years ago
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190416123833.60649-1-pixo@polepetko.eu
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>
target/i386/cpu.c | 5 +++++
1 file changed, 5 insertions(+)
[Qemu-devel] [PATCH] Pass through cache information for TOPOEXT CPUs
Posted by Stanislav Lanci 5 years ago
Signed-off-by: Stanislav Lanci <pixo@polepetko.eu>
---
 target/i386/cpu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index d6bb57d210..bc0559fc51 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -4546,6 +4546,11 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
         break;
     case 0x8000001D:
         *eax = 0;
+        /* pass through cache information */
+        if (cpu->cache_info_passthrough) {
+            host_cpuid(index, count, eax, ebx, ecx, edx);
+            break;
+        }
         switch (count) {
         case 0: /* L1 dcache info */
             encode_cache_cpuid8000001d(env->cache_info_amd.l1d_cache, cs,
-- 
2.21.0


Re: [Qemu-devel] [PATCH] Pass through cache information for TOPOEXT CPUs
Posted by Eduardo Habkost 5 years ago
On Tue, Apr 16, 2019 at 02:38:33PM +0200, Stanislav Lanci wrote:
> Signed-off-by: Stanislav Lanci <pixo@polepetko.eu>

Thanks.  Queued for 4.1.

-- 
Eduardo