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

Re: [PATCH v3] xen/evtchn: Introduce new IOCTL to bind static evtchn


  • To: Rahul Singh <rahul.singh@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Tue, 18 Jul 2023 14:50:09 +0000
  • Accept-language: en-US, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=iAeKl1E0tZdICBip/bXZYl5P930x+EXVgz1D+2mFUqc=; b=gOnavY8kdybcWU4sBLNoedqgB2+yUqqhpC/fJp9gBO6LIEKXaJJkQBrm5h402mQOIg29JT3ubnGrhfmL5JZZMWJwJCzZk8j+kOHNjX+xfgLfXKjYV3zJ3v//0ydKWKR6QqCvEvYavna2ynM/jkk5idd1yV413sR3/Vn8mufvSbf3hNaJUmxGbG3zN3pYM4MjUB75t4gT8lGXlrPfTR3JBYglr+zXqIn4XsaCQF9EUemR02pMa9ddGNoPIVVYu2uK1IqBzNZtqVIdIM1sqOdE3N/1o2XhYw3HOWpCx86aScuHAjO649gjlXPIMLTdf2ZL52AhYyCULMpK9bup67uQmg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=doNSBVwA+n2RDobVX/KoukkdbckOUOKMbHDjUfr19ia7Gyt/PR91wzWAZ/NhIfFaLkVH1EhgDZk0Wz0ufx0S6+sTHf+mPlersLAd4XAdS3QDdhL/MQ2aXJxYWCCIFoCMn3NWbrXjf64uQGS2LlBb+aRi3gLiHCln9RHEIrk01jXH9PsDufI+NBheMxzCBLADCc/ijqYHktS9nohwAbqDXGbsWibuxqOE0lzxvusF0hdKr6ZXD+tPvcPgPebWh7ea/BRPsGaMdJajlhPe9YdDEJWiwX6KJ3IcqmbF1l1DCs97Ewzhc1VFBylfOhcKCvOHC4sE2z7r0o9RPOUh5XHQWQ==
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, David Woodhouse <dwmw@xxxxxxxxxxxx>, Jane Malalane <jane.malalane@xxxxxxxxxx>
  • Delivery-date: Tue, 18 Jul 2023 14:50:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZuWtmTJj//uCt6EKYgZEjiCdjM6+/m3CA
  • Thread-topic: [PATCH v3] xen/evtchn: Introduce new IOCTL to bind static evtchn


On 18.07.23 14:31, Rahul Singh wrote:


Hello Rahul


> Xen 4.17 supports the creation of static evtchns. To allow user space
> application to bind static evtchns introduce new ioctl
> "IOCTL_EVTCHN_BIND_STATIC". Existing IOCTL doing more than binding
> that’s why we need to introduce the new IOCTL to only bind the static
> event channels.
> 
> Static evtchns to be available for use during the lifetime of the
> guest. When the application exits, __unbind_from_irq() ends up being
> called from release() file operations because of that static evtchns
> are getting closed. To avoid closing the static event channel, add the
> new bool variable "is_static" in "struct irq_info" to mark the event
> channel static when creating the event channel to avoid closing the
> static evtchn.
> 
> Also, take this opportunity to remove the open-coded version of the
> evtchn close in drivers/xen/evtchn.c file and use xen_evtchn_close().
> 
> Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
> ---
> v3:
>   * Remove the open-coded version of the evtchn close in drivers/xen/evtchn.c

Thanks!

Looks like there is one unmentioned change in change-log since v2:
* Make sure that evtchn hasn't been added yet before binding it in 
evtchn_ioctl():case IOCTL_EVTCHN_BIND_STATIC

Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

> v2:
>   * Use bool in place u8 to define is_static variable.
>   * Avoid closing the static evtchns in error path.
> ---

[snip]

 


Rackspace

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