From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: [PATCH kvm-unit-tests] x86: pcid: fix clearing of CR0.PG Date: Tue, 5 Aug 2014 12:32:07 +0200 Message-ID: <1407234727-529-1-git-send-email-pbonzini@redhat.com> Cc: chris.j.arges@canonical.com To: kvm@vger.kernel.org Return-path: Received: from mail-we0-f172.google.com ([74.125.82.172]:54830 "EHLO mail-we0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752064AbaHEKcQ (ORCPT ); Tue, 5 Aug 2014 06:32:16 -0400 Received: by mail-we0-f172.google.com with SMTP id x48so767823wes.17 for ; Tue, 05 Aug 2014 03:32:14 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: The test was trying to set CR0.PG, not clear it (and it was already set, even). Reported-by: Chris J Arges Signed-off-by: Paolo Bonzini --- x86/pcid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x86/pcid.c b/x86/pcid.c index 164e9a1..e3ccfdb 100644 --- a/x86/pcid.c +++ b/x86/pcid.c @@ -53,7 +53,7 @@ void test_pcid_enabled(void) goto report; /* try clearing CR0.PG when CR4.PCIDE=1, #GP expected */ - if (write_cr0_checking(cr0 | X86_CR0_PG) != GP_VECTOR) + if (write_cr0_checking(cr0 & ~X86_CR0_PG) != GP_VECTOR) goto report; write_cr4(cr4); -- 1.8.3.1