Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3980622pxf; Tue, 16 Mar 2021 02:41:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6HZ24irnqwNRlGxUGk7d0MN8k+yT9vxZNUunjs9ZcbXNh98nkipdWXyfll1fYN2P+WHUF X-Received: by 2002:a50:f314:: with SMTP id p20mr34828941edm.236.1615887695680; Tue, 16 Mar 2021 02:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615887695; cv=none; d=google.com; s=arc-20160816; b=IO7JJoJBGEcOclBpLtXy32yDRIBQ5cX4KtFBW4KeXt1YsPZz0sP5QfHea0IwKVgRhN gVjd+g3XCAEdh/30qDENVYD2wpp7mDXdUTDL9Ep5oSOIwTp7kYnmu9gbTQoQxkGXJVW9 tZzVSlwgNHw5PVvsoRAEjkSdYolxungUdEPfRXnNq2tHMKKL6fraj5qJkx1OryL5oXht 4mkeY1bZkdyhQ3J9SF2trX8minimT5g3NSfmZ66HChLLq2M5U1JNPyXneVZUNxbUSJTg 8FBbDi/sRre4hlGhZO2wNfT9inTVAbvtm5HeVvk3lZjzu6GBzbO4cfJUiIo8qhCOfVBa zaqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+oqR6szUib24vh2Qhp1KQ3wnL87sMgyAwHPQuv0E6AI=; b=Hav+uR2xLyvBIIxgELHVtHQJUG56FFpOlmpfiybhedXCXGzSMoMekfyr2mbHStAbR9 Mcr83/lKW3wZ/CeY9mCuL5SYeurJJOOCXGhG3nFvfKsC/cHoZxw9pk5QBgIVpvbDWW4G 3wh6k5eQdZwff2xPpn5IzdEGE0bLeA284g6SW6a8gnNdeNEnJvBBNwm/MysAPF6yNv1A F6xhF7brBL41y730MJdQs4bxh399/llJwVmIwvB9etZ31BD3CZV/t9nHtXHBLnZ5tAH2 7erzkJdVGnwrh+6uHATERm3l+xoV7AeVvRlWXl4yMIXfqtsH+ihvsXqRheYKsEzUvecy xTdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si13692509ejj.248.2021.03.16.02.41.13; Tue, 16 Mar 2021 02:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232647AbhCPIf0 (ORCPT + 99 others); Tue, 16 Mar 2021 04:35:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:54572 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234981AbhCPIe4 (ORCPT ); Tue, 16 Mar 2021 04:34:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D4790AE5C; Tue, 16 Mar 2021 08:34:54 +0000 (UTC) Date: Tue, 16 Mar 2021 09:34:57 +0100 From: Borislav Petkov To: Maxim Levitsky Cc: kvm@vger.kernel.org, Vitaly Kuznetsov , linux-kernel@vger.kernel.org, Thomas Gleixner , Wanpeng Li , Kieran Bingham , Jessica Yu , Jan Kiszka , Andrew Morton , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Joerg Roedel , Sean Christopherson , Jim Mattson , Borislav Petkov , Stefano Garzarella , "H. Peter Anvin" , Paolo Bonzini , Ingo Molnar Subject: Re: [PATCH 3/3] KVM: SVM: allow to intercept all exceptions for debug Message-ID: <20210316083457.GA18822@zn.tnic> References: <20210315221020.661693-1-mlevitsk@redhat.com> <20210315221020.661693-4-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210315221020.661693-4-mlevitsk@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 12:10:20AM +0200, Maxim Levitsky wrote: > Add a new debug module param 'debug_intercept_exceptions' which will allow the > KVM to intercept any guest exception, and forward it to the guest. > > This can be very useful for guest debugging and/or KVM debugging with kvm trace. > This is not intended to be used on production systems. > > 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/include/asm/kvm_host.h | 2 + > arch/x86/kvm/svm/svm.c | 77 ++++++++++++++++++++++++++++++++- > arch/x86/kvm/svm/svm.h | 5 ++- > arch/x86/kvm/x86.c | 5 ++- > 4 files changed, 85 insertions(+), 4 deletions(-) Looks interesting, I'll give it a try when I get a chance in the coming days. Thx! -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg