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

Re: [PATCH v6 2/5] xen/vpci: move xen_domctl_createdomain vPCI flag to common


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Wed, 29 Nov 2023 16:25:10 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=GTwAxKmxs+Q4Xpgd54ShO2z39QSwedi6ap1tpSP5ih4=; b=BbEC1N/LCAi0OIUHZmb21fthg4NcUaoJgECmeF5M32TtD6AzEeDntp5ElD3WmA+6EtBRR9ylhEtQVMauf4YApeU1K1u/Vi6NzmxD7uoAH18qd1ddTu35ERP0YLFYOFGUY7rGb1+oD2djxZ7BneVdeRIZRIaU9WRsANAYRRyqUthrU/Hm/E9YLTR0ddR+8saDsdtDLnDT9FAb7JyAp/7nlhi88joNUngIefhnZT0NpfIDxDyHzPaBfqS7eJYEYNajr5wEwWDMI2Ar2MYedjylJBTiGJyOkYF58JeMx2aXH1/K+9zfnYFJPvpgeG8tS+nsbzsBPb/q5LS53SGdCO6NSw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JC8j6yJeHLHLP/JXlQWqrZMm5tM7Oq+HNM+94GkIOI8mFlgr9YRP0jvLBM25cXmeC5CMazjsxM3svwBZSL20nppps44SUIzTWPA5X9fn5RQFNAPD9SzYX4rSPgpheYb5xo+4ZXv1OFdGqBBGDv7nA9hb6z2txtMGpPo2RcNEcFxqeI8xlN5zlAKUIFKJ5a731UYfkdc5qxaqzjsyW3vJ1dhcMStS2LmS1VIxzKcvmhN80yhGjfILLciMU9vH8P6D/cVYCCgvwrO7967mWI6ZnpVtlEHPJq+9w16DkK8gR0AxK8RkgTq9bSvbk7YGp3VVNaL+SsEz5lo8L7FHdRu3Ig==
  • Cc: Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Juergen Gross" <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "George Dunlap" <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 29 Nov 2023 21:25:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11/14/23 04:11, Jan Beulich wrote:
> On 13.11.2023 23:21, Stewart Hildebrand wrote:
>> @@ -709,10 +710,17 @@ int arch_sanitise_domain_config(struct 
>> xen_domctl_createdomain *config)
>>          return -EINVAL;
>>      }
>>  
>> +    if ( vpci && !hvm )
>> +    {
>> +        dprintk(XENLOG_INFO, "vPCI requested for non-HVM guest\n");
>> +        return -EINVAL;
>> +    }
>> +
>>      return 0;
>>  }
> 
> As said on the v5 thread, I think my comment was misguided (I'm sorry)
> and this wants keeping in common code as you had it.

I'll move it back to xen/common/domain.c. No worries.

> 
>> --- a/xen/include/public/arch-x86/xen.h
>> +++ b/xen/include/public/arch-x86/xen.h
>> @@ -283,15 +283,16 @@ struct xen_arch_domainconfig {
>>  #define XEN_X86_EMU_PIT             (1U<<_XEN_X86_EMU_PIT)
>>  #define _XEN_X86_EMU_USE_PIRQ       9
>>  #define XEN_X86_EMU_USE_PIRQ        (1U<<_XEN_X86_EMU_USE_PIRQ)
>> -#define _XEN_X86_EMU_VPCI           10
>> -#define XEN_X86_EMU_VPCI            (1U<<_XEN_X86_EMU_VPCI)
>> +/*
>> + * Note: bit 10 was previously used for a XEN_X86_EMU_VPCI flag. This bit 
>> should
>> + * not be re-used without careful consideration.
>> + */
> 
> I think a multi-line comment is drawing overly much attention to this.
> How about "Note: Bit 10 was previously used for XEN_X86_EMU_VPCI. Re-use
> with care." which I think fits in a single line comment.

Sounds good.

> 
> Jan



 


Rackspace

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