From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 09/11] kvm/x86: distingiush hyper-v guest crash notification Date: Tue, 23 Jun 2015 11:52:29 +0200 Message-ID: <55892C5D.40702@redhat.com> References: <1434989108-20924-1-git-send-email-den@openvz.org> <1434989108-20924-10-git-send-email-den@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, Andrey Smetanin , Gleb Natapov To: Peter Hornyack , "Denis V. Lunev" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53935 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbbFWJwd (ORCPT ); Tue, 23 Jun 2015 05:52:33 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 23/06/2015 01:55, Peter Hornyack wrote: >> > -static int kvm_hv_msr_set_crash_ctl(struct kvm_vcpu *vcpu, u64 data) >> > +static int kvm_hv_msr_set_crash_ctl(struct kvm_vcpu *vcpu, u64 data, bool host) >> > { >> > struct kvm_arch_hyperv *hv = &vcpu->kvm->arch.hyperv; >> > >> > hv->hv_crash_ctl = data; > Should we allow hv_crash_ctl to be set if !host? It's a small detail, > but it doesn't seem like the guest should be able to disable crash > actions that userspace has enabled in hv_crash_ctl. No, the MSR contents shouldn't be writable. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Ksf-0005C9-SZ for qemu-devel@nongnu.org; Tue, 23 Jun 2015 05:52:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7Ksc-0005kw-8E for qemu-devel@nongnu.org; Tue, 23 Jun 2015 05:52:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Ksc-0005ks-3h for qemu-devel@nongnu.org; Tue, 23 Jun 2015 05:52:34 -0400 Message-ID: <55892C5D.40702@redhat.com> Date: Tue, 23 Jun 2015 11:52:29 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1434989108-20924-1-git-send-email-den@openvz.org> <1434989108-20924-10-git-send-email-den@openvz.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 09/11] kvm/x86: distingiush hyper-v guest crash notification List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Hornyack , "Denis V. Lunev" Cc: Andrey Smetanin , Gleb Natapov , qemu-devel@nongnu.org, kvm@vger.kernel.org On 23/06/2015 01:55, Peter Hornyack wrote: >> > -static int kvm_hv_msr_set_crash_ctl(struct kvm_vcpu *vcpu, u64 data) >> > +static int kvm_hv_msr_set_crash_ctl(struct kvm_vcpu *vcpu, u64 data, bool host) >> > { >> > struct kvm_arch_hyperv *hv = &vcpu->kvm->arch.hyperv; >> > >> > hv->hv_crash_ctl = data; > Should we allow hv_crash_ctl to be set if !host? It's a small detail, > but it doesn't seem like the guest should be able to disable crash > actions that userspace has enabled in hv_crash_ctl. No, the MSR contents shouldn't be writable. Paolo