All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pv/pvh: disable MTRR feature on cpuid for Dom0
@ 2013-12-12 16:52 Roger Pau Monne
  2013-12-13 11:28 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Roger Pau Monne @ 2013-12-12 16:52 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Keir Fraser, Jan Beulich, Roger Pau Monne

MTRR is not available for PV/PVH Dom0, so prevent cpuid from
reporting it as an available feature.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Mukesh Rathor <mukesh.rathor@oracle.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
---
 xen/arch/x86/traps.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 940bc33..73b58dc 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -796,6 +796,7 @@ void pv_cpuid(struct cpu_user_regs *regs)
         __clear_bit(X86_FEATURE_DS, &d);
         __clear_bit(X86_FEATURE_ACC, &d);
         __clear_bit(X86_FEATURE_PBE, &d);
+        __clear_bit(X86_FEATURE_MTRR, &d);
 
         __clear_bit(X86_FEATURE_DTES64 % 32, &c);
         __clear_bit(X86_FEATURE_MWAIT % 32, &c);
-- 
1.7.7.5 (Apple Git-26)


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

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

* Re: [PATCH] pv/pvh: disable MTRR feature on cpuid for Dom0
  2013-12-12 16:52 [PATCH] pv/pvh: disable MTRR feature on cpuid for Dom0 Roger Pau Monne
@ 2013-12-13 11:28 ` Jan Beulich
  2013-12-13 11:55   ` Roger Pau Monné
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2013-12-13 11:28 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: George Dunlap, xen-devel, Keir Fraser

>>> On 12.12.13 at 17:52, Roger Pau Monne <roger.pau@citrix.com> wrote:
> MTRR is not available for PV/PVH Dom0, so prevent cpuid from
> reporting it as an available feature.

Some misunderstanding perhaps? PV certainly has MTRR support for
Dom0 - see XENPF_*_memtype.

> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -796,6 +796,7 @@ void pv_cpuid(struct cpu_user_regs *regs)
>          __clear_bit(X86_FEATURE_DS, &d);
>          __clear_bit(X86_FEATURE_ACC, &d);
>          __clear_bit(X86_FEATURE_PBE, &d);
> +        __clear_bit(X86_FEATURE_MTRR, &d);

Thus clearing this flag should be limited to PVH.

Jan

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

* Re: [PATCH] pv/pvh: disable MTRR feature on cpuid for Dom0
  2013-12-13 11:28 ` Jan Beulich
@ 2013-12-13 11:55   ` Roger Pau Monné
  0 siblings, 0 replies; 3+ messages in thread
From: Roger Pau Monné @ 2013-12-13 11:55 UTC (permalink / raw)
  To: Jan Beulich; +Cc: George Dunlap, xen-devel, Keir Fraser

On 13/12/13 12:28, Jan Beulich wrote:
>>>> On 12.12.13 at 17:52, Roger Pau Monne <roger.pau@citrix.com> wrote:
>> MTRR is not available for PV/PVH Dom0, so prevent cpuid from
>> reporting it as an available feature.
> 
> Some misunderstanding perhaps? PV certainly has MTRR support for
> Dom0 - see XENPF_*_memtype.

OK, my bad, I was looking for a PV implementation of struct mtrr_ops in
the pvops kernel, but Linux pvops doesn't use MTRR at all, also none of
the XENPF_*_memtype ops seem to be used.

>
>> --- a/xen/arch/x86/traps.c
>> +++ b/xen/arch/x86/traps.c
>> @@ -796,6 +796,7 @@ void pv_cpuid(struct cpu_user_regs *regs)
>>          __clear_bit(X86_FEATURE_DS, &d);
>>          __clear_bit(X86_FEATURE_ACC, &d);
>>          __clear_bit(X86_FEATURE_PBE, &d);
>> +        __clear_bit(X86_FEATURE_MTRR, &d);
> 
> Thus clearing this flag should be limited to PVH.

Will resend now with this fixed, thanks.

Roger.

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

end of thread, other threads:[~2013-12-13 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-12 16:52 [PATCH] pv/pvh: disable MTRR feature on cpuid for Dom0 Roger Pau Monne
2013-12-13 11:28 ` Jan Beulich
2013-12-13 11:55   ` Roger Pau Monné

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.