From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755818AbcAZA5V (ORCPT ); Mon, 25 Jan 2016 19:57:21 -0500 Received: from mga03.intel.com ([134.134.136.65]:24628 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752280AbcAZA5R convert rfc822-to-8bit (ORCPT ); Mon, 25 Jan 2016 19:57:17 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,347,1449561600"; d="scan'208";a="889152369" From: "Wu, Feng" To: =?iso-8859-1?Q?Radim_Krcm=E1r?= CC: Paolo Bonzini , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "Wu, Feng" Subject: RE: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the interrupt is not single-destination Thread-Topic: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the interrupt is not single-destination Thread-Index: AQHRVGeNISyV+T2JQESJFT5X4Ln/dJ8Gw2fAgAVqC12AAABuwP//ljWAgAE7IoA= Date: Tue, 26 Jan 2016 00:57:11 +0000 Message-ID: References: <1453254177-103002-1-git-send-email-feng.wu@intel.com> <1453254177-103002-2-git-send-email-feng.wu@intel.com> <20160121161949.GA14104@potion.brq.redhat.com> <20160122130551.GA23362@potion.brq.redhat.com> <56A6138E.9060805@redhat.com> <20160125140552.GB21252@potion.brq.redhat.com> In-Reply-To: <20160125140552.GB21252@potion.brq.redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Radim Krcmár [mailto:rkrcmar@redhat.com] > Sent: Monday, January 25, 2016 10:06 PM > To: Wu, Feng > Cc: Paolo Bonzini ; linux-kernel@vger.kernel.org; > kvm@vger.kernel.org > Subject: Re: [PATCH v3 1/4] KVM: Recover IRTE to remapped mode if the > interrupt is not single-destination > > 2016-01-25 12:26+0000, Wu, Feng: > >> From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo > >> It may be necessary because IRTE writes (128 bits) are not atomic. > > > > IRTE is updated atomically, I added the patch to support this. Please > > refer to 344cb4e0b6f3a0dbef0643eacb4946338eb228c0. > > I also think that SN bit is not affected by atomicity: if the IRTE could > have been read half-updated while changing from posted to non-posted, > then it wouldn't point to the correct PID, because its address is not > within 64 bits, so the SN bit wouldn't matter. Yes, like the comments in the commit, we should atomically update the IRTE in PI case (PI -> non-PI, non-PI -> PI), without which, it cannot guarantee the correctness, since 'pda' is not within 64 bits, like Radim pointed out above. Thanks, Feng > > IRTE invalidation seems important in VT-d ...