From nobody Sat May 18 06:31:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=de.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1562340975; cv=none; d=zoho.com; s=zohoarc; b=bqPpVFLS5QYE4IkBeQzdGh9Xpsl1A/da39ejkIJKzncc9Q2+6Jvn953J9Rv3ZuliTs3FyMwMUoTzOW+bfzvGf18F4JhEBEGJue4iAAny9fpOzDOPmAPlN8crqs/x56V29mPKThaubGS24jiBLhECfZ/7EqTd2diQ93GhfCsuXxo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562340975; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=9i9fi8R16rQ+f06NuqYAWfmQsuHnIVGJRkuIaRQurBU=; b=NphdaGqvDvke105flPrhlalFvBvJLr+bCjnvEbYqZPkzjLUqS4j5foQEs232jRiYm4/F+q6O4xkKRn/0/WOiFBQ0tFvOXZbOuyfYgYDnaCIKVUIEXA6ZQGe5WLypQsqTHTVeIFzTb4oh0n3fahuPW/KgrBEUnoJTutekMMWWQp0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1562340975770787.7723884193077; Fri, 5 Jul 2019 08:36:15 -0700 (PDT) Received: from localhost ([::1]:54214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjQFr-0006XM-VK for importer@patchew.org; Fri, 05 Jul 2019 11:36:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34321) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjQDn-0005lB-NF for qemu-devel@nongnu.org; Fri, 05 Jul 2019 11:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjQDg-0008CM-QQ for qemu-devel@nongnu.org; Fri, 05 Jul 2019 11:33:55 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:6366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hjQDg-00041a-Fu for qemu-devel@nongnu.org; Fri, 05 Jul 2019 11:33:52 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x65FVqlX075845 for ; Fri, 5 Jul 2019 11:32:57 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tj7chd168-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 05 Jul 2019 11:32:56 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 5 Jul 2019 16:32:54 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 5 Jul 2019 16:32:52 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x65FWolh35324318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 Jul 2019 15:32:50 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D0F352051; Fri, 5 Jul 2019 15:32:50 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 5CF185204F; Fri, 5 Jul 2019 15:32:50 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id 04660E00C5; Fri, 5 Jul 2019 17:32:50 +0200 (CEST) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 5 Jul 2019 17:32:49 +0200 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19070515-0020-0000-0000-000003509241 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19070515-0021-0000-0000-000021A435D3 Message-Id: <20190705153249.12525-1-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-05_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907050189 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH] s390x/cpumodel: Set up CPU model for AQIC interception X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tony Krowiak , Pierre Morel , David Hildenbrand , qemu-devel , Halil Pasic , Christian Borntraeger , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Pierre Morel Let's add support for the AP-Queue interruption facility to the CPU model. The S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, CPU facility indicates whether the PQAP instruction with the AQIC command is available to the guest. This feature will be enabled only if the AP instructions are available on the linux host and AQIC facility is installed on the host. This feature must be turned on from userspace to intercept AP instructions on the KVM guest. The QEMU command line to turn this feature on looks something like this: qemu-system-s390x ... -cpu xxx,apqi=3Don ... or ... -cpu host Right now AP pass-through devices do not support migration, which means that we do not have to take care of migrating the interrupt data: virsh migrate apguest --live qemu+ssh://root@target.lan/system error: Requested operation is not valid: domain has assigned non-USB host d= evices Signed-off-by: Pierre Morel Reviewed-by: Tony Krowiak Reviewed-by: Christian Borntraeger Reviewed-by: Halil Pasic Signed-off-by: Christian Borntraeger [rebase to newest qemu and fixup description] --- target/s390x/cpu_features_def.inc.h | 1 + target/s390x/cpu_models.c | 1 + target/s390x/gen-features.c | 1 + 3 files changed, 3 insertions(+) diff --git a/target/s390x/cpu_features_def.inc.h b/target/s390x/cpu_feature= s_def.inc.h index c20c780f2ea7..ef190e2fc783 100644 --- a/target/s390x/cpu_features_def.inc.h +++ b/target/s390x/cpu_features_def.inc.h @@ -77,6 +77,7 @@ DEF_FEAT(SEMAPHORE_ASSIST, "sema", STFL, 59, "Semaphore-a= ssist facility") DEF_FEAT(TIME_SLICE_INSTRUMENTATION, "tsi", STFL, 60, "Time-slice Instrume= ntation facility") DEF_FEAT(MISC_INSTRUCTION_EXT3, "minste3", STFL, 61, "Miscellaneous-Instru= ction-Extensions Facility 3") DEF_FEAT(RUNTIME_INSTRUMENTATION, "ri", STFL, 64, "CPU runtime-instrumenta= tion facility") +DEF_FEAT(AP_QUEUE_INTERRUPT_CONTROL, "apqi", STFL, 65, "AP-Queue interrupt= ion facility") DEF_FEAT(ZPCI, "zpci", STFL, 69, "z/PCI facility") DEF_FEAT(ADAPTER_EVENT_NOTIFICATION, "aen", STFL, 71, "General-purpose-ada= pter-event-notification facility") DEF_FEAT(ADAPTER_INT_SUPPRESSION, "ais", STFL, 72, "General-purpose-adapte= r-interruption-suppression facility") diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 2cb09c078055..1d16d7d5e794 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -818,6 +818,7 @@ static void check_consistency(const S390CPUModel *model) { S390_FEAT_PTFF_QTOUE, S390_FEAT_MULTIPLE_EPOCH }, { S390_FEAT_PTFF_STOE, S390_FEAT_MULTIPLE_EPOCH }, { S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH }, + { S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, S390_FEAT_AP }, }; int i; =20 diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index af06be3e3b98..9f216219ff53 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -519,6 +519,7 @@ static uint16_t full_GEN12_GA1[] =3D { S390_FEAT_EDAT_2, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2, S390_FEAT_AP_QUERY_CONFIG_INFO, + S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, S390_FEAT_AP_FACILITIES_TEST, S390_FEAT_AP, }; --=20 2.21.0