qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe


From: Robbin Ehn
Subject: Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe
Date: Mon, 05 Jun 2023 16:23:34 +0200
User-agent: Evolution 3.48.1-0ubuntu1

On Fri, 2023-06-02 at 19:57 -0700, Richard Henderson wrote:

> 
> > +        case RISCV_HWPROBE_KEY_CPUPERF_0:
> > +            pair->value = RISCV_HWPROBE_MISALIGNED_UNKNOWN;
> 
> Is that really what you want to expose here?  FAST is always going to be 
> true, in that 
> handling the unaligned access in the host is going to be faster than in the 
> emulated guest.

The plan was to add this in the cpu cfg in a later patch.
This setting e.g. changes jitted code and therefore it's helpful if such 
generated code
is the same in the emulated guest as it would be on that actual cpu.

I'll change to FAST as the hardcoded value until then.

> 
> 
> Where does CPU_ALLOC_SIZE and CPU_COUNT_S come from?
> 
> > +                unlock_user(host_cpus, arg4, cpu_setsize);
> > +                /* no selected cpu */
> > +                if (ccpu == 0) {
> > +                    return -TARGET_EINVAL;
> > +                }
> 
> I suppose you're just looking to see that the set is not empty?

Yes, exactly.

Thanks again! I'll send out an update.

/Robbin


> 
> 
> r~




reply via email to

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