From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a19:711a:0:0:0:0:0 with SMTP id m26csp1602523lfc; Thu, 4 Jun 2020 09:26:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJBVKUsnXDjoE3TYTa+iCxWZMLL9LrRs52GtuPiTazFPDYV3TbDILuwWMIvmmevWIBDXsP X-Received: by 2002:a25:d110:: with SMTP id i16mr2589085ybg.206.1591288003227; Thu, 04 Jun 2020 09:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591288003; cv=none; d=google.com; s=arc-20160816; b=eN155mWiGuVWC/Isjj+X1+NNRQLwQvHCJ+K0/HzcO+P4sW7qtILJgGi2rW8ahP+VY5 J7aSXUZFjmIcV2MnW41cyjzirH+vibkUQhErUrI6jyXmiB0z6h4bBI+l8Euz6vSvKiYN kyt78EKGabxAx/NJd82ROotMftPq7rWfY5SovFDAoizplqgwoNCtS0vAtKoQBpcEIMxs IlVcosCXo2qo82vQ5iVvg9/1atKwVad/SppKFqrVKJVfyR5tvTLYhllFATiFoOJMzcGG EkAWBYo857qD8ZeFz7XocYCk4GEnda7LOKopYIR8823g/IzOrf7RvK+o04yh3X6iswJs 4Kqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:dkim-signature; bh=wPNOw/I3JlqrIBS08wbKJdDUrxe00vptH4YgEIKXUXo=; b=lCztZJu6NZjAEt8+tvZy/8TTQIZJl13P+lI/gzyokJpunHEb5MtI9a6bSn0hHkqV5G 0OZFmryPbbOnA6EbSKF+mm2506YCMF3BqSdADcZjOlagUFp4jaxQxsJXOgF85edYaniI xTBe0L3BQH3Kr5WhTlWyRxrkKQvGBbJgIHWj6fIx2rVhtj/DetTsRU0vqP7050O2bhCT VnHqTsUevkBmSY000DBRkUWSiq/7iazPMSCi+h65CmTTR2pYaFkj5sk7knZ9d6+YYtVd +ZpxTKb9AhW9s062PqaWEBWKym3VRv/ZmAH1FnppQzMouQ8E4oTNXwxJVZKKSQuyJKj3 hD/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b="GW1Nt/7m"; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u2si5154302ybc.460.2020.06.04.09.26.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Jun 2020 09:26:43 -0700 (PDT) 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=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b="GW1Nt/7m"; 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" Received: from localhost ([::1]:45788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgshW-0005Vl-8j for alex.bennee@linaro.org; Thu, 04 Jun 2020 12:26:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgsh5-0005Tk-Cn for qemu-arm@nongnu.org; Thu, 04 Jun 2020 12:26:15 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:34392) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgsh2-0008Ak-5f for qemu-arm@nongnu.org; Thu, 04 Jun 2020 12:26:15 -0400 Received: by mail-wr1-x430.google.com with SMTP id r7so6839240wro.1 for ; Thu, 04 Jun 2020 09:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wPNOw/I3JlqrIBS08wbKJdDUrxe00vptH4YgEIKXUXo=; b=GW1Nt/7mRR+HXAVpKpab1YPXsp6jAhm5Tmuojf44O3zCZndJ2iRunuY8wxCyXmjnfV az/6GaLKnpl+lC283v35kVr4KQVxzAiEAJ0HJoKBrhmbMdLXSRoGnBmsf44EaUWhEPuF ButZb9uvSF8Tx9VgRxlOmr8A76gkTNrMsxmbmac6sOt1M6inDljTAtWmFt/xyEAUeNlr c6M4PlxJe27uKIp1KiXfClTOSzidiO8P71UiI1AgsldvtfuvelWi7ceHXcP8bKSRGFBA psxGmEmBhyl8qCYOdz/NwggtYiQMUriLJ6DHvFShiKRS+yrga/xvwObaf8MBvNr+iB1r 5UYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wPNOw/I3JlqrIBS08wbKJdDUrxe00vptH4YgEIKXUXo=; b=a3fCm/lUDh9JWaA46lBrt4XP+hj7j9479Qct/fb7IxQi+57EiYxzpx+txLcxTGX2mR LN1kCQxKB23uXi53w+iJODjX4iYtXd6Hv3mmSxC5mfEpUDNj7l3WRnUFy4mEB4iz0S2M 0OUek3WU2RkNk+iAeLwa9njAXU6NwzP+yEHx4EnbqE7hE/5hfYX1HhVNeKaJFhOPynS6 poiuBv7tJBUWGRs9uqgAjYEWs2Rdo6fG3ScVupBxrGudH6d4wZGVonEi8U4BQBvig779 Y/0A/zA/oY75/LwYyD6o+OvCCi4Qft3K8tQu8PN9xdjzuAvOKwbF6ipp5XxRlAsSCspt rCgQ== X-Gm-Message-State: AOAM533Ki5QkW+JechRq74joeFMjW6UXayO66Sw7YPlg2tedCOS0bowd ZaXoy2tHZweiU0deeHA961OHZQ== X-Received: by 2002:adf:bbc5:: with SMTP id z5mr5262670wrg.269.1591287970196; Thu, 04 Jun 2020 09:26:10 -0700 (PDT) Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id c81sm8322311wmd.42.2020.06.04.09.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 09:26:09 -0700 (PDT) Date: Thu, 4 Jun 2020 17:26:07 +0100 From: Leif Lindholm To: Peter Maydell Subject: Re: kvm_target, QEMU_KVM_ARM_TARGET_GENERIC_V8 questions Message-ID: <20200604162607.GC28566@vanye> References: <20200604125544.GW28566@vanye> <20200604131802.7w4hncgq2gopbw6z@kamzik.brq.redhat.com> <20200604160300.GB28566@vanye> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=leif@nuviainc.com; helo=mail-wr1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: , Cc: Paolo Bonzini , Andrew Jones , qemu-arm , QEMU Developers Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: dqzITHkYs672 On Thu, Jun 04, 2020 at 17:09:30 +0100, Peter Maydell wrote: > On Thu, 4 Jun 2020 at 17:03, Leif Lindholm wrote: > > But there's also things like: > > - a57_initfn explicitly setting kvm_target, then only being called > > from max_initfn for !kvm_enabled() > > Expected -- a KVM 'max' is nothing to do with a TCG 'max': > * for KVM, -cpu max means "same as -cpu host" > * for TCG, -cpu max means "start with an A57, then add in all the > extra architectural features that have been added since then". Sure. But why are we setting the kvm_target at all for the !kvm_enabled() case? > kvm_target being set by a57_initfn is specifically for the case > where a KVM user is using "-cpu cortex-a57". > > > - a57_initfn setting cpu->dtb_compatible to "arm,cortex-a57" > > What else would it set it to? Hmm, I had been hoping there was a generic v8a one - kvm64.c kind of got my hopes up with "arm,arm-v8". Still, for "max", would it not be useful to update it to the track the most architecturally advanced cpu supported? At this point "arm,cortex-a72". > > - a57 initfn setting cpu->midr, max_initfn overwriting parts of it > > Also expected, TCG's -cpu max is "A57 with lots of extras". Maybe I'm being too rigid in my thinking here, but it does kind of jar to see code call a function called aarch64_a57_initfn to have it write a value where it then throws away the only thing in the value that made it a57. > The way we create a TCG -cpu max is a bit odd, as the code was > originally written in a situation where A57 was the most advanced > TCG CPU we had and there were no extra architectural features > supported by our CPU emulation. Today we have an A72 model as > well and a lot of extra architectural features, so the "code > borrowed" to "extras added" ratio looks a bit unbalanced. > Cleaning it up would not be a bad idea. I might start by doing that bit. It might make a lot of the above niggles simply disappear. Not entirely unrelated question: Would you take added field definitions in target/arm/cpu.h for features not yet emulated in QEMU but defined in released versions of ARM ARM? Regards, Leif