On Sun, Mar 17, 2013 at 02:57:09AM -0400, siddhesh phadke wrote: > Hello, > > KVM uses __direct_map() to setup EPT entries for gfn->pfn mappings. > Is it possible to map gfns of two different guest to same pfn using > this function? > If you do it right it should be possible. Send your code. You probably do not get_page() enough times before mapping it. > I tried doing this but I get following messages, > > [<ffffffff810b184a>] bad_page+0x117/0x130 > [<ffffffff810b189c>] free_pages_check+0x39/0x56 > [<ffffffff810b24bb>] free_hot_cold_page+0x3e/0x128 > [<ffffffff810b264d>] free_hot_page+0x1d/0x21 > [<ffffffff810b6372>] put_page+0x70/0x79 > [<ffffffffa044c350>] kvm_release_pfn_clean+0x2c/0x31 [kvm] > [<ffffffffa0460fe4>] mmu_set_spte+0x26e/0x291 [kvm] > [<ffffffffa0462175>] __direct_map+0x9a/0x21a [kvm] > [<ffffffffa04658aa>] remap_spte+0xfe/0x12c [kvm] > [<ffffffffa0458062>] kvm_emulate_hypercall+0x2ad/0x662 [kvm] > [<ffffffffa0082d3a>] handle_vmcall+0x19/0x22 [kvm_intel] > [<ffffffffa00859a8>] vmx_handle_exit+0x5dc/0x605 [kvm_intel] > [<ffffffffa0083f36>] ? vmx_vcpu_run+0x3df/0x3ee [kvm_intel] > [<ffffffffa045aa6e>] kvm_arch_vcpu_ioctl_run+0xa8f/0xd1b [kvm] > [<ffffffffa045962a>] ? kvm_arch_vm_ioctl+0x864/0x8a0 [kvm] > [<ffffffffa04596ef>] ? kvm_arch_vcpu_load+0x89/0x139 [kvm] > [<ffffffffa044cf81>] kvm_vcpu_ioctl+0x10d/0x4d3 [kvm] > [<ffffffffa044dc89>] ? kvm_vm_ioctl+0x2f6/0x329 [kvm] > [<ffffffff811a9504>] ? file_has_perm+0xb4/0xc6 > [<ffffffff810f24ef>] vfs_ioctl+0x2a/0x77 > [<ffffffff810f2a46>] do_vfs_ioctl+0x492/0x4ca > [<ffffffff810f2ad5>] sys_ioctl+0x57/0x7a > [<ffffffff810e6e83>] ? sys_writev+0x5d/0x90 > [<ffffffff8100bb6b>] system_call_fastpath+0x16/0x1b > > here remap_spte is my function which calls __direct_map to map gfn of > guest2 to pfn mapped to gfn of guest 1. > > I cannot understand what is going wrong.Could anyone please help me > with this by giving some pointers about where to I had gone wrong? > > Thanks, > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html