|
On 2011-11-9 21:32, Ian Campbell wrote: Sorry for the confusion, my comment seems not so precise.On Wed, 2011-11-09 at 08:15 +0000, annie.li@xxxxxxxxxx wrote:From: Annie Li <annie.li@xxxxxxxxxx> Receiver-side copying of packets is based on this implementation, it gives better performance and better CPU accounting. It totally supports three types: full-page, sub-page and transitive grants. However this patch does not cover sub-page and transitive grants, it mainly focus on Full-page part and implements grant table V2 interfaces corresponding to what already exists in grant table V1, such as: grant table V2 initialization, mapping, releasing and exported interfaces. Each guest can only supports one type of grant table type, every entry in grant table should be the same version. It is necessary to set V1 or V2 version before initializing the grant table. Grant table exported interfaces of V2 are same with those of V1, Xen is responsible to judge what grant table version guests are using in every grant operation. V2 fulfills the same role of V1, and it is totally backwards compitable with V1. If dom0 support grant table V2, the guests runing on it can run with either V1 or V2. Signed-off-by: Annie Li <annie.li@xxxxxxxxxx> --- arch/x86/xen/grant-table.c | 34 ++++++++- drivers/xen/grant-table.c | 194 +++++++++++++++++++++++++++++++++++++++++--- include/xen/grant_table.h | 6 +- 3 files changed, 220 insertions(+), 14 deletions(-) diff --git a/arch/x86/xen/grant-table.c b/arch/x86/xen/grant-table.c index 65ce508..3e9f936 100644 --- a/arch/x86/xen/grant-table.c +++ b/arch/x86/xen/grant-table.c @@ -54,6 +54,17 @@ static int map_pte_fn(pte_t *pte, struct page *pmd_page, return 0; } +/*32bits is not enough since Xen supports sparse physical memory*/What does this mean? This function is used to map the status frames of grant table 2, and the status definition is uint64_t. So it requires 64bits even on both 32bit guest. Yes, map_pte_fn already exists, but the frames definition is different. uint64_t **frames in map_pte_fn_status VS unsigned long **frames in map_pte_fn Grant table 2 added status frames which is defined as uint64_t, so I kept both map_pte_fn and map_pte_fn_status. Thanks, will fix it. Thanks, will fix it. Thanks Annie Ian. |
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel