From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 3/5] vtdt: Modify vlapic code to add vtdt support Date: Tue, 14 Dec 2010 09:59:09 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Wei, Gang" , "xen-devel@lists.xensource.com" Cc: Tim Deegan List-Id: xen-devel@lists.xenproject.org On 14/12/2010 09:13, "Wei, Gang" wrote: > Keir Fraser wrote on=A02010-12-14: >>>>> @@ -265,6 +265,7 @@ struct hvm_hw_lapic { >>>>> uint64_t apic_base_msr; >>>>> uint32_t disabled; /* VLAPIC_xx_DISABLED */ >>>>> uint32_t timer_divisor; >>>>> + uint64_t tdt_msr; >>>>> }; >>>>=20 >>>> Is this backward compatible with old HVM save images? >>>=20 >>> I am not sure about this. If it isn't, would you accept to simply >>> add another data trunk for TDT msr? >>=20 >> That's Tim's call. I would personally prefer for Xen to accept >> truncated chunks, and extend them with sensible 'old save image' default= s, >> such as all-zeroes. >> That would be a generic solution to this case which will be reusable >> in future, and avoid needlessly creating extra chunk types just for >> backward compatibility reasons. >=20 > Ok. Let's wait for Tim to answer the call. Well I propose the attached patch, and then you can use hvm_load_entry_zeroextend() in vlapic.c. I would split this patch into two pieces if I apply it (code movement first, then the zeroextend logic). It needs an Ack from Tim however. -- Keir > I just found some code in xen/hvm/save.h: _hvm_check_entry() > if ( type !=3D d->typecode || len !=3D d->length ) > { > gdprintk(XENLOG_WARNING, > "HVM restore mismatch: expected type %u length %u, " > "saw type %u length %u\n", type, len, d->typecode, > d->length); > return -1; > } >=20 > So I am assuming it would not be backward compatible with old HVM save im= ages. >=20 > Jimmy