From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: Questions about kvm msr read/write policy Date: Tue, 8 Mar 2016 15:45:49 +0100 Message-ID: <56DEE59D.7060908@redhat.com> References: <20160308081916.GA20448@shuai.ruan@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: allen.m.kay@intel.com To: Shuai Ruan , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37735 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932107AbcCHOqA (ORCPT ); Tue, 8 Mar 2016 09:46:00 -0500 In-Reply-To: <20160308081916.GA20448@shuai.ruan@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/03/2016 09:19, Shuai Ruan wrote: > > Using read msr as an example, if the msr is not handled in kvm(not > recognised by kvm) and ignore_msrs clear, kvm will inject gp into > guest os(if I understand this correctly). > > My question is what problem will cause(or in which situation will cause > problem) if read msr (unhandled msr) just return 0 instead of injdecting > gp fault into guest os? > The same question with write msr, if just ignore this write , what will > happen? It depends on the MSR and on the guest OS. Usually 0 is treated as an error or as "feature not present" so it just works. Paolo