From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6230DC433ED for ; Tue, 27 Apr 2021 11:42:11 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75D586100C for ; Tue, 27 Apr 2021 11:42:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75D586100C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8abjvxIGAT26Jtr9JtP45sTNbI5n1uPEI0teqVZ/xCw=; b=lsxz2XU1kdMkCjjRNBuqG18EK pMEwXNZirSePtAauypS2Fuj7eSrDPyrb7HVpTNsVZDeBFXgdqh44MlYI+PDhP9gylr21AdZWFO8VP +Qe1p1YIGtFVtX1WYtm91FS+kYxR2KxDR97XUV9sPcfiywSYVU1/F1Zw70ReImutmZmr51eT86L0d S12pxwPVPqbw83xE3pFs6nf2dHAYIBVrcC1W6/YkrOI2bs5QlqNJ1iEr7ub2sAParQ+wClwHb98RE DcJkg1MqExrR0hNRuU7FyYTGyqfrttKQaKnLT59X9bpav0N/6jlhRICG8i8SLpqnEnNb/rkaOVndT 1VneLjhkQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbM3X-001XDr-30; Tue, 27 Apr 2021 11:39:07 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbM3T-001XDR-Dh for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 11:39:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=IAUQH8ckRL8RHgSocw7BeJrBQn+eUtnbT2dDn+igxMs=; b=ZfpxTPwrjQl8WVx3+Y5VdRrhYc 4OoHS7+2sCMApRYB5VnLzTwZ3AnuH1rbvpzhb5zNkktTJ4FJ8sWYOOxfWlxZuyqW4FtffOsdofLoP KEnVoUxvEsE+LTBuR9Ljukdoy98ZjIpZMOQnH7KK6Xb23XV7zf9EtlwdUNzwPfAC8Ej9FOJAtvqTu pwxFgiWJjnvvaMxw0LMuChYPjzsvtoVfl424yygmBx4l3asec7IZfNEGrxXBwc58M6V8IEpdJFusd MUppoDMIzNxXleaq37RnOHFI3/w9TD4Rx/IdZsPnt862rpzUGcDDu0bIvFclwAamSdI3WjcrJAvYP TiDHqSHA==; Received: from mail.skyhub.de ([2a01:4f8:190:11c2::b:1457]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbM3P-00GhEq-6h for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 11:39:01 +0000 Received: from zn.tnic (p200300ec2f0c5e008a7c4c8941e22261.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:5e00:8a7c:4c89:41e2:2261]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 5A0041EC047E; Tue, 27 Apr 2021 13:38:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1619523525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=IAUQH8ckRL8RHgSocw7BeJrBQn+eUtnbT2dDn+igxMs=; b=JVTU+70sWvRTU+SopM0YlyyGOmgJ6g6s0pfWanKmCpWILaUWfjQC0nNpvbpkUqfQ2RRum2 FEuSSKX1W3ssLIne23n7/XG++M6Vrmnc4wwpffOGYr4mLk1KAEn2IFh+WRvL4uHH763Ts1 j21Ra3QsjV66hv690SzIZHGqkUij9BY= Date: Tue, 27 Apr 2021 13:38:40 +0200 From: Borislav Petkov To: Maxim Levitsky Cc: kvm@vger.kernel.org, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Ingo Molnar , Andrew Morton , Thomas Gleixner , Sean Christopherson , Marc Zyngier , Catalin Marinas , open list , Julien Thierry , Stefano Garzarella , Suzuki K Poulose , Jonathan Corbet , Jessica Yu , "H. Peter Anvin" , Jan Kiszka , Will Deacon , "open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)" , Paolo Bonzini , Vitaly Kuznetsov , Vasily Gorbik , Joerg Roedel , Claudio Imbrenda , Jim Mattson , Cornelia Huck , David Hildenbrand , Wanpeng Li , Janosch Frank , Christian Borntraeger , "open list:S390" , Heiko Carstens , Kieran Bingham , "open list:DOCUMENTATION" , "moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)" , James Morse Subject: Re: [PATCH v2 8/9] KVM: x86: add force_intercept_exceptions_mask Message-ID: References: <20210401135451.1004564-1-mlevitsk@redhat.com> <20210401135451.1004564-9-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210401135451.1004564-9-mlevitsk@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210427_043859_432455_3A13CD2D X-CRM114-Status: GOOD ( 17.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 01, 2021 at 04:54:50PM +0300, Maxim Levitsky wrote: > This parameter will be used by VMX and SVM code to force > interception of a set of exceptions, given by a bitmask > for guest debug and/or kvm debug. > > This option is not intended for production. > > This is based on an idea first shown here: > https://patchwork.kernel.org/project/kvm/patch/20160301192822.GD22677@pd.tnic/ > > CC: Borislav Petkov > Signed-off-by: Maxim Levitsky > --- > arch/x86/kvm/x86.c | 3 +++ > arch/x86/kvm/x86.h | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 3627ce8fe5bb..1a51031d64d8 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -176,6 +176,9 @@ module_param(force_emulation_prefix, bool, S_IRUGO); > int __read_mostly pi_inject_timer = -1; > module_param(pi_inject_timer, bint, S_IRUGO | S_IWUSR); > > +uint force_intercept_exceptions_mask; > +module_param(force_intercept_exceptions_mask, uint, S_IRUGO | S_IWUSR); > +EXPORT_SYMBOL_GPL(force_intercept_exceptions_mask); That's nice. I could use some text explaning the usage though, i.e. that thing takes a bitfield of exception vectors, so that I don't have to look at the code each time. :-) Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel