From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suravee Suthikulpanit Subject: Re: [PART1 RFC v2 06/10] svm: Add interrupt injection via AVIC Date: Mon, 14 Mar 2016 15:54:33 +0700 Message-ID: <56E67C49.6070807@amd.com> References: <1457124368-2025-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1457124368-2025-7-git-send-email-Suravee.Suthikulpanit@amd.com> <56DD9FF5.7010201@redhat.com> <56E64B39.5040609@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-bn1bon0058.outbound.protection.outlook.com ([157.56.111.58]:24423 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752138AbcCNIy6 (ORCPT ); Mon, 14 Mar 2016 04:54:58 -0400 In-Reply-To: <56E64B39.5040609@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi, Please ignore this. I should have read the whole thread before reply :( Sorry for spam. Suravee On 03/14/2016 12:25 PM, Suravee Suthikulpanit wrote: > > > On 03/07/2016 10:36 PM, Paolo Bonzini wrote: >> >> >> On 04/03/2016 21:46, Suravee Suthikulpanit wrote: >>> +static void svm_deliver_avic_intr(struct kvm_vcpu *vcpu, int vec) >>> +{ >>> + struct vcpu_svm *svm = to_svm(vcpu); >>> + >>> + kvm_lapic_set_vector(vec, avic_get_bk_page_entry(svm, APIC_IRR)); >>> + >>> + if (vcpu->mode == IN_GUEST_MODE) { >>> + wrmsrl(SVM_AVIC_DOORBELL, >>> + __default_cpu_present_to_apicid(vcpu->cpu)); >>> + } else { >>> + kvm_vcpu_kick(vcpu); >>> + } >> >> You also need to add >> >> kvm_make_request(KVM_REQ_EVENT, vcpu); >> >> before the "if", similar to vmx_deliver_posted_interrupt. >> >> Paolo >> > > Actually, I should only need that just before the kvm_cpu_kick(vcpu) > isn't it. I don't think we need it in the case when sending doorbell. > > Thanks, > Suravee