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

Re: [PATCH v2 5/5] x86/ioapic: Don't open-code 32-bits rte reads


  • To: Teddy Astie <teddy.astie@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 19 Nov 2025 10:34:01 +0000
  • 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=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=jHDCUg4U6jHmHeHbDXIljK9wsreNfvmASatg8X7F9pI=; b=kcRkXIYvxD5FtBAHYjltZCtV0306i6us5elGwVk4S7PAnLqGU1poYmhcO54KTDzFLQO/6BAe63oJxuAsoQhxLUNiKCZloy1P9yvv+PvHOgFLJDM7e1/qIS6lUOzmuIztR5RjN4yJ56cuf5JfZAC9YLspjorKBJ0ICdFpBV6VFAQmgtfaZyy4/eWE9SieRpdayquI44Cvn2SujE1vtf/q9ypuNqje/W468ZkHrjEoTz0q4sLS3enPWssnKiZI4ybFCgnI7J6gQoAKs0bGpCCFsFDnKdBPoGmaM0IT0YjArkk+XyUVACl2J+aSS64oA76Be1666vYEe9k0UQWeefDg+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pvwXljca2QoGG9/8cYOUJYXZYHX5SxzvDrjXiQSGt5WCmkbjBWyg1LwXB5+WiMIGZVtQdMNd1UaLyMMJcou6EsjXcNorLKXP5fYR0auSOQWiNGE9ihQtSe/6pnY9QHOuOxU3rRwpbv54qa2mhyp4F7BtsOxwlG2CxSD66Oz17SoaX+6wAkYibyLext3Gfvfwvh0FT1jcDwimB1nsSknjpFOOnOnx9Me7QG7JayxIXrjYHYPOZS4JTb1+Wg6qeoSQnIm227FCFKK9rclk4Pn+HpPvLfGup1V6wIizFaCfibkA7t5SqFWRUYbwFCm4tMPiOmR4cA0FSl0bjkjlWa61Kw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Delivery-date: Wed, 19 Nov 2025 10:34:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23/10/2025 10:12 am, Teddy Astie wrote:
> diff --git a/xen/drivers/passthrough/vtd/intremap.c 
> b/xen/drivers/passthrough/vtd/intremap.c
> index 612e08bcec..a276518c52 100644
> --- a/xen/drivers/passthrough/vtd/intremap.c
> +++ b/xen/drivers/passthrough/vtd/intremap.c
> @@ -411,11 +411,8 @@ unsigned int cf_check io_apic_read_remap_rte(
>  
>      if ( remap_entry_to_ioapic_rte(iommu, index, &old_rte) )
>          return __io_apic_read(apic, reg);
> -
> -    if ( rte_upper )
> -        return (*(((u32 *)&old_rte) + 1));
> -    else
> -        return (*(((u32 *)&old_rte) + 0));
> +    
> +    return rte_upper ? old_rte.high : old_rte.low;
>  }

This hunk introduces trailing whitespace where there was none previously.

~Andrew



 


Rackspace

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