[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>, Jason Andryuk <jason.andryuk@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Thu, 10 Apr 2025 19:20:41 +0100
  • 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=1X/9WO/LqGbkhwb578nUSjhvJMvuzwE21gFJuEcUmqQ=; b=nhGa6TtiZLR5VmWnDSiMfD0oFDwVt8uUmUmuMaEf9FNnynIEycIFWRUVtgtkrlSrXfJ58Sc2GTHUc6+71luaaaE6wyy7Kcu1J2xpG75LgenNz24nVxWiygSCsnjBulwlWDcd4CxPCHUGf5+/f9tQdmCUjKXeOnA3077BaL4JsZV8NhLd7uDLCpYo1tvJLWnTtDORfUDEkwxVz8uneGkPzhihQfyl9RWO0hFHiwMG8hy2ssDSJobcFbAdN7VVH1wj3eLs318eaOwfRiMziFbpLzJCRhfbs8WLqmKnXEl32rzC4AZP257CPdbkqI0GEh6dj6zbmR5EMsnWrogDwhKAeQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rU6LUF+C2lsmVqkPq4qpsypf7U3wAy/su81TNN4G8n5LYcHvvo/nF2TeeHP+txequRGEA+fGyaePdlcg+YMFkiyV2Buok1PZqOBGlHBuMMW+VvGsl+qtj76hOFA7YcBuwBMRmR7zWItYUnp83gcykf8wj+LhUIHJ8jS4BjX2H82p3r7x712Q177q1T50TDMdTa2WOVYEiMBNooXdEN2AL1lNvfiitc3aib1pBzn9di105IB+2MuOEpSLLUexecaLzsd9kRKDQbS+ayvIC94R31f57UMUpEEeyGMYSe1e6XRiRyO10G04udPzW3/m7jKM6ds7kEtyOqfAUL/wAX7vAQ==
  • 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>, Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 10 Apr 2025 18:21:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu Apr 10, 2025 at 10:17 AM BST, Andrew Cooper wrote:
> On 10/04/2025 1:09 am, Jason Andryuk wrote:
>> 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.
>
> 6.6.74 is broken too.  (That's the revision that the ARM tests want). 
> So it broke somewhere between .56 and .74 which narrows the bisect a little.
>
> https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1761323774
>
> In Gitlab, both AMD and Intel are failing in roughly the same way.
>
> ~Andrew

I've bisected the tags and it was was introduced somewhere between the
v6.6.66 and the v6.6.67 tags.

The hypercall page was removed very shortly before v6.6.67 was tagged,
so I have a nagging suspicion...

Cheers,
Alejandro



 


Rackspace

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