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

Re: [XEN PATCH v1 7/7] x86/MCE: optional build of AMD/Intel MCE code


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
  • Date: Thu, 2 May 2024 11:59:05 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NvcjSf2ot5E0HjkHo7YQYp8x3QeT0rou/3zsPr4sqDo=; b=mNAm3Gh5JrhDvDj5NW/tnSuPvbbflXR7JJiDGrKXvoJn7cJe+S+71/7js5VYXmnGOsbqMJepy2lum3l2GS0sBP4nb3GcqlAewr4RY8kR+11gAb1JjWBYrb5j+DANysKkb54HUHvXDS3G+irY6cn8LcpTB/vGbarW8pa8C9z1gmPXevJYhjth03mgst7aOFhjdkbOoq0q1NVUamtReQiHNKC3um/pptQnCNdm826C1H8EQOdu3NTIdirFrHaqaOC5KGQ3Oynacv0v65k2HfpQn73cGCwo6gWEMu4OhpZyXyY8vMO9QIgbqP4VrwhHSWy96gl8Bw6WGzO3Zc1vrKBFPA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YatD3XBSyoaUgMlh0vQoPJqumriNyB3sk2jskvyjVM2SkVvLvafkkXy4lBBtsitftx6+9HgrH0DZTFZl/n+6p2m4x+hHbfPmtyr6aibgzL+Kia1N9ECfFwI9pI9271xs/Si9Q5GvL6ad5iucsVf6Kn6K1tiYnUamVCGcl2bAbzgzO0zldHJigUymC/iav4OrJ5MPrklUGle+3JgTgltqXAJRhXULgqsXMDWzk4BkXwnT5t24FC9B81PE8xiWAyY0FYUh5lE3FsOHp9pacaTIEQ8pB6Ohy9BRbf7tgT0ZbOvrqCOJptCBBGH9mWqtU4Ch05BHCcikzHGWGiL8MX6MGg==
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 02 May 2024 08:59:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

29.04.24 18:54, Jan Beulich:
On 27.04.2024 01:16, Stefano Stabellini wrote:
On Tue, 23 Apr 2024, Sergiy Kibrik wrote:
--- a/xen/arch/x86/cpu/mcheck/Makefile
+++ b/xen/arch/x86/cpu/mcheck/Makefile
@@ -1,12 +1,10 @@
-obj-y += amd_nonfatal.o
-obj-y += mce_amd.o
  obj-y += mcaction.o
  obj-y += barrier.o
-obj-y += intel-nonfatal.o
  obj-y += mctelem.o
  obj-y += mce.o
  obj-y += mce-apei.o
-obj-y += mce_intel.o
+obj-$(CONFIG_AMD) += mce_amd.o amd_nonfatal.o
+obj-$(CONFIG_INTEL) += mce_intel.o intel-nonfatal.o
  obj-y += non-fatal.o
  obj-y += util.o
  obj-y += vmce.o

Awesome!

Almost. I'd appreciate if the ordering of files would be retained. It's
not quite alphabetic, but still. Moving mce_amd.o and mcaction.o to their
designated slots may or may not be done right here.

sure, I'll leave ordering as before


--- a/xen/arch/x86/cpu/mcheck/non-fatal.c
+++ b/xen/arch/x86/cpu/mcheck/non-fatal.c
@@ -24,14 +24,20 @@ static int __init cf_check init_nonfatal_mce_checker(void)
         * Check for non-fatal errors every MCE_RATE s
         */
        switch (c->x86_vendor) {
+#ifdef CONFIG_AMD
        case X86_VENDOR_AMD:
        case X86_VENDOR_HYGON:
                /* Assume we are on K8 or newer AMD or Hygon CPU here */
                amd_nonfatal_mcheck_init(c);
                break;
+#endif
+#ifdef CONFIG_INTEL
        case X86_VENDOR_INTEL:
                intel_nonfatal_mcheck_init(c);
                break;
+#endif
+       default:
+               return -ENODEV;

This, while perhaps desirable, doesn't fit ...

        }
        printk(KERN_INFO "mcheck_poll: Machine check polling timer started.\n");
        return 0;

... earlier behavior, and hence is somewhat unexpected in a change which, by
its description, looks like a "no functional change" one.


I see, will try to describe it a bit better then.

  -Sergiy



 


Rackspace

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