]> xenbits.xensource.com Git - xen.git/commitdiff
x86/HVM: skip offline vCPU-s when dumping VMCBs/VMCSes
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Dec 2021 10:17:50 +0000 (11:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Dec 2021 10:17:50 +0000 (11:17 +0100)
There's not really any register state associated with vCPU-s that
haven't been initialized yet, so avoid spamming the log with largely
useless information while still leaving an indication of the fact.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/hvm/svm/vmcb.c
xen/arch/x86/hvm/vmx/vmcs.c

index 565e997155f2650a716e4176e0c6712ba958d283..efa085032bb5b5578608257a6704b8387e699620 100644 (file)
@@ -242,6 +242,11 @@ static void vmcb_dump(unsigned char ch)
         printk("\n>>> Domain %d <<<\n", d->domain_id);
         for_each_vcpu ( d, v )
         {
+            if ( !v->is_initialised )
+            {
+                printk("\tVCPU %u: not initialized\n", v->vcpu_id);
+                continue;
+            }
             printk("\tVCPU %d\n", v->vcpu_id);
             svm_vmcb_dump("key_handler", v->arch.hvm.svm.vmcb);
         }
index f9f9bc18cdbc23bc9ff3c52441f9d7f54128a0a5..7ab15e07a0b2acf79a8dd045933db56d578637c8 100644 (file)
@@ -2133,6 +2133,11 @@ static void vmcs_dump(unsigned char ch)
         printk("\n>>> Domain %d <<<\n", d->domain_id);
         for_each_vcpu ( d, v )
         {
+            if ( !v->is_initialised )
+            {
+                printk("\tVCPU %u: not initialized\n", v->vcpu_id);
+                continue;
+            }
             printk("\tVCPU %d\n", v->vcpu_id);
             vmcs_dump_vcpu(v);
         }