Received: from eggs.gnu.org ([2001:4830:134:3::10]:46341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSfn-0002jZ-EB for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:47:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTSfk-0001ke-AD for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:47:51 -0400 Received: from mail-eopbgr40100.outbound.protection.outlook.com ([40.107.4.100]:9856 helo=EUR03-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTSfj-0001j7-C9 for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:47:48 -0400 Date: Fri, 7 Jul 2017 15:47:19 +0300 From: Roman Kagan Message-ID: <20170707124719.GA17544@rkaganb.sw.ru> References: <20170621162424.10462-1-rkagan@virtuozzo.com> <20170621162424.10462-15-rkagan@virtuozzo.com> <20170629170546.6450586d@nial.brq.redhat.com> <20170629175100.GB13435@rkaganb.sw.ru> <20170707142220.4d0f14fe@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170707142220.4d0f14fe@nial.brq.redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 14/23] hyperv: qom-ify SynIC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: "Denis V . Lunev" , Paolo Bonzini , Evgeny Yakovlev , qemu-devel@nongnu.org, Eduardo Habkost On Fri, Jul 07, 2017 at 02:22:20PM +0200, Igor Mammedov wrote: > On Thu, 29 Jun 2017 20:51:01 +0300 > Roman Kagan wrote: > > > On Thu, Jun 29, 2017 at 05:05:46PM +0200, Igor Mammedov wrote: > > > On Wed, 21 Jun 2017 19:24:15 +0300 > > > Roman Kagan wrote: > [...] > > > > > > + if (cpu->hyperv_synic) { > > > > + if (kvm_vcpu_enable_cap(CPU(cpu), KVM_CAP_HYPERV_SYNIC, 0)) { > > > > + fprintf(stderr, "failed to enable Hyper-V SynIC\n"); > > > > + return -ENOSYS; > > > > + } > > > > + > > > > + hyperv_synic_add(cpu); > > > is synic KVM specific or may it work with TCG accel? > > > > No, it's exclusively KVM. Actually most of it sits in the kernel. > > > > > in either case, looks like hyperv_synic_add() should be called from > > > x86_cpu_realizefn(), the same like we do with APIC creating it > > > depending feature being enabled. > > > > I'm not sure I understand the reason, in view of it being exclusively > > KVM. > couldn't synic be emulated (if missing QEMU part is written) in TCG mode > or it relies on specific KVM features? At the moment it depends on KVM and, in particular, relies on lapic being in KVM. I guess with certain effort it can be done in TCG too, but we didn't even consider this so far, and have no plans for it. Roman.