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

Re: [Xen-devel] [PATCH] x86/vMSI: miscellaneous fixes



>>> On 24.01.12 at 16:43, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 20/01/12 16:33, Jan Beulich wrote:
>> This addresses a number of problems in msixtbl_{read,write}():
>> - address alignment was not checked, allowing for memory corruption in
>>   the hypervisor (write case) or returning of hypervisor private data
>>   to the guest (read case)
>> - the interrupt mask bit was permitted to be written by the guest
>>   (while Xen's interrupt flow control routines need to control it)
>> - MAX_MSIX_TABLE_{ENTRIES,PAGES} were pointlessly defined to plain
>>   numbers (making it unobvious why they have these values, and making
>>   the latter non-portable)
>> - MAX_MSIX_TABLE_PAGES was also off by one (failing to account for a
>>   non-zero table offset); this was also affecting host MSI-X code
>> - struct msixtbl_entry's table_flags[] was one element larger than
>>   necessary due to improper open-coding of BITS_TO_LONGS()
>> - msixtbl_read() unconditionally accessed the physical table, even
>>   though the data was only needed in a quarter of all cases
>> - various calculations were done unnecessarily for both of the rather
>>   distinct code paths in msixtbl_read()
>>
>> Additionally it is unclear on what basis MAX_MSIX_ACC_ENTRIES was
>> chosen to be 3.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Tested by backport to XenServer 6.0 (Xen-4.1.1)  The only conflicts were
> with the context around adding the two new header files, and <xen/pfn.h>
> which is a new header file.
> 
> Tested-and-acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Thanks a lot, Andrew! (Keir had already committed the patch.)

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.