From: Nadav Amit <namit@vmware.com>
To: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: Nikos Nikoleris <nikos.nikoleris@arm.com>,
Andrew Jones <andrew.jones@linux.dev>,
Shaoqin Huang <shahuang@redhat.com>,
"kvmarm@lists.linux.dev" <kvmarm@lists.linux.dev>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [kvm-unit-tests PATCH 1/2] arm64: set sctlr_el1.SPAN
Date: Wed, 19 Jul 2023 05:42:59 +0000 [thread overview]
Message-ID: <02111DF8-0D75-46C3-B5DD-A0FCE026263F@vmware.com> (raw)
In-Reply-To: <ZLZQ6r4-9mVdg4Ry@monolith.localdoman>
> On Jul 18, 2023, at 1:44 AM, Alexandru Elisei <alexandru.elisei@arm.com> wrote:
>
> Hi,
>
> On Mon, Jul 17, 2023 at 05:05:06PM +0000, Nadav Amit wrote:
>> Combining the answers to Andrew and Nikos.
>>
>> On Jul 17, 2023, at 1:53 AM, Nikos Nikoleris <nikos.nikoleris@arm.com> wrote:
>>>
>>>>>
>>>>> Would you mind reposting this along with the BSS zeroing patch, the
>>>>> way I proposed we do that, and anything else you've discovered when
>>>>> trying to use the EFI unit tests without QEMU? We'll call that our
>>>>> first non-QEMU EFI support series, since the first EFI series was
>>>>> only targeting QEMU.
>>
>> I need to rehash the solution that you proposed for BSS (if there is
>> anything special there). I had a different workaround for that issue,
>> because IIRC I had some issues with the zeroing. I’ll give it another
>>
>>>>
>>>> Oh, and I meant to mention that, when reposting this patch, maybe we
>>>> can consider managing sctlr in a similar way to the non-efi start path?
>>>>
>>
>> I am afraid of turning on random bits on SCTLR. Arguably, the way that
>
> What do you mean by turning on random bits on SCTLR? All the functional
> bits are documented in the architecture. Same goes for RES1 (it's in the
> Glossary).
>
>> the non-efi test sets the default value of SCTLR (with no naming of the
>> different bits) is not very friendly.
>
> That's because as the architecture gets updated, what used to be a RES1 bit
> becomes a functional bit. The only sane way to handle this is to disable
> all the features you don't support, **and** set all the RES1 bits (and
> clear RES0 bits), to disable any newly introduced features you don't know
> about yet which were left enabled by software running at a higher privilege
> level.
>
> You can send a patch if you want to give a name to the bits which have
> become functional since SCTLR_EL1_RES1 was introduced.
I can give it a quick shot, but I do need to clarify something. Although
I have rather deep knowledge of x86 architecture with over 20 years of
experience, my experience with ARM is limited to 2 weeks. And I don’t even
have an environment in which I can run KVM+ARM.
So I am not inclined to revamp code that was actually just added to
kvm-unit-tests. I will attempt to refactor the code to solve both the
BSS and SCTLR issues in EFI under these limitations.
next prev parent reply other threads:[~2023-07-19 5:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-17 1:31 [kvm-unit-tests PATCH 0/2] arm64: fix paging issues Nadav Amit
2023-06-17 1:31 ` [kvm-unit-tests PATCH 1/2] arm64: set sctlr_el1.SPAN Nadav Amit
2023-06-25 19:44 ` Nadav Amit
2023-07-07 18:26 ` Nadav Amit
2023-07-14 10:31 ` Alexandru Elisei
2023-07-14 11:29 ` Shaoqin Huang
2023-07-14 18:42 ` Nadav Amit
2023-07-17 6:50 ` Andrew Jones
2023-07-17 6:52 ` Andrew Jones
2023-07-17 8:53 ` Nikos Nikoleris
2023-07-17 17:05 ` Nadav Amit
2023-07-18 8:44 ` Alexandru Elisei
2023-07-19 5:42 ` Nadav Amit [this message]
2023-06-17 1:31 ` [kvm-unit-tests PATCH 2/2] arm64: ensure tlbi is safe Nadav Amit
2023-07-14 10:55 ` Alexandru Elisei
2023-07-14 17:20 ` Nadav Amit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02111DF8-0D75-46C3-B5DD-A0FCE026263F@vmware.com \
--to=namit@vmware.com \
--cc=alexandru.elisei@arm.com \
--cc=andrew.jones@linux.dev \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=nikos.nikoleris@arm.com \
--cc=shahuang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox