x86 hvm: Another clarifying comment in the HVM address translation emulation.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 19 Aug 2008 18:45:27 +0000 (19:45 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 19 Aug 2008 18:45:27 +0000 (19:45 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/emulate.c

index 60a815c7e5d92a419fff5c8ce9c6e3d8efc4bffd..bb621553174533f0c649318064d7bfcf1bca652c 100644 (file)
@@ -311,6 +311,10 @@ static int hvmemul_virtual_to_linear(
 
     if ( (hvmemul_ctxt->ctxt.regs->eflags & X86_EFLAGS_DF) && (*reps > 1) )
     {
+        /*
+         * x86_emulate() clips the repetition count to ensure we don't wrap
+         * the effective-address index register. Hence this assertion holds.
+         */
         ASSERT(offset >= ((*reps - 1) * bytes_per_rep));
         okay = hvm_virtual_to_linear_addr(
             seg, reg, offset - (*reps - 1) * bytes_per_rep,