From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755614AbbCLVUd (ORCPT ); Thu, 12 Mar 2015 17:20:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38101 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbbCLVUb (ORCPT ); Thu, 12 Mar 2015 17:20:31 -0400 Date: Thu, 12 Mar 2015 22:20:02 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Joel Schopp Cc: 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: <20150312212002.GA1711@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: <20150312201746.2953.11716.stgit@joelvm2.amd.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-03-12 15:17-0500, Joel Schopp: > There isn't really a valid reason for kvm to intercept cr* reads > on svm hardware. The current kvm code just ends up returning > the register There is no need to intercept CR* if the value that the guest should see is equal to what we set there, but that is not always the case: - CR0 might differ from what the guest should see because of lazy fpu - CR3 isn't intercepted with nested paging and it should differ otherwise - CR4 contains PAE bit when run without nested paging CR2 and CR8 already aren't intercepted, so it looks like only CR0 and CR4 could use some optimizations.