[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] A question about hvm_copy_from_guest_virt
current hvm_copy_from_guest_virt implementation can't hanle momery access crossing a page boundary if the 2 guest physical pages are not contiguous, but the following code in vmx_io_instruction requires hvm_copy_from_guest_virt can do that. I remember the original code from Keir can handle that case, although I don't think there will be a real case in a OS that the 2 guest physical pages are not contiguous. The same to movs handling in handle_mmio. Thanks -Xin /* * Handle string pio instructions that cross pages or that * are unaligned. See the comments in hvm_domain.c/handle_mmio() */ if ( (addr & PAGE_MASK) != ((addr + size - 1) & PAGE_MASK) ) { unsigned long value = 0; pio_opp->flags |= OVERLAP; if ( dir == IOREQ_WRITE ) /* OUTS */ { if ( hvm_paging_enabled(current) ) (void)hvm_copy_from_guest_virt(&value, addr, size); else (void)hvm_copy_from_guest_phys(&value, addr, size); } else pio_opp->addr = addr; if ( count == 1 ) regs->eip += inst_len; send_pio_req(port, 1, size, value, dir, df, 0); } else { _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |