Received: by 2002:a05:6512:3aa:0:0:0:0 with SMTP id v10csp477574lfp; Thu, 13 Feb 2020 03:10:11 -0800 (PST) X-Google-Smtp-Source: APXvYqzcU3a3MiwfSmkvde1DX/DPg44J8/gsWFrjoS8VHQp3PYXSF/cYs4QhlLS98Hm5zrrgISzH X-Received: by 2002:ac8:1385:: with SMTP id h5mr10912478qtj.59.1581592211769; Thu, 13 Feb 2020 03:10:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581592211; cv=none; d=google.com; s=arc-20160816; b=tu4RMWR8TZ9gBkMNNb5qF/dnogkWdnQm5HGgedAjV7ICj1qlqfu+jpG0/smTmyVOcS VEk3hGRFiSMt6CnQQ/GUL1IwgAxchAPQA71Z1tS1OBH1XhzESlGGimh4XmG/nABWrA+H jEJf7L6n0Q+5QXBkIqcwEPkbpTZfo7CR1MxBxe6E7ixoAoH3z2fxAiwvxWUkHKS/ELt2 HfTpP2IIKJqVFnp8ZIkk2neeXRc05iPOoJY8L6e5bI+yB47VAkJQkayKUA1eThDIlhus sevWQNBB44ld0Pfk7z4wmOIXNMc94w9ps80IvHZtn9vr/uj5LZpJC+0HmZ3lZNH/NNSR 1xzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :dkim-signature; bh=cBDpDGp8hRaSxc8Ce6qbjpIukw3OOaVaDvkazzNkgeo=; b=YV3o054dm2UMogMftIoWgA3tLYLuMwiXHyoITBzXoiJ6N4/fgdS3tP/BNXdbYFrIO9 soKPHr+1SJipi6PywettNIMBMpsNyO2TQqML6/3qsdOOKl2rhxWZJHo53eWkxLrRqIm3 pChAPmTMwKNrkKNnmXdu3g0ht/Irut0twO7dq+OCfTu3z0WRtFWNPT1bbJA1H+EpmaIi xdlgcXCG1AsHNUKSXiA6tHn4es3E4TbEp5NWqF5BZvTSOYg6/uZiWPsOOwWhmjaSo+jB FqzF9jDX2MU697ckpdamcjklgCZl0R58XHD/Y+qmqrH1kq+OfNYkFhkXBxi6miqNm15v oDgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=Ksh70mi4; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w9si781947qvj.17.2020.02.13.03.10.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Feb 2020 03:10:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=Ksh70mi4; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:50612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2CNn-0006lQ-5x for alex.bennee@linaro.org; Thu, 13 Feb 2020 06:10:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58206) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2CNe-0006j0-0S for qemu-arm@nongnu.org; Thu, 13 Feb 2020 06:10:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2CNZ-00055f-86 for qemu-arm@nongnu.org; Thu, 13 Feb 2020 06:10:01 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:38518 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j2CNZ-00055G-1U for qemu-arm@nongnu.org; Thu, 13 Feb 2020 06:09:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581592195; h=from:from:reply-to: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=cBDpDGp8hRaSxc8Ce6qbjpIukw3OOaVaDvkazzNkgeo=; b=Ksh70mi4HATtoguDz1QfyC4J3OEWj8XUe88MosS+PNpHzChl5ou9t6goLxnbmJoK06wetH 51QxtUrDKv+TzQaakpL5iXXOwBJ2102wGP7WHAxgOtkrAQxhE+qRbuX2w/7ABgi48pquvY 5cCth0dCUETVkWpwZlrdxVNDfFWLb+o= 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-192-ZXUFChKiMOq3jFMFDIbVoQ-1; Thu, 13 Feb 2020 06:09:54 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 22168800D4C; Thu, 13 Feb 2020 11:09:53 +0000 (UTC) Received: from localhost.localdomain (vpn2-54-95.bne.redhat.com [10.64.54.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ECB5E1001B2B; Thu, 13 Feb 2020 11:09:46 +0000 (UTC) Subject: Re: [RESEND RFC PATCH v2 1/2] target/arm: Allow to inject SError interrupt To: Richard Henderson , Peter Maydell References: <20200205110541.37811-2-gshan@redhat.com> <8dce7dbe-c6c1-122a-f960-0fc29257dd1c@redhat.com> <21e4051a-4d06-03cb-6d8e-5331b5b570c4@redhat.com> From: Gavin Shan Message-ID: Date: Thu, 13 Feb 2020 22:09:44 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: ZXUFChKiMOq3jFMFDIbVoQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Gavin Shan Cc: Andrew Jones , jthierry@redhat.com, Alexey Kardashevskiy , Marc Zyngier , QEMU Developers , Eric Auger , qemu-arm , Shan Gavin , Paolo Bonzini Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: X6Ak8nwqUIur On 2/13/20 4:39 PM, Richard Henderson wrote: > On 2/12/20 7:49 PM, Gavin Shan wrote: >> On 2/12/20 10:34 PM, Peter Maydell wrote: >>> Yeah, this is on my list to look at; Richard Henderson also could >>> have a look at it. From a quick scan I suspect you may be missing >>> handling for AArch32. >>> >> >> [Thanks for copying Richard Henderson] >> >> Yes, the functionality is only supported on aarch64 currently by intention >> because the next patch enables it on "max" and "host" CPU models and both >> of them are running in aarch64 mode. > > We shouldn't leave the aarch32 exception entry paths unimplemented though. C.f. > > AArch32.TakePhysicalSErrorException() > AArch32.TakeVirtualSErrorException() > > It really shouldn't be more than a couple of lines, just like > arm_cpu_do_interrupt_aarch64. Remember both arm_cpu_do_interrupt_aarch32 and > arm_cpu_do_interrupt_aarch32_hyp. > Thanks for the details. The SError injection for aarch32 will be included in v3. >> However, it seems there is a long list of aarch32 CPU models, defined >> in target/arm/cpu.c::arm_cpus. so which CPU models you prefer to see with >> this supported? I think we might choose one or two popular CPU models if >> you agree. > > Even qemu-system-aarch64 -cpu max can exercise this path when EL1 is running in > aarch32 mode. Admittedly it would be easier if we had the rest of the plumbing > so that -cpu max,aarch64=off worked. > > FWIW, the rest of the patch looks good. > I think "-cpu max,aarch64=off" is only valid when KVM is enabled? If that's true, the ioctl(cpu, KVM_SET_VCPU_EVENTS, &events) already worked for aarch32 or aarch64 guest if I'm correct enough. But yes, I need to test it because I never tested this series on aarch32 guest :) Thanks, Gavin