when nested HVM is enabled after VCPus are allocated.
The previous patch would fail because the call to
nestedhvm_vcpu_initialise() in the HVM param set code
happens before nestedhvm_enabled(v->domain) is true.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
if ( (rc = hvm_funcs.vcpu_initialise(v)) != 0 )
goto fail2;
- if ( (rc = nestedhvm_vcpu_initialise(v)) < 0 )
+ if ( nestedhvm_enabled(v->domain)
+ && (rc = nestedhvm_vcpu_initialise(v)) < 0 )
goto fail3;
/* Create ioreq event channel. */
{
int rc;
- if ( !nestedhvm_enabled(v->domain) )
- return 0;
-
if ( (rc = nhvm_vcpu_initialise(v)) )
{
nhvm_vcpu_destroy(v);