All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] docs/misc: document PV control/feature keys for laptop/slate mode
@ 2017-03-30 18:02 Paul Durrant
  2017-03-30 18:18 ` Stefano Stabellini
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Durrant @ 2017-03-30 18:02 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Wei Liu, Andrew Cooper, Tim (Xen.org),
	George Dunlap, Jan Beulich, Ian Jackson, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 3237 bytes --]

On 30 March 2017, at 18:49, Stefano Stabellini <sstabellini@kernel.org> wrote:

>
>
>On Thu, 30 Mar 2017, Paul Durrant wrote:
>> Commit 4c8153d9 "add ACPI device for Windows laptop/slate mode switch"
>> added code to provide an 'laptop/slate mode' ACPI device to guests.
>>
>> When present this device is used by Microsoft Windows to bind a HID
>> driver which controls whether the Windows desktop appearance is optimized
>> for laptop/desktop or slate/tablet PCs. The mechanism for switching
>> between modes is to open a handle to this driver and write a byte of
>> arbitrary data.
>>
>> This patch documents xenstore keys such that a PV agent running in a
>> Windows guest can advertise the capability to, and receive instruction
>> from, a toolstack to cause such a mode switch.
>>
>> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
>> ---
>> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
>> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>> Cc: Jan Beulich <jbeulich@suse.com>
>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> Cc: Stefano Stabellini <sstabellini@kernel.org>
>> Cc: Tim Deegan <tim@xen.org>
>> Cc: Wei Liu <wei.liu2@citrix.com>
>> ---
>>  docs/misc/xenstore-paths.markdown | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
>> diff --git a/docs/misc/xenstore-paths.markdown b/docs/misc/xenstore-paths.markdown
>> index 5d89ed8..6c80a9e 100644
>> --- a/docs/misc/xenstore-paths.markdown
>> +++ b/docs/misc/xenstore-paths.markdown
>> @@ -435,6 +435,21 @@ XS_RESET_WATCHES xenstore message. See
>>  [xen/include/public/io/xs\_wire.h][XSWIRE] for the XenStore wire
>>  protocol definition.
>>
>> +#### ~/control/laptop-slate-mode = (""|"laptop"|"slate") [w]
>> +
>> +This is the PV laptop/slate mode control node. If the toolstack has
>> +provisioned a guest with the ACPI laptop/slate mode device then it
>> +can write the desired mode here to cause the guest to switch modes if
>> +necessary. The guest acknowledges a request by writing the empty
>> +string back to the control node.
>> +
>> +#### ~/control/feature-laptop-slate-mode = (""|"0"|"1") [w]
>> +
>> +This may be initialized to "" by the toolstack and may then be set
>> +to 0 or 1 by a guest to indicate whether it is capable or incapable,
>> +respectively, of responding to a mode value written to
>> +~/control/laptop-slate-mode.
>Usually, this is done by having the guest drivers write something like:
>feature-laptop-slate-mode
>to xenstore. The lack of the feature-* means no support is available.
>In fact, how is this supposed to work with old guest PV drivers that
>don't know about ~/control/feature-laptop-slate-mode? There won't be
>anybody to write "0" there, right?

The toolstack has to write this first because the parent control key is read only to the guest.
Old guests will not write 0 so the toolstack does not know whether the guest can handle a command written to control/laptop-slate-mode. It has to apply some form of timeout in that case. This is exactly the same as with any of the shutdown features.

  Paul

>>  ### Domain Controlled Paths
>>
>>  #### ~/data/* [w]
>> --
>> 2.1.4
>>
>

[-- Attachment #1.2: Type: text/html, Size: 9347 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] docs/misc: document PV control/feature keys for laptop/slate mode
  2017-03-30 18:02 [PATCH] docs/misc: document PV control/feature keys for laptop/slate mode Paul Durrant
@ 2017-03-30 18:18 ` Stefano Stabellini
  0 siblings, 0 replies; 5+ messages in thread
From: Stefano Stabellini @ 2017-03-30 18:18 UTC (permalink / raw)
  To: Paul Durrant
  Cc: Stefano Stabellini, Wei Liu, Andrew Cooper, Tim (Xen.org),
	George Dunlap, Jan Beulich, Ian Jackson, xen-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 3587 bytes --]

On Thu, 30 Mar 2017, Paul Durrant wrote:
> On 30 March 2017, at 18:49, Stefano Stabellini <sstabellini@kernel.org> wrote:
> >On Thu, 30 Mar 2017, Paul Durrant wrote:
> >> Commit 4c8153d9 "add ACPI device for Windows laptop/slate mode switch"
> >> added code to provide an 'laptop/slate mode' ACPI device to guests.
> >>
> >> When present this device is used by Microsoft Windows to bind a HID
> >> driver which controls whether the Windows desktop appearance is optimized
> >> for laptop/desktop or slate/tablet PCs. The mechanism for switching
> >> between modes is to open a handle to this driver and write a byte of
> >> arbitrary data.
> >>
> >> This patch documents xenstore keys such that a PV agent running in a
> >> Windows guest can advertise the capability to, and receive instruction
> >> from, a toolstack to cause such a mode switch.
> >>
> >> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> >> ---
> >> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> >> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> >> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> >> Cc: Jan Beulich <jbeulich@suse.com>
> >> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> >> Cc: Stefano Stabellini <sstabellini@kernel.org>
> >> Cc: Tim Deegan <tim@xen.org>
> >> Cc: Wei Liu <wei.liu2@citrix.com>
> >> ---
> >>  docs/misc/xenstore-paths.markdown | 15 +++++++++++++++
> >>  1 file changed, 15 insertions(+)
> >>
> >> diff --git a/docs/misc/xenstore-paths.markdown b/docs/misc/xenstore-paths.markdown
> >> index 5d89ed8..6c80a9e 100644
> >> --- a/docs/misc/xenstore-paths.markdown
> >> +++ b/docs/misc/xenstore-paths.markdown
> >> @@ -435,6 +435,21 @@ XS_RESET_WATCHES xenstore message. See
> >>  [xen/include/public/io/xs\_wire.h][XSWIRE] for the XenStore wire
> >>  protocol definition.
> >> 
> >> +#### ~/control/laptop-slate-mode = (""|"laptop"|"slate") [w]
> >> +
> >> +This is the PV laptop/slate mode control node. If the toolstack has
> >> +provisioned a guest with the ACPI laptop/slate mode device then it
> >> +can write the desired mode here to cause the guest to switch modes if
> >> +necessary. The guest acknowledges a request by writing the empty
> >> +string back to the control node.
> >> +
> >> +#### ~/control/feature-laptop-slate-mode = (""|"0"|"1") [w]
> >> +
> >> +This may be initialized to "" by the toolstack and may then be set
> >> +to 0 or 1 by a guest to indicate whether it is capable or incapable,
> >> +respectively, of responding to a mode value written to
> >> +~/control/laptop-slate-mode.
> >Usually, this is done by having the guest drivers write something like:
> >feature-laptop-slate-mode
> >to xenstore. The lack of the feature-* means no support is available.
> >In fact, how is this supposed to work with old guest PV drivers that
> >don't know about ~/control/feature-laptop-slate-mode? There won't be
> >anybody to write "0" there, right?
> 
> The toolstack has to write this first because the parent control key is read only to the guest.
> Old guests will not write 0 so the toolstack does not know whether the guest can handle a command written to control/laptop-slate-mode. It has to apply some form of timeout in
> that case. This is exactly the same as with any of the shutdown features.

All right, I had not read the shutdown protocol before, so this struck
me as odd (compared to PV frontends/backends). If I were to write this,
I would avoid the possibility to end up in uncertain state like "".
However, it is up to you :)


> >>  ### Domain Controlled Paths
> >> 
> >>  #### ~/data/* [w]
> >> --
> >> 2.1.4
> >>
> >
> 
> 
> 

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] docs/misc: document PV control/feature keys for laptop/slate mode
  2017-03-30 13:40 Paul Durrant
  2017-03-30 13:56 ` Wei Liu
@ 2017-03-30 17:49 ` Stefano Stabellini
  1 sibling, 0 replies; 5+ messages in thread
From: Stefano Stabellini @ 2017-03-30 17:49 UTC (permalink / raw)
  To: Paul Durrant
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Thu, 30 Mar 2017, Paul Durrant wrote:
> Commit 4c8153d9 "add ACPI device for Windows laptop/slate mode switch"
> added code to provide an 'laptop/slate mode' ACPI device to guests.
> 
> When present this device is used by Microsoft Windows to bind a HID
> driver which controls whether the Windows desktop appearance is optimized
> for laptop/desktop or slate/tablet PCs. The mechanism for switching
> between modes is to open a handle to this driver and write a byte of
> arbitrary data.
> 
> This patch documents xenstore keys such that a PV agent running in a
> Windows guest can advertise the capability to, and receive instruction
> from, a toolstack to cause such a mode switch.
> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Tim Deegan <tim@xen.org>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
>  docs/misc/xenstore-paths.markdown | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/docs/misc/xenstore-paths.markdown b/docs/misc/xenstore-paths.markdown
> index 5d89ed8..6c80a9e 100644
> --- a/docs/misc/xenstore-paths.markdown
> +++ b/docs/misc/xenstore-paths.markdown
> @@ -435,6 +435,21 @@ XS_RESET_WATCHES xenstore message. See
>  [xen/include/public/io/xs\_wire.h][XSWIRE] for the XenStore wire
>  protocol definition.
>  
> +#### ~/control/laptop-slate-mode = (""|"laptop"|"slate") [w]
> +
> +This is the PV laptop/slate mode control node. If the toolstack has
> +provisioned a guest with the ACPI laptop/slate mode device then it
> +can write the desired mode here to cause the guest to switch modes if
> +necessary. The guest acknowledges a request by writing the empty
> +string back to the control node.
> +
> +#### ~/control/feature-laptop-slate-mode = (""|"0"|"1") [w]
> +
> +This may be initialized to "" by the toolstack and may then be set
> +to 0 or 1 by a guest to indicate whether it is capable or incapable,
> +respectively, of responding to a mode value written to
> +~/control/laptop-slate-mode.

Usually, this is done by having the guest drivers write something like:

feature-laptop-slate-mode

to xenstore. The lack of the feature-* means no support is available.
In fact, how is this supposed to work with old guest PV drivers that
don't know about ~/control/feature-laptop-slate-mode? There won't be
anybody to write "0" there, right?


>  ### Domain Controlled Paths
>  
>  #### ~/data/* [w]
> -- 
> 2.1.4
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] docs/misc: document PV control/feature keys for laptop/slate mode
  2017-03-30 13:40 Paul Durrant
@ 2017-03-30 13:56 ` Wei Liu
  2017-03-30 17:49 ` Stefano Stabellini
  1 sibling, 0 replies; 5+ messages in thread
From: Wei Liu @ 2017-03-30 13:56 UTC (permalink / raw)
  To: Paul Durrant
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, xen-devel

On Thu, Mar 30, 2017 at 02:40:45PM +0100, Paul Durrant wrote:
> Commit 4c8153d9 "add ACPI device for Windows laptop/slate mode switch"
> added code to provide an 'laptop/slate mode' ACPI device to guests.
> 
> When present this device is used by Microsoft Windows to bind a HID
> driver which controls whether the Windows desktop appearance is optimized
> for laptop/desktop or slate/tablet PCs. The mechanism for switching
> between modes is to open a handle to this driver and write a byte of
> arbitrary data.
> 
> This patch documents xenstore keys such that a PV agent running in a
> Windows guest can advertise the capability to, and receive instruction
> from, a toolstack to cause such a mode switch.
> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH] docs/misc: document PV control/feature keys for laptop/slate mode
@ 2017-03-30 13:40 Paul Durrant
  2017-03-30 13:56 ` Wei Liu
  2017-03-30 17:49 ` Stefano Stabellini
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Durrant @ 2017-03-30 13:40 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Paul Durrant, Jan Beulich

Commit 4c8153d9 "add ACPI device for Windows laptop/slate mode switch"
added code to provide an 'laptop/slate mode' ACPI device to guests.

When present this device is used by Microsoft Windows to bind a HID
driver which controls whether the Windows desktop appearance is optimized
for laptop/desktop or slate/tablet PCs. The mechanism for switching
between modes is to open a handle to this driver and write a byte of
arbitrary data.

This patch documents xenstore keys such that a PV agent running in a
Windows guest can advertise the capability to, and receive instruction
from, a toolstack to cause such a mode switch.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 docs/misc/xenstore-paths.markdown | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/docs/misc/xenstore-paths.markdown b/docs/misc/xenstore-paths.markdown
index 5d89ed8..6c80a9e 100644
--- a/docs/misc/xenstore-paths.markdown
+++ b/docs/misc/xenstore-paths.markdown
@@ -435,6 +435,21 @@ XS_RESET_WATCHES xenstore message. See
 [xen/include/public/io/xs\_wire.h][XSWIRE] for the XenStore wire
 protocol definition.
 
+#### ~/control/laptop-slate-mode = (""|"laptop"|"slate") [w]
+
+This is the PV laptop/slate mode control node. If the toolstack has
+provisioned a guest with the ACPI laptop/slate mode device then it
+can write the desired mode here to cause the guest to switch modes if
+necessary. The guest acknowledges a request by writing the empty
+string back to the control node.
+
+#### ~/control/feature-laptop-slate-mode = (""|"0"|"1") [w]
+
+This may be initialized to "" by the toolstack and may then be set
+to 0 or 1 by a guest to indicate whether it is capable or incapable,
+respectively, of responding to a mode value written to
+~/control/laptop-slate-mode.
+
 ### Domain Controlled Paths
 
 #### ~/data/* [w]
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-03-30 18:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30 18:02 [PATCH] docs/misc: document PV control/feature keys for laptop/slate mode Paul Durrant
2017-03-30 18:18 ` Stefano Stabellini
  -- strict thread matches above, loose matches on Subject: below --
2017-03-30 13:40 Paul Durrant
2017-03-30 13:56 ` Wei Liu
2017-03-30 17:49 ` Stefano Stabellini

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.