-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can 't use kvm_vm_ioctl #109
Comments
hi @wangbaba523 , If I'm not mistaken,
|
yes,I know,I add the nitro code in KVMI subsystem to support it ,in kvm_dev_ioctl add
|
@wangbaba523, can you show |
/* struct kvm* kvmi_get_vm_by_creator(pid_t creator) rv = NULL; spin_lock(&kvm_lock); return rv; |
The KVMi subsystem uses a socket. On one side of this socket is the QEMU process of the introspected guest + the kernel (KVM) and on the other side is the introspection tool. QEMU initiates the connection by writing and reading during a simple handshake (see handshake header). After this, the socket is handed over to KVM, where the KVMi subsystem will use a couple of socket specific functions (see kvmi_msg.c for You'll have to replace the code using the socket functions (from QEMU and KVMi) if you still want to use the KVMi API without a socket. |
Thank you for your reply,but how to call the case of "KVM_INTROSPECTION_HOOK" in kvmi-v7 /virt/kvm/kvm_main.c |
I don't know how would you combine Nitro and KVMi. You said that you don't want to use a socket. I assumed you will replace it with another "channel". |
In short, i want to use the function of |
Do you want to use QEMU to run your introspected VMs or something else? Because the kvm-vmi/qemu project (kvmi-v7 branch) has all that you might need. |
@wangbaba523 from what I understand you are trying to use both Nitro and KVMi and these are 2 incompatibles APIs. What you need to do is to rebuild the Nitro capabilities on top of the KVMi API. You will need to setup a breakpoint system manually and figure out where the syscall entrypoint and exitpoints are, insert them and reconstruct the semantic context. I'm not maintaining Nitro anymore. I hope this helps |
hi,I don't want to use PathToSocket, so I didn't add
<qemu:arg value='-chardev'/>
<qemu:arg value='socket,patch=/tmp/introspector,id=chardev0'>
<........>
to the XML file.
But,In order to use "KVM_INTROSPECTION_HOOK", I am in kvm_dev_ioctl add nitro of "KVM_NITRO_ATTACH_VM" to get the fd communicating with VM, But when we use this fd to communicate with VM, we can 't in kvm_vm_ioctl, could you tell me what's wrong, or how can I add it. Thanks!
The text was updated successfully, but these errors were encountered: