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

Re: [PATCH v2 0/6] x86/PVH: Dom0 building adjustments


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 2 Sep 2021 14:39:58 +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; bh=HvglPhIv0cC1gQHqWcWdOwMhFrpQApUA2uzO4pvexEw=; b=LnsQd33BSrgFGrl4dKFyG4VcUfubkoDGGogpsNuhffHJz4D1VpHxChVV4/2zVswPJmuANp8Y1xgIh4i4PkNKMB1B78nECYFYgWoedTHFD9NLhoElCPVSEP7EkIixq8kQ5M0EA4I7ybymFRhZIpHdwzNf98gkrtTEN+u9roYP9pwWIewj18TZtQJcEUCnRNkFwCWBAZktpTGk1ukKRsRkLE+KBaI4aKaPDd2zxZd2fwc+S6kAG41IKZ2m322AFeCiJ0Wrar3yINw+o+oCyQakPIWpZOgJEEhBMYoCS9CMVG5XjzfPfrodiW/LOOcgJM6S75R7jUtry2QNA5o8LmDZjQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z6v52/GYwaeFluSAUd4EEcyf5vIktYq0I2ZrFYAhpSENyEXK1mBBzj7bVPKcaERIQ1S2/s0wfEwdsD0/moENd1Mszb85D1Fyy3ozqaxzbKRSnZqUIOMcY+EMuwQU3zFczwUad7q8T12xxKHBmJ2O/wuJ+QY41Htecw69KVqPZDBlRzJMFTUVBU76gciafoClWIt51JuU2OHn2XBy493Ss/5d1Dqydfn6gx7HqmFFtguKji7pMn8ItepvLcLBg81poi8jKh3WagIs/pD0AZNhszyR1h1znpinNCMJbnjg6qD5ImIMmVf0d0TrrNnGqaZOd0szRQ/vUe24HU6FtqJs7A==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 02 Sep 2021 12:40:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 02.09.2021 14:15, Juergen Gross wrote:
> On 02.09.21 13:42, Jan Beulich wrote:
>> On 02.09.2021 10:30, Jan Beulich wrote:
>>> The code building PVH Dom0 made use of sequences of P2M changes
>>> which are disallowed as of XSA-378. First of all population of the
>>> first Mb of memory needs to be redone. Then, largely as a
>>> workaround, checking introduced by XSA-378 needs to be slightly
>>> relaxed.
>>>
>>> Note that with these adjustments I get Dom0 to start booting on my
>>> development system, but the Dom0 kernel then gets stuck. Since it
>>> was the first time for me to try PVH Dom0 in this context (see
>>> below for why I was hesitant), I cannot tell yet whether this is
>>> due further fallout from the XSA, or some further unrelated
>>> problem. Dom0's BSP makes it all the way through to entering the
>>> idle loop while all APs are still in VPF_down.
>>
>> This last part of the mystery is now solved: By cloning from my PV
>> .config, I've inherited the X86_X2APIC=n that I have there. Yet
>> ACPI's MADT gets populated with only x2APIC entries when building
>> Dom0, which such a kernel would mostly ignore (except for logging).
>> IOW in a way this was indeed a missing select, except that what's
>> needed wouldn't quite work yet:
>>
>> --- a/arch/x86/xen/Kconfig
>> +++ b/arch/x86/xen/Kconfig
>> @@ -83,6 +83,6 @@ config XEN_PVH
>>      bool "Xen PVH guest support"
>>      depends on XEN && XEN_PVHVM && ACPI
>>      select PVH
>> -    def_bool n
>> +    select X86_X2APIC if XEN_DOM0
>>      help
>>        Support for running as a Xen PVH guest.
>>
>> This is because, as mentioned, XEN_DOM0 gets turned off when XEN_PV
>> is off. Whereas x2APIC isn't strictly needed for DomU afaics
>> (MADT gets populated with LAPIC entries only), so the "select" also
>> shouldn't be unconditional.
> 
> Correct.
> 
> We should rename XEN_DOM0 to XEN_DOM0_PV, and add a "real" XEN_DOM0.

Actually, as I have just found, the lack of XEN_DOM0 _is_ a problem:
xen_initial_domain() gets hardcoded to 0 without it. I'll have to
make a(nother) patch along the lines of what you suggest; hvc-xen
and "earlyprintk=xen" also don't really work together, because the
first thing xenboot_write_console() does is a !xen_pv_domain() check.

Jan




 


Rackspace

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