lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 18 Mar 2022 10:10:52 +0800
From:   Minghao Xue <quic_mingxue@...cinc.com>
To:     Jean-Philippe Brucker <jean-philippe@...aro.org>
CC:     <mst@...hat.com>, <jasowang@...hat.com>, <quic_ztu@...cinc.com>,
        <robh+dt@...nel.org>, <virtualization@...ts.linux-foundation.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup
 property

Hi Jean and folks,
This is just an optional flag which could be used on an embedded system.
For example, if we want to use an virtio-input device as a virtual power
key to wake up the virtual machine, we can set this flag in the device
tree.
Currently, virio-mmio driver does not implement suspend/resume
callback(maybe no need). So we want to check this flag and call
enable_irq_wake()  accordingly in vm_find_vqs().

Regards,
Minghao

On Thu, Mar 17, 2022 at 10:13:51AM +0000, Jean-Philippe Brucker wrote:
> Hi Minghao,
> 
> On Thu, Mar 17, 2022 at 02:35:15PM +0800, Minghao Xue wrote:
> > Hi Jean,
> > 
> > Do you have any comment on this change? And do you consider to accpet
> > this commit? Looking forward to your reply.
> 
> Please send device-tree patches to devicetree@...r.kernel.org with the
> maintainer "Rob Herring <robh+dt@...nel.org>" on Cc. Add the virtio list
> virtualization@...ts.linux-foundation.org for anything related to virtio.
> (You can find that by running "scripts/get_maintainer.pl <your patch>")
> 
> Regarding the patch itself it's outside my expertise, but I feel like
> there should be more generic mechanism to solve this problem, and firmware
> might not need to be involved if this is not describing a property of the
> platform. Plenty of drivers outside virtio deal with IRQ lines as wakeup
> source and I don't see similar properties in other device tree nodes, how
> do they do it?  It looks like a lot of drivers call enable_irq_wake() in
> their suspend() callback, so could we do the same for virtio-mmio?
> 
> Thanks,
> Jean
> 
> > 
> > Regards,
> > Minghao
> > 
> > On Tue, Mar 08, 2022 at 05:52:36PM +0800, Minghao Xue wrote:
> > > Some systems want to set the interrupt of virtio_mmio device
> > > as a wakeup source. On such systems, we'll use the existence
> > > of the "virtio,wakeup" property as a signal of requirement.
> > > 
> > > Signed-off-by: Minghao Xue <quic_mingxue@...cinc.com>
> > > ---
> > >  Documentation/devicetree/bindings/virtio/mmio.yaml | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/virtio/mmio.yaml b/Documentation/devicetree/bindings/virtio/mmio.yaml
> > > index 4b7a027..a5fe02a 100644
> > > --- a/Documentation/devicetree/bindings/virtio/mmio.yaml
> > > +++ b/Documentation/devicetree/bindings/virtio/mmio.yaml
> > > @@ -31,6 +31,10 @@ properties:
> > >      description: Required for devices making accesses thru an IOMMU.
> > >      maxItems: 1
> > >  
> > > +  virtio,wakeup:
> > > +    type: boolean
> > > +    description: Required for setting irq of a virtio_mmio device as wakeup source.
> > > +
> > >  required:
> > >    - compatible
> > >    - reg
> > > -- 
> > > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> > > a Linux Foundation Collaborative Project
> > > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ