[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] x86/hvmloader: round up memory BAR size to 4K
On Fri, Jan 17, 2020 at 6:08 AM Roger Pau Monne <roger.pau@xxxxxxxxxx> wrote: > > When placing memory BARs with sizes smaller than 4K multiple memory > BARs can end up mapped to the same guest physical address, and thus > won't work correctly. > > Round up all memory BAR sizes to be at least 4K, so that they are > naturally aligned to a page size and thus don't end up sharing a page. > Also add a couple of asserts to the current code to make sure the MMIO > hole is properly sized and aligned. > > Note that the guest can still move the BARs around and create this > collisions, and that BARs not filling up a physical page might leak > access to other MMIO regions placed in the same host physical page. > > This is however no worse than what's currently done, and hence should > be considered an improvement over the current state. > > Reported-by: Jason Andryuk <jandryuk@xxxxxxxxx> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> > --- > Cc: Jason Andryuk <jandryuk@xxxxxxxxx> > --- > Changes since v1: > - Do the round up when sizing the BARs, so that the MMIO hole is > correctly sized. > - Add some asserts that the hole is properly sized and size-aligned. > - Dropped Jason Tested-by since the code has changed. > --- > Jason, can you give this a spin? Thanks. Tested-by: Jason Andryuk <jandryuk@xxxxxxxxx> Thanks! -Jason _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |