|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [BUGFIX][PATCH 4/4] XEN_DOMCTL_gdbsx_guestmemio: always do the copyback.
On 01/07/14 18:01, Mukesh Rathor wrote: On Tue, 07 Jan 2014 11:24:15 -0500 Don Slutz <dslutz@xxxxxxxxxxx> wrote:On 01/07/14 05:02, Ian Campbell wrote:On Tue, 2014-01-07 at 10:00 +0000, Ian Campbell wrote:On Mon, 2014-01-06 at 17:53 -0800, Mukesh Rathor wrote:On Sat, 4 Jan 2014 12:52:16 -0500 Don Slutz <dslutz@xxxxxxxxxxx> wrote:The gdbsx code expects that domctl->u.gdbsx_guest_memio.remain is returned...... Since it did not look like we would get to an agreement soon on this, I have sent out v2 series. Not at all clear this patch should be in 4.4.0 (domctl api change, high risk, no clear use case (as far as I know gdb does not do anything with partial success)). On this topic; you seem to be overlooking the page crossing case. Using the info that page 1f is good and 20 is bad, a domctl request for 1ffff for 2 bytes would call on dbg_rw_mem(), dbg_rw_guest_mem() which calculate pagecnt == 1, get a valid mfn and return that byte. The 2nd time pagecnt is also 1, but we get INVALID_MFN, so dbg_rw_guest_mem(0 returns 1. dbg_rw_mem(0 also returns 1. gdbsx_guest_mem_io() returns -EFAULT so no copyback. At this point of the 2 requested byte, 1 byte is valid and 1 is not. Since copyback is not done, remain is 0. So the caller get the error and does not have this "partial success" information. The 1st version of this patch I proposed, the copyback is done, so the caller gets remain == 1 and the valid byte and an error. The 2nd version of this patch (which has now been tested) sets remian == 1, the valid byte, and no error. Hope this helps. -Don Slutz _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |