From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suravee Suthikulpanit Subject: Re: [PART1 RFC v2 09/10] svm: Do not intercept CR8 when enable AVIC Date: Mon, 14 Mar 2016 13:09:00 +0700 Message-ID: <56E6557C.6080208@amd.com> References: <1457124368-2025-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1457124368-2025-10-git-send-email-Suravee.Suthikulpanit@amd.com> <56DDA0B7.4010709@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , To: Paolo Bonzini , , , , , Return-path: Received: from mail-by2on0055.outbound.protection.outlook.com ([207.46.100.55]:32624 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932525AbcCNGJX (ORCPT ); Mon, 14 Mar 2016 02:09:23 -0400 In-Reply-To: <56DDA0B7.4010709@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi On 03/07/2016 10:39 PM, Paolo Bonzini wrote: >> + svm_x86_ops.update_cr8_intercept = NULL; >> > } else { >> > svm_x86_ops.deliver_posted_interrupt = NULL; >> > } >> >@@ -1116,7 +1119,8 @@ static void init_vmcb(struct vcpu_svm *svm) >> > set_cr_intercept(svm, INTERCEPT_CR0_WRITE); >> > set_cr_intercept(svm, INTERCEPT_CR3_WRITE); >> > set_cr_intercept(svm, INTERCEPT_CR4_WRITE); >> >- set_cr_intercept(svm, INTERCEPT_CR8_WRITE); >> >+ if (!avic) > Remember that AVIC enabled/disabled must be refreshed when the > .refresh_apicv_exec_ctrl callback is invoked, so it is not enough to use > the global variable. > > Paolo > Good point. I'll fix this. By the way, how can we enable APICv only in certain VM? Does Qemu/KVM have any specific flags that we can pass to enable/disable this? Thanks, Suravee