All of lore.kernel.org
 help / color / mirror / Atom feed
* assumptions when hvm guest uses string instructions on MMIO memory
@ 2006-11-29 16:50 Jan Beulich
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2006-11-29 16:50 UTC (permalink / raw)
  To: xen-devel

>I'm wondering if the assumptions currently made are appropriate:
>
>- movs assumes that either address is not in MMIO space (What if the
>  guest uses it e.g. on video memory for scrolling?)
>- stos and lods assume that the mmio memory is physically contiguous,
>  while movs doesn't (and even ins/outs for PIO don't, although I'm
>  not clear why, as it still seems to be assumed that the memory
>  accessed is not in MMIO space)

- What if the non-MMIO address of MOVS is also in a not present page?

>Likewise I find it at least strange that all the I/O related
>hvm_copy_{from,to}_guest_virt invocations have their return value
>cast to void instead of forcing page faults into the guest. While I
>can see the point for single datum instructions (the CPU supposedly
>did the checking, except perhaps for ins/outs), movs where the
>non-mmio address crosses a page boundary and lods/stos because
>they're not being broken up would still seem to cause issues. Even
>in the single datum case I think it would be much more consistent
>to force a fault into the guest rather than silently ignoring any
>problems.

Thanks, Jan

^ permalink raw reply	[flat|nested] 3+ messages in thread
* assumptions when hvm guest uses string instructions on MMIO memory
@ 2006-11-29 16:29 Jan Beulich
  2006-11-29 17:19 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2006-11-29 16:29 UTC (permalink / raw)
  To: xen-devel

I'm wondering if the assumptions currently made are appropriate:

- movs assumes that either address is not in MMIO space (What if the
  guest uses it e.g. on video memory for scrolling?)
- stos and lods assume that the mmio memory is physically contiguous,
  while movs doesn't (and even ins/outs for PIO don't, although I'm
  not clear why, as it still seems to be assumed that the memory
  accessed is not in MMIO space)

Likewise I find it at least strange that all the I/O related
hvm_copy_{from,to}_guest_virt invocations have their return value
cast to void instead of forcing page faults into the guest. While I
can see the point for single datum instructions (the CPU supposedly
did the checking, except perhaps for ins/outs), movs where the
non-mmio address crosses a page boundary and lods/stos because
they're not being broken up would still seem to cause issues. Even
in the single datum case I think it would be much more consistent
to force a fault into the guest rather than silently ignoring any
problems.

Thanks, Jan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-29 17:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-29 16:50 assumptions when hvm guest uses string instructions on MMIO memory Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2006-11-29 16:29 Jan Beulich
2006-11-29 17:19 ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.