Message ID | 20181220182850.4579-21-alazar@bitdefender.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-2.web.codeaurora.org (Postfix) with ESMTP id 9B14313B5 for <patchwork-kvm@patchwork.kernel.org>; Thu, 20 Dec 2018 18:36:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87FFC28E58 for <patchwork-kvm@patchwork.kernel.org>; Thu, 20 Dec 2018 18:36:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7681328F39; Thu, 20 Dec 2018 18:36:23 +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,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 352CA28E58 for <patchwork-kvm@patchwork.kernel.org>; Thu, 20 Dec 2018 18:36:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389320AbeLTSgD (ORCPT <rfc822;patchwork-kvm@patchwork.kernel.org>); Thu, 20 Dec 2018 13:36:03 -0500 Received: from mx01.bbu.dsd.mx.bitdefender.com ([91.199.104.161]:44322 "EHLO mx01.bbu.dsd.mx.bitdefender.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389293AbeLTSgC (ORCPT <rfc822;kvm@vger.kernel.org>); Thu, 20 Dec 2018 13:36:02 -0500 Received: from smtp.bitdefender.com (smtp02.buh.bitdefender.net [10.17.80.76]) by mx01.bbu.dsd.mx.bitdefender.com (Postfix) with ESMTPS id 0BB35305FFC1; Thu, 20 Dec 2018 20:29:38 +0200 (EET) Received: from host.bbu.bitdefender.biz (unknown [10.10.193.111]) by smtp.bitdefender.com (Postfix) with ESMTPSA id 008BC304BD6A; Thu, 20 Dec 2018 20:29:38 +0200 (EET) From: =?utf-8?q?Adalbert_Laz=C4=83r?= <alazar@bitdefender.com> To: kvm@vger.kernel.org Cc: Paolo Bonzini <pbonzini@redhat.com>, =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= <rkrcmar@redhat.com>, =?utf-8?q?Mihai_Don?= =?utf-8?q?=C8=9Bu?= <mdontu@bitdefender.com>, =?utf-8?q?Adalbert_Laz=C4=83r?= <alazar@bitdefender.com> Subject: [RFC PATCH v5 20/20] kvm: x86: hook in kvmi_trap_event() Date: Thu, 20 Dec 2018 20:28:50 +0200 Message-Id: <20181220182850.4579-21-alazar@bitdefender.com> In-Reply-To: <20181220182850.4579-1-alazar@bitdefender.com> References: <20181220182850.4579-1-alazar@bitdefender.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 |
Series |
VM introspection
|
expand
|
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 6d5f801e4797..64572f7ec689 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -7773,6 +7773,9 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) } } + if (kvmi_lost_exception(vcpu)) + kvmi_trap_event(vcpu); + r = kvm_mmu_reload(vcpu); if (unlikely(r)) { goto cancel_injection;