[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/hvm: Widen condition for is_hvm_pv_evtchn_vcpu()
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Jane Malalane <Jane.Malalane@xxxxxxxxxx>
- Date: Wed, 18 May 2022 10:49:40 +0000
- Accept-language: en-US
- 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=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=efAx/8ljS/+OE6+4qUJIgOpijDrZxS8me08+v3JDzL8=; b=Z/wOTv0Z0WhnJLRtQNk+MpSSV6BKnKIYUrRmbtqd6/KhN6x05Pwy7BvVj2Zko9ICMn38Z6QhlSlqNPhgmm1ABPU2SGjHDEaX1M/DUQ2lMa3eFsxK7GwoOcwEN/PR+Kb9bs+F8BV8T1rS2cobN6IgHDK+u1Y3uevbJL1gJsVbe4vrqxvJTsTrHjYLzWJpEftgd5k+WkvIkQ9FTKVaSk1s97Wrlgj2rPSKNMTWNe5EzrvsKoUkfQStpBG0AiJKxh7WgNEnM5g4A5qhiygYdDV2v5rmEbKCSlSU2ZEDd6hah5eY2Hsj9D83aolbGvQzLvLnbqtwEWHYHnG259GBb2JknQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kPOJvU4Lcyn0qRH1ldNQlT6DVF08RFiyKFBX+k0WtC9Q4Upe/feF50Zd22sCESDkm137u26PxlmzfdNw+Wllylm5Fx4yasFDiktjvrQ2vGtIxnqj5f/KUedjZJfxfPt5Ajn7yXqysPuYx8YE06h2PSB9BS+RciZ+I2JtntS3vWlbauEoeZKFuXH267w8nIbXgkjdUswVnY/jPcY2vNr0DX8cg4wbiz2HmsiLe/EeZdeptZvP/jYFxVNSbPqu7dxqAwFyBEPA/S4gUdSWgZ8vsepZo2GTf7aoP78FrPeNZvrcpWZykET8tE63seiV/Wj5qGoEsFcvRUzumwTz2EPn/A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 18 May 2022 10:49:51 +0000
- Ironport-data: A9a23:YmJdmK03bs0jz2UTP/bD5aNwkn2cJEfYwER7XKvMYLTBsI5bp2MFy TQaWG6PO/6NNGrwKI8gO4jl9B5QusXTy4JnHgI+pC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkjk7xdOCn9xGQ7InQLlbGILes1htZGEk1EU/NtTo5w7Rj2tMx0YDga++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1gsYD3VCx5Dpf3xtsFajBUFXo9PopJreqvzXiX6aR/zmXgWl61mrBEKhFzOocVvOFqHWtJ6 PoUbigXaQyOjP63x7T9TfRwgsMkL4/gO4Z3VnNIlGmFS6p5B82TBfyVube03x9p7ixKNdTXY cdfTDNrZRDJZRBnMVYLEpMu2uyvgxETdhUH8QPK+vVsugA/yiRb4Ym0PsDaI+eNG+dfpk29n WLI3jzmV0Ry2Nu3jGDtHmiXru3FkD7/WYkSPKal7fMsi1qWrkQMDDUGWF39puO24mauVtQaJ 0EK9y4Gqakp6FftXtT7Rwe/onOPolgbQdU4LgEhwASEy66R6QDJAGEBF2dFcIZ/65NwQiE23 FiUmd+vHSZorLCeVXOa8PGTsC+2Pi8Wa2QFYEfoUDc43jUqm6lr5jqnczqpOPfdYgHdcd0o/ w23kQ==
- Ironport-hdrordr: A9a23:GpDdQan+4xFkq0H0tk9vDwgSiI7pDfOOimdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcIi7SdK9qXO1z+8X3WGIVY3SETUOy1HYVr2KirGSjwEIeheOvNK1sJ 0NT0EQMqyWMbEXt6fHCUyDYq4dKbq8ge+VbIXlvhFQpGhRAskOgTuRSDzra3GeLzM2Z6bRYa Dsgvav0ADQHEj/AP7aOlA1G8z44/HbnpPvZhALQzQ97hOVsD+u4LnmVzCFwxY3SVp0sPYf2F mAtza8yrSosvm9xBOZ/XTU9Y5qlNzozcYGLNCQi/ISNi7nhm+TFcRcsvy5zXMISdOUmRMXee r30lMd1gNImjTsl1SO0FnQMs/boXATAjHZuAalaDDY0LHErXoBerZ8bMRiA1XkAgMbza5B+b MO0GSDu5VNCxTc2Cz7+tjTThlv0lG5uHw4jIco/jViuKYlGchsRLYkjTVo+VY7bVHHwZFiFP MrANDX5f5Qf1/fZ3fFvnN3yNjpWngoBB+JTkULp8TQilFt7TtE5lpdwNZakmYL9Zo7RZUB7+ PYMr5wnLULSsMNd6pyCOoIXMPyAG3QRhDHNn6UPD3cZek6EmOIr4Sy7KQ+5emsdpBNxJwumI 7ZWFcdrmI2c1KGM7z74HSKyGG5fIyQZ0Wd9igF3ekGhlTVfsuaDQSTDFYzjsCnv/ITRsXGRv fbAuMlP8Pe
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYZUnyc7oF7QLoj0+gbrrX4WFU9K0kYs2AgAAckIA=
- Thread-topic: [PATCH] x86/hvm: Widen condition for is_hvm_pv_evtchn_vcpu()
On 18/05/2022 10:07, Jan Beulich wrote:
> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments
> unless you have verified the sender and know the content is safe.
>
> On 11.05.2022 17:14, Jane Malalane wrote:
>> Have is_hvm_pv_evtchn_vcpu() return true for vector callbacks for
>> evtchn delivery set up on a per-vCPU basis via
>> HVMOP_set_evtchn_upcall_vector.
>
> I'm confused: You say "per-vCPU" here, but ...
>
>> --- a/xen/arch/x86/include/asm/domain.h
>> +++ b/xen/arch/x86/include/asm/domain.h
>> @@ -14,8 +14,14 @@
>>
>> #define has_32bit_shinfo(d) ((d)->arch.has_32bit_shinfo)
>>
>> +/*
>> + * Set to true if either the global vector-type callback or per-vCPU
>> + * LAPIC vectors are used. Assume all vCPUs will use
>> + * HVMOP_set_evtchn_upcall_vector as long as the initial vCPU does.
>> + */
>> #define is_hvm_pv_evtchn_domain(d) (is_hvm_domain(d) && \
>> - (d)->arch.hvm.irq->callback_via_type == HVMIRQ_callback_vector)
>> + ((d)->arch.hvm.irq->callback_via_type == HVMIRQ_callback_vector || \
>> + (d)->vcpu[0]->arch.hvm.evtchn_upcall_vector))
>
> ... you use (d)->vcpu[0] here (and, yes, you say so in the comment)
> and ...
>
>> #define is_hvm_pv_evtchn_vcpu(v) (is_hvm_pv_evtchn_domain(v->domain))
>
> ... you don't alter this at all.
>
> Also (re-ordering context) this ...
>
>> is_hvm_pv_evtchn_vcpu() returning true is a condition for setting up
>> physical IRQ to event channel mappings.
>
> ... isn't really true - it's is_hvm_pv_evtchn_domain() which controls
> this (which in turn is why above you need to make the assumption I've
> put under question). With that assumption I think is_hvm_pv_evtchn_vcpu()
> would better go away.
Here only is_hvm_pv_evtchn_domain() should have been mentioned. The
"per-VCPU" was in regard to the vector callback for evthcn delivery
setup not being global but now done on a per-vCPU basis, in any case, I
will amend the description and title. Thanks for the feedback.
Jane.
|