Message ID | 20180510204148.11687-3-babu.moger@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kvm-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AA11560353 for <patchwork-kvm@patchwork.kernel.org>; Thu, 10 May 2018 20:42:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B8D228CF8 for <patchwork-kvm@patchwork.kernel.org>; Thu, 10 May 2018 20:42:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9007928D13; Thu, 10 May 2018 20:42:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4E8128CFB for <patchwork-kvm@patchwork.kernel.org>; Thu, 10 May 2018 20:42:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752190AbeEJUmM (ORCPT <rfc822;patchwork-kvm@patchwork.kernel.org>); Thu, 10 May 2018 16:42:12 -0400 Received: from mail-sn1nam01on0080.outbound.protection.outlook.com ([104.47.32.80]:43264 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751937AbeEJUmI (ORCPT <rfc822;kvm@vger.kernel.org>); Thu, 10 May 2018 16:42:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=V/aoeY7xdeOM5+46fEeGzmnmOlVc2JEAsInvVosTH70=; b=nUO5tBF/UadjmugaSiA81/zZ3L73/HN4H089K9b1/kxB9z/DClchQkAKfhc36k05k4RvsNvB5/Abt+N8MwT/MqSCrAbwKvXAtVmBn3s+K50eB0mmkF3ihtY/7+Uurl9koMk6bqqCJ1uZNkP2WcyS7mHm27Yy0AyW4kNPDNcpBG0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; Received: from bmoger-ubuntu.amd.com (165.204.78.1) by SN1PR12MB2478.namprd12.prod.outlook.com (2603:10b6:802:29::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Thu, 10 May 2018 20:42:04 +0000 From: Babu Moger <babu.moger@amd.com> To: mst@redhat.com, marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, mtosatti@redhat.com Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, geoff@hostfission.com, kash@tripleback.net, babu.moger@amd.com Subject: [PATCH v8 2/8] i386: Add cache information in X86CPUDefinition Date: Thu, 10 May 2018 15:41:42 -0500 Message-Id: <20180510204148.11687-3-babu.moger@amd.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180510204148.11687-1-babu.moger@amd.com> References: <20180510204148.11687-1-babu.moger@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0801CA0024.namprd08.prod.outlook.com (2603:10b6:803:29::34) To SN1PR12MB2478.namprd12.prod.outlook.com (2603:10b6:802:29::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:SN1PR12MB2478; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2478; 3:+jYnTwn+JbQHoS1SL/HCyY4+ihpqQvUCTlXcEq5Jq5RyWEjLBnoGuxSibH7D5Kmck6/cZQCuyW8AthIBvJtXuI4UvY4WYLsfb9jRBO5Y/PcDMojz6wXwMuvvAAV8xpDYvYcK+OHCHAWaXCigIzNzOAAg+DULum4008+OepoC5GpJutM02uCwTAC90Iq3OneNP0qMA0K7eCbyydNYbIsuWfh8r5/A8mHu+o0vX69EWDrnKieDHpZRW9E1SNVKqi/B; 25:UQyDeGCoJ5uTM8K+SdZ6PEgaHRCmG+aODC6K3CTw9vxSAaEedcwULmec6LdtO9xsygrQFPq89q5GlWZ/33QuZdfTaaD6lFU/zHXA5Drf55WmmmsNODXZlShra1IRjm+Jx+r8KV3rfr7K+Uctss4nTT5F7j9F0pvz7t5Sa6+C8wFijPy8VXzZMpiKDOUjCvpr2iWU6WxO3dQzmNA8YpyPWN8IakV4yJ73QAoseD+rzkbeO0Wv2c1Pvmdo6xmJEDbarT+a6QhZSXclaFYk4GvWlpFZtpTGsjYxI4Rxia5qB2cBGrdPBdPM1XazzhdPsmqL/vL/rlR4ZwGYB0NRnipGJw==; 31:YlCXI0Z2JsRdgseOyf7O0ITw+F+REKXwkQknDaWhkEbME9Sx6waPBdUMybNJinarESh4iEHDGkFRUr8CLjrBJgALTPbn4gM6ut7ujfe/j1wjeybnWFDzFhGo5t9D1pnMEOv6jiIgM0I3RxMs06xoXYchq4rFzyiJCQHtarOm+Znil2EoYIvPUIlGwuj+AvqslBzps31m/57VVkZTZ5x0lta1S7cmw7fTDxEi+O8wVus= X-MS-TrafficTypeDiagnostic: SN1PR12MB2478: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2478; 20:SFZPRbluARllwud0CKUgjR2eJKrjpQn7FP/8+pbRXFtGK+ZI3MOrbVw58VR/7Rto3FUdp2n5A3VXnBgy8Ux071+BoyuBDQwyKhhM42q/l2fDuBgm7L527ERQ3b9uy/Z4plYaC3XjeIfPY0YhTA2PBG2CspvK/NGN16ViR3oJLi7jeqWScXfqHB5FhUdOLRvI73ex6ZAhfdheJnfbK3D7UNy6A/32jnOKl1wIXjPyQx7U0H+qTYFs7nvpoAP5iFxNyPihwnThZ71Ar1j8hESHIVx+T0JT6njaSE4tlyGUCms8SHGF4LtapgcM8nb61RzEUZrH2i7NsFaGLGBHAx0ssoXUnHi3OTtq5xtTb3z+2xqaGbpRK5dhu83TTM9wayDyUeiIBFEqbzJz83M8EFZZ7piFXMjRpUWMlpG+avl3GwRGQWgHVhg1Pt5mZnb96/H+dSWtKX0paQprQ3MEoa/F6WzG9WsjHHy1s/cvWHZ4b9nQEu1evic4aC9yXx/8b3uO; 4:n2YouPZj6O3cTkfmTkvOVZnQRT1Ede59kf16ipJJHjEnMbRQcuDdWEwGcoy6mpw7nFHqlXQdSTxgOYsNlUz848PE5jK9iVk8Y96TP4yO22kwXQSrQSrR+DFU7n1+Ji7duaUu4xo9zPuC0WTCHkMl77zuMuOg9cIoaGv4ql+F2QMjFu27wxbPfqI/Vuayi3yOFmaT49Owfd01ZQzPYduJ+Om2nRr/VXrejpyyXqVFXWGHiGyQauEGL9XJhRc98yUCf+o3DEeqsfk4FIQTjzLPl6hgGAiNq1zHMrkAAXaVQ7ISvyo6OHEG/bogpLX5f/5U X-Microsoft-Antispam-PRVS: <SN1PR12MB2478E99AC6F75CFFCD17500595980@SN1PR12MB2478.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:SN1PR12MB2478; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB2478; X-Forefront-PRVS: 066898046A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(396003)(39860400002)(39380400002)(189003)(199004)(476003)(446003)(48376002)(50466002)(50226002)(2616005)(53936002)(76176011)(97736004)(4326008)(11346002)(16526019)(8676002)(86362001)(186003)(7736002)(956004)(44832011)(305945005)(6486002)(81156014)(2906002)(8936002)(52116002)(7696005)(59450400001)(486006)(81166006)(386003)(3846002)(26005)(25786009)(68736007)(51416003)(106356001)(5660300001)(316002)(36756003)(16586007)(105586002)(53416004)(7416002)(6666003)(6116002)(15760500003)(39060400002)(72206003)(66066001)(478600001)(47776003)(1076002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB2478; H:bmoger-ubuntu.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB2478; 23:j46fHHuS3tMQ/idLaI1dL5yhQCkVq58dhymgH1WCn?= =?us-ascii?Q?qnt15Esn87RfqsIT2317e+d7k2EZ9FDGBdE4aMGS9Z7+cS5OQVulP+IhMZMc?= =?us-ascii?Q?1URbIwhqsb8oJyCoNtF1AnMlC2+67J20Ctszsayx0TiKN/vY2djbCiGAz8UF?= =?us-ascii?Q?W+zTNhEL4hXRVUY7frMvobr6tdQaT4qbNxaGf5xMsAWCwVTFTKhT0nVZiqZJ?= =?us-ascii?Q?frtWcIpVdch4nQHNBEvjBRB5AcDBm8+3JcNQ4Y0hbecCjwir13C+VOwL//1H?= =?us-ascii?Q?2XMrNeN+tNAV3xw8in71YIilbwywcHfT7zs+OcBY17A4uU6lUnDtOsL4kk94?= =?us-ascii?Q?4stEopARqbhyck/38958ifhywCxpwu1Li+Arb6qVIGl7dNe7r7q8GIAZV1i9?= =?us-ascii?Q?IIBmnhsEl5az4eihb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jLI1aPf/z7nyjqrZFA?= =?us-ascii?Q?BYGhOzkyu2AITnRwzbs7h8=3D?= X-Microsoft-Antispam-Message-Info: 0w6g/pfeYyuWpnR0VzBT44l/2cHwGeSkkJ8ks20FAACZaNRtD4LthoxqlMHivhpxy5PL77ghA6Hs1XjrjaJwhJILxdrh5wUlTuh2h5elXcOuA0KN15SJkeo+p4UbYNQlvb5qv4Ld6kTgTwp/s6McooKqRKiakNBcY/wpOQVAknqRWnHRM2ppejxTfIVaYrAF X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2478; 6:GapQboRAtkbhT3DUi4IGQrA5EFCgrgipJqlOWP/EphHmUxBsWHLOoIeBSbeWxZpL3jwBDS0CGONCXp3wzqk5RGiVELbwsXld2o7NEr4vQoo1Mlde8L0NTjSjlojpRU1NndVyijCImu3RUx1iv/o0V/Eiet2INOhlHq1RkaqNtU74wdpN+oNuq/cq34dDJVVgBIpQQglOlB5O2WHDn58rz+m5SAyK/RAx/m4EP6EnSL6svsuIiU9GMnx5I3Y6ym+MWibcQ/r+CvgWk/KQqTf58b1nPGz2M2Ee69zHliZeL9p5x/IMlKvpmYRY/UU0940wX3+mi3ZH1I58LAUu4b0u2PniIe9mpGG5EjbcTWU2B/gPi2lj+KQ4cMkMZchFOr7EOQmFc+99iWdYc8bKAs/DlFniBJSkHwa+bgi2FwBkSlbb9cNLAOkaxXTMXq+08khAcxLW/uBG9jHCxmsZ99RckQ==; 5:1KIn+OAl74O0PRXbRkF3eCwexUWZZukQW4g0RVrXECg5gprw2sTCqd89F1wiFzrdeS2sznur7ZT4AXhRLlXG0JdNbq/SvBldyq3WNpcy3mREywoAM4cqtk0NdiFrnL4paDRvzys1Ruj8Q5PMRthRgXNc1FyiEgkfchgKwm9PCoY=; 24:4g6oY/h/sHXgvIV7/lmEPDO8T1u+9Lltgl4IwKbJDjDWb31KnUjndc882ic980uUeodUlAiBiy28mVe3dvmJDcUUp1pQ9X9Tx43JiVv6gvE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2478; 7:lvddtaRXKaaSj1vdtgAdsBCDPpEno9cTPCeOnto8gY2rZcuk8C9sUZP3PvxJJiuK8+jXi0mk/MppxTkDP6/6JTsqeK9OkOzbQBMJJ5enaYoXYlEmBsMn1cv15+mRu7LlDOheJsRGHg2DObLSS+pniIVaD2/+by6tNOwtOv/neefeXE3fbwZ7jK04oenCYVCSbyq3k41O8aCRP9aYOJlec7wfdsZsOcSixjQCokEEjBme63NiNipj3uHTSWZT6gBA; 20:R5MNTxoUrXnomu8+uMS3TQG0ybyZRMuFGU9ah9QOpGPFhbkX/Ou0vGrHsetQzEMgumgcRsfWcSmPYyxLv0y91+Vxmn0d7fxklZtGofCOtO2o6c67GvCL71nUtpq2++W8Nw6N20EM5X0RMj7WCXq2PHMmvCz8SwjAmJk0EcqYEO4nt2I5KEq3Ny5ZTa8eTGhcl/7Af/whoYrN9yGCmejwLphT7Y8hoOpfDfWXhGnHrPlGXp1xbKdICAKA6lIlkjqP X-MS-Office365-Filtering-Correlation-Id: e33afcc6-da44-47cf-28e6-08d5b6b67d5d X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2018 20:42:04.3541 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e33afcc6-da44-47cf-28e6-08d5b6b67d5d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2478 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 18835400f1..3a74c4b1e4 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1105,6 +1105,7 @@ struct X86CPUDefinition { int stepping; FeatureWordArray features; const char *model_id; + CPUCaches *cache_info; }; static X86CPUDefinition builtin_x86_defs[] = { diff --git a/target/i386/cpu.h b/target/i386/cpu.h index fa03e2ced4..372f8b7ef5 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1096,6 +1096,12 @@ typedef struct CPUCacheInfo { } CPUCacheInfo; +typedef struct CPUCaches { + CPUCacheInfo l1d_cache; + CPUCacheInfo l1i_cache; + CPUCacheInfo l2_cache; + CPUCacheInfo l3_cache; +} CPUCaches; typedef struct CPUX86State { /* standard registers */ @@ -1282,6 +1288,7 @@ typedef struct CPUX86State { /* Features that were explicitly enabled/disabled */ FeatureWordArray user_features; uint32_t cpuid_model[12]; + CPUCaches *cache_info; /* MTRRs */ uint64_t mtrr_fixed[11];