From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Sebastian_Sch=c3=bctte?= Subject: Re: [Bug 103321] New: NPT page attribute support causes extreme slowdown Date: Wed, 2 Sep 2015 21:01:25 +0200 Message-ID: <55E74785.2060701@ewetel.net> References: <55D90002.10703@redhat.com> <55DA16BB.4020004@ewetel.net> <55DA8054.7080900@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Cc: KVM list To: Paolo Bonzini Return-path: Received: from mail-in11-05-pp.ewetel.de ([212.6.122.115]:57495 "EHLO mail-in11-pp.ewetel.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751615AbbIBTBd convert rfc822-to-8bit (ORCPT ); Wed, 2 Sep 2015 15:01:33 -0400 In-Reply-To: <55DA8054.7080900@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: I inserted some printk() lines into init_vmcb() around the call of svm_set_guest_pat() to print out the g_pat value as well as svm->vcpu.vcpu_id and noticed that something was off: Initially, the PATs of all VCPUs are set to 0x0606060606060606. However, after attaching some devices (vfio-pci enabling device and vfio_ecap_init lines are being printed) init_vmcb() is only called again for vcpu_id > 0. Unless g_pat is changed somewhere else, VCPU #0 remains set to 0x0606060606060606 (according to comments in svm_set_guest_pat() this is bad for assigned devices) while all other VCPUs use 0x0007040600070406. I'd guess that could explain the slowdown.