From: Dushyant Bansal Date: Tue, 20 Dec 2011 15:55:21 +0000 Subject: Load data from shared page (magic page) using 'kvmppc_ld' Message-Id: <4EF0AD19.3020603@cse.iitd.ac.in> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org 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. Regards, Dushyant