]> xenbits.xensource.com Git - xen.git/commitdiff
x86/MTRR: correct inadvertently inverted WC check
authorJan Beulich <jbeulich@suse.com>
Tue, 23 Apr 2024 12:13:48 +0000 (14:13 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 23 Apr 2024 12:13:48 +0000 (14:13 +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>
xen/arch/x86/cpu/mtrr/main.c

index 55a4da54a70c4af36b3144e14eb7fa6bb9478200..90b235f57e68f3e46b930012dbec20b5e70aa8e9 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 == 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;