On 12.01.2024 11:43, Andrew Cooper wrote: > On 12/01/2024 10:37 am, Jan Beulich wrote: >> On 12.01.2024 00:13, Andrew Cooper wrote: >>> --- a/xen/arch/x86/hvm/vmx/vmx.c >>> +++ b/xen/arch/x86/hvm/vmx/vmx.c >>> @@ -1551,7 +1551,10 @@ static void cf_check vmx_set_nonreg_state(struct >>> vcpu *v, >>> { >>> vmx_vmcs_enter(v); >>> >>> - __vmwrite(GUEST_ACTIVITY_STATE, nrs->vmx.activity_state); >>> + if ( nrs->vmx.activity_state ) >>> + domain_crash(v->domain, "Attempt to set activity_state %#lx\n", >>> + nrs->vmx.activity_state); >> Might be useful to log the offending vCPU here? > > Already covered. the innards of __domain_crash() does: > > else if ( d == current->domain ) > { > printk("Domain %d (vcpu#%d) crashed on cpu#%d:\n", > ...
Except that afaict v != current here at all times (at least as far as current use of the function goes). Jan