From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v2] KVM: SVM: Sync g_pat with guest-written PAT value Date: Tue, 21 Apr 2015 13:25:46 +0200 Message-ID: <553633BA.7020900@siemens.com> References: <552B5128.4010909@siemens.com> <552B6923.3020602@siemens.com> <20150420161401.GB26491@potion.brq.redhat.com> <5535368B.9060408@siemens.com> <55362FFC.1040905@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , kvm , Joel Schopp To: Paolo Bonzini Return-path: Received: from thoth.sbs.de ([192.35.17.2]:41114 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbbDULZ6 (ORCPT ); Tue, 21 Apr 2015 07:25:58 -0400 In-Reply-To: <55362FFC.1040905@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2015-04-21 13:09, Paolo Bonzini wrote: > > > On 20/04/2015 19:25, Jan Kiszka wrote: >> When hardware supports the g_pat VMCB field, we can use it for emulating >> the PAT configuration that the guest configures by writing to the >> corresponding MSR. >> >> Signed-off-by: Jan Kiszka > > I'm not sure about this. The problem is that, unlike Intel, AMD has no > way for the host to force its PAT value and ignore the guest's. I'm > worried about potential performance problems in the guest. I think the guest needs to get what it requests - see my remark in http://thread.gmane.org/gmane.comp.emulators.kvm.devel/135271. > > This is not as bad as on ARM, because the guest cannot disable the cache You mean AMD, I guess. > snooping protocol and thus cache coherency is guaranteed (see tables > 7-10 and 15-20 in the AMD docs), but still I think I'd prefer having > some knob (module parameter) to enable/disable gPAT. It's okay to make > it enabled by default. I still don't get the scenario where we want to override the guest settings. Maybe you can help out - would be valuable for the reasoning in code or commit logs as well. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux