[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 4/5] [FUTURE] xen/arm: enable vPCI for domUs
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- Date: Thu, 30 Nov 2023 12:06:23 -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=r9yv9IDk5DyS3cwk/afV9Gg+1N1Gnxr+EoG2hGG58K0=; b=a0ZsbafVNFxXEk4NBizck482TnWCoOfh59TubiwPBUsvv8BE2UgSO8YrOMznRScbmG4ddP4veKN6KXfkCEoCl7ga/z6ToXxDCptdkeI5ocojBC929FXrOyBmHOI4A1at2ErNaOMjvDsZH4GsE9QiW9isBxMj8a0sl238Sgjow7bc9oXa2Ta1VQFetP2sE+fy1XSzQVn/Chui7kp270Id6pij2E1OFHibM4bfTxwYBGrPMqc9RnGyQHZ0+qzyazDaIDTtEBDO5+cyvL+OuMiKv+9jqiXH30lcb3Hp7y2Sdv0SWMvEpNQtb9eFfaSWi/Ep+S6kNEj+Hud0720nofWpTQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hipbjfnuHKAPzu2pz6cNM/bUpPE4E6/q6urYnHDhewnj0GlekG8RLfLUHbgUOp7JeTNMejB815U3KbPeCmHT98tf8/UA1P1OILFG9dkJ4gDMbVupAR+9F9DsXPJxDGoUdJuE9LU9aa+VYEF5idrk5c+h+ZX6AZDD8nBgg8MGmSQg5fEK95eyvEnM4EKnEyx8xMY+m5A7ZcwJrErZgb0MTfTladciOnbacI0P+KC0pRRBz6+pEuvc+SuSzW1YEscSctScIhiW/84zIeifEOekflk++kEA5J/A8JaL3vC4QrXqSUSdFkF8ChLo4XS007UbfdwjItT4DHVuvMMZv0lcug==
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 30 Nov 2023 17:06:43 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11/30/23 03:33, Jan Beulich wrote:
> On 30.11.2023 03:47, Stewart Hildebrand wrote:
>> On 11/14/23 04:13, Jan Beulich wrote:
>>> On 13.11.2023 23:21, Stewart Hildebrand wrote:
>>>> --- a/xen/arch/x86/include/asm/domain.h
>>>> +++ b/xen/arch/x86/include/asm/domain.h
>>>> @@ -503,6 +503,8 @@ struct arch_domain
>>>> #define has_vpit(d) (!!((d)->arch.emulation_flags & X86_EMU_PIT))
>>>> #define has_pirq(d) (!!((d)->arch.emulation_flags &
>>>> X86_EMU_USE_PIRQ))
>>>>
>>>> +#define arch_needs_vpci(d) ({ (void)(d); false; })
>>>
>>> See my comments on the v5 thread on both this and ...
>>
>> So, the goal here is to return true for a PVH dom0, and false otherwise (for
>> now). Since dom0 can't feasibly be full HVM, and is_hvm_domain(d) returns
>> true for PVH, how about the following?
>>
>> /* TODO: re-visit when vPCI is enabled for PVH domUs. */
>> #define arch_needs_vpci(d) ({ \
>> const struct domain *_d = (d); \
>> is_hardware_domain(_d) && is_hvm_domain(_d); })
>
> Looks okay to me, except for the leading underscore in _d (see respective
> Misra guidelines, merely re-enforcing what the C standard says).
Right. If I'm interpreting the standards correctly, it looks like a trailing
underscore would work, seeing as we haven't adopted MISRA C:2012 Dir 4.5 (yet?).
> Of course
> the double evaluate_nospec() isn't quite nice in the result, but I guess
> this isn't going to be used in many places?
Only in XEN_DOMCTL_assign_device, as far as I'm aware.
>
> Jan
|