From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suravee Suthikulpanit Subject: Re: [PART1 RFC v2 10/10] svm: Manage vcpu load/unload when enable AVIC Date: Mon, 14 Mar 2016 18:58:05 +0700 Message-ID: <56E6A74D.8090807@amd.com> References: <1457124368-2025-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1457124368-2025-11-git-send-email-Suravee.Suthikulpanit@amd.com> <20160309214629.GE19459@potion.brq.redhat.com> <20160310140141.GA23501@potion.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: , , , , , , , , To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Return-path: Received: from mail-bn1on0057.outbound.protection.outlook.com ([157.56.110.57]:39904 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755494AbcCNL62 (ORCPT ); Mon, 14 Mar 2016 07:58:28 -0400 In-Reply-To: <20160310140141.GA23501@potion.brq.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi, On 03/10/2016 09:01 PM, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > Well, we haven't reached an agreement on is_running yet. The situati= on: > if we don't unset vcpu1.is_running when vcpu1 is scheduled out and vc= pu2 > gets scheduled on vcpu1's physical core, then vcpu2 would receive a > doorbell intended to vcpu1. That's why, in V2, I added the logic to check if the is_running bit is=20 set for the current vcpu (e.g. vcpu1) when unloaded, then restore the=20 bit during loading later of if it was set during previous unloaded. Thi= s=20 way, when we load the new vcpu (e.g. vcpu2), the is_running will be set= =20 as it was before unloading. > We'd like to keep is_running set when there is no reason to vmexit, b= ut > not if a guest can negatively affect other guests. Not sure how this can affect other guests? > How does receiving a stray doorbell affect the performance? As far as I know, the doorbell only affects the CPU during vmrun. Once=20 received, it will check the IRR in vAPIC backing page. So, I think if=20 IRR bit is not set, the affect should be rather minimal. Thanks, Suravee