From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suravee Suthikulpanit Subject: Re: [PART1 RFC v3 07/12] svm: Add interrupt injection via AVIC Date: Tue, 5 Apr 2016 22:56:39 +0700 Message-ID: <5703E037.5050509@amd.com> References: <1458281388-14452-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1458281388-14452-8-git-send-email-Suravee.Suthikulpanit@amd.com> <56EBD6FE.2050807@redhat.com> <5703BD1D.1070604@amd.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-bl2on0066.outbound.protection.outlook.com ([65.55.169.66]:14800 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933195AbcDEP5E (ORCPT ); Tue, 5 Apr 2016 11:57:04 -0400 In-Reply-To: <5703BD1D.1070604@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi Paolo, On 4/5/16 20:26, Suravee Suthikulpanit wrote: >>> @@ -2877,8 +2895,10 @@ static int clgi_interception(struct vcpu_svm >>> *svm) >>> disable_gif(svm); >>> >>> /* After a CLGI no interrupts should come */ >>> - svm_clear_vintr(svm); >>> - svm->vmcb->control.int_ctl &= ~V_IRQ_MASK; >>> + if (!svm_vcpu_avic_enabled(svm)) { >>> + svm_clear_vintr(svm); >>> + svm->vmcb->control.int_ctl &= ~V_IRQ_MASK; >>> + } >> >> This is for nested virtualization. Unless you support nested AVIC, the >> L2 guest should run without AVIC (i.e. IsRunning should be false) and >> use the old VINTR mechanism. > > I see. I am not planning to supported nested AVIC at the L2 level for > the moment. If it is alright, I would like to get the basic AVIC and > IOMMU in first (unless you have a different opinion). > > In that case, I think I should also make sure to not expose AVIC CPUID > to the guest VM. Actually, it should have already not set the AVIC CPUID in the L1 guest. Thanks, Suravee