debuggers.hg
changeset 21010:94e009ef5a58
[IA64] Support grant_table v2 for XENMAPSPACE_grant_table
This patch is ia64 counter part of 20281:95ea2052b41b.
This fixes the issue that HVM domains with PV-on-HVM drivers panic.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
This patch is ia64 counter part of 20281:95ea2052b41b.
This fixes the issue that HVM domains with PV-on-HVM drivers panic.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Feb 22 10:08:10 2010 +0000 (2010-02-22) |
parents | 70d974c2401d |
children | 2e7dc3421a52 |
files | xen/arch/ia64/xen/mm.c |
line diff
1.1 --- a/xen/arch/ia64/xen/mm.c Mon Feb 22 10:07:27 2010 +0000 1.2 +++ b/xen/arch/ia64/xen/mm.c Mon Feb 22 10:08:10 2010 +0000 1.3 @@ -3338,12 +3338,25 @@ arch_memory_op(int op, XEN_GUEST_HANDLE( 1.4 case XENMAPSPACE_grant_table: 1.5 spin_lock(&d->grant_table->lock); 1.6 1.7 - if ((xatp.idx >= nr_grant_frames(d->grant_table)) && 1.8 - (xatp.idx < max_nr_grant_frames)) 1.9 - gnttab_grow_table(d, xatp.idx + 1); 1.10 - 1.11 - if (xatp.idx < nr_grant_frames(d->grant_table)) 1.12 - mfn = virt_to_mfn(d->grant_table->shared_raw[xatp.idx]); 1.13 + if (d->grant_table->gt_version == 0) 1.14 + d->grant_table->gt_version = 1; 1.15 + 1.16 + if (d->grant_table->gt_version == 2 && 1.17 + (xatp.idx & XENMAPIDX_grant_table_status)) 1.18 + { 1.19 + xatp.idx &= ~XENMAPIDX_grant_table_status; 1.20 + if (xatp.idx < nr_status_frames(d->grant_table)) 1.21 + mfn = virt_to_mfn(d->grant_table->status[xatp.idx]); 1.22 + } 1.23 + else 1.24 + { 1.25 + if ((xatp.idx >= nr_grant_frames(d->grant_table)) && 1.26 + (xatp.idx < max_nr_grant_frames)) 1.27 + gnttab_grow_table(d, xatp.idx + 1); 1.28 + 1.29 + if (xatp.idx < nr_grant_frames(d->grant_table)) 1.30 + mfn = virt_to_mfn(d->grant_table->shared_raw[xatp.idx]); 1.31 + } 1.32 1.33 spin_unlock(&d->grant_table->lock); 1.34 break;