From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.10906.1674030478912309767 for ; Wed, 18 Jan 2023 00:27:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JQdMm3nS; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: osteffen@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674030477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2OiuAcJj8S8RK+ykgO4zb4byMLEzQtFIr7c2LUv1MP8=; b=JQdMm3nSGzJ0XSBzs861t3cf63iR9g6mvXvFb/I7d7UMftwcFrUaZAgvswkxvyynLOydTf 5xU9vkD3Tj1zUyyxCx7S6tlcNgnGPLvyM19R1yifXHb68h3xM/Gc8q8pHyfKnkNjmmPBV5 KzJhoI+McFW3p1ZAZix4gE4cEM+Y1yQ= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-45-ftDTyE7ANUC1Bqn5o97_vQ-1; Wed, 18 Jan 2023 03:27:56 -0500 X-MC-Unique: ftDTyE7ANUC1Bqn5o97_vQ-1 Received: by mail-lf1-f70.google.com with SMTP id a20-20020ac25214000000b004b57756f937so12553179lfl.3 for ; Wed, 18 Jan 2023 00:27:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:user-agent:from:references :in-reply-to:mime-version:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2OiuAcJj8S8RK+ykgO4zb4byMLEzQtFIr7c2LUv1MP8=; b=ljfxnFJ1Ctuu+LfZ59L5eU9++/XMizYAKtFu8BUA5w4yxiEKwRkP2D5lBiY3qcF6xx UFZs29s6gQHJqZWovcA1sYED+SaGpGoz9HNsqRKSOwUF9NFztxkvyD+DWgwte4SHmqF3 8OMke1Tar62UN+K7CezisB6mEDAcxu3OcKmBkxJzp1OgAakT7syP/FbbMKxAC890guPf mFYLPoltdQObHx15raUUZhx3PhsTBEoitmK5W9VGlOGq0vuqIrkdp2Ta7FZ33XjVg5G7 SvqeCP1iE741IR4XHNaJb2MmDwS9sC6pN3eHpTb/V6dQpcvoJeUvzkH71LoxsKumSnkH kvLA== X-Gm-Message-State: AFqh2krvShBE/oXecHDAYWuYvm7PYWIaPL82pQzFr2SZTj31wdApeByb iaSdXvAhvpfCByPBweR2clCpMLKsg5K6VAhj6ag0QLTYgqrpAU2rqI61OEIRtQ6ob2DXXMfJFDI lH7JvcfGqMTSaMy8dq5uhX0NEryGg3Q== X-Received: by 2002:a19:f602:0:b0:4ca:f757:6c91 with SMTP id x2-20020a19f602000000b004caf7576c91mr279258lfe.92.1674030475262; Wed, 18 Jan 2023 00:27:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXu6rjJXvnJt94sF3k5ZmSQ3cdlS1AOatG2jYMo/483PocZnGawHnveVgTK1KANAH4dwLr5iAEZJQRedxAbb9ow= X-Received: by 2002:a19:f602:0:b0:4ca:f757:6c91 with SMTP id x2-20020a19f602000000b004caf7576c91mr279252lfe.92.1674030474986; Wed, 18 Jan 2023 00:27:54 -0800 (PST) Received: from 567203818698 named unknown by gmailapi.google.com with HTTPREST; Wed, 18 Jan 2023 00:27:54 -0800 MIME-Version: 1.0 In-Reply-To: References: <20230105162528.1430368-1-ardb@kernel.org> <20230105162528.1430368-2-ardb@kernel.org> From: "Oliver Steffen" User-Agent: alot/0.8.1 Date: Wed, 18 Jan 2023 00:27:54 -0800 Message-ID: Subject: Re: [edk2-devel] [PATCH v2 2/2] ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX To: Ard Biesheuvel Cc: devel@edk2.groups.io, dann.frazier@canonical.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Quoting Ard Biesheuvel (2023-01-18 08:34:32) > On Wed, 18 Jan 2023 at 07:37, Oliver Steffen wrote: > > > > On Tue, Jan 17, 2023 at 3:57 PM Ard Biesheuvel wrote: > >> > >> On Tue, 17 Jan 2023 at 13:48, Oliver Steffen wrote: > >> > > >> > Hi Ard, Hi everyone, > >> > > >> > Thanks for the work! > >> > > >> > But somehow this patch (as it was merged into master branch) does not > >> > work for me on the ThunderX box we have. > >> > > >> > Any idea what could be wrong? > >> > >> I'm not sure I understand the question. The patch targets ThunderX, > >> and you are using a ThunderX2. > >> > >> What were you expecting to happen, and what is happening instead? > > > > > > Firmware does not start at all when using KVM. > > > > Please excuse my limited knowledge of Arm processor variants. > > I assumed that ThunderX and ThunderX2 are very similar and hoped > > the fix would also work for this case. > > > > The issue was introduced by the same commit that Dann > > reported (07be1d34d95460a238fcd0f6693efb747c28b329): > > "ArmVirtPkg/ArmVirtQemu: enable initial ID map at early boot". > > > > Can you share the QEMU command line that you are using? I use a > ThunderX2 basically 24/7 to do all my Linux and EDK2 development, so > this change was developed on ThunderX2 and so I'm surprised you are > seeing this issue. > > Did you try the DEBUG build as well? Yes, debug is on. Here is what I have, trying with the master branch from just now (998ebe5ca0ae5c449e83ede533bee872f97d63af): # make -C BaseTools && \ . ./edksetup.sh && \ build -t GCC5 -a AARCH64 \ -p ArmVirtPkg/ArmVirtQemu.dsc \ -DCAVIUM_ERRATUM_27456 \ -b DEBUG # /usr/libexec/qemu-kvm \ -machine accel=kvm -m 1G -boot menu=on \ -blockdev node-name=code,driver=file,filename="${FW_CODE_RESIZED}",read-only=on \ -blockdev node-name=vars,driver=file,filename="${FW_VARS}" \ -machine pflash0=code \ -machine pflash1=vars \ -cpu max \ -net none \ -serial stdio # /usr/libexec/qemu-kvm --version QEMU emulator version 7.2.0 (qemu-kvm-7.2.0-3.el9) # uname -r 5.14.0-234.el9.aarch64 # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-redhat-linux/11/lto-wrapper Target: aarch64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-host-pie --enable-host-bind-now --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-plugin --enable-initfini-array --without-isl --enable-multilib --with-linker-hash-style=gnu --enable-gnu-indirect-function --build=aarch64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.3.1 20221121 (Red Hat 11.3.1-4) (GCC) Since you have the same CPU... Might this be a bug in KVM? Thanks! -Oliver