From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 9/9] qemu/kvm: kvm hyper-v based guest crash event handling Date: Thu, 2 Jul 2015 15:30:26 +0200 Message-ID: <55953CF2.20700@redhat.com> References: <1435664007-4965-1-git-send-email-den@openvz.org> <1435664007-4965-10-git-send-email-den@openvz.org> <5594023F.70104@redhat.com> <1435843180.21037.13.camel@virtuozzo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "Denis V. Lunev" , qemu-devel@nongnu.org, kvm@vger.kernel.org, =?UTF-8?Q?Andreas_F=c3=a4rber?= To: asmetanin@virtuozzo.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46226 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752641AbbGBNab (ORCPT ); Thu, 2 Jul 2015 09:30:31 -0400 In-Reply-To: <1435843180.21037.13.camel@virtuozzo.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/07/2015 15:19, Andrey Smetanin wrote: >>> > > + if (has_msr_hv_crash) { >>> > > + env->msr_hv_crash_ctl = HV_X64_MSR_CRASH_CTL_NOTIFY; >> > >> > The value is always host-defined, so I think it doesn't need a field in >> > CPUX86State. On the other hand, this: > Kernel just works with that value, kernel doesn't setup it. > The user space is allowed to setup this msr if qemu option "hv-crash" is > on. So the code "env->msr_hv_crash_ctl = HV_X64_MSR_CRASH_CTL_NOTIFY;" > setups msr in user space at cpu reset. When cpu setup it's registers > these msr's values are uploaded into kernel. > > Anyway we need a code that initially set up crash ctl msr with value > HV_X64_MSR_CRASH_CTL_NOTIFY. And I think that code should be user space. > Any objections ? Yes, that's correct. What I'm saying, is that the value can be hard-coded and doesn't need a field in CPUX86State. If you want to leave the field that's also okay, but even then it should not be part of the migration state. Paolo