WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] hvmemul_virtual_to_linear() doesn't care about direction

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] hvmemul_virtual_to_linear() doesn't care about direction-flag?
From: "Trolle Selander" <trolle.selander@xxxxxxxxx>
Date: Wed, 20 Aug 2008 12:35:27 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 20 Aug 2008 04:35:52 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=JfWBN1bHVHrpMpvA9ugDKeL34eBS21h1N2OR8NrACJw=; b=HdX+5n6jDBvrICvdYxytG2o1KNkPT4zPCMbPKr5usY3a5CS3W16hYUp8FkEVgpVNZo 7/Xg2u2rL9yFap2zdWK9920dt3gv66a4L5oeD1puFHP6HbAGNcU3JGkHuQwVaeQ8Ik9O uASXVw3r7lpOl5qmlqAdBAJu5zFx5fl7EYzmU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=FsH6XbhO7S4IGOqJN3cSRNzUjv2TlGLTwCoIMsDT9/mS2Qr6Q1gsgO4UefqedEbydu 7HhE08uPO2oQXeChSHfQDQWaFE/4KutyjNwzxdjPnArlx+/iABVoCw3tfkfHHoAI9hm7 /TQAhQi9OsDWlrCE+vxX/1ql6IOrGRbzPWs2o=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C4D0D26E.1C419%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <469F2699A483D44BA6D2B311B1089D3A4338FC6113@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C4D0D26E.1C419%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This conditional assignment looks reversed.

    done = reverse ? bytes_per_rep + (addr & ~PAGE_MASK) : -addr & ~PAGE_MASK;

Changing it fixes the legacy OS breakage i reported in a previous
private mail to Keir. Patch attached.

On Tue, Aug 19, 2008 at 7:41 PM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
> On 19/8/08 19:33, "Byrne, John (HP Labs)" <john.l.byrne@xxxxxx> wrote:
>
>> Wrong assert. I confused you, my fault. The ASSERT(!reverse) I figured out.
>>
>> The ASSERT I was concerned about is this:
>>
>>     if ( (hvmemul_ctxt->ctxt.regs->eflags & X86_EFLAGS_DF) && (*reps > 1) )
>>     {
>>         ASSERT(offset >= ((*reps - 1) * bytes_per_rep));
>>
>> However, I just read truncate_ea_and_reps() in the emulator which should
>> guarantee this.
>
> Yes, I considered giving that one a comment too. Now I will do so.
>
>  -- Keir
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>

Attachment: reverse_conditional_assignment.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel