]> xenbits.xensource.com Git - xen.git/commitdiff
x86/MTRR: correct inadvertently inverted WC check
authorJan Beulich <jbeulich@suse.com>
Mon, 29 Apr 2024 07:38:47 +0000 (09:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 29 Apr 2024 07:38:47 +0000 (09:38 +0200)
The ! clearly got lost by mistake.

Fixes: e9e0eb30d4d6 ("x86/MTRR: avoid several indirect calls")
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: 77e25f0e30ddd11e043e6fce84bf108ce7de5b6f
master date: 2024-04-23 14:13:48 +0200

xen/arch/x86/cpu/mtrr/main.c

index dee59ea16848d2d35a0efcd7fa731d198e79888a..990f12286ae58c70f5d7f3881ee09a704f953120 100644 (file)
@@ -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 == MTRR_TYPE_WRCOMB) && mtrr_have_wrcomb()) {
+       if ((type == MTRR_TYPE_WRCOMB) && !mtrr_have_wrcomb()) {
                printk(KERN_WARNING
                       "mtrr: your processor doesn't support write-combining\n");
                return -EOPNOTSUPP;