Skip to contentSkip to conversation

string mmio/pio across page boundaries

DISCUSSION Jan Beulich 1 participant 2 messages Nov 23, 2006

lore
Share & tools
lore
#0 lore raw

When preparing arguments for send_mmio_req() or send_pio_req() in hvm where a single iteration crosses a page boundary, the value to be written is copied from guest memory, but I can't see where the value read is copied to guest memory. Is this case simply missing?

Also, a long while back the logic to calculate when wrapping occurs was changed with two subsequent patches. As I'm looking at the code now it seems like
- only the first patch got applied to handle_mmio() (i.e., the logic is still broken
- neither patch got applied to {svm,vmx}_io_instruction().

Further, there is a comment in handle_mmio() now saying "We need to make sure we advance to the point where the next request will be on a different page. If we're going down, that means advancing until one byte before the start of the page, hence +1." This wasn't applied similarly to {svm,vmx}_io_instruction(). And the actual code seems
wrong: If e.g. addr is on a page boundary, count will become zero. I would think that the +1 must be outside of the division.

Was this intentional in some way? Otherwise, I'll prepare a patch to address all of these.

Thanks, Jan

#1 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line

"Jan Beulich" <[email protected]> 23.11.06 11:22 >>>

When preparing arguments for send_mmio_req() or send_pio_req() in hvm where a single iteration crosses a page boundary, the value to be written is copied from guest memory, but I can't see where the value read is copied to guest memory. Is this case simply missing?

Additionally - how is ecx being updated in all these wrapping cases?

Jan