qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] redirecting stdio from a VM guest


From: Alexander Binun
Subject: [Qemu-devel] redirecting stdio from a VM guest
Date: Wed, 28 May 2014 15:51:55 +0300 (IDT)

Dear Friends, 
   First of all, great thanks for your support! I would ask yet one question.

I have a programs running on a VM guest. Its output is valuable (for VM 
introspection) so I want to let the host module know about it. I prefer to 
redirect  ' stdio" of a guest into a device at the host (the latter has the 
name "mydev" and the driver is written for it). 

The command string for qemu will look like qemu -serial /dev/mydev ... But I 
would like to modify the libvirt definition XML file (in /etc/libvirt/qemu). 
Stefan notes in his blog 
(http://blog.vmsplice.net/2011/04/how-to-pass-qemu-command-line-options.html) 
that the options will look like:

<qemu:commandline>
   <qemu:arg value='-serial'/>
   <qemu:arg value='/dev/mydev>
</qemu:commandline>

But the link referenced from the log mentioned above 
(http://wiki.libvirt.org/page/QEMUSwitchToLibvirt) provides a different XML 
mapping for the "serial" command:

<serial type='pty'>
     <target port='0'/>
   </serial>

How should I map my preference -serial /dev/mydev into the XML ? 

Thanks ,
   Alex Binun


  



On Thu 13 Mar 15:01 2014 Alexander Binun wrote:
> Dear Friends, 
>   
>    Thanks for your assistance!
> 
> We would like to ask you a question about the KVM internals. 
> 
> Our module includes a timer which (once in every second) fetches the IDT 
> value of every online VCPU in the system using the kvm_x86_ops->get_idt ; the 
> code looks like:
> 
>   struct kvm_vcpu *curr_vcpu;
>   struct desc_ptr dt;
>   
>   list_for_each_entry(kvm, vms_list, vm_list) 
>   {
>     for (i = 0; i < kvm->online_vcpus.counter; i++) 
>        {
>        curr_vcpu = kvm->vcpus[i];
>        kvm_x86_ops->get_idt(curr_vcpu, &dt); 
>     }      
>   }
> 
> We have noticed that get_idt returns DIFFERENT values for the same VCPU (i.e. 
> for the same value of i that refers to a given VCPU). We cannot understand 
> this issue; could you explain ?
> 
> It is very strange since nobody changes the IDT value (as , for example, 
> rootkits do).
> 
> Regards,
>     the Israeli KVM team
>   
> 
> 







reply via email to

[Prev in Thread] Current Thread [Next in Thread]