[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.18] x86/MTRR: correct inadvertently inverted WC check



commit eb7059767c82d833ebecdf8106e96482b04f3c40
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Apr 29 09:36:37 2024 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Apr 29 09:36:37 2024 +0200

    x86/MTRR: correct inadvertently inverted WC check
    
    The ! clearly got lost by mistake.
    
    Fixes: e9e0eb30d4d6 ("x86/MTRR: avoid several indirect calls")
    Reported-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    master commit: 77e25f0e30ddd11e043e6fce84bf108ce7de5b6f
    master date: 2024-04-23 14:13:48 +0200
---
 xen/arch/x86/cpu/mtrr/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpu/mtrr/main.c b/xen/arch/x86/cpu/mtrr/main.c
index 55a4da54a7..90b235f57e 100644
--- a/xen/arch/x86/cpu/mtrr/main.c
+++ b/xen/arch/x86/cpu/mtrr/main.c
@@ -316,7 +316,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
        }
 
        /*  If the type is WC, check that this processor supports it  */
-       if ((type == X86_MT_WC) && mtrr_have_wrcomb()) {
+       if ((type == X86_MT_WC) && !mtrr_have_wrcomb()) {
                printk(KERN_WARNING
                       "mtrr: your processor doesn't support 
write-combining\n");
                return -EOPNOTSUPP;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.18



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.