[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/PVH: restore VMX APIC assist for Dom0
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 20 Sep 2022 15:05:47 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=F9W1XzhSuoJVOfakoBvWD0zz0EJUBbde6jdFgCAzHTQ=; b=M5u9svo9Lb9TsALncMAs+Kp+DdgKwBwVYVKLSvPyaPWxuCYriIZJ2m5KATfLAdD31oIiR+vJt+FzJS2GvKe2wmIoi0gnvycJGufVGtYREP5fEpyycqdxkxMcOF1lHB1gqvTfgojj8s+YdjLEe13tgW4agaXqJYsU0Rusqo52TDej1ulObqgAFBs2iDiDsnuSDJmTXdNdTBYbD3pYk0O0WfkBBhuYW8MrOWuulxCvuPc6wa2jkqzbyiIjBRqBiQ1LlaUVKPIi7PouZ7In2JaSFmnoPp834Fnryl3BmJYqKeOm3Fp+hKiJ8Bx3FzgwOevGUn4dwl4m36YpbiByZBV/4g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NygG6Z/y+1VSnCB1fAO4ACEAWa4+1CunEHtUe/Nwv8eCIp0M7utBgVGqlnstsi2vXiX+e+Rcvk5JFhtmQBsm36PPoPIaVqJ+IIqHZZvZ+dyeMs+cC4OFht970/LZLjcHrRdDP7jVbheIJOZfDBmLI3OaVvt4zdxSosf+1ncXAinwXChitRHE5bC5ChD+kv8LyjTLydfkLMJ0HrBjITCzAe6sCYJu3Bqq5OOA3DDUsWrRdoXqJe8gUzoFMKJfn85iOOOOgM5Q8+fJKtEKpC38G+etpdFDH2zECtQZBHVochJ/jn1WVp379hPnv4UZBafGzho1ClrQaVy/osHOA/4WIA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jane Malalane <jane.malalane@xxxxxxxxxx>
- Delivery-date: Tue, 20 Sep 2022 13:06:44 +0000
- Ironport-data: A9a23:wGa+0Kq4j2fMayizTX7Rq3c+Yk5eBmIKZBIvgKrLsJaIsI4StFCzt garIBmPPayJYmKneI0gOdjn/R5SuZbVn4dnQQpoqX9mEihG85uZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlVEliefSAOKU5NfsYkhZXRVjRDoqlSVtkus4hp8AqdWiCkaGt MiaT/f3YTdJ4BYpdDNPg06/gEk35q6q6WlA5gVWic1j5zcyqVFEVPrzGonpR5fIatE8NvK3Q e/F0Ia48gvxl/v6Ior4+lpTWhRiro/6ZWBiuFIPM0SRqkEqShgJ+rQ6LJIhhXJ/0F1lqTzTJ OJl7vRcQS9xVkHFdX90vxNwS0mSNoUekFPLzOTWXWV+ACQqflO1q8iCAn3aMqUl6N14EThz7 sAxAywzSDaeoeaX7IiSH7wEasQLdKEHPas5k1Q5lHTzK6ZjRprOBaLX+dVfwTE8wNhUGurTb NYYbjwpawncZxpIOREcD5dWcOWA3yGjNWEH7g/F4/NpsgA/zyQouFTpGMDSddGQA91cg26Tp 37c/nS/CRYfXDCa4Wrdry3w3LSU9c/9cNwYJKWA+M5yvAe04HMIGiYXCFm1uObs3yZSXPoac ST44BEGr6I/6UiqRdnVRACjrTiPuRt0c8pdFag25R+AzoLQ4h2FHS4UQzhZctskucQqAzsw2 TehgNfBFTFp9rqPRhqgGqy8qDqzPW0fKz8EbCpdFA8duYC98cc0kw7FSctlHOitlNrpFDrsw jeM6i8jm7EUis1N3KK+lbzavw+RSlHyZlZdzm3qsqiNtGuVuKbNi1SU1GXm
- Ironport-hdrordr: A9a23:eZyhlKgzOYJFPEDgIVicNMcTi3BQXz913DAbv31ZSRFFG/FwyP rCoB1L73XJYWgqM03I+eruBEBPewK4yXdQ2/hoAV7CZniehILMFu1fBOTZowEIdxeOldK1kJ 0QCJSWa+eAcWSS7/yKhzVQeuxIqLfnzEnrv5a5854Ed3AWV0gK1XYcNu/0KDwVeOEQbqBJbq Z0q/A30AaISDAyVICWF3MFV+/Mq5nik4/nWwcPA1oC5BOVhT2lxbbmG1zAty1uGg9n8PMHyy zoggb57qKsv7WSzQLd7Xba69BzlMH6wtVOKcSQgow+KynqiCyveIN9MofyygwdkaWK0hIHgd PMqxAvM4Ba7G7QRHi8pV/X1wzpwF8Vmg3f4G7dpUGmjd3yRTo8BcYEr5leaAHl500pu8w5+L 5X3kqC3qAnQC/orWDY3ZzlRhtqnk27rT4JiugIlUFSVoMYdft4sZEfxkVIC50NdRiKorzPKN MeQ/002cwmP29zNxvizyhSKZ2XLz8O9y69MwQ/Upf/6UkXoJh7p3Fot/D30E1wt67VcKM0lt gsAp4Y642mcfVmE56VJN1xNPdfWVa9NS7kASa1HWnNMp0hFjbkl6PXiY9FlN1CPqZ4hKcPpA ==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, Aug 23, 2022 at 01:56:22PM +0200, Jan Beulich wrote:
> --- a/xen/arch/x86/hvm/dom0_build.c
> +++ b/xen/arch/x86/hvm/dom0_build.c
> @@ -55,6 +55,9 @@
> */
> #define HVM_VM86_TSS_SIZE 265
>
> +bool __initdata opt_dom0_assisted_xapic = true;
> +bool __initdata opt_dom0_assisted_x2apic = true;
Defaulting those to true unconditionally is troublesome, as the check
in arch_sanitise_domain_config() will fail if either
assisted_x{2,}apic_available is not true, and dom0 domain creation
will fail, so...
> +
> static unsigned int __initdata acpi_intr_overrides;
> static struct acpi_madt_interrupt_override __initdata *intsrcovr;
>
> --- a/xen/arch/x86/include/asm/setup.h
> +++ b/xen/arch/x86/include/asm/setup.h
> @@ -68,6 +68,14 @@ extern bool opt_dom0_verbose;
> extern bool opt_dom0_cpuid_faulting;
> extern bool opt_dom0_msr_relaxed;
>
> +#ifdef CONFIG_HVM
> +extern bool opt_dom0_assisted_xapic;
> +extern bool opt_dom0_assisted_x2apic;
> +#else
> +#define opt_dom0_assisted_xapic false
> +#define opt_dom0_assisted_x2apic false
> +#endif
> +
> #define max_init_domid (0)
>
> #endif
> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -784,6 +784,11 @@ static struct domain *__init create_dom0
>
> dom0_cfg.arch.emulation_flags |=
> XEN_X86_EMU_LAPIC | XEN_X86_EMU_IOAPIC | XEN_X86_EMU_VPCI;
> +
> + if ( opt_dom0_assisted_xapic )
> + dom0_cfg.arch.misc_flags |= XEN_X86_ASSISTED_XAPIC;
> + if ( opt_dom0_assisted_x2apic )
> + dom0_cfg.arch.misc_flags |= XEN_X86_ASSISTED_X2APIC;
...the values of assisted_x{2,}apic_available need to be taken into
account here in order to avoid requesting an invalid configuration.
I could swear I have checked PVH dom0 interaction when reviewing the
original patch, but I clearly missed it.
Thanks, Roger.
|