qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 02/29] target/s390x: remove some Linux assump


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v2 02/29] target/s390x: remove some Linux assumptions from IPTE
Date: Tue, 30 May 2017 10:20:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 29.05.2017 21:24, Aurelien Jarno wrote:
> Signed-off-by: Aurelien Jarno <address@hidden>
> ---
>  target/s390x/cpu.h        |  2 ++
>  target/s390x/mem_helper.c | 17 ++++++++++-------
>  target/s390x/mmu_helper.c |  4 +---
>  3 files changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
> index 79235cfa45..d89ad83e71 100644
> --- a/target/s390x/cpu.h
> +++ b/target/s390x/cpu.h
> @@ -1033,6 +1033,8 @@ struct sysib_322 {
>  #define _SEGMENT_ENTRY_RO       0x200     /* page protection bit             
>  */
>  #define _SEGMENT_ENTRY_INV      0x20      /* invalid segment table entry     
>  */
>  
> +#define _VADDR_PX               0xff000   /* page index bits                 
>  */

Even though the other #defines start with an underscore, we should not
use this for new code anymore. #defines that start with an underscore +
capital letter are reserved for the C compiler. If you're afraid that
this "VADDR_PX" is not unique enough, maybe rename it to "MMU_VADDR_PX"
instead?

>  #define _PAGE_RO        0x200            /* HW read-only bit  */
>  #define _PAGE_INVALID   0x400            /* HW invalid bit    */
>  #define _PAGE_RES0      0x800            /* bit must be zero  */
[...]

 Thomas



reply via email to

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