qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [QEMU-PPC] [PATCH V2 1/7] target/ppc: Check mask when set


From: David Gibson
Subject: Re: [Qemu-ppc] [QEMU-PPC] [PATCH V2 1/7] target/ppc: Check mask when setting cap_ppc_safe_indirect_branch
Date: Fri, 2 Mar 2018 11:44:27 +1100
User-agent: Mutt/1.9.2 (2017-12-15)

On Thu, Mar 01, 2018 at 05:37:58PM +1100, Suraj Jitindar Singh wrote:
> Check the character and character_mask field when setting
> cap_ppc_safe_indirect_branch based on the hypervisor response
> to KVM_PPC_GET_CPU_CHAR. Previously the mask field wasn't checked
> which was incorrect.
> 
> Fixes: 8acc2ae5 (target/ppc/kvm: Add 
> cap_ppc_safe_[cache/bounds_check/indirect_branch])
> 
> Signed-off-by: Suraj Jitindar Singh <address@hidden>

There are some details in the custom properties mechanism that could
be improved, but nothing so important as to hold up merging the
series, I'll look at making those changes as a followup.

Applied to ppc-for-2.12.

> 
> ---
> 
> V1 -> V2:
>  - No Change
> ---
>  target/ppc/kvm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
> index 9842b3bb12..2c183f61e2 100644
> --- a/target/ppc/kvm.c
> +++ b/target/ppc/kvm.c
> @@ -2494,7 +2494,7 @@ static void kvmppc_get_cpu_characteristics(KVMState *s)
>          cap_ppc_safe_bounds_check = 1;
>      }
>      /* Parse and set cap_ppc_safe_indirect_branch */
> -    if (c.character & H_CPU_CHAR_BCCTRL_SERIALISED) {
> +    if (c.character & c.character_mask & H_CPU_CHAR_BCCTRL_SERIALISED) {
>          cap_ppc_safe_indirect_branch = 2;
>      }
>  }

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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