[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 1/2] X86: Move rdmsr/wrmsr functionality to s
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH v3 1/2] X86: Move rdmsr/wrmsr functionality to standalone functions |
Date: |
Tue, 14 Mar 2017 14:10:13 -0300 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Tue, Mar 14, 2017 at 03:08:06PM +0100, Julian Kirsch wrote:
[...]
> +uint64_t x86_cpu_rdmsr(CPUX86State *env, uint32_t idx, bool *valid)
> +{
> + return 0ULL;
> +}
> +
> +void x86_cpu_wrmsr(CPUX86State *env, uint32_t idx, uint64_t val, bool *valid)
> +{
> +}
These implementations don't set *valid...
[...]
> + bool res_valid;
[...]
> + x86_cpu_wrmsr(env, (uint32_t)env->regs[R_ECX], val, &res_valid);
[...]
> + bool res_valid;
[...]
> + val = x86_cpu_rdmsr(env, (uint32_t)env->regs[R_ECX], &res_valid);
...while these callers don't initialize res_valid.
I suggest setting *valid = false on the CONFIG_USER_ONLY stubs.
--
Eduardo
- Re: [Qemu-devel] [PATCH v3 1/2] X86: Move rdmsr/wrmsr functionality to standalone functions,
Eduardo Habkost <=