From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE5036AB81; Thu, 21 Dec 2023 11:59:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="LdGQMNRg" Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BLArAvB011054; Thu, 21 Dec 2023 11:59:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=Nk22VKzp/TbG9pw9wULPwSdj0KNuNAoBU6vMFTyddq8=; b=LdGQMNRgmVOY3bA4DLgAfnpdk+Y2GcK/9HhrjhY7fCh0UMRVBz8ovo+z+vUAIwMVfiyp 4xrblyOwlpqhlgo0kJqFuNOcMhbox/VgvkToAjyhLBsqOBFfcc8r5mmWm8MI9XQMStAA TZTY4wZjwXzNKJ7ZwSLVtD4VmBSf2S2vLS1hzpXdpbuP+U+kQVzrBLAXkGUkPA8rsic2 7tEupEvWr2n96+NT6towd84moACLNuKdyflHTm0xH3OxRlRIagp1XTQ/dEm0ubH66nBX O5WW+FesXFqwA5wByuvl5ohFlCjs7BK2Wys+1JXyHaws+qV/X9WHkeGYee6Fgg828RPH oQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3v4m0d24sj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Dec 2023 11:59:31 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BLBoYVi000979; Thu, 21 Dec 2023 11:59:30 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3v4m0d24s5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Dec 2023 11:59:30 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BLA0lLV010900; Thu, 21 Dec 2023 11:59:30 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3v1q7nvpfh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Dec 2023 11:59:30 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BLBxQfQ28771020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Dec 2023 11:59:27 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB78920049; Thu, 21 Dec 2023 11:59:26 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3FDD420040; Thu, 21 Dec 2023 11:59:26 +0000 (GMT) Received: from [9.179.10.86] (unknown [9.179.10.86]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 21 Dec 2023 11:59:26 +0000 (GMT) Message-ID: Date: Thu, 21 Dec 2023 12:59:25 +0100 Precedence: bulk X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] KVM: s390: vsie: fix race during shadow creation To: KVM Cc: Janosch Frank , David Hildenbrand , linux-s390 , Thomas Huth , Claudio Imbrenda , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Marc Hartmayer References: <20231220125317.4258-1-borntraeger@linux.ibm.com> Content-Language: en-US From: Christian Borntraeger In-Reply-To: <20231220125317.4258-1-borntraeger@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 5N3_bT-id61c4w97XLNLE6wUBbo5Kfiw X-Proofpoint-ORIG-GUID: Rs-WF6PzYlFE-078kZbQLa9w4SK-fFVi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-21_04,2023-12-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 impostorscore=0 mlxlogscore=590 phishscore=0 lowpriorityscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 spamscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312210088 Am 20.12.23 um 13:53 schrieb Christian Borntraeger: > Right now it is possible to see gmap->private being zero in > kvm_s390_vsie_gmap_notifier resulting in a crash. This is due to the > fact that we add gmap->private == kvm after creation: > > static int acquire_gmap_shadow(struct kvm_vcpu *vcpu, > struct vsie_page *vsie_page) > { > [...] > gmap = gmap_shadow(vcpu->arch.gmap, asce, edat); > if (IS_ERR(gmap)) > return PTR_ERR(gmap); > gmap->private = vcpu->kvm; > > Let children inherit the private field of the parent. > > Reported-by: Marc Hartmayer > Fixes: a3508fbe9dc6 ("KVM: s390: vsie: initial support for nested virtualization") > Cc: > Cc: David Hildenbrand > Signed-off-by: Christian Borntraeger queue on kvms390/master.