Re: [PATCH v2] KVM/nVMX: Do not validate that posted_intr_desc_addr is page aligned

From: Jim Mattson
Date: Mon Oct 22 2018 - 13:12:40 EST


On Sat, Oct 20, 2018 at 3:50 PM, KarimAllah Ahmed <karahmed@xxxxxxxxx> wrote:
> The spec only requires the posted interrupt descriptor address to be
> 64-bytes aligned (i.e. bits[0:5] == 0). Using page_address_valid also
> forces the address to be page aligned.
>
> Only validate that the address does not cross the maximum physical address
> without enforcing a page alignment.
>
> v1 -> v2:
> - Add a missing parenthesis (dropped while merging!)
>
> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> Cc: Radim KrÄmÃÅ <rkrcmar@xxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxxxx>
> Cc: H. Peter Anvin <hpa@xxxxxxxxx>
> Cc: x86@xxxxxxxxxx
> Cc: kvm@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Fixes: 6de84e581c0 ("nVMX x86: check posted-interrupt descriptor addresss on vmentry of L2")
> Signed-off-by: KarimAllah Ahmed <karahmed@xxxxxxxxx>
Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>