From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Smetanin Subject: Re: [PATCH v3 9/9] kvm/x86: Hyper-V kvm exit Date: Tue, 3 Nov 2015 18:42:47 +0300 Message-ID: <5638D5F7.4050805@virtuozzo.com> References: <1444979273-6587-10-git-send-email-den@openvz.org> <1445530236-20746-1-git-send-email-asmetanin@virtuozzo.com> <5638B663.8090903@redhat.com> <5638C654.90002@virtuozzo.com> <5638C9E4.2000903@redhat.com> Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: Roman Kagan , Gleb Natapov , , "Denis V. Lunev" , Vitaly Kuznetsov , "K. Y. Srinivasan" To: Paolo Bonzini , Return-path: Received: from relay.parallels.com ([195.214.232.42]:41107 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964829AbbKCPnN (ORCPT ); Tue, 3 Nov 2015 10:43:13 -0500 In-Reply-To: <5638C9E4.2000903@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/03/2015 05:51 PM, Paolo Bonzini wrote: > > > On 03/11/2015 15:36, Andrey Smetanin wrote: >>> >>> >>> if I run a patched QEMU but I *do not* enable the synthetic interrupt >>> controller. I can fix it by wrapping the calls to synic_exit with "if >>> (!host)", but I haven't checked yet the source---so that may not be the >>> proper fix. Sorry for not having looked more in detail. >>> >> Could you please specify test case(kvm unit tests ?) and kernel/qemu(if >> it's not standard)? > > It happens just by starting QEMU. > > Kernel: kvm/queue > + kvm/irqchip: kvm_arch_irq_routing_update renaming split > + kvm/x86: split ioapic-handled and EOI exit bitmaps > + kvm/x86: Hyper-V synthetic interrupt controller > + kvm/x86: Hyper-V kvm exit > > QEMU: 3a958f559ecd > + standard-headers/x86: add Hyper-V SynIC constants > + target-i386/kvm: Hyper-V SynIC MSR's support > + linux-headers/kvm: add Hyper-V SynIC irq routing type and struct > + kvm: Hyper-V SynIC irq routing support > + linux-headers/kvm: KVM_EXIT_HYPERV type and struct > + target-i386/hyperv: Hyper-V SynIC SINT routing and vCPU exit > + hw/misc: Hyper-V test device 'hyperv-testdev' > > Can be reproduced just with > "../qemu/+build/x86_64-softmmu/qemu-system-x86_64 --enable-kvm -cpu > kvm64 -display none". > Thanks! We probably found root case - qemu reads/writes Hyper-V SynIC msrs just by check SynIC MSR's support in kernel. So KVM synic exits into userspace(at SynIC MSR's writes), while userspace Hyper-V SynIC handler doesn't expect this exit(cpu 'hv-synic' option is not set), so handler returns -1 and qemu exits. > Paolo >