Rather than guarding higher level operations (like vPMU initialization
as suggested by Boris in
http://lists.xenproject.org/archives/html/xen-devel/2014-11/msg02278.html)
mark the vLAPIC hardware disabled for PVH guests and prevent it from
getting moved out of this state.
Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
goto fail1;
/* NB: vlapic_init must be called before hvm_funcs.vcpu_initialise */
- if ( is_hvm_vcpu(v) )
- rc = vlapic_init(v);
+ rc = vlapic_init(v);
if ( rc != 0 ) /* teardown: vlapic_destroy */
goto fail2;
break;
case MSR_IA32_APICBASE:
- if ( !vlapic_msr_set(vcpu_vlapic(v), msr_content) )
+ if ( unlikely(is_pvh_vcpu(v)) ||
+ !vlapic_msr_set(vcpu_vlapic(v), msr_content) )
goto gp_fault;
break;
HVM_DBG_LOG(DBG_LEVEL_VLAPIC, "%d", v->vcpu_id);
+ if ( is_pvh_vcpu(v) )
+ {
+ vlapic->hw.disabled = VLAPIC_HW_DISABLED;
+ return 0;
+ }
+
vlapic->pt.source = PTSRC_lapic;
if (vlapic->regs_page == NULL)