Re: [[PATCH 2/2] kvm: enable preemption to register/unregister preempt notifier

2015-07-05 Thread Chen, Tiejun
On 2015/7/3 19:23, Paolo Bonzini wrote: On 03/07/2015 10:56, Tiejun Chen wrote: After commit 1cde2930e154 ("sched/preempt: Add static_key() to preempt_notifiers") is introduced, preempt_notifier_{register, unregister} always hold a mutex, jump_label_mutex. So in current case this shouldn't work

Re: Qemu e1000 broken in -rc1 and -rc2 : bisected

2015-03-08 Thread Chen, Tiejun
On 2015/3/7 3:27, Ken Moffat wrote: On Fri, Mar 06, 2015 at 12:02:40AM +, Ken Moffat wrote: I have a very recent qemu i686 image, using a 3.19.0 kernel and dhclient, which works fine if the host is running a 3.19.0 kernel, but breaks when the host runs 4.0.0-rc1 or -rc2. On those, dhcli

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-25 Thread Chen, Tiejun
On 2014/12/25 18:52, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/24 19:02, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 15:26, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 9:50, Chen, Tiejun wrote: On 2014/12/22 17:23, Jamie Heilman wrote: KVM internal error

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-24 Thread Chen, Tiejun
On 2014/12/24 19:11, Paolo Bonzini wrote: On 24/12/2014 12:02, Jamie Heilman wrote: Running qemu-system-x86_64 -machine pc,accel=kvm -nodefaults works, my real (headless) kvm guests work, but this new patch makes running "qemu-system-x86_64 -machine pc,accel=kvm" fail again, this time with err

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-24 Thread Chen, Tiejun
On 2014/12/24 19:02, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 15:26, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 9:50, Chen, Tiejun wrote: On 2014/12/22 17:23, Jamie Heilman wrote: KVM internal error. Suberror: 1 emulation failure EAX=000de494 EBX= ECX

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-24 Thread Chen, Tiejun
On 2014/12/23 15:26, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 9:50, Chen, Tiejun wrote: On 2014/12/22 17:23, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/21 20:46, Jamie Heilman wrote: With v3.19-rc1 when I run qemu-system-x86_64 -machine pc,accel=kvm I get: KVM: entry

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-22 Thread Chen, Tiejun
On 2014/12/23 15:26, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/23 9:50, Chen, Tiejun wrote: On 2014/12/22 17:23, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/21 20:46, Jamie Heilman wrote: With v3.19-rc1 when I run qemu-system-x86_64 -machine pc,accel=kvm I get: KVM: entry

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-22 Thread Chen, Tiejun
On 2014/12/23 9:50, Chen, Tiejun wrote: On 2014/12/22 17:23, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/21 20:46, Jamie Heilman wrote: With v3.19-rc1 when I run qemu-system-x86_64 -machine pc,accel=kvm I get: KVM: entry failed, hardware error 0x8021 Looks some MSR writing

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-22 Thread Chen, Tiejun
On 2014/12/22 17:23, Jamie Heilman wrote: Chen, Tiejun wrote: On 2014/12/21 20:46, Jamie Heilman wrote: With v3.19-rc1 when I run qemu-system-x86_64 -machine pc,accel=kvm I get: KVM: entry failed, hardware error 0x8021 Looks some MSR writing issues such a failed entry. If you&#x

Re: regression bisected; KVM: entry failed, hardware error 0x80000021

2014-12-21 Thread Chen, Tiejun
On 2014/12/21 20:46, Jamie Heilman wrote: With v3.19-rc1 when I run qemu-system-x86_64 -machine pc,accel=kvm I get: KVM: entry failed, hardware error 0x8021 Looks some MSR writing issues such a failed entry. If you're running a guest on an Intel machine without unrestricted mode support

Re: [PATCH] kvm: iommu: Add cond_resched to legacy device assignment code

2014-12-16 Thread Chen, Tiejun
On 2014/12/16 23:47, Joerg Roedel wrote: From: Joerg Roedel When assigning devices to large memory guests (>=128GB guest memory in the failure case) the functions to create the IOMMU page-tables for the whole guest might run for a very long time. On non-preemptible kernels this might cause Soft

Re: [PATCH] KVM: ia64: remove

2014-11-19 Thread Chen, Tiejun
On 2014/11/20 5:05, Paolo Bonzini wrote: KVM for ia64 has been marked as broken not just once, but twice even, and the last patch from the maintainer is now roughly 5 years old. Time for it to rest in piece. Signed-off-by: Paolo Bonzini --- I think we also need to sync this in Documentation:

Re: [PATCH] kvm: x86: vmx: avoid returning bool to distinguish success from error

2014-11-04 Thread Chen, Tiejun
On 2014/11/5 9:43, Chen, Tiejun wrote: On 2014/11/5 1:33, Paolo Bonzini wrote: Return a negative error code instead, and WARN() when we should be covering the entire 2-bit space of vmcs_field_type's return value. For increased robustness, add a BUILD_BUG_ON checking the ran

Re: [PATCH] kvm: x86: vmx: avoid returning bool to distinguish success from error

2014-11-04 Thread Chen, Tiejun
On 2014/11/5 1:33, Paolo Bonzini wrote: Return a negative error code instead, and WARN() when we should be covering the entire 2-bit space of vmcs_field_type's return value. For increased robustness, add a BUILD_BUG_ON checking the range of vmcs_field_to_offset. Suggested-by: Tiejun Chen Signe

Re: [PATCH v2] KVM: x86: fix access memslots w/o hold srcu read lock

2014-10-30 Thread Chen, Tiejun
On 2014/10/31 14:26, Wanpeng Li wrote: The srcu read lock must be held while accessing memslots (e.g. when using gfn_to_* functions), however, commit c24ae0dcd3e8 ("kvm: x86: Unpin and remove kvm_arch->apic_access_page") call gfn_to_page() in kvm_vcpu_reload_apic_access_page() w/o hold it in vmx_

Re: [PATCH] KVM: x86: fix access memslots w/o hold srcu read lock

2014-10-30 Thread Chen, Tiejun
On 2014/10/31 12:33, Wanpeng Li wrote: The srcu read lock must be held while accessing memslots (e.g. when using gfn_to_* functions), however, commit c24ae0dcd3e8 ("kvm: x86: Unpin and remove kvm_arch->apic_access_page") call gfn_to_page() in kvm_vcpu_reload_apic_access_page() w/o hold it which l

Re: [x86, kvm] WARNING: at arch/x86/kernel/pvclock.c:182 pvclock_init_vsyscall()

2014-09-30 Thread Chen, Tiejun
On 2014/9/30 15:59, Fengguang Wu wrote: Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is commit 3dc4f7cfb7441e5e0fed3a02fc81cdaabd28300a Author: Marcelo Tosatti AuthorDate: Tue Nov 27 23:28:56 2012 -0200 Commit: Marcelo Tosatti CommitDate: Tue Nov 2

Re: [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-02 Thread Chen, Tiejun
On 2014/7/2 14:21, Michael S. Tsirkin wrote: On Thu, Jun 19, 2014 at 05:53:51PM +0800, Tiejun Chen wrote: Originally the reason to probe ISA bridge instead of Dev31:Fun0 is to make graphics device passthrough work easy for VMM, that only need to expose ISA bridge to let driver know the real hard

Re: [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-30 Thread Chen, Tiejun
On 2014/6/30 19:18, Michael S. Tsirkin wrote: On Thu, Jun 19, 2014 at 05:53:51PM +0800, Tiejun Chen wrote: Originally the reason to probe ISA bridge instead of Dev31:Fun0 is to make graphics device passthrough work easy for VMM, that only need to expose ISA bridge to let driver know the real har

Re: [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-29 Thread Chen, Tiejun
On 2014/6/25 15:55, Paolo Bonzini wrote: Il 25/06/2014 09:34, Chen, Tiejun ha scritto: On 2014/6/25 14:48, Paolo Bonzini wrote: Second problem. Your IGD passthrough code currently works with QEMU's PIIX4-based machine. But what happens if you try to extend it, so that Yes, curren

Re: [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-25 Thread Chen, Tiejun
On 2014/6/25 14:48, Paolo Bonzini wrote: Il 22/06/2014 10:25, Chen, Tiejun ha scritto: In qemu-upstream, as you commented we can't create this as a ISA class type explicitly. Note I didn't say that QEMU doesn't like having two ISA bridges. I commented that the firmware w

Re: [Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-24 Thread Chen, Tiejun
On 2014/6/24 10:59, Zhenyu Wang wrote: On 2014.06.19 17:53:51 +0800, Tiejun Chen wrote: Originally the reason to probe ISA bridge instead of Dev31:Fun0 is to make graphics device passthrough work easy for VMM, that only need to expose ISA bridge to let driver know the real hardware underneath. T

Re: [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-22 Thread Chen, Tiejun
On 2014/6/20 20:48, Paolo Bonzini wrote: Il 19/06/2014 11:53, Tiejun Chen ha scritto: so this mean that isa bridge is still represented with Dev31:Func0 like the native OS. Furthermore, currently we're pushing VGA passthrough support into qemu upstream, and with some discussion, we wouldn't set

Re: [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-22 Thread Chen, Tiejun
this ISA bridge. And especially, we wouldn't provide that ISA bridge with an explicit class type in qemu-upstream, so we need to the i915 driver to probe pch by checking devfn. This should work both on the native case and the virtualized case. Thanks Tiejun -Daniel On Fri, Jun 20, 20

Re: [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-20 Thread Chen, Tiejun
Just ping, any comments? Thanks Tiejun On 2014/6/19 17:53, Tiejun Chen wrote: Originally the reason to probe ISA bridge instead of Dev31:Fun0 is to make graphics device passthrough work easy for VMM, that only need to expose ISA bridge to let driver know the real hardware underneath. This is a