From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbbDCMUJ (ORCPT ); Fri, 3 Apr 2015 08:20:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41065 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751435AbbDCMUG (ORCPT ); Fri, 3 Apr 2015 08:20:06 -0400 Date: Fri, 3 Apr 2015 14:19:42 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Bandan Das Cc: Joel Schopp , Gleb Natapov , Paolo Bonzini , kvm@vger.kernel.org, Joerg Roedel , Borislav Petkov , linux-kernel@vger.kernel.org, David Kaplan Subject: Re: [PATCH] kvm: x86: svm: remove SVM_EXIT_READ_CR* intercepts Message-ID: <20150403121941.GB28325@potion.brq.redhat.com> References: <20150312201746.2953.11716.stgit@joelvm2.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-03-12 17:17-0400, Bandan Das: > Joel Schopp writes: > > @@ -2968,29 +2964,10 @@ static int cr_interception(struct vcpu_svm *svm) > > kvm_queue_exception(&svm->vcpu, UD_VECTOR); > > return 1; > > } > > - } else { /* mov from cr */ > > - [reads of CR 0..8] > > + } else { /* mov from cr, should never trap in svm */ > > + WARN(1, "unhandled read from CR%d", cr); > > + kvm_queue_exception(&svm->vcpu, UD_VECTOR); > > + return 1; > > Can we end up here if a nested hypervisor sets cr read interception ? No. If the nested hypervisor sets intercept bits, we're going to detect them in 'handle_exit -> nested_svm_exit_handled -> nested_svm_intercept' and enter L1 before the cr_interception handler.