Hello,
On Tue, Jun 11, 2013 at 10:15 AM, Mario Smarduch <mario.smarduch@xxxxxxxxxx> wrote:
I'm still testing your newer patches. However taken your new version into account this can now be removed from the QEMU patch, is that not the case?diff --git a/cpus.c b/cpus.c
index c15ff6c..0c19214 100644
--- a/cpus.c
+++ b/cpus.c
@@ -737,6 +737,26 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
CPUState *cpu = ENV_GET_CPU(env);
int r;
+ /* For now just do a 1:1 vCPU binding as they come online for device
+ * pass through
+ */
+ cpu_set_t cpuset;
+ int ret, i;
+ unsigned long cpu_index = kvm_arch_vcpu_id(cpu);
+
+ CPU_ZERO(&cpuset);
+ CPU_SET(cpu_index, &cpuset);
+ ret = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
+ if(ret != 0) {
+ printf("pthread_setaffinity_np failed to setaffinity to CPU 0\n");
+ exit(-1);
+ }
+
+ CPU_ZERO(&cpuset);
+ pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
+ if(CPU_ISSET(cpu_index,&cpuset))
+ printf("Binding: vCPU %ld --> CPU %d\n", cpu_index, i);
+
qemu_mutex_lock(&qemu_global_mutex);
qemu_thread_get_self(cpu->thread);
cpu->thread_id = qemu_get_thread_id();
Best regards,
Antonios
Antonios
_______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm