From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: Guest handling of IA32_DEBUGCTL MSR Date: Tue, 28 Apr 2015 14:32:37 +0200 Message-ID: <553F7DE5.1040100@redhat.com> References: <07377BC4-FD59-4A2E-9FA8-28ABE1B7F6D2@gmail.com> <553F7261.40500@redhat.com> <553F765F.4050008@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit To: Jan Kiszka , Nadav Amit , kvm list Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35074 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965373AbbD1Mcw (ORCPT ); Tue, 28 Apr 2015 08:32:52 -0400 In-Reply-To: <553F765F.4050008@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 28/04/2015 14:00, Jan Kiszka wrote: > > > It seems strange that the guest is allowed to set IA32_DEBUGCTL MSR for the > > > nested VM and get this value to the physical IA32_DEBUGCTL (see > > > prepare_vmcs02), while it cannot set IA32_DEBUGCTL for itself (see > > > kvm_set_msr_common). > > > > > > Am I missing something? > > > > No, it makes no sense. > > Are you sure that vmx is not allowing direct access to that MSR while in > guest mode? We do save/restore it on all Intel CPUs, see > setup_vmcs_config. Not sure about the AMD situation, though. Right now, L1 could for example enable LBR for the L2 guest, but it wouldn't make sense since the L1 guest cannot then read the last branch MSRs. Paolo