All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Guyader <jean.guyader@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] hvmloader: pci range cache policy
Date: Fri, 23 May 2008 15:58:22 +0100	[thread overview]
Message-ID: <4836DB8E.6070503@eu.citrix.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]


hvmloader: pci range cache policy

Use frame number instead address when we write the msr for the mtrr of 
the pci range.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>


[-- Attachment #2: msr_pci_range.patch --]
[-- Type: text/plain, Size: 1073 bytes --]

diff -r ef7525e87030 tools/firmware/hvmloader/cacheattr.c
--- a/tools/firmware/hvmloader/cacheattr.c	Fri May 23 11:58:08 2008 +0100
+++ b/tools/firmware/hvmloader/cacheattr.c	Fri May 23 15:53:32 2008 +0100
@@ -89,9 +89,9 @@ void cacheattr_init(void)
     if ( nr_var_ranges != 0 )
     {
         /* A single UC range covering PCI space. */
-        wrmsr(MSR_MTRRphysBase(0), PCI_MEMBASE);
+        wrmsr(MSR_MTRRphysBase(0), PCI_MEMBASE >> PAGE_SHIFT);
         wrmsr(MSR_MTRRphysMask(0),
-              ((uint64_t)(int32_t)PCI_MEMBASE & addr_mask) | (1u << 11));
+              (((uint64_t)(int32_t)PCI_MEMBASE & addr_mask) | (1u << 11)) >> PAGE_SHIFT);
         printf("var MTRRs ... ");
     }
 
diff -r ef7525e87030 tools/firmware/hvmloader/util.h
--- a/tools/firmware/hvmloader/util.h	Fri May 23 11:58:08 2008 +0100
+++ b/tools/firmware/hvmloader/util.h	Fri May 23 15:53:32 2008 +0100
@@ -9,6 +9,8 @@
 
 #undef NULL
 #define NULL ((void*)0)
+
+#define PAGE_SHIFT      12
 
 void __assert_failed(char *assertion, char *file, int line)
     __attribute__((noreturn));

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

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

             reply	other threads:[~2008-05-23 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23 14:58 Jean Guyader [this message]
2008-05-23 16:00 ` [PATCH] hvmloader: pci range cache policy Keir Fraser
2008-05-23 16:08   ` Jean Guyader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4836DB8E.6070503@eu.citrix.com \
    --to=jean.guyader@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.