[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 11/11] softmmu: move all load/store function
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [RFC PATCH 11/11] softmmu: move all load/store functions to cpu_ldst.h |
Date: |
Mon, 12 May 2014 10:36:00 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 05/08/2014 09:09 AM, Paolo Bonzini wrote:
> diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
> index a6b7884..e5550e7 100644
> --- a/include/exec/cpu_ldst.h
> +++ b/include/exec/cpu_ldst.h
> @@ -28,8 +28,373 @@
> #ifndef CPU_LDST_H
> #define CPU_LDST_H
>
> -#if !defined(CONFIG_USER_ONLY)
> -#include "exec/softmmu_exec.h"
> +#if defined(CONFIG_USER_ONLY)
> +/* All direct uses of g2h and h2g need to go away for usermode softmmu. */
> +#define g2h(x) ((void *)((unsigned long)(target_ulong)(x) + GUEST_BASE))
As an extremely minor nit, I'd prefer CONFIG_SOFTMMU be the conditional checked
here, so that, as the comment notes, one day we can have CONFIG_SOFTMMU and
CONFIG_USER_ONLY defined at the same time.
r~
- [Qemu-devel] [RFC PATCH 00/11] Cleanup load/store functions in headers and C files, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 01/11] hw: use ld_p/st_p instead of ld_raw/st_raw, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 11/11] softmmu: move all load/store functions to cpu_ldst.h, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 09/11] target-arm: move arm_*_code to a separate file, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 05/11] softmmu: move ALIGNED_ONLY to cpu.h, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 04/11] softmmu: move definition of CPU_MMU_INDEX to inclusion site, drop ACCESS_TYPE, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 02/11] softmmu: start introducing SOFTMMU_CODE_ACCESS in softmmu_header.h, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 08/11] softmmu: make do_unaligned_access extern, Paolo Bonzini, 2014/05/08