[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 6/6] x86/HVM: skip offline vCPU-s when dumping VMCBs/VMCSes


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 2 Sep 2021 10:36:19 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3HFchKadupoYKtpNV3JYrysgf0xXI5YrxKsF7FnzFzY=; b=HnwuMz2pbxBhJcat1k1iXydYwGElHcWwFXQ14FJnWWm601UzLOYzOEWI0Rx6fFj83kKn4wyfkdLYjE/R+Nie3d4wufAIyV2+wnoaY4WhrT0CHBbs0cyxVQm7SqTa//e1VHygXC7Fv66mTz0rWFctK578yXqPXcaQ/p0ZFxTLdoisjDGcw74KlYDiuTxQqub1St2fz3aJDV8Oc9ESN7abL2TRzu6bDReeWtDYxQH/EbWHrkhPgqHVf5pmLxOKDFJSdVo9ahubKYTGKkoHbOJ9f9QEHKM6eABCn8FHlRm8i48YIuLjZUhQ8KNdpTghrmQ4hSgBtDYetEFbCV0BzzsbzA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ENAuNW26oOVoUlaUGTBVtchjUH19yEzgBRSRLdxfPOPmQvDWcd0xq3ixkf3UHAZ3aDGnJmJ/stubckZ0KW7kes2Kbr1t2/A1mrLu2WBmAJIBEiFrvh5q5TQdnI8rzBn31UHP3tlbA412BHUc9c3euIFIoYU2A4ebtkh31J01+mYw1Alb9VwXGpa/QvRsjp0WBtgs6V8/3eKzRXTUDuhUtwseJSCUQ15ndw2OqEBtpa1m1qS+iaXaANK/4H70ZBOeK2+ysQs/DM+s+q+EeSDQjgnbEDPQvnzpdA9LaohrwHUp3pQHm7bSarx3ZIVzm/7uWjEtWUlMIO2rz/DNx3moFg==
  • Authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>
  • Delivery-date: Thu, 02 Sep 2021 08:36:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

There's not really any register state associated with offline vCPU-s, so
avoid spamming the log with largely useless information while still
leaving an indication of the fact.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: New.

--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -241,6 +241,11 @@ static void vmcb_dump(unsigned char ch)
         printk("\n>>> Domain %d <<<\n", d->domain_id);
         for_each_vcpu ( d, v )
         {
+            if ( test_bit(_VPF_down, &v->pause_flags) )
+            {
+                printk("\tVCPU %u: offline\n", v->vcpu_id);
+                continue;
+            }
             printk("\tVCPU %d\n", v->vcpu_id);
             svm_vmcb_dump("key_handler", v->arch.hvm.svm.vmcb);
         }
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -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 ( test_bit(_VPF_down, &v->pause_flags) )
+            {
+                printk("\tVCPU %u: offline\n", v->vcpu_id);
+                continue;
+            }
             printk("\tVCPU %d\n", v->vcpu_id);
             vmcs_dump_vcpu(v);
         }




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.