[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC
- To: Anthony Perard <anthony.perard@xxxxxxxxxx>
- From: Jane Malalane <Jane.Malalane@xxxxxxxxxx>
- Date: Fri, 25 Feb 2022 14:31:39 +0000
- Accept-language: en-US
- 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=UhfEm22/Cv36tYP4Emir/j2Tu0W4Ek1hZclOq0pCCJU=; b=RbZN0ewzzRhE6HDtfaFCm3+pw25EJX+xlJJXLLQgJ+LVDiVLD5yLhHz1TiCcKyJAvE1Ny3SOc01iADVKbgeBsFXfN0pqeJnaRlLBdoI3m2BQniX8HieCpErfI+9okf9eiXiYsqfXq15VN/ikCz7uGrJMCShZXqAsDhhBJyyn4SAtvDndCbW6herv2bddWjHewfDLmL9Q3VyDw/5WeZ7H0Ozqhk9xbGTpkDBV+eWbEF0le7MPlWmxLcsCaMAE7x+A0IVlgmgYHgSGl2eybJvfBD9xwvd+XwwCiO8+KvlFk7zlgDIjQLHWWlxNkLUgJ9aerfSJyWhDH5Cw4QWuxwB2yg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ule0926Yh3PFsaCKjS2nIs1f2VMUNJheUTyIlP90Af/4I6flRoGbBI4On+bOh4HR97zMlkMqI7CuUwMRWNG4017iikccxbRL3uzi3PsrcEfdzgpnvnEZV+zRxDRg0/1R6Z1xqK93q5hfBrXeDCrcX3S+apG3YTtvgMDo2QiXZkoxE4Fo1cQmU+u6TkhHbrGdyoHqdfjoaB9sb0892K0T0LZp5jDmdVeYi94r2Fi1SiwH4RRY5dGXcKqF8syKv3iIQAnh2vFL/rWCYMYSrDGO7XBvS1bYEDJPcwwnaLqBGfUMABR9rcuaorbOp+AUN2Zb6HnrPbL4IUN4soWgQfwXCA==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Juergen Gross" <jgross@xxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, "George Dunlap" <George.Dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "Roger Pau Monne" <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 25 Feb 2022 14:32:00 +0000
- Ironport-data: A9a23:kjYqEaNabRvb+QrvrR1el8FynXyQoLVcMsEvi/4bfWQNrUoq0DwCz DMdXziBa66LZmbyL4wkbN/j/B4CucLTn4NjQAto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFcMpBsJ00o5wbZj2NMw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z0 vZNnJeMSF4TGYLmlNkWeAR2Lx1aBPgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALDsDtMcU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dsgfav0gDQAEj/Gf7LYEXtMdKzwuHjpdbDW1orFhQn4A6BgXeD87jhCSWV2R8YTndm3aoi2X KtqX242oyT99WAjjPM3W7a6Jpb3PH7zMFYOcCKgs8Jbh3xlweTYph7UbHqhkF3nAjv0idprD D/mWZlAy1B0QKXQohzm2qq5+DU6kdq15Yl8y7AvZKsm72geNtwMbs+uWsQSGqp16NnhqAn7E sD5RPoi7NHSRzHhyjz/N7OSlVjkVe1u2MrlaoJg2VYSpZ2Us4bkWUzxjIdLH47JlOz1GnnKp gbMOjMoPJNNV+KZXHQuWdihNSqQ3QoBx+DBkwPoNac3TRalG1wixJw/r1Tol4QsJYmD5VU7e XNNapl0LlIU88NdKp4QOMMW9G+BGDBSQ/FdGiSPVPkHqcaPG+lke+83JwloOWxPJAYxpo7n5 rMFFteqG4pYkrrTdaD2ZVamyq9NllVnQ6dvf22y6IJyIEUHoCbQhFrYGpe5vednw==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYJO0/E2Q9kBLnmUergICAnT03vaykSTOAgAAVuwA=
- Thread-topic: [PATCH v3 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC
On 25/02/2022 13:13, Anthony PERARD wrote:
> On Fri, Feb 18, 2022 at 05:29:43PM +0000, Jane Malalane wrote:
>> diff --git a/tools/include/libxl.h b/tools/include/libxl.h
>> index 333ffad38d..1c83cae711 100644
>> --- a/tools/include/libxl.h
>> +++ b/tools/include/libxl.h
>> @@ -535,6 +535,13 @@
>> #define LIBXL_HAVE_PHYSINFO_ASSISTED_APIC 1
>>
>> /*
>> + * LIBXL_HAVE_ASSISTED_APIC indicates that libxl_domain_build_info has
>> + * assisted_x{2}apic fields, for enabling hardware assisted virtualization
>> for
>
> Could you spell out both "assisted_xapic and assisted_x2apic" as that
> would allow for grep to find both string.
Will do (for both cases).
>
>> + * x{2}apic per domain.
>> + */
>> +#define LIBXL_HAVE_ASSISTED_APIC 1
>> +
>> +/*
>> diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c
>> index 39fdca1b49..ba5b8f433f 100644
>> --- a/tools/libs/light/libxl_arm.c
>> +++ b/tools/libs/light/libxl_arm.c
>> @@ -1384,8 +1384,9 @@ void
>> libxl__arch_domain_create_info_setdefault(libxl__gc *gc,
>> }
>> }
>>
>> -void libxl__arch_domain_build_info_setdefault(libxl__gc *gc,
>> - libxl_domain_build_info
>> *b_info)
>> +int libxl__arch_domain_build_info_setdefault(libxl__gc *gc,
>> + libxl_domain_build_info
>> *b_info,
>> + const libxl_physinfo *physinfo)
>> {
>> /* ACPI is disabled by default */
>> libxl_defbool_setdefault(&b_info->acpi, false);
>> @@ -1399,6 +1400,8 @@ void
>> libxl__arch_domain_build_info_setdefault(libxl__gc *gc,
>
> There is another return in this function, which want to return 0 rather
> than void.
>
>> memset(&b_info->u, '\0', sizeof(b_info->u));
>> b_info->type = LIBXL_DOMAIN_TYPE_INVALID;
>> libxl_domain_build_info_init_type(b_info, LIBXL_DOMAIN_TYPE_PVH);
>> +
>> + return 0;
>> }
>>
>> int libxl__arch_passthrough_mode_setdefault(libxl__gc *gc,
>> diff --git a/tools/libs/light/libxl_x86.c b/tools/libs/light/libxl_x86.c
>> index e0a06ecfe3..c377d13b19 100644
>> --- a/tools/libs/light/libxl_x86.c
>> +++ b/tools/libs/light/libxl_x86.c
>> @@ -819,11 +827,27 @@ void
>> libxl__arch_domain_create_info_setdefault(libxl__gc *gc,
>> {
>> }
>>
>> -void libxl__arch_domain_build_info_setdefault(libxl__gc *gc,
>> - libxl_domain_build_info
>> *b_info)
>> +int libxl__arch_domain_build_info_setdefault(libxl__gc *gc,
>> + libxl_domain_build_info
>> *b_info,
>> + const libxl_physinfo *physinfo)
>> {
>> libxl_defbool_setdefault(&b_info->acpi, true);
>> libxl_defbool_setdefault(&b_info->arch_x86.msr_relaxed, false);
>> +
>> + if (b_info->type != LIBXL_DOMAIN_TYPE_PV) {
>> + libxl_defbool_setdefault(&b_info->arch_x86.assisted_xapic,
>> + physinfo->cap_assisted_xapic);
>> + libxl_defbool_setdefault(&b_info->arch_x86.assisted_x2apic,
>> + physinfo->cap_assisted_x2apic);
>> + }
>> +
>> + else if (!libxl_defbool_is_default(b_info->arch_x86.assisted_xapic) ||
>
> This "else" needs to be on the same line as the "}" 2 lines above.
Okay.
Thank you,
Jane.
|