On 10/11/2015 10:28, Han, Huaitong wrote:
> >     pkru = is_long_mode(vcpu) ? read_pkru() : 0;
> >     if (unlikely(pkru) && (pfec & PFERR_PK_MASK)) {
> >             ... from above ... */
> > 
> >             /* Flip PFERR_PK_MASK if pkru_bits is non-zero */
> >             pfec ^= -pkru_bits & PFERR_PK_MASK;
> 
> If pkru_bits is zero, it means dynamically conditions is not met for
> protection-key violations, so pfec on PK bit should be flipped. So I
> guess it should be:
>       pfec ^= pkru_bits ? 0 : PFERR_PK_MASK;

Right.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to