Hi.
The Hunks in vhpt.c look good.
But, is the hunk in vtlb.c really necessary?
vmx_vcpu_flush_vtlb_all() is called only by domain_flush_vtlb_all()
which checks is_initialized member.
thanks,
On Wed, Aug 13, 2008 at 11:08:03AM +0900, Kouya Shimura wrote:
Content-Description: message body text
> Live migration with uninitialized vcpu will crash xen by null pointer.
>
> Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
>
> diff -r d24bc5f549ba xen/arch/ia64/vmx/vtlb.c
> --- a/xen/arch/ia64/vmx/vtlb.c Mon Aug 11 11:04:52 2008 +0900
> +++ b/xen/arch/ia64/vmx/vtlb.c Wed Aug 13 10:50:00 2008 +0900
> @@ -633,6 +633,9 @@ static void __thash_purge_all(void *arg)
>
> void vmx_vcpu_flush_vtlb_all(VCPU *v)
> {
> + if (!v->is_initialised)
> + return;
> +
> if (v == current) {
> thash_purge_all(v);
> return;
> diff -r d24bc5f549ba xen/arch/ia64/xen/vhpt.c
> --- a/xen/arch/ia64/xen/vhpt.c Mon Aug 11 11:04:52 2008 +0900
> +++ b/xen/arch/ia64/xen/vhpt.c Wed Aug 13 10:21:45 2008 +0900
> @@ -526,6 +526,8 @@ void flush_tlb_for_log_dirty(struct doma
> /* NB. There is no race because all vcpus are paused. */
> if (is_hvm_domain(d)) {
> for_each_vcpu (d, v) {
> + if (!v->is_initialised)
> + continue;
> /* XXX: local_flush_tlb_all is called redundantly */
> thash_purge_all(v);
> }
> @@ -533,6 +535,8 @@ void flush_tlb_for_log_dirty(struct doma
> NULL, 1, 1);
> } else if (HAS_PERVCPU_VHPT(d)) {
> for_each_vcpu (d, v) {
> + if (!v->is_initialised)
> + continue;
> vcpu_purge_tr_entry(&PSCBX(v,dtlb));
> vcpu_purge_tr_entry(&PSCBX(v,itlb));
> vcpu_vhpt_flush(v);
> _______________________________________________
> Xen-ia64-devel mailing list
> Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-ia64-devel
--
yamahata
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|