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

Re: [RFC 6/7] x86/iommu: call pi_update_irte through an hvm_function callback


  • To: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 21 Dec 2022 12:25:10 +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=CXGRyDtm6s8XqtjWXzwMgwRFBKRvXm/6uCkIXpW+Y54=; b=gKg2JCDHC4QjNnQDaBTYoqLHptXb1Dp5Wmrw/5qePKyeJW9dd+ZLisvYg7HlklBRjcefGK/8Jz1jn6dZwp5GUbT8Q6Ti+1zd54bCBx5NZDpQvzWQMxlaZG8oIaXk9+iMVKAC2gtUqJ3xFnMWtdCwlpl1fvLHUEzIW6cVch0Jtud5yJ2/RRptMZbD3Y9+jvCayOciIdnbTfONGUiK+lTLPiyu5I9ih+I0bjardxqaunmugIqXsPmF3siEPHL38uzC26S/z13v18tDSw+1m6ESPSLEtXPWeawmAGgdnRitidcMAQdymwkxcIHSGQiw2daPKI+kjd0otqbikXsCwarRXA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I7Gk8of0G1nPxLDkp16pqSsh164XmzgAEyUgCGh61jr8ge0GbDayN+gXaZlyAmnCyTnHrvJyRt+LuWN1MMonfPz92/Afb86dBE7xeOgqjzr3dCzWUMW7b43fnppncmEEzapUfkzK9soj7P0J9354nGU9Kw3XFVSiqlhCT+6fmqp4TjUs2B8W5bmpCe8m1RvHt3TjJFC8wlCJzmCDvKo1jJ4Ap4WHa+VNUHS+mkuNvaedCUNXv1hnVDvKXZ6ff4oQuID0Xx3Sf6oD4WKymcDy3aTiRP78/ZrugwGkoixVJPJ+0ueqGYnVQpVh4EdIflDdx7NXSG76cNimmruHX1pMhA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Jun Nakajima <jun.nakajima@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 21 Dec 2022 11:25:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 21.12.2022 12:09, Xenia Ragiadakou wrote:
> 
> On 12/21/22 12:13, Jan Beulich wrote:
>> On 19.12.2022 07:34, Xenia Ragiadakou wrote:
>>> @@ -774,6 +779,16 @@ static inline void hvm_set_nonreg_state(struct vcpu *v,
>>>           alternative_vcall(hvm_funcs.set_nonreg_state, v, nrs);
>>>   }
>>>   
>>> +static inline int hvm_pi_update_irte(const struct vcpu *v,
>>> +                                     const struct pirq *pirq, uint8_t gvec)
>>
>> Why "int" as return type when both call sites ignore the return value?
> 
> Because the original function returned int.

Hmm, indeed - looking more closely there can actually be errors, and
those shouldn't really be ignored in all cases. At the very least an
assertion would seem on order.

> I 'm not sure though why the returned value is ignored.

Kevin, thoughts?

Jan



 


Rackspace

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