From patchwork Tue Sep 13 14:50:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9329381 Return-Path: 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 04A346077F for ; Tue, 13 Sep 2016 16:00:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5E3529298 for ; Tue, 13 Sep 2016 16:00:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA24329450; Tue, 13 Sep 2016 16:00:17 +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 A8B9A293D7 for ; Tue, 13 Sep 2016 16:00:16 +0000 (UTC) Received: from localhost ([::1]:49804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjq87-0002XO-Qh for patchwork-qemu-devel@patchwork.kernel.org; Tue, 13 Sep 2016 12:00:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjpXs-0004o3-MI for qemu-devel@nongnu.org; Tue, 13 Sep 2016 11:22:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjpXn-0002hW-KX for qemu-devel@nongnu.org; Tue, 13 Sep 2016 11:22:48 -0400 Received: from mail-sn1nam01on0068.outbound.protection.outlook.com ([104.47.32.68]:12992 helo=NAM01-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjpXn-0002fi-AT for qemu-devel@nongnu.org; Tue, 13 Sep 2016 11:22: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=urXlHltWWck2lVdL3NSHYIh8mIEzTj+VxK67hRaq3bI=; b=Jf3981uv0nyX6FzWB9hwr+WRmpcnD3sBKUU4+NzqcGYWJ8cd+plsEMsXEMwl/PVNfAL3vl/CWrLDWRkxlg2iSxjDqcOy79WO1s0layqV/WcuN67SUlP5FFnyS2I+WVOIWegmk8qcHshtpMofpCGq1lLUeCK1StcauYg5Pa+uggY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by BY2PR12MB0662.namprd12.prod.outlook.com (10.163.113.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.619.10; Tue, 13 Sep 2016 14:50:19 +0000 From: Brijesh Singh To: , , , , , , , , Date: Tue, 13 Sep 2016 10:50:15 -0400 Message-ID: <147377821533.11859.9325768460158473728.stgit@brijesh-build-machine> In-Reply-To: <147377800565.11859.4411044563640180545.stgit@brijesh-build-machine> References: <147377800565.11859.4411044563640180545.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BY2PR05CA023.namprd05.prod.outlook.com (10.141.250.13) To BY2PR12MB0662.namprd12.prod.outlook.com (10.163.113.151) X-MS-Office365-Filtering-Correlation-Id: ed16c3aa-362c-48c7-d7c9-08d3dbe548b9 X-Microsoft-Exchange-Diagnostics: 1; BY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KZXM31Y2Q7tjY=; 20:4Yd79y/C26X8ha2sYLcvVAc/qyhiHMWLvaf2p8A7DkQGiR3PXSzmkAAcVwFG02WIlJdnwlYgt+DO2c8kHYKZWJsCwhHTtxsmf69YPGem631CJSi2vdpLIEIu4c8AYm84L6rTzRuM6/qbBMoxbMOLNRs+KgCUv2HepLlLjF10ldBRvQnExqemFie86U7m39sxFXD8cqd7eH08FezC0ZUSzVt3SLXJwp5TyqPiEEORXLSEzvPtD/kI1jg0Q5qHdst3HwaRUzIeyCFS/vzf3sIbSiwnmDuAYhALqg+NnzZvpq4blxoP7y0Zfj3clky3mYt1iURHBVgtnvo4Y6bFHnayvrTxFi2/PLFIVMfWb8nkhJ0ULN4rsQVwfuM+bnzVPzvDbN7Hcbs7GKV9mruyXroyJ/wgQ2rxDGI0gD4FifT1nmGHuIsiK6Wj1E3BWWE6iRFWvtXp+pW60hDz5D1Xd+yVfgSW8Nio2LDjdqS2dEB2iPjalBcYbQxkuOx/SR2xbMiz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BY2PR12MB0662; BCL:0; PCL:0; RULEID:; SRVR:BY2PR12MB0662; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0662; 4:PreBF+XxlxVealrOZlzgaHGrCP7Qsf/x55l0dPGX+un8YMajwIcdLEKpg4H54Rfc780yp4jpW+dgYHZC6JvswnQMp0FV7ic292RcY5Q/0R7ec24o0FI7E+ZsCXfO0JIvvK/Va/EAVApqMcaLylCXMj1Bw0fccfyW4VQigggwE3fJM8vZO38WXD5x0UJ4YxQv76cCKzEpBspsy5y2XG/dFEIEu0k4Qzt0var39SSZNMQR1Uuvv1CiOHLryxXukqLm8zusHEK7zPlXpQgJ3VfTczyWsQAzvNhdQMYlhWkqvUkhyNh1YR4qvu6Y8z7xra3rR5wJ8qUi3l8RcLKd+ZmEgnUCamQxw0n6OmC39AnYsiBF8MUy272SUuQ3dXiA4W57adCEGpS5yHRgNH6L7ZQuaQZn+ksak98TgBBhrTlEF+D+gWAWjvUGEK0U8TG4OThq X-Forefront-PRVS: 0064B3273C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(2906002)(19580395003)(19580405001)(81166006)(81156014)(7846002)(68736007)(92566002)(86362001)(305945005)(107886002)(7736002)(8676002)(47776003)(83506001)(9686002)(4001350100001)(33716001)(2201001)(66066001)(189998001)(50466002)(42186005)(106356001)(76176999)(54356999)(50986999)(23676002)(101416001)(33646002)(103116003)(105586002)(229853001)(5001770100001)(586003)(5660300001)(230700001)(6116002)(2950100001)(3846002)(77096005)(97736004)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0662; 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?MTtCWTJQUjEyTUIwNjYyOzIzOnV4anBlcUdPZnZadk9uSFNERFMwVGFHbXZV?= =?utf-8?B?dkZybytUOWNzMC9oQlBzK09RTXE0cXpCRTl6U0RTc2JTaW5sK29PNlc0SjdD?= =?utf-8?B?V3VNb21TU3o2Y3l3bDVXQVNReHVRZXlQbmo3dzN6eHRVb0hQUWg1bGdZaGg5?= =?utf-8?B?Q2ZQam5PWG84aVlrQklYZGRxRUxJZTZEMGdTSzA3eVR0OGtwSlltbG5qdlJH?= =?utf-8?B?VGxidm9hSUFEYytadWRlRVVyUlhqQW8rbHI2d1RGeWRiSHdMN1FZVHFxY0Iv?= =?utf-8?B?czdIcW1IbzlGQlNkTVI2K1dUTFVVeXhKc2JnemZJMzlXby9tRVhFVlZ4Tzdz?= =?utf-8?B?bHBqS0VKUisxblltRkNrNzBlUjBMQm1MZ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33NXShuOkk10U3JRWyAmpgOsfpnhEsu+xPgAkOYYg+Lym5xm3V7Qn1A088lyFczoZwFP0I=; 7:5sYFYkpXHD0y9F1OZKQ49eu+wxFgdYaR8c65t5rV9Rx/poYg3iWzcI20lWZWK11CwoA3ZPLEzNV4+REayTK5XNveuerjMH3BdbUF22AdL2r/BJnXfJsYX1nzvfsVNHub6RfL0TWmQh4oR+J/LiHZpoRHiHY4MSBT6aPVzENsTLDYLRri1wJ1RgCG8Z1Lih5i/31Pk9qC7jbG1Ihj++BI9875h8IQwZugNH1Tkr/BnX+nde1nqC2wEAPMsVeev3Yy SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0662; 20:sOkKe1QuyGiNzddt1VaafZiV4J/IlCCa9A0gKOI+o0FBSoEUw6k9KO53k8UH4u6c6VJ6JIuOTAcmz1onYb2dLXT6UWxAj/cs/+uTJrjHUMLE1dBJ6W6L2At1Je4Ozm15T1WsFaxOrpHKvZthZVGiCIth8z+GQhyNj2rI3o4IMTMq5dlksrMtrx5tfdWySBcucjwk+EdAcxmZhCcPq1QHRnO2MZy2aHwpbcRVkxnrAM2iV1NFPkVq+crX1Lf3O1W0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2016 14:50:19.7589 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0662 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.32.68 X-Mailman-Approved-At: Tue, 13 Sep 2016 11:45:47 -0400 Subject: [Qemu-devel] [RFC PATCH v1 21/22] hw: add pre and post system reset callback X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch adds methods to register a callback in qemu_system_reset(). - qemu_register_pre_reset() : function will be called just after entering into qemu_system_reset(). - qemu_register_post_reset(): function will be called just before exiting from the qemu_system_reset(). A qemu_system_reset() causes loader to reload the OS images into guest memory. In case of SEV-enabled guest we need to call the SEV launch start command before loader copies any data into guest RAM and similarly SEV launch finish command should be executed after we finished copying the data into guest memory. These callback will allow us to hook the SEV launch START and FINISH commands into qemu_system_reset() handlder to start and finalize the SEV guest launch process. Signed-off-by: Brijesh Singh --- include/hw/hw.h | 2 ++ sev.c | 14 ++++++++++++++ vl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) diff --git a/include/hw/hw.h b/include/hw/hw.h index 3669ebd..31dcf9f 100644 --- a/include/hw/hw.h +++ b/include/hw/hw.h @@ -17,6 +17,8 @@ typedef void QEMUResetHandler(void *opaque); void qemu_register_reset(QEMUResetHandler *func, void *opaque); void qemu_unregister_reset(QEMUResetHandler *func, void *opaque); +void qemu_register_pre_reset(QEMUResetHandler *func, void *opaque); +void qemu_register_post_reset(QEMUResetHandler *func, void *opaque); void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); diff --git a/sev.c b/sev.c index c1135c4..141f9d6 100644 --- a/sev.c +++ b/sev.c @@ -35,6 +35,7 @@ #include "qemu/event_notifier.h" #include "trace.h" #include "hw/irq.h" +#include "hw/hw.h" //#define DEBUG_SEV @@ -257,6 +258,16 @@ static int parse_sev_cfg(SEVInfo *s, int type, const char *filename) } +static void sev_pre_reset_handler(void *data) +{ + kvm_sev_guest_start(); +} + +static void sev_post_reset_handler(void *data) +{ + kvm_sev_guest_finish(); +} + int sev_init(KVMState *kvm_state) { QemuOpts *opts; @@ -287,6 +298,9 @@ int sev_init(KVMState *kvm_state) goto err; } + qemu_register_pre_reset(sev_pre_reset_handler, sev_info); + qemu_register_post_reset(sev_post_reset_handler, sev_info); + return kvm_sev_guest_start(); err: free(sev_info); diff --git a/vl.c b/vl.c index 22b8eba..5923c73 100644 --- a/vl.c +++ b/vl.c @@ -25,6 +25,7 @@ #include "qemu-version.h" #include "qemu/cutils.h" #include "qemu/help_option.h" +#include "sysemu/sev.h" #ifdef CONFIG_SECCOMP #include "sysemu/seccomp.h" @@ -1630,6 +1631,10 @@ static NotifierList suspend_notifiers = static NotifierList wakeup_notifiers = NOTIFIER_LIST_INITIALIZER(wakeup_notifiers); static uint32_t wakeup_reason_mask = ~(1 << QEMU_WAKEUP_REASON_NONE); +static QTAILQ_HEAD(pre_reset_handlers, QEMUResetEntry) pre_reset_handlers = + QTAILQ_HEAD_INITIALIZER(pre_reset_handlers); +static QTAILQ_HEAD(post_reset_handlers, QEMUResetEntry) + post_reset_handlers = QTAILQ_HEAD_INITIALIZER(post_reset_handlers); int qemu_shutdown_requested_get(void) { @@ -1733,12 +1738,51 @@ void qemu_devices_reset(void) } } +void qemu_register_pre_reset(QEMUResetHandler *func, void *opaque) +{ + QEMUResetEntry *re = g_malloc0(sizeof(QEMUResetEntry)); + + re->func = func; + re->opaque = opaque; + QTAILQ_INSERT_TAIL(&pre_reset_handlers, re, entry); +} + +static void qemu_system_pre_reset(void) +{ + QEMUResetEntry *re, *nre; + + /* call pre_reset handler */ + QTAILQ_FOREACH_SAFE(re, &pre_reset_handlers, entry, nre) { + re->func(re->opaque); + } +} + +void qemu_register_post_reset(QEMUResetHandler *func, void *opaque) +{ + QEMUResetEntry *re = g_malloc0(sizeof(QEMUResetEntry)); + + re->func = func; + re->opaque = opaque; + QTAILQ_INSERT_TAIL(&post_reset_handlers, re, entry); +} + +static void qemu_system_post_reset(void) +{ + QEMUResetEntry *re, *nre; + + /* call post reset handler */ + QTAILQ_FOREACH_SAFE(re, &post_reset_handlers, entry, nre) { + re->func(re->opaque); + } +} + void qemu_system_reset(bool report) { MachineClass *mc; mc = current_machine ? MACHINE_GET_CLASS(current_machine) : NULL; + qemu_system_pre_reset(); cpu_synchronize_all_states(); if (mc && mc->reset) { @@ -1750,6 +1794,7 @@ void qemu_system_reset(bool report) qapi_event_send_reset(&error_abort); } cpu_synchronize_all_post_reset(); + qemu_system_post_reset(); } void qemu_system_guest_panicked(void)