From: Tim Deegan Subject: Re: [PATCH v14 07/17] pvh: vmx-specific changes Date: Thu, 7 Nov 2013 01:27:13 +0100 Message-ID: <20131107002713.GD32964@deinos.phlegethon.org> References: <1383567306-6636-1-git-send-email-george.dunlap@eu.citrix.com> <1383567306-6636-8-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1383567306-6636-8-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Keir Fraser , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 12:14 +0000 on 04 Nov (1383563696), George Dunlap wrote: > + if ( is_pvh_domain(d) ) > + { > + /* Disable virtual apics, TPR */ > + v->arch.hvm_vmx.secondary_exec_control &= > + ~(SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES > + | SECONDARY_EXEC_APIC_REGISTER_VIRT > + | SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY); > + v->arch.hvm_vmx.exec_control &= ~CPU_BASED_TPR_SHADOW; > + > + /* Disable wbinvd (only necessary for MMIO), > + * unrestricted guest (real mode for EPT) */ > + v->arch.hvm_vmx.secondary_exec_control &= > + ~(SECONDARY_EXEC_UNRESTRICTED_GUEST > + | SECONDARY_EXEC_WBINVD_EXITING); WBINVD exiting is used for supporting _real_ MMIO, which PVH guetst will still have, right? > + if ( is_pvh_domain(d) ) > + vmx_disable_intercept_for_msr(v, MSR_SHADOW_GS_BASE, MSR_TYPE_R | MSR_TYPE_W); > + > + /* > + * PVH: We don't disable intercepts for MSRs: MSR_STAR, MSR_LSTAR, > + * MSR_CSTAR, and MSR_SYSCALL_MASK because we need to specify > + * save/restore area to save/restore at every VM exit and entry. > + * Instead, let the intercept functions save them into > + * vmx_msr_state fields. See comment in vmx_restore_host_msrs(). > + * See also vmx_restore_guest_msrs(). > + */ Why are these MSRs special for PVH guests? Are PVH guests restricted in how they can use SHADOW_GS? Tim.