All of lore.kernel.org
 help / color / mirror / Atom feed
* reading IOPL
@ 2012-05-03 16:07 Jan Beulich
  2012-05-03 17:22 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2012-05-03 16:07 UTC (permalink / raw)
  To: xen-devel

Both Linux and Xen offer only ways to set the IOPL. While on native Linux
this is not a problem since user mode code can read the IOPL by inspecting
EFLAGS, on Xen this would always yield zero.

Now X folks appear to be using save-modify-restore cycles in some newer
code, and this obviously breaks under Xen, as they would restore IOPL 0
even when IOPL 3 was in effect before.

Since the only way to read the IOPL is xc_vcpu_getcontext() (i.e.
XEN_DOMCTL_getvcpucontext), I wonder whether we shouldn't add
e.g. a "get" counterpart to PHYSDEVOP_set_iopl.

Or am I overlooking some other access mechanism?

Jan

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

* Re: reading IOPL
  2012-05-03 16:07 reading IOPL Jan Beulich
@ 2012-05-03 17:22 ` Konrad Rzeszutek Wilk
  2012-05-04  7:09   ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-05-03 17:22 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

On Thu, May 03, 2012 at 05:07:04PM +0100, Jan Beulich wrote:
> Both Linux and Xen offer only ways to set the IOPL. While on native Linux
> this is not a problem since user mode code can read the IOPL by inspecting
> EFLAGS, on Xen this would always yield zero.
> 
> Now X folks appear to be using save-modify-restore cycles in some newer
> code, and this obviously breaks under Xen, as they would restore IOPL 0

This is in the KMS drivers or in the user-land Xorg?

> even when IOPL 3 was in effect before.
> 
> Since the only way to read the IOPL is xc_vcpu_getcontext() (i.e.
> XEN_DOMCTL_getvcpucontext), I wonder whether we shouldn't add
> e.g. a "get" counterpart to PHYSDEVOP_set_iopl.
> 
> Or am I overlooking some other access mechanism?
> 
> Jan
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

* Re: reading IOPL
  2012-05-03 17:22 ` Konrad Rzeszutek Wilk
@ 2012-05-04  7:09   ` Jan Beulich
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2012-05-04  7:09 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel

>>> On 03.05.12 at 19:22, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> On Thu, May 03, 2012 at 05:07:04PM +0100, Jan Beulich wrote:
>> Both Linux and Xen offer only ways to set the IOPL. While on native Linux
>> this is not a problem since user mode code can read the IOPL by inspecting
>> EFLAGS, on Xen this would always yield zero.
>> 
>> Now X folks appear to be using save-modify-restore cycles in some newer
>> code, and this obviously breaks under Xen, as they would restore IOPL 0
> 
> This is in the KMS drivers or in the user-land Xorg?

Userland code (as explained above).

Jan

>> even when IOPL 3 was in effect before.
>> 
>> Since the only way to read the IOPL is xc_vcpu_getcontext() (i.e.
>> XEN_DOMCTL_getvcpucontext), I wonder whether we shouldn't add
>> e.g. a "get" counterpart to PHYSDEVOP_set_iopl.
>> 
>> Or am I overlooking some other access mechanism?
>> 
>> Jan
>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org 
>> http://lists.xen.org/xen-devel 

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

end of thread, other threads:[~2012-05-04  7:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 16:07 reading IOPL Jan Beulich
2012-05-03 17:22 ` Konrad Rzeszutek Wilk
2012-05-04  7:09   ` Jan Beulich

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.