Message ID | 147801567435.18237.5589304835385835946.stgit@brijesh-build-machine (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.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 CBE6B600C8 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 1 Nov 2016 16:12:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA5FE299A2 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 1 Nov 2016 16:12:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB819299AB; Tue, 1 Nov 2016 16:12:04 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1BD61299A2 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 1 Nov 2016 16:12:04 +0000 (UTC) Received: from localhost ([::1]:48987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1c1bfO-0003cD-SW for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Nov 2016 12:12:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1c1bOh-0006b7-PG for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:54:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1c1bOd-0004A3-Ju for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:54:47 -0400 Received: from mail-sn1nam01on0063.outbound.protection.outlook.com ([104.47.32.63]:39824 helo=NAM01-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1c1bOd-00049v-Cv for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:54:43 -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=QPPD9Juv2PFYDcdD/jH7ZySX4btAb9c/8iBCf+Dq6Z4=; b=sQ2c+pNwxD0Uei05qf2W71THoP6bDMcY6/YnMDdjhrqQrCkBm2Lmr4P2x4IAVfjPOsFgoTu29P18I6x2HvwA/U7JRF1QmNeUX5kpHCJE/jKT68d+aaHh9ysaQB2C02bnbj17fDRSysq1KAvC1nfJmxSkb5NMDIzAMTTX+w1vdeI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by SN1PR12MB0671.namprd12.prod.outlook.com (10.163.208.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Tue, 1 Nov 2016 15:54:39 +0000 From: Brijesh Singh <brijesh.singh@amd.com> To: <Thomas.Lendacky@amd.com>, <ehabkost@redhat.com>, <crosthwaite.peter@gmail.com>, <armbru@redhat.com>, <mst@redhat.com>, <p.fedin@samsung.com>, <qemu-devel@nongnu.org>, <lcapitulino@redhat.com>, <pbonzini@redhat.com>, <rth@twiddle.net> Date: Tue, 1 Nov 2016 11:54:34 -0400 Message-ID: <147801567435.18237.5589304835385835946.stgit@brijesh-build-machine> In-Reply-To: <147801550845.18237.12915616525154608660.stgit@brijesh-build-machine> References: <147801550845.18237.12915616525154608660.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR21CA0014.namprd21.prod.outlook.com (10.173.47.24) To SN1PR12MB0671.namprd12.prod.outlook.com (10.163.208.29) X-MS-Office365-Filtering-Correlation-Id: a7db16cc-faca-4e7f-c65b-08d4026f63c0 X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0671; 2:ZZhSCvTzC5BT54/ApJociM3xrrlndthoP9+vQMXIT1De2gYuXGp8iTPwcxA6nnEMYWtKPli3WCOqJMb+21Eys/EyduXCbM5daNqdM/nHYsevZMus0bes2sce/5CYR3p2Bl0yyF6guF0QcqTjPxQqknfLqV7mK9ZFK4Mh8x481wRZ4Ye/0xwJ1dSL8+yHfq9Mi7054N4l00KV+KHO5twUoA==; 3:rrfUkNhnR5m6nHiMNiCWj3LPZgTcKeTzUjrU8VG6Jwbqn00K+8iebpcArQ/G/t/gbQOCaH9e24fTuO9j/hijfQ1rAaYUx2RTl/17tl7PPu4+XUkVaf1SRWc7PnZLbL8JFGY1+KfxiGhkT3OcVhEk+Q==; 25:yBWDnn5PyRR1Wg8bhHL0OInaDbYk75/awQzkp3JAy3eMOX5DrfoXLzGMkZ+K6lp+PZ/YIWLK1t725wGnNKUtKsNM68nK/XxceyZlq8jLWYNykjpK53KcroyZwu2LGf/QOEE9cp78LrTo5uPt0qATrTZk8VjVxHcD76HP0Nq2OpYcP4mUc8BMitKri9srVitrpPnCoiP/i0ot7L7SoveVB1GmpVultXn0lF78Aa4kkl8FPeEvs1uf00SZPszGSqU5dtB/ej70WLUoRC9lGGBmCDUHutkhTbEnkXb777kufVafR+zjKwkqP+nJakNWcH0k/A7P0ZtdBEDr4Vl2KDX0ncBMzTRDWpPJLEgpOO7SMqRiNu6ytfzZ1oVsKt0K4ORFb0NFEzXLe1kJRWGJCBUQhM5eOIMeaAatNdH1HbimjnCk6umxWpMD2+JRhTC3G/RO X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0671; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0671; 31:EO/nd8fv5hJjPbN9WxIVWLrR7Skgot7PtpO/YJPEEgL+2BdkH2Go9rlNRYe9fqhiuP+CpHk13DTPmUp+0d3s8c7Fn4e6bT10IxV7uR4w67rR36MloJLB/fS1SzEHj8FanUBq3M48EEvzI4jwj2Yjc5hiTEm9TNedPOyahWlQPMCu2N2SW0HSWeb2vkwOJBa0qCpzFH0r6SAXf0EFnUhcZxbgl8GOYyI/2g+oZgGUaaNEdusbLG3qKbpn8o8bqtZC; 20:VhmSV1UuYjtHwcNIGP48RM4nRg/Yx+t70o1VUYi70Oq+RQtufK3oayDwWFC+0fQaSjfFg8osGURRgXk4F3ZbaJL61aahveqqGIGNnqKXRAVSY43mKKluT1fX5jMAzPvjOGREjCEso3sThFp1bh69/9r5mTRy869FoXddI6GtCQQ4boMehQy+RtA/q7PpMcTkQ/lS+g0KpUbXOUOLBC/VHm0qxtUh5tqnf5zsV0p6xMtmulWFY2U1guPd603gqImw/UTY5PAB5y4i8j797dq5yj3JWsbJgj+hLizyXU5y7x8NbHi23v4Ee6Z0Uf3/cHaAnvzufaIDl+Xaqet73ebfwpnR+5q85ccnfKKF1Hzt6SWH7l0kSABW/mz4mEzQb67x+SuWjHKPaxc6oPD9cnYFwnc4W8ySQlEi0bLPgA+jPJvpUBABmGHP0uF0oreEK/ZwZFjnAG2YIR200+5GfRzK68iRfhVxiAeOksF/cggJ2RXAA1C3zp0INMLpON/J4lmN X-Microsoft-Antispam-PRVS: <SN1PR12MB067183A925DA6D20E1F550A4E5A10@SN1PR12MB0671.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:SN1PR12MB0671; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0671; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0671; 4:j32BRbZJIRAGSmMSLIQPSBYCWkhqm5b5v8hdyxZFqw5K3q84H1bN0YPoJYTKaCw/MsIKDEx2SU8RMZ7EPa1sz5pxuncBhD80HLS1J+grMxKvzs8Oy2q+BZLdX9TTBm8MY1OqDlr4Z5fzxDxlDeLVX0peHT69wY6ZWpQtpwpeSL0ZsUAPPX46Sycd9B394W/e8ZjJtfqKwsVA33jTf3QzR59S8s3+eyEbuz9ghfnVi+SspxWwToLrhbhInDhsIahYu3ljxJvTASzEjXVmR1MojxUPyEhZ0CKuqsAyIBaR7xiisG9dzz9KC6k94gHTavvH3X1avLzbJ2hOnV6mqhFlxQ/m1+rg4aph3/Tt27mF9N0fm/0W5Jlg793lOO3V7Q3ebCz8OkPEHgring81um20ioQi9UaRMJSfEsYUK2Y5LiGcuSJrHv5KkBnjMOME0Bn36uOcuBK75X4ASqPbHpwmrg== X-Forefront-PRVS: 01136D2D90 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(229853001)(2201001)(6116002)(3846002)(66066001)(586003)(230700001)(47776003)(68736007)(23676002)(50466002)(2950100002)(9686002)(103116003)(97736004)(189998001)(5001770100001)(5660300001)(4326007)(86362001)(83506001)(6666003)(105586002)(42186005)(19580405001)(19580395003)(33716001)(8676002)(2906002)(50986999)(54356999)(7416002)(81156014)(4001350100001)(33646002)(76176999)(101416001)(106356001)(92566002)(305945005)(81166006)(7736002)(77096005)(7846002)(921003)(217873001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0671; H:[127.0.1.1]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjEyTUIwNjcxOzIzOlBncXdaaUU0azArTEM2S2RHS0tsR01sOTR6?= =?utf-8?B?YVoyazVyQnhPYStOalNHNXlYUEhFL2xBUzdwVjFBbWFkNnNlanhUZWlGV0pF?= =?utf-8?B?d2YrWmtYWWE2cU9VUDdzOXcvWmNCSDdiUlBHZlZaNXYrSXdSVnhWelZGcys3?= =?utf-8?B?eDNmSndqaUhGRW0rcVR5L3hScjhwbnNwU0xKWXZDZXpHS2VhMzF6aVhpQlVs?= =?utf-8?B?OGE2TDVUZGFmVExZWkF6OGR4Y1czZjRaeko5enVzYVFQQTYyUFFOR2FwMXF6?= =?utf-8?B?MXYybUhtZlhwL0JwVXNGSERVUHdraTdTWWpQbjZ4VGl4NXVSejBMNWdpczdE?= =?utf-8?B?Ums4bFRnTCsvN3N5YlBudExubG5IZks2NEg3QUtIQldSQ3Y0THg5QVFLV0Nk?= =?utf-8?B?WWZTRFVKdmswREVoSGdjN2pKYXhGakkraERXUXRFelp5TGNxTjBIM3NCWGpO?= =?utf-8?B?S2JHdGpqN3JGd0pRaE1XaFNkRURqa1YwUjVPalNuejhOd2FVbnlxNjhERDI2?= =?utf-8?B?aXVlQXNaL3JPQkxYUWtIUUFrZm5CeHk5NFhaSHVGQXhPaHF6dFlOdGg3VHhq?= =?utf-8?B?RDVnU0FSenJqSzZSa2VuOTFiayt6Mkd4bysrUmtTTFNkckdqekcxb2FCcTRF?= =?utf-8?B?cHQwbjdNSFFXbmh4c2sxNUpZK0UwcGN0L0FjZHpaSlI1SG1IMStydGg0d0Rj?= =?utf-8?B?Z3hoYnFuZXJmNSs2NS94eDJML0U3WHp3ZU1DNmc2OXc4eS9Na0lxNUxRMnN0?= =?utf-8?B?c0pUZWhSQ1dFZGdNMDgyMXNvbVdVN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Dg4emhab29FM2hiSUZsVk5sM3c4MUJ1V0htMFlLaCtsZmtyRE5kNlRu?= =?utf-8?B?TVh4eDJ3NEhWMXlibXRGZz09?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0671; 6:soWGb3AcMH94Eo0B+oq/IVxiQMsPWyPE3anppozlLgh3rgoBiDdo1B/PutfurC+xTSPfTnjzCEfPRjkspY0W7teTsZViymDSKMNTJpuhHw/uhjlgj297ocL+R7OhBnOOttiD+e6awLhhc9SFiA3mu3THxptgpXGlZZulDv6f63GKt7A0CvxOBsb5ZmFJeyCiMVVLF7rYb7h6iyi8/3eF5VZ2Hb3Sy45essJePCWIjgB1V0CjkfPdbLGdscaRnoJzWphAbbRnjKN0BAcP10S3n3UDliUim4WRbCHvf8EkZjeRQ95MykIcnZzW6YNDBabb1dD1sFjiOB8dCcRsRHvlZOmK9wKM91IPt5wTJPbFOCE=; 5:slAh7ONxwsl8JKNmzGY/Lg1kPAIDbCX44MCHZfniQ28dPbtlacsABnDrSVc7a1eMEomYs/fnWqHgx2zdKZIoSW6SekVhrxbt4CkwWR1a3VL6MAOnCcqkFPZXB9jGt3qPKYiDdOkVI2Qw4otMCX+hHQ==; 24:QnJ1ZRgGROgiWKbuv31mjErTSf8ojNErCBzGvzl2nMjyv4bvH4G9irm/sdkC7g6TVusZ8G76DUDkIfnvc6/9WtnhzLW9xsVP0DS28vyU/Yc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0671; 7:yTDeRpP1il5TKKuEJ+dG12WiNmwoFoPvTDTcjX6N3DMrtHmmOo7uZfp5l38xJ0BAkgdOEFXg710FbhHbb7uiOdEcXxVeohm8f81++CcOL+lEaKOPq1/PFXFPAyGS0lHCfoM/KDtDNeZD1M/4fwdQPzTjLos3C3BDCORuM5ufd4YqJQ5J7+AvK4a6WpeYCqrhQ7L9cqiVDY6YrOCH6OT2D1NWBrVmu1OBmyQK2u3YVlIuBeYRmGPWVBJpyphMjZTMhQip204hlwVSQcTGUUOyECOQ3hNXFO6lpoiE6zDQDZCVwWjiNwACdn7lH4P7K/Av6qq7j+l5YETfagjc7ROQ35ZShlXltIztaV9gd1eVuJQ=; 20:LV84/Nv4/Wdh5/16+/G3/qoufIRpsJk1mZx7NfpzHEoRdUdoz0LBBl2BEE3MEBoaC5ynSPzKdLOo+iYhoCYbzxW1g/8iHpnMvrC7zNb63vADVeQrKNVwdnstCmQgy/Yp1UsSBwXL3ivvRS3FiCYJ0XMcaqyCl2SlIZmVXUu0CYO/bDspXj/2xis+dW6gUgvT5/KqVs5D8BMlLC3VbDrMZs45b7vPzIw573rE85tPEEgSK/44UvJ/vQY2857LxUjh X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2016 15:54:39.1484 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0671 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.32.63 Subject: [Qemu-devel] [RFC PATCH v3 16/18] target-i386: add cpuid Fn8000_001f X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: brijesh.ksingh@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 83998a8..9dc7b4f 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -34,6 +34,7 @@ #include "qapi-visit.h" #include "qapi/visitor.h" #include "sysemu/arch_init.h" +#include "sysemu/sev.h" #if defined(CONFIG_KVM) #include <linux/kvm_para.h> @@ -2733,6 +2734,11 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, *edx = 0; } break; + case 0x8000001F: + if (sev_enabled()) { + host_cpuid(index, 0, eax, ebx, ecx, edx); + } + break; case 0xC0000000: *eax = env->cpuid_xlevel2; *ebx = 0;
Fn8000_001f cpuid provides the memory encryption (aka C-bit) location in a page table for the SEV-enabled guest. Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> --- target-i386/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+)