On 20.12.2011, at 16:43, Dushyant Bansal wrote: > Hi, > > The Book3S KVM implementation contains one helper function 'kvmppc_ld' to load data from guest virtual addresses. > > Usually, this works fine for me. But this doesn't work when I try to read data from the shared page (magic page). > > /* Writing data on shared page */ > u32 * p = (u32 *) (vcpu->arch.shared + 192); /* p becomes the host address corresponding to guest address of '0xfffff0c0' */ > p[0] = 20; > > /* Reading data on shared page */ > u32 inst = 0; > ulong pc = 0xfffff0c0; /* Or, any other address on the shared page */ > r = kvmppc_ld(vcpu, &pc, sizeof(u32), &inst, false); > > 'inst' still contains '0'. Also, value returned by this call is '0' which means 'kvmppc_ld' has not failed. > > Am I missing something here? If you have any pointers, please let me know. Uh. Looks like the kvmppc_ld code path doesn't take the magic page into consideration. Could you please verify if you can read the value from guest code? Also, why do you want to load it using kvmppc_ld on the host? Alex -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html