From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933592AbcI3NXR (ORCPT ); Fri, 30 Sep 2016 09:23:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44418 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932839AbcI3NXI (ORCPT ); Fri, 30 Sep 2016 09:23:08 -0400 Date: Fri, 30 Sep 2016 15:23:04 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, yang zhang wz , feng wu , mst@redhat.com Subject: Re: [RFC PATCH 0/3] kvm: x86: speedups for APICv Message-ID: <20160930132304.GF13257@potion> References: <1475011213-34225-1-git-send-email-pbonzini@redhat.com> <20160929195557.GE13257@potion> <1865155490.553427.1475185306049.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1865155490.553427.1475185306049.JavaMail.zimbra@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 30 Sep 2016 13:23:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2016-09-29 17:41-0400, Paolo Bonzini: >> Another possible optimization: when delivering an IPI, don't write the >> vector to PIR, but directly to VIRR. If the guest is not in VMX >> non-root mode, then vm entry will take care of the injection; in the >> other case, we'll send POSTED_INTR_VECTOR. >> It seems that we don't even have to set PI.ON -- SDM doesn't say it is >> necessary to evaluate pending virtual interrupts after receiving the >> notification interrupt. If we have to set PI.ON, we can just skip the >> PIR->VIRR sync as long as the VM doesn't have an assigned device, >> because we know that PIR is empty. > > Nope, you cannot write to the APIC page while the VM is running. True, thanks. > (We're already reading the manual in such a way as to "allow" us to > write TMR while the VM is running, but that should not be extended. > For example the SDM doesn't say that the processor accesses VIRR with > atomic instructions, in fact it probably doesn't). Yeah, TMR is not used by the hardware ...