All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property
       [not found]   ` <YjMJ32SFXTLCuaRY@myrica>
@ 2022-03-18  2:10     ` Minghao Xue
  2022-03-18 13:40         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Minghao Xue @ 2022-03-18  2:10 UTC (permalink / raw)
  To: Jean-Philippe Brucker
  Cc: mst, jasowang, quic_ztu, robh+dt, virtualization, devicetree,
	linux-kernel

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@vger.kernel.org with the
> maintainer "Rob Herring <robh+dt@kernel.org>" on Cc. Add the virtio list
> virtualization@lists.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@quicinc.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
> > > 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property
  2022-03-18  2:10     ` [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property Minghao Xue
@ 2022-03-18 13:40         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-18 13:40 UTC (permalink / raw)
  To: Minghao Xue, Jean-Philippe Brucker
  Cc: mst, jasowang, quic_ztu, robh+dt, virtualization, devicetree,
	linux-kernel

On 18/03/2022 03:10, Minghao Xue wrote:
> 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().

There is a generic wakeup-source property. How is this one different
that you need a separate one?


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property
@ 2022-03-18 13:40         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-18 13:40 UTC (permalink / raw)
  To: Minghao Xue, Jean-Philippe Brucker
  Cc: devicetree, mst, linux-kernel, virtualization, robh+dt, quic_ztu

On 18/03/2022 03:10, Minghao Xue wrote:
> 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().

There is a generic wakeup-source property. How is this one different
that you need a separate one?


Best regards,
Krzysztof
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property
  2022-03-18 13:40         ` Krzysztof Kozlowski
  (?)
@ 2022-03-22  6:19         ` Minghao Xue
  2022-03-22  8:38             ` Krzysztof Kozlowski
  -1 siblings, 1 reply; 6+ messages in thread
From: Minghao Xue @ 2022-03-22  6:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Jean-Philippe Brucker, mst, jasowang, quic_ztu, robh+dt,
	virtualization, devicetree, linux-kernel

Hi Krzysztof,

Thanks for your comment. First of all, which "generic wakeup-source
property" do you mean? Could you give an example? I find "wakeup-source"
property in several binding files. Are you pointing to this? As my
understanding, there is no standard naming rule about the property of
each driver right? Currently, there's no virtio-mmio driver using this.
Anyway, I can modify my patch, if you prefer "wakeup-source".

Regards,
Minghao

On Fri, Mar 18, 2022 at 02:40:29PM +0100, Krzysztof Kozlowski wrote:
> On 18/03/2022 03:10, Minghao Xue wrote:
> > 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().
> 
> There is a generic wakeup-source property. How is this one different
> that you need a separate one?
> 
> 
> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property
  2022-03-22  6:19         ` Minghao Xue
@ 2022-03-22  8:38             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-22  8:38 UTC (permalink / raw)
  To: Minghao Xue
  Cc: Jean-Philippe Brucker, mst, jasowang, quic_ztu, robh+dt,
	virtualization, devicetree, linux-kernel

On 22/03/2022 07:19, Minghao Xue wrote:
> Hi Krzysztof,
> 
> Thanks for your comment. First of all, which "generic wakeup-source
> property" do you mean? 

There is only one generic - wakeup-source.

> Could you give an example? I find "wakeup-source"
> property in several binding files. Are you pointing to this? 

Yes, use wakeup-source.

Please avoid top-posting.



Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property
@ 2022-03-22  8:38             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-22  8:38 UTC (permalink / raw)
  To: Minghao Xue
  Cc: Jean-Philippe Brucker, mst, linux-kernel, virtualization,
	devicetree, robh+dt, quic_ztu

On 22/03/2022 07:19, Minghao Xue wrote:
> Hi Krzysztof,
> 
> Thanks for your comment. First of all, which "generic wakeup-source
> property" do you mean? 

There is only one generic - wakeup-source.

> Could you give an example? I find "wakeup-source"
> property in several binding files. Are you pointing to this? 

Yes, use wakeup-source.

Please avoid top-posting.



Best regards,
Krzysztof
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-22  8:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1646733156-19333-1-git-send-email-quic_mingxue@quicinc.com>
     [not found] ` <20220317063515.GA30789@mingxue-gv.qualcomm.com>
     [not found]   ` <YjMJ32SFXTLCuaRY@myrica>
2022-03-18  2:10     ` [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property Minghao Xue
2022-03-18 13:40       ` Krzysztof Kozlowski
2022-03-18 13:40         ` Krzysztof Kozlowski
2022-03-22  6:19         ` Minghao Xue
2022-03-22  8:38           ` Krzysztof Kozlowski
2022-03-22  8:38             ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.