From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDC7DC2D0B1 for ; Thu, 6 Feb 2020 08:25:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95D1C217BA for ; Thu, 6 Feb 2020 08:25:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CQGWCz3C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727698AbgBFIZ5 (ORCPT ); Thu, 6 Feb 2020 03:25:57 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:33507 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726673AbgBFIZ5 (ORCPT ); Thu, 6 Feb 2020 03:25:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580977556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PDyDa5Dzr4xy8blteeZ0yJhb15nJxcktYC094Uibheg=; b=CQGWCz3CawAS2d1Z+AmrooWRT6OB7F29Wqsdd8m6V10Ystcu3aaRmp0+bJRhz8M/6OES6e 8/TdGELy8TQBeAxWopXB6YSEM9ixure5Vg0zNF11IUQUMah3f4guraObaI3LfLUyHlxBMD VHoU01qc6PHUIyaITuAhHemArculxck= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-y_zx8CnYOR6BDhdfY45C2A-1; Thu, 06 Feb 2020 03:25:54 -0500 X-MC-Unique: y_zx8CnYOR6BDhdfY45C2A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E51B4801FA9; Thu, 6 Feb 2020 08:25:52 +0000 (UTC) Received: from gondolin (dhcp-192-195.str.redhat.com [10.33.192.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id E882C8DC1F; Thu, 6 Feb 2020 08:25:48 +0000 (UTC) Date: Thu, 6 Feb 2020 09:25:46 +0100 From: Cornelia Huck To: Christian Borntraeger Cc: Janosch Frank , KVM , David Hildenbrand , Thomas Huth , Ulrich Weigand , Claudio Imbrenda , Andrea Arcangeli Subject: Re: [RFCv2 18/37] KVM: s390: protvirt: Implement machine-check interruption injection Message-ID: <20200206092546.14a812ce.cohuck@redhat.com> In-Reply-To: <55e7548b-520b-d271-6867-fb887697235e@de.ibm.com> References: <20200203131957.383915-1-borntraeger@de.ibm.com> <20200203131957.383915-19-borntraeger@de.ibm.com> <20200205144704.58b2c327.cohuck@redhat.com> <55e7548b-520b-d271-6867-fb887697235e@de.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, 5 Feb 2020 19:18:44 +0100 Christian Borntraeger wrote: > On 05.02.20 14:47, Cornelia Huck wrote: > [..] > >> --- a/arch/s390/kvm/interrupt.c > >> +++ b/arch/s390/kvm/interrupt.c > >> @@ -571,6 +571,14 @@ static int __write_machine_check(struct kvm_vcpu *vcpu, > >> union mci mci; > >> int rc; > >> > >> + if (kvm_s390_pv_is_protected(vcpu->kvm)) { > >> + vcpu->arch.sie_block->iictl = IICTL_CODE_MCHK; > >> + vcpu->arch.sie_block->mcic = mchk->mcic; > >> + vcpu->arch.sie_block->faddr = mchk->failing_storage_address; > >> + vcpu->arch.sie_block->edc = mchk->ext_damage_code; > > > > Maybe add a comment that we don't need with other machine-check related data? > > Not sure I get this point. Can you make a proposal? /* * All other possible payload for a machine check will * not be handled by the hypervisor, as it does not have * the needed information for protected guests. */ Something like that? > > > > >> + return 0; > >> + } > >> + > >> mci.val = mchk->mcic; > >> /* take care of lazy register loading */ > >> save_fpu_regs(); > > > > Anyway, > > Reviewed-by: Cornelia Huck > > >