All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] [HVM] Limit MTRR virtualization for VMX guests to 8 registers
@ 2009-04-16 22:32 Nitin A Kamble
  2009-04-17  8:04 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Nitin A Kamble @ 2009-04-16 22:32 UTC (permalink / raw
  To: xen-devel; +Cc: keir.fraser


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

Hi Keir,
  Bellow is the patch for xen-unstable tree which limits MTRR
virtualization for VMX guests to 8 registers. Please comment/Apply.

Thanks & Regards,
Nitin

# HG changeset patch
# User Nitin A Kamble <nitin.a.kamble@intel.com>
# Date 1239916751 25200
# Branch mtrrcap_fix_for_guest
# Node ID 276c1008200895845f47fe61dd9e42e47dbbc772
# Parent  120d3c67951bac0f4c31b0b828500ee6ac23b0b4
Limit MTRR virtualization to 8 registers for VMX guests.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>

diff -r 120d3c67951b -r 276c10082008 xen/arch/x86/cpu/mtrr/generic.c
--- a/xen/arch/x86/cpu/mtrr/generic.c	Fri Apr 10 06:58:04 2009 +0100
+++ b/xen/arch/x86/cpu/mtrr/generic.c	Thu Apr 16 14:19:11 2009 -0700
@@ -55,6 +55,7 @@ void mtrr_save_fixed_ranges(void *info)
 }
 
 /*  Grab all of the MTRR state for this CPU into *state  */
+/* This function is called only for Intel processors */
 void __init get_mtrr_state(void)
 {
 	unsigned int i;
@@ -83,6 +84,10 @@ void __init get_mtrr_state(void)
 
 	/* Store mtrr_cap for HVM MTRR virtualisation. */
 	rdmsrl(MTRRcap_MSR, mtrr_state.mtrr_cap);
+
+	/* Virtualization of max 8 MTRRs is supported */
+	if ((mtrr_state.mtrr_cap & 0xff) > 8)
+		mtrr_state.mtrr_cap = (mtrr_state.mtrr_cap & ~0xff) | 0x8;
 }
 


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

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

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

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

* Re: [Patch] [HVM] Limit MTRR virtualization for VMX guests to 8 registers
  2009-04-16 22:32 [Patch] [HVM] Limit MTRR virtualization for VMX guests to 8 registers Nitin A Kamble
@ 2009-04-17  8:04 ` Keir Fraser
  2009-04-17 20:57   ` Kamble, Nitin A
  0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2009-04-17  8:04 UTC (permalink / raw
  To: Nitin A Kamble, xen-devel@lists.xensource.com

On 16/04/2009 23:32, "Nitin A Kamble" <nitin.a.kamble@intel.com> wrote:

> Hi Keir,
>   Bellow is the patch for xen-unstable tree which limits MTRR virtualization
> for VMX guests to 8 registers. Please comment/Apply.

mtrr_state.mtrr_cap isn't directly plumbed to guests. Guests get their own
hardcoded virtualised value for mtrr_cap, set up in arch/x86/hvm/mtrr.c. The
physical mtrr_state.mtrr_cap is only used for interpreting physical MTRR
info as part of PAT/MTRR virtualisation. So all looks correct to me as is.

 -- Keir

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

* RE: [Patch] [HVM] Limit MTRR virtualization for VMX guests to 8 registers
  2009-04-17  8:04 ` Keir Fraser
@ 2009-04-17 20:57   ` Kamble, Nitin A
  0 siblings, 0 replies; 3+ messages in thread
From: Kamble, Nitin A @ 2009-04-17 20:57 UTC (permalink / raw
  To: Keir Fraser, xen-devel@lists.xensource.com; +Cc: Mallick, Asit K, Nakajima, Jun

Keir, 
   You are right. The problem I was trying to fix was observed on RHEL5.3 Xen, and I don't see that issue with the xen-unstable tree.

Thanks & Regards,
Nitin
Linux Open Source Technology Center, Intel Corporation
----------------------------------------------------------------------------
The Mind is like a parachute; it works much better when it's open.

>-----Original Message-----
>From: Keir Fraser [mailto:keir.fraser@eu.citrix.com]
>Sent: Friday, April 17, 2009 1:05 AM
>To: Kamble, Nitin A; xen-devel@lists.xensource.com
>Subject: Re: [Patch] [HVM] Limit MTRR virtualization for VMX guests to 8
>registers
>
>On 16/04/2009 23:32, "Nitin A Kamble" <nitin.a.kamble@intel.com> wrote:
>
>> Hi Keir,
>>   Bellow is the patch for xen-unstable tree which limits MTRR
>virtualization
>> for VMX guests to 8 registers. Please comment/Apply.
>
>mtrr_state.mtrr_cap isn't directly plumbed to guests. Guests get their own
>hardcoded virtualised value for mtrr_cap, set up in arch/x86/hvm/mtrr.c.
>The
>physical mtrr_state.mtrr_cap is only used for interpreting physical MTRR
>info as part of PAT/MTRR virtualisation. So all looks correct to me as is.
>
> -- Keir
>

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

end of thread, other threads:[~2009-04-17 20:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 22:32 [Patch] [HVM] Limit MTRR virtualization for VMX guests to 8 registers Nitin A Kamble
2009-04-17  8:04 ` Keir Fraser
2009-04-17 20:57   ` Kamble, Nitin A

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.