Received: from eggs.gnu.org ([2001:4830:134:3::10]:39634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL6AP-00066d-OF for qemu-devel@nongnu.org; Wed, 14 Jun 2017 07:08:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL6AL-0001ad-M4 for qemu-devel@nongnu.org; Wed, 14 Jun 2017 07:08:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40054) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dL6AL-0001aN-Fw for qemu-devel@nongnu.org; Wed, 14 Jun 2017 07:08:49 -0400 References: <20170606181948.16238-1-rkagan@virtuozzo.com> <20170606181948.16238-12-rkagan@virtuozzo.com> <20170613190256.GA5016@thinpad.lan.raisama.net> From: Paolo Bonzini Message-ID: Date: Wed, 14 Jun 2017 13:08:43 +0200 MIME-Version: 1.0 In-Reply-To: <20170613190256.GA5016@thinpad.lan.raisama.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/23] hyperv: address HvSintRoute by X86CPU pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , Roman Kagan Cc: qemu-devel@nongnu.org, Evgeny Yakovlev , "Denis V . Lunev" On 13/06/2017 21:02, Eduardo Habkost wrote: >> @@ -101,16 +101,18 @@ static void hv_test_dev_control(void *opaque, hwaddr addr, uint64_t data, >> uint8_t sint = data & 0xFF; >> uint8_t vcpu_id = (data >> 8ULL) & 0xFF; > > vcpu_id risks being confused KVM's vcpu_id (which is the CPU APIC > ID in x86). If you are already touching this code, this could be > renamed to vp_index to avoid confusion. Actually the VP_INDEX is _also_ the vcpu_id. Should we just document that KVM makes the VP_INDEX equal to the CPU APIC id, and adjust patch 5 accordingly? Paolo