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

Re: [PATCH v2 2/3] xen/arm: make has_vpci depend on CONFIG_HAS_VPCI


  • To: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 7 Jul 2023 08:59:32 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0Fg3SKqBpgFnJHUM+u1c6ukisHCJk5yv3+LVL97goiE=; b=EYbgMcKhHIyFPxe4C54v9iMJAW1M5jKCwTGDd/s6MUf9vcvsYM05Ax8TOZBFGB9XCTtLLdcamH3GnwxzHl/EvIhBYvKqVLsSjpHtRgQpp5kuurCmqYtap8kID7XsEmYYKXKL4cmUUtBtF/Yt6f1/OBUs5LdloYYBN+dSP5k3Nxw/ZW9CijhAE8AXnY5nMgW8dJE6X9WcEaKIy8m5935DK0LQJLYwkwm+KZ/xxmq5EJzs/VFBp0Y3fnc3/bwbdiiFEA+UeZ/AyeeIMFfh9KxapKJFnojpXfHftWZpvpD2jzx4y4aw3IwcxFO2YLghJg84qW6lrvMlC4FHfDiLThXWBw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wg/rBwXiCwemsElsn7zM0B9WtWoNga+nMrPjo+tFzCFWVxpHQobm+SlGB3T+hpmcqy2FmLxEsPDaueVdMnD8sV+HCgxg8BHpHovl8l/mQZpCQmkTeq2c/qWLBDgmgoRD4wWnLEwLjmAD885RZOcHTeRJpEMECJsO7+5Ttdh3S67RNfZzhr95gY8FocctiPua0doX6x9aqd9tywGSPn66mCjC82ukVAiyxv1Dxfljl9UtOxp9Ya4JsgNRVwCXMTdajNin4N4bVsd4DGCSxSY2mAMJC1MhqFfMLJ+KjfLiYcVePAOaQcwQsJWw2ZqGq0KBQvav2RNP1RyLNL/vq+rCtw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Artem Mygaiev <artem_mygaiev@xxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 07 Jul 2023 06:59:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.07.2023 03:47, Stewart Hildebrand wrote:
> --- a/xen/arch/arm/include/asm/domain.h
> +++ b/xen/arch/arm/include/asm/domain.h
> @@ -298,8 +298,7 @@ static inline void arch_vcpu_block(struct vcpu *v) {}
>  
>  #define arch_vm_assist_valid_mask(d) (1UL << 
> VMASST_TYPE_runstate_update_flag)
>  
> -/* vPCI is not available on Arm */
> -#define has_vpci(d)    ({ (void)(d); false; })
> +#define has_vpci(d) ({ IS_ENABLED(CONFIG_HAS_VPCI) && is_hardware_domain(d); 
> })

While likely not much of a problem here, I think we should strive to
write macros such that their arguments are evaluated exactly once in
all cases (for side effects to occur exactly once). When that's not
easily possible, so be it, but here it doesn't look problematic to
swap both sides of the &&.

Jan



 


Rackspace

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