From: "Jan Beulich" Subject: Re: [PATCH v5] Sanity check xsave area when migrating or restoring from older Xen verions Date: Wed, 22 Oct 2014 15:04:28 +0100 Message-ID: <5447D58C02000078000410E4@mail.emea.novell.com> References: <1413986397-11171-1-git-send-email-dkoch@verizon.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1413986397-11171-1-git-send-email-dkoch@verizon.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Don Koch Cc: Andrew Cooper , Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 22.10.14 at 15:59, wrote: > @@ -2039,10 +2033,22 @@ static int hvm_load_cpu_xsave_states(struct domain *d, hvm_domain_context_t *h) > if ( desc->length > size ) > { > printk(XENLOG_G_WARNING > - "HVM%d.%d restore mismatch: xsave length %u > %u\n", > + "HVM%d.%u restore mismatch: xsave length %#x > %#x\n", > d->domain_id, vcpuid, desc->length, size); > - return -EOPNOTSUPP; > + /* > + * Xen-4.3 and older used to send longer-than-needed xsave regions. > + * Permit loading the record if the extra data is all zero. > + */ > + for ( i = size; i < desc->length; i++ ) > + { > + if ( h->data[overflow_start + i] ) > + { > + printk(XENLOG_G_WARNING > + "HVM%d.%u restore mismatch: xsave has non-zero data starting at %#x\n", > + d->domain_id, vcpuid, i); > + return -EOPNOTSUPP; > + } > + } > } > /* Checking finished */ > See the reply on v4 just sent - these are _still_ two messages in certain cases. Jan