All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests] SKIP: Hyper-V SynIC connections are not supported
@ 2017-08-21  9:38 Li Zhijian
  2017-08-30 14:24 ` FAIL hyperv_connections (terminated on SIGABRT)//Re: " Li Zhijian
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zhijian @ 2017-08-21  9:38 UTC (permalink / raw)
  To: kvm; +Cc: Li, Philip

Hi guys

i encountered a problem when i test hyperv_connections case

the test log like below
lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ cat logs/hyperv_connections.log
timeout -k 1s --foreground 90s /home/lizhijian/lkp/qemu-colo/x86_64-softmmu/qemu-system-x86_64 -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel x86/hyperv_connections.flat -smp 2 -cpu kvm64,hv_synic -device hyperv-testdev # -initrd /tmp/tmp.I3s3a37Pi9
enabling apic
enabling apic
paging enabled
cr0 = 80010011
cr3 = 458000
cr4 = 20
SKIP: Hyper-V SynIC connections are not supported
SUMMARY: 1 tests, 1 skipped

I tracked the host kernel kvm module, kvm_hv_hypercall returned 0 when the code is HVCALL_SIGNAL_EVENT when i run this case.
but the test code does return HV_STATUS_INVALID_HYPERCALL_CODE at guest.

so i want to know either does this case require some special hardware platform(cpu fetures) or i miss something(module paramenter etc.) ?


  ------------------------------------
   1202	int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
   1203	{
   1204		u64 param, ingpa, outgpa, ret;
   1205		uint16_t code, rep_idx, rep_cnt, res = HV_STATUS_SUCCESS, rep_done = 0;
   1206		bool fast, longmode;
   ....
   1241	
   1242		printk(KERN_ERR "code %x, rep_cnt %d, rep_idx %d\n", code, rep_cnt, rep_idx);
   1243		/* Hypercall continuation is not supported yet */
   1244		if (rep_cnt || rep_idx) {
   1245			res = HV_STATUS_INVALID_HYPERCALL_CODE;
   1246			printk(KERN_ERR "%s, %d: FUUUUUUUUUUUUK\n", __func__, __LINE__);
   1247			goto set_result;
   1248		}
   1249	
   1250		switch (code) {
   1251		case HVCALL_NOTIFY_LONG_SPIN_WAIT:
   1252			kvm_vcpu_on_spin(vcpu);
   1253			break;
   1254		case HVCALL_POST_MESSAGE:
   1255		case HVCALL_SIGNAL_EVENT:
   1256			printk(KERN_ERR "%s, %d: vcpu_to_synic(vcpu)->active is %d, code %04x\n", __func__, __LINE__, vcpu_to_synic(vcpu)->active, code);
   1257			/* don't bother userspace if it has no way to handle it */
   1258			if (!vcpu_to_synic(vcpu)->active) {
   1259				printk(KERN_ERR "%s, %d: FUUUUUUUUUUUU\n", __func__, __LINE__);
   1260				res = HV_STATUS_INVALID_HYPERCALL_CODE;
   1261				break;
   1262			}
   1263			vcpu->run->exit_reason = KVM_EXIT_HYPERV;
   1264			vcpu->run->hyperv.type = KVM_EXIT_HYPERV_HCALL;
   1265			vcpu->run->hyperv.u.hcall.input = param;
   1266			vcpu->run->hyperv.u.hcall.params[0] = ingpa;
   1267			vcpu->run->hyperv.u.hcall.params[1] = outgpa;
   1268			vcpu->arch.complete_userspace_io =
   1269					kvm_hv_hypercall_complete_userspace;
   1270			return 0;         /////// host will return from here
   1271		default:
   1272			printk(KERN_ERR "%s, %d: FUUUUUUUUUUUU\n", __func__, __LINE__);
   1273			res = HV_STATUS_INVALID_HYPERCALL_CODE;
   1274			break;
   1275		}
   1276	
   1277	set_result:
   1278		printk(KERN_ERR "%s, %d: FUUUUUUUUUUUU\n", __func__, __LINE__);
   1279		ret = res | (((u64)rep_done & 0xfff) << 32);
   1280		kvm_hv_hypercall_set_result(vcpu, ret);
   1281		return 1;
   1282	}

------------------------------------


my test environmnet:
-------------------------------------
lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ /home/lizhijian/lkp/qemu-colo/x86_64-softmmu/qemu-system-x86_64 --version
QEMU emulator version 2.9.91 (v2.10.0-rc1-23-gf22ab6c-dirty)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ git log |head -1
commit 9e5e817be8634bd9800253f404aa9d53d0742131

lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ uname -a
Linux haswell-OptiPlex-9020 4.12.0 #24 SMP Fri Jul 21 13:21:49 CST 2017 x86_64 x86_64 x86_64 GNU/Linux

lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Model name:            Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Stepping:              3
CPU MHz:               2696.923
CPU max MHz:           4000.0000
CPU min MHz:           800.0000
BogoMIPS:              7184.61
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts
-------------------------------------

Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

* FAIL hyperv_connections (terminated on SIGABRT)//Re: [kvm-unit-tests] SKIP: Hyper-V SynIC connections are not supported
  2017-08-21  9:38 [kvm-unit-tests] SKIP: Hyper-V SynIC connections are not supported Li Zhijian
@ 2017-08-30 14:24 ` Li Zhijian
  0 siblings, 0 replies; 2+ messages in thread
From: Li Zhijian @ 2017-08-30 14:24 UTC (permalink / raw)
  To: kvm; +Cc: Li, Philip

Hi,

I got an abort when test hyperv_connections, i think there are bugs on either qemu or kvm-unit-tests.

lizj@500R5H:~/workspace/lkp/kvm-unit-tests$ sudo -E ./tests/hyperv_connections
BUILD_HEAD=d38b111b
timeout -k 1s --foreground 90s /home/lizj/workspace/vgt/qemu-vgt/x86_64-softmmu/qemu-system-x86_64 -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel /tmp/tmp.hmDnWp9rse -smp 2 -cpu kvm64,hv_synic -device hyperv-testdev # -initrd /tmp/tmp.8W8sejLMHY
qemu-system-x86_64: error: failed to set MSR 0x40000090 to 0x0
qemu-system-x86_64: /home/lizj/workspace/vgt/qemu-vgt/target/i386/kvm.c:1788: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
timeout: the monitored command dumped core
QEMU Aborted
FAIL hyperv_connections (terminated on SIGABRT)

lizj@500R5H:~/workspace/lkp/kvm-unit-tests$ /home/lizj/workspace/vgt/qemu-vgt/x86_64-softmmu/qemu-system-x86_64 --version
QEMU emulator version 2.9.94 (v2.10.0-rc4-dirty)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

lizj@500R5H:~/workspace/lkp/kvm-unit-tests$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 61
Model name:            Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Stepping:              4
CPU MHz:               2379.656
CPU max MHz:           3000.0000
CPU min MHz:           500.0000
BogoMIPS:              4789.31
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              4096K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt dtherm ida arat pln pts

lizj@500R5H:~/workspace/lkp/kvm-unit-tests$ uname -a
Linux 500R5H 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


Thanks


On 2017年08月21日 17:38, Li Zhijian wrote:
> Hi guys
>
> i encountered a problem when i test hyperv_connections case
>
> the test log like below
> lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ cat logs/hyperv_connections.log
> timeout -k 1s --foreground 90s /home/lizhijian/lkp/qemu-colo/x86_64-softmmu/qemu-system-x86_64 -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel x86/hyperv_connections.flat -smp 2 -cpu kvm64,hv_synic -device hyperv-testdev # -initrd /tmp/tmp.I3s3a37Pi9
> enabling apic
> enabling apic
> paging enabled
> cr0 = 80010011
> cr3 = 458000
> cr4 = 20
> SKIP: Hyper-V SynIC connections are not supported
> SUMMARY: 1 tests, 1 skipped
>
> I tracked the host kernel kvm module, kvm_hv_hypercall returned 0 when the code is HVCALL_SIGNAL_EVENT when i run this case.
> but the test code does return HV_STATUS_INVALID_HYPERCALL_CODE at guest.
>
> so i want to know either does this case require some special hardware platform(cpu fetures) or i miss something(module paramenter etc.) ?
>
>
>    ------------------------------------
>     1202	int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
>     1203	{
>     1204		u64 param, ingpa, outgpa, ret;
>     1205		uint16_t code, rep_idx, rep_cnt, res = HV_STATUS_SUCCESS, rep_done = 0;
>     1206		bool fast, longmode;
>     ....
>     1241	
>     1242		printk(KERN_ERR "code %x, rep_cnt %d, rep_idx %d\n", code, rep_cnt, rep_idx);
>     1243		/* Hypercall continuation is not supported yet */
>     1244		if (rep_cnt || rep_idx) {
>     1245			res = HV_STATUS_INVALID_HYPERCALL_CODE;
>     1246			printk(KERN_ERR "%s, %d: FUUUUUUUUUUUUK\n", __func__, __LINE__);
>     1247			goto set_result;
>     1248		}
>     1249	
>     1250		switch (code) {
>     1251		case HVCALL_NOTIFY_LONG_SPIN_WAIT:
>     1252			kvm_vcpu_on_spin(vcpu);
>     1253			break;
>     1254		case HVCALL_POST_MESSAGE:
>     1255		case HVCALL_SIGNAL_EVENT:
>     1256			printk(KERN_ERR "%s, %d: vcpu_to_synic(vcpu)->active is %d, code %04x\n", __func__, __LINE__, vcpu_to_synic(vcpu)->active, code);
>     1257			/* don't bother userspace if it has no way to handle it */
>     1258			if (!vcpu_to_synic(vcpu)->active) {
>     1259				printk(KERN_ERR "%s, %d: FUUUUUUUUUUUU\n", __func__, __LINE__);
>     1260				res = HV_STATUS_INVALID_HYPERCALL_CODE;
>     1261				break;
>     1262			}
>     1263			vcpu->run->exit_reason = KVM_EXIT_HYPERV;
>     1264			vcpu->run->hyperv.type = KVM_EXIT_HYPERV_HCALL;
>     1265			vcpu->run->hyperv.u.hcall.input = param;
>     1266			vcpu->run->hyperv.u.hcall.params[0] = ingpa;
>     1267			vcpu->run->hyperv.u.hcall.params[1] = outgpa;
>     1268			vcpu->arch.complete_userspace_io =
>     1269					kvm_hv_hypercall_complete_userspace;
>     1270			return 0;         /////// host will return from here
>     1271		default:
>     1272			printk(KERN_ERR "%s, %d: FUUUUUUUUUUUU\n", __func__, __LINE__);
>     1273			res = HV_STATUS_INVALID_HYPERCALL_CODE;
>     1274			break;
>     1275		}
>     1276	
>     1277	set_result:
>     1278		printk(KERN_ERR "%s, %d: FUUUUUUUUUUUU\n", __func__, __LINE__);
>     1279		ret = res | (((u64)rep_done & 0xfff) << 32);
>     1280		kvm_hv_hypercall_set_result(vcpu, ret);
>     1281		return 1;
>     1282	}
>
> ------------------------------------
>
>
> my test environmnet:
> -------------------------------------
> lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ /home/lizhijian/lkp/qemu-colo/x86_64-softmmu/qemu-system-x86_64 --version
> QEMU emulator version 2.9.91 (v2.10.0-rc1-23-gf22ab6c-dirty)
> Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
>
> lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ git log |head -1
> commit 9e5e817be8634bd9800253f404aa9d53d0742131
>
> lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ uname -a
> Linux haswell-OptiPlex-9020 4.12.0 #24 SMP Fri Jul 21 13:21:49 CST 2017 x86_64 x86_64 x86_64 GNU/Linux
>
> lizhijian@haswell-OptiPlex-9020:~/lkp/kvm-unit-tests$ lscpu
> Architecture:          x86_64
> CPU op-mode(s):        32-bit, 64-bit
> Byte Order:            Little Endian
> CPU(s):                8
> On-line CPU(s) list:   0-7
> Thread(s) per core:    2
> Core(s) per socket:    4
> Socket(s):             1
> NUMA node(s):          1
> Vendor ID:             GenuineIntel
> CPU family:            6
> Model:                 60
> Model name:            Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
> Stepping:              3
> CPU MHz:               2696.923
> CPU max MHz:           4000.0000
> CPU min MHz:           800.0000
> BogoMIPS:              7184.61
> Virtualization:        VT-x
> L1d cache:             32K
> L1i cache:             32K
> L2 cache:              256K
> L3 cache:              8192K
> NUMA node0 CPU(s):     0-7
> Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts
> -------------------------------------
>
> Thanks
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-30 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21  9:38 [kvm-unit-tests] SKIP: Hyper-V SynIC connections are not supported Li Zhijian
2017-08-30 14:24 ` FAIL hyperv_connections (terminated on SIGABRT)//Re: " Li Zhijian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.