Hi,

Thank you for testing the patch.

Yangminqiang <yangminqi...@huawei.com> wrote:
> Hi Tomoki
> 
> I tried your smart patch "cpu isolation and direct interrupt delivery",  
>       http://article.gmane.org/gmane.linux.kernel/1353803
> 
> got  output when I run qemu
>       kvm_set_slave_cpu: Invalid argument
> 
> So I wonder
> * Did I  misuse your patches? 
> * How is the offlined CPU assigned? or the Guest OS will automaticly detect
> and use it?

Currently it is hard-coded in the patch for qemu-kvm just for testing:

diff -Narup a/qemu-kvm-1.0/qemu-kvm-x86.c b/qemu-kvm-1.0/qemu-kvm-x86.c
--- a/qemu-kvm-1.0/qemu-kvm-x86.c       2011-12-04 19:38:06.000000000 +0900
+++ b/qemu-kvm-1.0/qemu-kvm-x86.c       2012-09-06 20:19:44.828163734 +0900
@@ -139,12 +139,28 @@ static int kvm_enable_tpr_access_reporti
     return kvm_vcpu_ioctl(env, KVM_TPR_ACCESS_REPORTING, &tac);
 }

+static int kvm_set_slave_cpu(CPUState *env)
+{
+    int r, slave = env->cpu_index == 0 ? 2 : env->cpu_index == 1 ? 3 : -1;

`slave' is the offlined CPU ID assigned, and `env->cpu_index' is
the virtual CPU ID. You need to modify here and recompile qemu-kvm
(or just offline cpu 2 and 3 for a 2vcpus guest ;) ).

Thanks,
Tomoki Sekiyama
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to