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

Re: [PATCH 5/8] xen/evtchn: don't close the static event channel.


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 28 Jun 2022 14:52:00 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=E3Usn+WLduDq2CAWi0URDioj7XgRGUFCPKnDcPy7kPU=; b=YWHSQfPKv24+FairVlQE24ApxBSG+maX0aEPT0UcDD6qkXEGeuMfSWSyJJcjCe/9DuE0WtA0GZdfPvisuEo50ueD6z/cprZBDpPXxNLhQAZXhgroi1N8V/Qv3MpxnmYgP2ZT55OiZVeB3bxXTThLfK66qYfADO1Pvc3n8Clv7Dhsr2gCsybew93LNeQWLaPyiGcz7Q7S/pTqV3IB9vreCC2IORVq7WoQTmOuhyRtCKp67d4BNzKjqAXI26QcJBC1nSOgamMZc4HjxmH78+gNFXkn2v4EC9PeToOS2I7fzoEEGTLNbGn13KGXLcCc6RyuYdLMxXW3m0XS5NCEEGMPzA==
  • 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=E3Usn+WLduDq2CAWi0URDioj7XgRGUFCPKnDcPy7kPU=; b=l7jB00QhdNcOHZ/zitLAmi3uQcLlYv75DP70VaRPNs2BohKFq8BPDxsO1zFIp9lzT6f5laHDCxFFUvMHbXN/MVvJbc7v2cjRIbOcmSBGXN+rt2CiZzpGOkNUC5cpm1z1HjBBVu9R7q7ztMaFByLiJ73EwcLJmVOE7ASRwOIf0mbVItqQJi9BEKqlcIh5WAH92ZGnl3g4Q+HsXZFn3/vzVcG/de3LNX3TFA9N6883ZSIOqJhyFkVIqC0YISpvthg84N0geoceGWHCyY0VC9wU5x0uSq7Z1YLttcGnL6eKYO+0H2hi8luAm+HYE4hxgNNylpkII62JXOyDvZicUebR/g==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=ZgeIupU9VHXKbgfRsbU8TlI6LS5m/uJ6BdO54ztqPZKu/m4zia4MAXJDmtPJl21/MtSVZqCNSfISnPXfnk3dI1RPORB2B1CWpJLmHQq4W061fP6FhKTniAS6yJFkzS3jgGOJMKFkNqz93GYQFGlVp4L/V8K1FfrNn/x28X5FGsUZJ5/aAprKJeDoUqqJoQo5Tkup1C8DDwiPpTafTU4VetF1EMUHVk1oA9Qum7NOoD28rPgPYZYb2m8yseGOR6LIMgEAoUQ7f9KvVIpEpLnvoE1/FSNyyTh977p+5oiKHzvVD/cOFyyqSenZ/APe/fs9fXcyASGQaHi7R5X2s6kqXw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QemuhnuxxRrkMgUVG4Kuxs4BjfAtOnbAxWtM7pHQy/+yiInQuQYFvx/ThJoFITNLiys1hgsRe/3SclmwwafpfgfDnHEjLoJVTmy3KbUgwEr4XAqqC38ltax36QjfeZdW4O73Cn1vjMdYccaw8FiY1c0t4smLv5yYd/vmClun4vHS49fiyuLA4h+VJO6P0/lQF+IbO94UQeDqvFuXjako08HhIcCgJ5J1g/HrpF85VZdQogN+20WGhL6wTr3PHFPloFdyFfbHOka6XB6Zea/CPiEnsYoO6B9EvYLjZJWEBh5hkTspT6TW4XC0zsPpNVI1XWs7ei78ZYq6PYsLVqOvqQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Rahul Singh <Rahul.Singh@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 28 Jun 2022 14:52:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYhkX7DDZgCoAMsUecvv2wUY+1U61bhmuAgAGTuwCAAAWdgIAHwJOAgAAJOwCAAAcgAA==
  • Thread-topic: [PATCH 5/8] xen/evtchn: don't close the static event channel.

Hi Julien,

> On 28 Jun 2022, at 15:26, Julien Grall <julien@xxxxxxx> wrote:
> 
> 
> 
> On 28/06/2022 14:53, Rahul Singh wrote:
>> Hi Julien
> 
> Hi Rahul,
> 
>>> On 23 Jun 2022, at 4:30 pm, Julien Grall <julien@xxxxxxx> wrote:
>>> 
>>> 
>>> 
>>> On 23/06/2022 16:10, Rahul Singh wrote:
>>>> Hi Julien,
>>>>> On 22 Jun 2022, at 4:05 pm, Julien Grall <julien@xxxxxxx> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> On 22/06/2022 15:38, Rahul Singh wrote:
>>>>>> Guest can request the Xen to close the event channels. Ignore the
>>>>>> request from guest to close the static channels as static event channels
>>>>>> should not be closed.
>>>>> 
>>>>> Why do you want to prevent the guest to close static ports? The problem I 
>>>>> can see is...
>>>> As a static event channel should be available during the lifetime of the 
>>>> guest we want to prevent
>>>> the guest to close the static ports.
>>> I don't think it is Xen job to prevent a guest to close a static port. If 
>>> the guest decide to do it, then it will just break itself and not Xen.
>> It is okay for the guest to close a port, port is not allocated by the guest 
>> in case of a static event channel.
> As I wrote before, the OS will need to know that the port is statically 
> allocated when initializing the port (we don't want to call the hypercall to 
> bind the event channel). By extend, the OS should be able to know that when 
> closing it and skip the hypercall.
> 
>> Xen has nothing to do for close the static event channel and just return 0.
> 
> Xen would not need to be modified if the OS was doing the right (i.e. no 
> calling close).
> 
> So it is still unclear why papering over the issue in Xen is the best 
> solution.

It is not that a static event channel cannot be closed, it is just that during 
a close there is nothing to do for Xen as the event channel is static and hence 
is never removed so none of the operations to be done for a non static one are 
needed (maybe some day some will be, who knows).

Why requiring the OS to have the knowledge of the fact that an event channel is 
static or not and introduce some complexity on guest code if we can prevent it ?

Doing so would need to have a specific binding in device tree (not to mention 
the issue on ACPI), a new driver in linux kernel, etc where right now we just 
need to introduce an extra IOCTL in linux to support this feature.

Cheers
Bertrand




 


Rackspace

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