From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [PATCH 2/2] KVM: s390: sthyi: fix specification exception detection Date: Mon, 21 Aug 2017 15:09:18 +0200 Message-ID: <20170821150918.4df5d2d5.cohuck@redhat.com> References: <1503318465-19013-1-git-send-email-borntraeger@de.ibm.com> <1503318465-19013-3-git-send-email-borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: KVM , linux-s390 , Heiko Carstens To: Christian Borntraeger Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43110 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753110AbdHUNJW (ORCPT ); Mon, 21 Aug 2017 09:09:22 -0400 In-Reply-To: <1503318465-19013-3-git-send-email-borntraeger@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 21 Aug 2017 14:27:45 +0200 Christian Borntraeger wrote: > From: Heiko Carstens > > sthyi should only generate a specification exception if the function > code is zero and the response buffer is not on a 4k boundary. > > The current code would also test for unknown function codes if the > response buffer, that is currently only defined for function code 0, > is not on a 4k boundary and incorrectly inject a specification > exception instead of returning with condition code 3 and return code 4 > (unsupported function code). > > Fix this by moving the boundary check. > > Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation") > Cc: # 4.8+ > Reviewed-by: Janosch Frank > Signed-off-by: Heiko Carstens > Signed-off-by: Christian Borntraeger > --- > arch/s390/kvm/sthyi.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Cornelia Huck