diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-08-19 19:45:27 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-08-19 19:45:27 +0100 |
commit | 724fc2e33fc7540daae83f04c4afe43ffc15e3b6 (patch) | |
tree | 26f8bd1f0272b32b9ce129179f342875a8639997 /xen/arch/x86/hvm/emulate.c | |
parent | aa6af210f6a8684e7a5a8c7e66b44d482902b01c (diff) | |
download | xen-724fc2e33fc7540daae83f04c4afe43ffc15e3b6.tar.gz xen-724fc2e33fc7540daae83f04c4afe43ffc15e3b6.tar.bz2 xen-724fc2e33fc7540daae83f04c4afe43ffc15e3b6.zip |
x86 hvm: Another clarifying comment in the HVM address translation emulation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/emulate.c')
-rw-r--r-- | xen/arch/x86/hvm/emulate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index 60a815c7e5..bb62155317 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -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, |