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

Re: [PATCH v2] x86/x2apic: introduce a mixed physical/cluster mode


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 2 Nov 2023 14:48:42 +0100
  • 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nsxli57NdPnbBLkRZQST2iOVkCwDLBT5mKJ4Grai8+c=; b=FF0vM8gy3ogbxI8O+IAoqQhEayssDEifFjfoPAOPjXRaWjOstZYRJ7bpmje6nyQEyelj2hDbajuSnE0PyNGHjhX9+1ro0cvABR1xKP8MvvKJ9/bXoJU3yZBIbVILMpIXsGStXGpUF7xjqbvgKxIl9MowKSQuqC449cWh/L6Hu0Tx+ZaqXRkKNLztW5VWvvmE6EOuvoCTfhJuHIsKOEicRLt7bNCu0qZTVITB0TeNPdDhcSg85xgwfK7HsUZPbEphUjEGRB0NFc9qBzG18HlX6JXbLzeQSkMYPQS26j3zIklCpujAM0+e9e/UcaPZUP9E32syf0NbYNydM540uiO7xg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BNa9GWMVTPq6A1/BX8j5DmFOvMBGfvskliD7lWIdARcOhqSOmUTG9bwzi+1PFvu+UmzDShC5r3oiTPZe3Hpaoecs0ymerb5mg/pvlLs0au9HLSJJ615JZykXNf8PiukUW3mkr5Sk0410dJ7FV3No4t1KMYABh9m8Mfq8Povw+TELxBvWOGzmRRW13JMS1bzDU8UdT6bJ2K6+y3FcJzkfSDGjgOinDq6QRNl+co2dO0zyY+9/Sx4FqJFUotOoRhDoof5OLm0EdoVKG6YxteU2WXaPYjNTY3RpD0QqJVv52JWbvMGsLxvIi/u8y/IC7Tp6hAhZnmf2w+EhAg5EZgPqyg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Henry Wang <Henry.Wang@xxxxxxx>, Community Manager <community.manager@xxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 02 Nov 2023 13:49:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.10.2023 15:52, Roger Pau Monne wrote:
> --- a/xen/arch/x86/genapic/x2apic.c
> +++ b/xen/arch/x86/genapic/x2apic.c
> @@ -180,6 +180,29 @@ static const struct genapic __initconstrel 
> apic_x2apic_cluster = {
>      .send_IPI_self = send_IPI_self_x2apic
>  };
>  
> +/*
> + * Mixed x2APIC mode: use physical for external (device) interrupts, and
> + * cluster for inter processor interrupts.  Such mode has the benefits of not
> + * sharing the vector space with all CPUs on the cluster, while still 
> allowing
> + * IPIs to be more efficiently delivered by not having to perform an ICR 
> write
> + * for each target CPU.
> + */
> +static const struct genapic __initconstrel apic_x2apic_mixed = {
> +    APIC_INIT("x2apic_mixed", NULL),
> +    /*
> +     * NB: IPIs use the send_IPI_{mask,self} hooks only, other fields are
> +     * exclusively used by external interrupts and hence are set to use
> +     * Physical destination mode handlers.
> +     */
> +    .int_delivery_mode = dest_Fixed,
> +    .int_dest_mode = 0 /* physical delivery */,
> +    .init_apic_ldr = init_apic_ldr_x2apic_cluster,

INT_DEST_MODE and the init_apic_ldr hook pointer are used in one place
that's neither IPI nor device-IRQ related: What connect_bsp_APIC() logs
is already not really correct for x2APIC mode, but clearly things go
worse with this further extension of the possible modes. I think this
wants adjusting to cover the (now) three x2APIC modes as well. (It
could also be updated up front to deal with the two original x2APIC
modes, but personally I'd fold the whole change right into here.)

Jan



 


Rackspace

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