qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 27/54] tcg/riscv: Require TCG_TARGET_REG_BITS == 64


From: Daniel Henrique Barboza
Subject: Re: [PATCH v2 27/54] tcg/riscv: Require TCG_TARGET_REG_BITS == 64
Date: Thu, 13 Apr 2023 06:55:01 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1



On 4/13/23 04:12, Richard Henderson wrote:
On 4/12/23 22:18, Daniel Henrique Barboza wrote:


On 4/10/23 22:04, Richard Henderson wrote:
The port currently does not support "oversize" guests, which
means riscv32 can only target 32-bit guests.  We will soon be
building TCG once for all guests.  This implies that we can
only support riscv64.

Since all Linux distributions target riscv64 not riscv32,
this is not much of a restriction and simplifies the code.

Code looks good but I got confused about the riscv32 implications you cited.

Does this means that if someone happens to have a risc-v 32 bit host, with a
special Linux sauce that runs on that 32 bit risc-v host, this person won't be
able to build the riscv32 TCG target in that machine?

Correct.

At present, one is able to configure with such a host, and if one uses 
--target-list=x,y,z such that all of x, y or z are 32-bit guests the build 
should even succeed, and the result should probably work.

However, if one does not use --target-list in configure, the build will #error 
out here:

@@ -942,9 +913,6 @@ static void * const qemu_st_helpers[MO_SIZE + 1] = {
  #endif
  };
-/* We don't support oversize guests */
-QEMU_BUILD_BUG_ON(TCG_TARGET_REG_BITS < TARGET_LONG_BITS);
-

I am working on a patch set, not yet posted, which builds tcg/*.o twice, once 
for system mode and once for user-only.  At which point riscv32 cannot build at 
all.

I brought this patch forward from there in order to reduce churn.

Thanks for clarifying.

As you mentioned in the commit msg, there's no Linux distro (that we care 
about) that
runs on riscv32, so this is not even a restriction today. And we can always 
change our
minds later if the need arrives.


Daniel



r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]