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

Re: [PATCH TEST-ARTEFACTS 0/8] Cleanup and Linux ARM64 support


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 9 Apr 2025 20:09:09 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=JZlT5Us7mIiHxX89uKFrbQyqvHBxoaXWK3lidXiSWHM=; b=lFUGKRnhSkG0wG7yIdTAugkNyPsJOcewJW75CiEE3Skbtw0YXt38iuXVjzFqaxL9LIMiYOnkRZw/8n2JwKm1sbaihO0sq12oxoHI+3kLKe9bCPrgqTl3zk7lck+FDETMhlssMnTSFmnQcJLlPEaj7Cp+xKxvQMlUO1VQafZC/BdouEY3P7TDGv5xDesnl1xa/dW8HQDxtJHp0sIhszjgyYmQWScSwVy4zMzJqZDS7QENMCgflAo2qalcch4vP/bzsy9DXFFv5GPbi2asNoZ7DC+jJyqtTFnyHIO2ij8m0eY4P8is+6iwm7Frztp5DZ0u6WUoM/R83AP46XCnmzyYLA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=n8KvLqn4vDw6BFDVexnKfhU9xi4qcTcApnzxTiK2RVJRlNBLJE3SILIMa/lWJfRtdhfkgbla7hoCcxbYptLL4SXWblJ+sTIFSxnezy7TcAtSdR8B2e1ZEwLYREO/tAUVKpH0R8rMvMnRAd9pHaLOLzEnLIAh87YpLOBBa3WE902BeOhBhKfIWOntxieS9FXAb+PxH+OUc9sA+wQvGIAlaPTlgbDsBN1SA+o8zXyhIbgpIQSgfE+jJGFeC/oM2OUpeNqUNO8BKs8TpL8l0v3eh41LjwRDtjx3EU4iQ00mPDY049FLcSgsOe3puNy9ly8HTlPdn1HhuIE1K+qIK67T/A==
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Thu, 10 Apr 2025 00:09:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-04-09 13:01, Andrew Cooper wrote:
On 09/04/2025 5:36 pm, Andrew Cooper wrote:
Various bits of cleanup, and support for arm64 Linux builds.

Run using the new Linux 6.6.86 on (most) x86, and ARM64:
   https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1760667411

Lovely, Linux 6.6.86 is broken for x86 PVH.  It triple faults very early on.

Sample log:
https://gitlab.com/xen-project/hardware/xen-staging/-/jobs/9673797450

I guess we'll have to stay on 6.6.56 for now.  (Only affects the final
patch.)

This is an AMD system:

(XEN) [    2.577549] d0v0 Triple fault - invoking HVM shutdown action 1
(XEN) [    2.577557] RIP:    0008:[<0000000001f851d4>]

The instruction:
ffffffff81f851d4:       0f 01 c1                vmcall

vmcall is the Intel instruction, and vmmcall is the AMD one, so CPU detection is malfunctioning.

(Early PVH is running identity mapped, so it's offset from ffffffff80000000)

There are no debug symbols in the vmlinux I extracted from the bzImage from gitlab, but I can repro locally with on 6.6.86. It's unclear to me why it's failing.

Trying:
diff --git i/arch/x86/xen/enlighten.c w/arch/x86/xen/enlighten.c
index 0219f1c90202..fb4ad7fe3e34 100644
--- i/arch/x86/xen/enlighten.c
+++ w/arch/x86/xen/enlighten.c
@@ -123,11 +123,10 @@ noinstr void *__xen_hypercall_setfunc(void)
        if (!boot_cpu_has(X86_FEATURE_CPUID))
                xen_get_vendor();

-       if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
-            boot_cpu_data.x86_vendor == X86_VENDOR_HYGON))
-               func = xen_hypercall_amd;
-       else
+       if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
                func = xen_hypercall_intel;
+       else
+               func = xen_hypercall_amd;

        static_call_update_early(xen_hypercall, func);

But it still calls xen_hypercall_intel(). So maybe x86_vendor isn't getting set and ends up as 0 (X86_VENDOR_INTEL)?

That's as far as I got here.

Different but related, on mainline master, I also get a fail in vmcall. There, I see in the disassembly that __xen_hypercall_setfunc()'s calls to xen_get_vendor() is gone. xen_get_vendor() seems to have been DCE-ed. There is some new code that hardcodes features - "x86/cpufeatures: Add {REQUIRED,DISABLED} feature configs" - which may be responsible.

Regards,
Jason



 


Rackspace

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