Re: Handle multiple interrupts injection in one vmexit

2014-05-26 Thread Arthur Chunqi Li
Thanks Jan. On Mon, May 26, 2014 at 6:44 PM, Jan Kiszka wrote: > On 2014-05-26 15:51, Arthur Chunqi Li wrote: >> Hi there, >> >> External interrupts are injected in function vcpu_enter_guest, with >> checking KVM_REQ_EVENT. If there are more than one interrupts in

Handle multiple interrupts injection in one vmexit

2014-05-26 Thread Arthur Chunqi Li
? So only NMI is injected in this vmexit, thus when will the other external events injected? I don't see any extra setting of KVM_REQ_EVENT to handle the lower priority interrupts injection in KVM. Thanks, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking Unive

Re: How to disable IDE DMA in KVM or in guest OS

2014-05-14 Thread Arthur Chunqi Li
On Thu, May 15, 2014 at 2:39 PM, Jan Kiszka wrote: > On 2014-05-15 07:54, Arthur Chunqi Li wrote: >> Hi Jan and there, >> >> I want to disable IDE BMDMA in Qemu/KVM and let guest OS uses only PIO >> mode. Are there any configurations in Qemu or KVM to disable the

How to disable IDE DMA in KVM or in guest OS

2014-05-14 Thread Arthur Chunqi Li
disable IDE BMDMA from guest's boot time? Thanks, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More ma

CPUs support APIC virtualization

2014-04-21 Thread Arthur Chunqi Li
lated information? Thanks, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- 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://

The action of Accessed and Dirty bit for EPT

2014-03-06 Thread Arthur Chunqi Li
just parse the EPT paging structure and cannot distinguish Accessed or Dirty in it. Thanks ahead, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body

Guest VMs access a strange address

2014-03-04 Thread Arthur Chunqi Li
kvm->tm_turn, vcpu->vcpu_id, pfn, gfn); } mmu_set_spte(vcpu, iterator.sptep, ACC_ALL, write, &emulate, level, gfn, pfn, prefault, map_writable); direct_pte_prefetch(vcpu, iterator.sptep); ++vcpu->stat.pf_fixed; break; } -- Arthur Chunqi L

Re: How to trace every memory access

2013-12-20 Thread Arthur Chunqi Li
On Fri, Dec 20, 2013 at 7:58 PM, Paolo Bonzini wrote: > Il 20/12/2013 10:15, Arthur Chunqi Li ha scritto: >> Hi Paolo, >> >> When using EPT in KVM, does every vcpu has an EPT paging structure or >> all vcpus share one? > > All MMU structures are in vcpu->ar

Re: How to trace every memory access

2013-12-20 Thread Arthur Chunqi Li
Bonzini wrote: > Il 20/12/2013 10:15, Arthur Chunqi Li ha scritto: >> Hi Paolo, >> >> When using EPT in KVM, does every vcpu has an EPT paging structure or >> all vcpus share one? > > All MMU structures are in vcpu->arch.mmu and vcpu->arch.nested_mmu, so >

Re: How to trace every memory access

2013-12-20 Thread Arthur Chunqi Li
Hi Paolo, When using EPT in KVM, does every vcpu has an EPT paging structure or all vcpus share one? Thanks, Arthur On Wed, Nov 20, 2013 at 6:41 PM, Paolo Bonzini wrote: > Il 20/11/2013 08:55, Arthur Chunqi Li ha scritto: >> Hi Paolo, >> >> Currently I can trap every

Re: How to get to know vcpu status from outside

2013-12-20 Thread Arthur Chunqi Li
Hi Paolo, On Tue, Dec 17, 2013 at 8:28 PM, Paolo Bonzini wrote: > Il 17/12/2013 12:43, Arthur Chunqi Li ha scritto: >> Hi Paolo, >> >> Thanks very much. And...(see below) >> >> On Tue, Dec 17, 2013 at 7:21 PM, Paolo Bonzini wrote: >>> Il 17/12/2013 0

Re: About preemption timer

2013-12-17 Thread Arthur Chunqi Li
On Tue, Dec 17, 2013 at 8:43 PM, Jan Kiszka wrote: > On 2013-12-17 12:31, Arthur Chunqi Li wrote: >> Hi Jan, >> >> On Tue, Dec 17, 2013 at 7:21 PM, Jan Kiszka wrote: >>> On 2013-12-17 10:32, Arthur Chunqi Li wrote: >>>> Hi Jan and Paolo, >>>

Re: How to get to know vcpu status from outside

2013-12-17 Thread Arthur Chunqi Li
Hi Paolo, Thanks very much. And...(see below) On Tue, Dec 17, 2013 at 7:21 PM, Paolo Bonzini wrote: > Il 17/12/2013 07:11, Arthur Chunqi Li ha scritto: >> Hi Paolo, >> >> Since VCPU is managed the same as a process in kernel, how can I know >> the status (running,

Re: About preemption timer

2013-12-17 Thread Arthur Chunqi Li
Hi Jan, On Tue, Dec 17, 2013 at 7:21 PM, Jan Kiszka wrote: > On 2013-12-17 10:32, Arthur Chunqi Li wrote: >> Hi Jan and Paolo, >> >> I've tried to use preemption timer in KVM to trap vcpu regularly, but >> there's something unexpected. I run a VM with 4 vcpus

About preemption timer

2013-12-17 Thread Arthur Chunqi Li
frequency. Could u help me explain this phenomenon? Thanks, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org Mo

How to get to know vcpu status from outside

2013-12-16 Thread Arthur Chunqi Li
kernel thread send a message to force vcpu1 trap to VMM? How can I do this? Thanks very much, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message

PMU in KVM

2013-11-26 Thread Arthur Chunqi Li
/disable) it? Thanks, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- 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.

How to trace every memory access

2013-11-19 Thread Arthur Chunqi Li
Hi Paolo, Currently I can trap every first write/read to a memory page from guest VM (add codes in tdp_page_fault). If I want to trace every memory access to a page, how can I achieve such goal in KVM? Thanks, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking

Re: EPT page fault procedure

2013-11-03 Thread Arthur Chunqi Li
Hi Paolo, On Thu, Oct 31, 2013 at 6:54 PM, Paolo Bonzini wrote: > Il 31/10/2013 10:07, Arthur Chunqi Li ha scritto: >> Sorry to disturb you with so many trivial questions in KVM EPT memory >> management and thanks for your patience. > > No problem, please remain onlist tho

Re: Calling to kvm_mmu_load

2013-10-31 Thread Arthur Chunqi Li
Hi Paolo, On Tue, Oct 29, 2013 at 8:55 PM, Paolo Bonzini wrote: > Il 29/10/2013 06:39, Arthur Chunqi Li ha scritto: >> What is the dirty page tracking code path? I find a obsoleted flag >> "dirty_page_log_all" in the very previous codes, but I cannot get the >>

Re: Calling to kvm_mmu_load

2013-10-30 Thread Arthur Chunqi Li
On Tue, Oct 29, 2013 at 8:55 PM, Paolo Bonzini wrote: > Il 29/10/2013 06:39, Arthur Chunqi Li ha scritto: >> What is the dirty page tracking code path? I find a obsoleted flag >> "dirty_page_log_all" in the very previous codes, but I cannot get the >> most recent

Re: Calling to kvm_mmu_load

2013-10-28 Thread Arthur Chunqi Li
Hi Paolo, On Fri, Oct 25, 2013 at 8:43 AM, Paolo Bonzini wrote: > Il 24/10/2013 08:55, Arthur Chunqi Li ha scritto: >> Hi Paolo, >> >> Thanks for your reply. >> >> On Wed, Oct 23, 2013 at 2:21 PM, Paolo Bonzini wrote: >>> Il 21/10/2013 08:56,

Re: Calling to kvm_mmu_load

2013-10-24 Thread Arthur Chunqi Li
Hi Paolo, Thanks for your reply. On Wed, Oct 23, 2013 at 2:21 PM, Paolo Bonzini wrote: > Il 21/10/2013 08:56, Arthur Chunqi Li ha scritto: >> Hi there, >> >> I noticed that kvm_mmu_reload() is called every time in vcpu enter, >> and kvm_mmu_load() is called in thi

Calling to kvm_mmu_load

2013-10-21 Thread Arthur Chunqi Li
, kvm_mmu_unload() is called to invalid root_hpa, but this condition cannot cover all occasions. Thanks, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a

Re: [PATCH v5] KVM: nVMX: Fully support of nested VMX preemption timer

2013-10-11 Thread Arthur Chunqi Li
Hi Jan, On Fri, Oct 11, 2013 at 12:12 AM, Jan Kiszka wrote: > On 2013-10-02 20:47, Jan Kiszka wrote: >> On 2013-09-30 11:08, Jan Kiszka wrote: >>> On 2013-09-26 17:04, Paolo Bonzini wrote: >>>> Il 16/09/2013 10:11, Arthur Chunqi Li ha scritto: >>>>>

[PATCH v2] kvm-unit-tests: VMX: Comments on the framework and writing test cases

2013-09-22 Thread Arthur Chunqi Li
Add some comments on the framework of nested VMX testing, and guides of how to write new test cases. Signed-off-by: Arthur Chunqi Li --- x86/vmx.c | 30 ++ x86/vmx_tests.c | 13 + 2 files changed, 43 insertions(+) diff --git a/x86/vmx.c b/x86

[PATCH] kvm-unit-tests: VMX: Comments on the framework and writing test cases

2013-09-16 Thread Arthur Chunqi Li
Add some comments on the framework of nested VMX testing, and guides of how to write new test cases. Signed-off-by: Arthur Chunqi Li --- x86/vmx.c | 25 + x86/vmx_tests.c | 13 + 2 files changed, 38 insertions(+) diff --git a/x86/vmx.c b/x86/vmx.c

[PATCH v5] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-16 Thread Arthur Chunqi Li
X. With this patch, nested VMX preemption timer features are fully supported. Signed-off-by: Arthur Chunqi Li --- ChangeLog to v4: Format changes and remove a flag in nested_vmx. arch/x86/include/uapi/asm/msr-index.h |1 + arch/x86/kvm/vmx.c

Re: [PATCH v4] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-15 Thread Arthur Chunqi Li
On Sun, Sep 15, 2013 at 8:31 PM, Gleb Natapov wrote: > On Fri, Sep 06, 2013 at 10:04:51AM +0800, Arthur Chunqi Li wrote: >> This patch contains the following two changes: >> 1. Fix the bug in nested preemption timer support. If vmexit L2->L0 >> with some reasons not em

Re: [PATCH v4] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-15 Thread Arthur Chunqi Li
On Sat, Sep 14, 2013 at 1:15 AM, Paolo Bonzini wrote: > Il 06/09/2013 04:04, Arthur Chunqi Li ha scritto: >> This patch contains the following two changes: >> 1. Fix the bug in nested preemption timer support. If vmexit L2->L0 >> with some reasons not emulated by L1, preem

Re: [PATCH v4] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-15 Thread Arthur Chunqi Li
On Sat, Sep 14, 2013 at 3:44 PM, Jan Kiszka wrote: > On 2013-09-13 19:15, Paolo Bonzini wrote: >> Il 06/09/2013 04:04, Arthur Chunqi Li ha scritto: >>> +preempt_val_l1 = delta_tsc_l1 >> preempt_scale; >>> +if (preempt_val_l2 <= preempt_val_l1)

Re: [RFC PATCH 0/2] kvm-unit-tests: VMX: vmentry checks

2013-09-12 Thread Arthur Chunqi Li
reserved Invalid host EFER - LMA & LME Invalid CS selector field - RPL Invalid TR selector field - RPL You can find detailed description of these cases in Intel SDM 26.1 and 26.2. Arthur On Fri, Sep 13, 2013 at 2:35 PM, Arthur Chunqi Li wrote: > This series implement a framework to capture ear

[RFC PATCH 0/2] kvm-unit-tests: VMX: vmentry checks

2013-09-12 Thread Arthur Chunqi Li
crash test environment and affect the following tests. They are hoped to uncomment after related bugs are fixed. Arthur Chunqi Li (2): kvm-unit-tests: VMX: Add vmentry failed handler to framework kvm-unit-tests: VMX: Add test cases for vmentry checks lib/x86/vm.h|3 + x86/vmx.c

[RFC PATCH 2/2] kvm-unit-tests: VMX: Add test cases for vmentry checks

2013-09-12 Thread Arthur Chunqi Li
. Signed-off-by: Arthur Chunqi Li --- x86/vmx.h | 22 +- x86/vmx_tests.c | 647 +++ 2 files changed, 668 insertions(+), 1 deletion(-) diff --git a/x86/vmx.h b/x86/vmx.h index 469b4dc..aeee602 100644 --- a/x86/vmx.h +++ b/x86/vmx.h

[RFC PATCH 1/2] kvm-unit-tests: VMX: Add vmentry failed handler to framework

2013-09-12 Thread Arthur Chunqi Li
-off-by: Arthur Chunqi Li --- lib/x86/vm.h|3 +++ x86/vmx.c | 34 -- x86/vmx.h | 15 +-- x86/vmx_tests.c | 31 +-- 4 files changed, 57 insertions(+), 26 deletions(-) diff --git a/lib/x86/vm.h b/lib/x86

The state of vmexit/vmenter MSR store/load in nested vmx

2013-09-12 Thread Arthur Chunqi Li
Hi Jan and maillist, Does nest VMX support vmexit MSR store/load and vmenter MSR load now? I tried to set "VM-exit MSR-store address" with valid address and set "VM-exit MSR-store count" to 1, then the vmenter fails. Anything else should I set to use these features? Arthur

Re: How to recreate MOV-SS blocking vmentry fail

2013-09-11 Thread Arthur Chunqi Li
On Wed, Sep 11, 2013 at 9:03 PM, Gleb Natapov wrote: > On Wed, Sep 11, 2013 at 03:01:07PM +0200, Paolo Bonzini wrote: >> Il 11/09/2013 14:53, Gleb Natapov ha scritto: >> >> > I was trying to recreate MOV-SS blocking vmentry fail (Intel SDM 26.1, >> >> > 5. a). Here the manual refers to Table 24-3,

Re: How to recreate MOV-SS blocking vmentry fail

2013-09-11 Thread Arthur Chunqi Li
On Wed, Sep 11, 2013 at 8:53 PM, Gleb Natapov wrote: > On Wed, Sep 11, 2013 at 08:49:28PM +0800, Arthur Chunqi Li wrote: >> Hi Gleb, Paolo and related folks, >> >> I was trying to recreate MOV-SS blocking vmentry fail (Intel SDM 26.1, >> 5. a). Here the manual refers

How to recreate MOV-SS blocking vmentry fail

2013-09-11 Thread Arthur Chunqi Li
Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- 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

Re: [PATCH] kvm-unit-tests: VMX: Fix two minor bugs

2013-09-10 Thread Arthur Chunqi Li
based on vmx? Thanks, Arthur On Wed, Sep 11, 2013 at 11:11 AM, Arthur Chunqi Li wrote: > This patch just contains two minor changes to EPT framwork. > 1. Reorder macro definition > 2. Fix bug of setting CPU_EPT without check. > > Signed-off-by: Arthur Chunqi Li > --- > x

[PATCH] kvm-unit-tests: VMX: Fix two minor bugs

2013-09-10 Thread Arthur Chunqi Li
This patch just contains two minor changes to EPT framwork. 1. Reorder macro definition 2. Fix bug of setting CPU_EPT without check. Signed-off-by: Arthur Chunqi Li --- x86/vmx.h |2 +- x86/vmx_tests.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/vmx.h

Re: [PATCH v3 1/6] KVM: nVMX: Replace kvm_set_cr0 with vmx_set_cr0 in load_vmcs12_host_state

2013-09-10 Thread Arthur Chunqi Li
); >> /* >>* If we did fpu_activate()/fpu_deactivate() during L2's run, we need >>* to apply the same changes to L1's vmcs. We just set cr0 correctly, >> -- >> 1.7.3.4 > > -- > Gleb. -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- 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

Re: Correct way of tracking reads on given gfn ?

2013-09-09 Thread Arthur Chunqi Li
On Mon, Sep 9, 2013 at 8:29 PM, Gleb Natapov wrote: > On Mon, Sep 09, 2013 at 12:53:02PM +0200, Paolo Bonzini wrote: >> Il 09/09/2013 12:22, SPA ha scritto: >> > Thanks Paolo. >> > >> > Is there a way where reads would trap ? >> > >> > I explored a bit on PM_PRESENT_MASK. Though its not READ bit,

[PATCH] kvm-unit-tests: VMX: Fix some nested EPT related bugs

2013-09-09 Thread Arthur Chunqi Li
ot; is not used and will return unexpected value when read. Signed-off-by: Arthur Chunqi Li --- x86/vmx.c | 13 ++--- x86/vmx_tests.c |2 -- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/x86/vmx.c b/x86/vmx.c index 87d1d55..9db4ef4 100644 --- a/x86/vmx.c +++ b

Re: [PATCH 2/2] kvm-unit-tests: VMX: Test cases for nested EPT

2013-09-09 Thread Arthur Chunqi Li
On Mon, Sep 9, 2013 at 12:57 PM, Arthur Chunqi Li wrote: > Some test cases for nested EPT features, including: > 1. EPT basic framework tests: read, write and remap. > 2. EPT misconfigurations test cases: page permission mieconfiguration > and memory type misconfiguration > 3. EPT

Re: [PATCH 2/2] kvm-unit-tests: VMX: Test cases for nested EPT

2013-09-09 Thread Arthur Chunqi Li
On Mon, Sep 9, 2013 at 9:56 PM, Paolo Bonzini wrote: > Il 09/09/2013 06:57, Arthur Chunqi Li ha scritto: >> Some test cases for nested EPT features, including: >> 1. EPT basic framework tests: read, write and remap. >> 2. EPT misconfigurations test cases: page permission mi

Re: [PATCH] kvm-unit-tests: VMX: Test suite for preemption timer

2013-09-09 Thread Arthur Chunqi Li
On Mon, Sep 9, 2013 at 8:51 PM, Paolo Bonzini wrote: > Il 05/09/2013 11:22, Arthur Chunqi Li ha scritto: >> Hi Jan, Gleb and Paolo, >> >> It suddenly occurred to me that, if guest's PIN_PREEMPT disabled while >> EXI_SAVE_PREEMPT_VALUE enabled, what will happen? T

Re: [PATCH 0/2] kvm-unit-tests: VMX: Test nested EPT features

2013-09-09 Thread Arthur Chunqi Li
On Mon, Sep 9, 2013 at 3:17 PM, Jan Kiszka wrote: > On 2013-09-09 06:57, Arthur Chunqi Li wrote: >> This series of patches provide the framework of nested EPT and some test >> cases for nested EPT features. >> >> Arthur Chunqi Li (2): >> kvm-unit-tests: VMX: Th

[PATCH 0/2] kvm-unit-tests: VMX: Test nested EPT features

2013-09-08 Thread Arthur Chunqi Li
This series of patches provide the framework of nested EPT and some test cases for nested EPT features. Arthur Chunqi Li (2): kvm-unit-tests: VMX: The framework of EPT for nested VMX testing kvm-unit-tests: VMX: Test cases for nested EPT x86/vmx.c | 159

[PATCH 2/2] kvm-unit-tests: VMX: Test cases for nested EPT

2013-09-08 Thread Arthur Chunqi Li
Signed-off-by: Arthur Chunqi Li --- x86/vmx_tests.c | 266 +++ 1 file changed, 266 insertions(+) diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c index c1b39f4..a0b9824 100644 --- a/x86/vmx_tests.c +++ b/x86/vmx_tests.c @@ -1,4 +1,36 @@ #include

[PATCH 1/2] kvm-unit-tests: VMX: The framework of EPT for nested VMX testing

2013-09-08 Thread Arthur Chunqi Li
The framework of EPT for nested VMX, including functions to build up EPT paging structures, read/set EPT PTEs and setup a range of 1:1 map EPT. Signed-off-by: Arthur Chunqi Li --- x86/vmx.c | 159 +++-- x86/vmx.h | 76

[PATCH v2] kvm-unit-tests: VMX: Test suite for preemption timer

2013-09-05 Thread Arthur Chunqi Li
r will never trigger if the value is large enough. 3. Some other aspects are tested, e.g. preempt without save, preempt when value is 0. Signed-off-by: Arthur Chunqi Li --- ChangeLog to v1: 1. Add test of EXI_SAVE_PREEMPT enable and PIN_PREEMPT disable 2. Add test of PIN_PREEMPT enable and EXI_SAVE_P

[PATCH v4] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-05 Thread Arthur Chunqi Li
X. With this patch, nested VMX preemption timer features are fully supported. Signed-off-by: Arthur Chunqi Li --- ChangeLog to v3: Move nested_adjust_preemption_timer to the latest place just before vmenter. Some minor changes. arch/x86/include/uapi/asm/msr-index.h |1 + arch/

Re: [PATCH v3] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-05 Thread Arthur Chunqi Li
On Thu, Sep 5, 2013 at 7:05 PM, Zhang, Yang Z wrote: > Arthur Chunqi Li wrote on 2013-09-05: >> > Arthur Chunqi Li wrote on 2013-09-05: >> >> On Thu, Sep 5, 2013 at 3:45 PM, Zhang, Yang Z >> >> >> >> wrote: >> >> > Arthur Chunqi Li

Re: [PATCH v3] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-05 Thread Arthur Chunqi Li
On Thu, Sep 5, 2013 at 5:24 PM, Zhang, Yang Z wrote: > Arthur Chunqi Li wrote on 2013-09-05: >> On Thu, Sep 5, 2013 at 3:45 PM, Zhang, Yang Z >> wrote: >> > Arthur Chunqi Li wrote on 2013-09-04: >> >> This patch contains the following two changes: >> &g

Re: [PATCH] kvm-unit-tests: VMX: Test suite for preemption timer

2013-09-05 Thread Arthur Chunqi Li
Hi Jan, Gleb and Paolo, It suddenly occurred to me that, if guest's PIN_PREEMPT disabled while EXI_SAVE_PREEMPT_VALUE enabled, what will happen? The preempt value in vmcs will not be affected, yes? This cases fails to test in this patch. Arthur On Wed, Sep 4, 2013 at 11:26 PM, Arthur Chun

Re: [PATCH v3] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-05 Thread Arthur Chunqi Li
On Thu, Sep 5, 2013 at 3:45 PM, Zhang, Yang Z wrote: > Arthur Chunqi Li wrote on 2013-09-04: >> This patch contains the following two changes: >> 1. Fix the bug in nested preemption timer support. If vmexit L2->L0 with some >> reasons not emulated by L1, preemption timer

Re: [PATCH] kvm-unit-tests: VMX: Add the framework of EPT

2013-09-04 Thread Arthur Chunqi Li
mush, Arthur On Mon, Sep 2, 2013 at 5:38 PM, Arthur Chunqi Li wrote: > There must have some minor revisions to be done in this patch, so this > is mainly a RFC mail. > > Besides, I'm not quite clear what we should test in nested EPT > modules, and I bet writers of nested EPT mu

[PATCH] kvm-unit-tests: VMX: Test suite for preemption timer

2013-09-04 Thread Arthur Chunqi Li
r will never trigger if the value is large enough. Signed-off-by: Arthur Chunqi Li --- x86/vmx.h |3 ++ x86/vmx_tests.c | 117 +++ 2 files changed, 120 insertions(+) diff --git a/x86/vmx.h b/x86/vmx.h index 28595d8..ebc8cfd 100644 ---

[PATCH v3] KVM: nVMX: Fully support of nested VMX preemption timer

2013-09-04 Thread Arthur Chunqi Li
X. With this patch, nested VMX preemption timer features are fully supported. Signed-off-by: Arthur Chunqi Li --- This series depends on queue. arch/x86/include/uapi/asm/msr-index.h |1 + arch/x86/kvm/vmx.c| 51 ++--- 2 files changed, 48 ins

Information of EPT violation VMEXIT

2013-09-03 Thread Arthur Chunqi Li
it is means when set and clear. I always get the exit qualification with this bit set, how to design a violation with this bit clear? Thanks, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- To unsubscribe from this list: send the line &

Re: Corner cases of I/O bitmap

2013-09-03 Thread Arthur Chunqi Li
On Tue, Sep 3, 2013 at 7:48 PM, Gleb Natapov wrote: > On Tue, Sep 03, 2013 at 07:45:47PM +0800, Arthur Chunqi Li wrote: >> On Tue, Sep 3, 2013 at 7:19 PM, Gleb Natapov wrote: >> > On Mon, Aug 12, 2013 at 08:35:57PM +0800, Arthur Chunqi Li wrote: >> >> Hi Gleb a

Re: Corner cases of I/O bitmap

2013-09-03 Thread Arthur Chunqi Li
On Tue, Sep 3, 2013 at 7:19 PM, Gleb Natapov wrote: > On Mon, Aug 12, 2013 at 08:35:57PM +0800, Arthur Chunqi Li wrote: >> Hi Gleb and Paolo, >> There are some corner cases when testing I/O bitmaps, and I don't know >> the exact action of HW. >> > A little bi

Re: [PATCH] kvm-unit-tests: VMX: Add the framework of EPT

2013-09-02 Thread Arthur Chunqi Li
ow to test nested EPT is welcome. Please help me CC EPT-related guys if anyone knows. Thanks, Arthur On Mon, Sep 2, 2013 at 5:26 PM, Arthur Chunqi Li wrote: > Add a framework of EPT in nested VMX testing, including a set of > functions to construct and read EPT paging structures and a si

[PATCH] kvm-unit-tests: VMX: Add the framework of EPT

2013-09-02 Thread Arthur Chunqi Li
Add a framework of EPT in nested VMX testing, including a set of functions to construct and read EPT paging structures and a simple read/write test of EPT remapping from guest to host. Signed-off-by: Arthur Chunqi Li --- x86/vmx.c | 132 -- x86

Re: [PATCH v2 0/4] kvm-unit-tests: Add a series of test cases

2013-09-02 Thread Arthur Chunqi Li
Hi Gleb, Paolo and Jan, Would you please review this series of codes when you can spare time? Jan has review it and, of course, further suggestions are welcomed. Arthur On Thu, Aug 15, 2013 at 7:45 PM, Arthur Chunqi Li wrote: > Add a series of test cases for nested VMX in kvm-unit-te

Some questions about nested EPT

2013-08-30 Thread Arthur Chunqi Li
se tell me and CC the authors for more detailed discussion. Thanks, Arthur -- Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.k

Re: [PATCH v2] KVM: nVMX: Fully support of nested VMX preemption timer

2013-08-26 Thread Arthur Chunqi Li
On Mon, Aug 26, 2013 at 3:23 PM, Jan Kiszka wrote: > On 2013-08-25 17:26, Arthur Chunqi Li wrote: >> This patch contains the following two changes: >> 1. Fix the bug in nested preemption timer support. If vmexit L2->L0 >> with some reasons not emulated by L1, preemption

[PATCH v2] KVM: nVMX: Fully support of nested VMX preemption timer

2013-08-25 Thread Arthur Chunqi Li
X. With this patch, nested VMX preemption timer features are fully supported. Signed-off-by: Arthur Chunqi Li --- arch/x86/kvm/vmx.c | 49 - 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c

Re: [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer

2013-08-25 Thread Arthur Chunqi Li
On Sun, Aug 25, 2013 at 4:53 PM, Jan Kiszka wrote: > On 2013-08-25 10:41, Arthur Chunqi Li wrote: >> On Sun, Aug 25, 2013 at 4:18 PM, Abel Gordon wrote: >>> >>> >>> kvm-ow...@vger.kernel.org wrote on 25/08/2013 10:54:13 AM: >>> >>>> From:

Re: [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer

2013-08-25 Thread Arthur Chunqi Li
of nested VMX > preemption >> >>> timer >> >>>> Sent by: kvm-ow...@vger.kernel.org >> >>>> >> >>>> On 2013-08-24 20:44, root wrote: >> >>>>> This patch contains the following two changes: >> >>>

Re: [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer

2013-08-25 Thread Arthur Chunqi Li
t; with some reasons not emulated by L1, preemption timer value should >> >>> be save in such exits. >> >>> 2. Add support of "Save VMX-preemption timer value" VM-Exit controls >> >>> to nVMX. >> >>> >>

Re: [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer

2013-08-25 Thread Arthur Chunqi Li
On Sun, Aug 25, 2013 at 3:44 PM, Jan Kiszka wrote: > On 2013-08-25 09:37, Arthur Chunqi Li wrote: >> On Sun, Aug 25, 2013 at 3:28 PM, Jan Kiszka wrote: >>> On 2013-08-25 09:24, Arthur Chunqi Li wrote: >>>> On Sun, Aug 25, 2013 at 2:44 PM, Jan Kiszka wrote: >>

Re: [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer

2013-08-25 Thread Arthur Chunqi Li
emulated by L1, preemption timer value should >> > be save in such exits. >> > 2. Add support of "Save VMX-preemption timer value" VM-Exit controls >> > to nVMX. >> > >> > With this patch, nested VMX preemption timer features are fully >> &

Re: [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer

2013-08-25 Thread Arthur Chunqi Li
On Sun, Aug 25, 2013 at 3:28 PM, Jan Kiszka wrote: > On 2013-08-25 09:24, Arthur Chunqi Li wrote: >> On Sun, Aug 25, 2013 at 2:44 PM, Jan Kiszka wrote: >>> On 2013-08-24 20:44, root wrote: >>>> This patch contains the following two changes: >>>> 1. Fix

Re: [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer

2013-08-25 Thread Arthur Chunqi Li
hould >> be save in such exits. >> 2. Add support of "Save VMX-preemption timer value" VM-Exit controls >> to nVMX. >> >> With this patch, nested VMX preemption timer features are fully >> supported. >> >> Signed-off-by: Arthur Chunqi Li >

[PATCH v2 0/4] kvm-unit-tests: Add a series of test cases

2013-08-15 Thread Arthur Chunqi Li
Add a series of test cases for nested VMX in kvm-unit-tests. Arthur Chunqi Li (4): kvm-unit-tests: VMX: Add test cases for PAT and EFER kvm-unit-tests: VMX: Add test cases for CR0/4 shadowing kvm-unit-tests: VMX: Add test cases for I/O bitmaps kvm-unit-tests: VMX: Add test cases for

[PATCH v2 4/4] kvm-unit-tests: VMX: Add test cases for instruction interception

2013-08-15 Thread Arthur Chunqi Li
Signed-off-by: Arthur Chunqi Li --- x86/vmx.c |3 +- x86/vmx.h |7 +++ x86/vmx_tests.c | 152 +++ 3 files changed, 160 insertions(+), 2 deletions(-) diff --git a/x86/vmx.c b/x86/vmx.c index ca36d35..c346070 100644 --- a/x86

[PATCH v2 3/4] kvm-unit-tests: VMX: Add test cases for I/O bitmaps

2013-08-15 Thread Arthur Chunqi Li
Add test cases for I/O bitmaps, including corner cases. Test includes: pass & trap, in & out, different I/O width, low & high I/O bitmap, partial I/O pass, overrun (inl 0x). Signed-off-by: Arthur Chunqi Li --- x86/vmx.h |6 +-- x86/vmx_te

[PATCH v2 1/4] kvm-unit-tests: VMX: Add test cases for PAT and EFER

2013-08-15 Thread Arthur Chunqi Li
Add test cases for ENT_LOAD_PAT, ENT_LOAD_EFER, EXI_LOAD_PAT, EXI_SAVE_PAT, EXI_LOAD_EFER, EXI_SAVE_PAT flags in enter/exit control fields. Signed-off-by: Arthur Chunqi Li --- x86/vmx.h |7 +++ x86/vmx_tests.c | 185 +++ 2 files

[PATCH v2 2/4] kvm-unit-tests: VMX: Add test cases for CR0/4 shadowing

2013-08-15 Thread Arthur Chunqi Li
from shadowed value). Signed-off-by: Arthur Chunqi Li --- lib/x86/vm.h|4 + x86/vmx_tests.c | 218 +++ 2 files changed, 222 insertions(+) diff --git a/lib/x86/vm.h b/lib/x86/vm.h index eff6f72..6e0ce2b 100644 --- a/lib/x86/vm.h +++ b/lib

Re: [PATCH 3/4] kvm-unit-tests: VMX: Add test cases for I/O bitmaps

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 4:23 PM, Jan Kiszka wrote: > On 2013-08-15 10:20, Arthur Chunqi Li wrote: >> On Thu, Aug 15, 2013 at 4:13 PM, Jan Kiszka wrote: >>> On 2013-08-15 10:09, Arthur Chunqi Li wrote: >>>> On Thu, Aug 15, 2013 at 3:58 PM, Jan Kiszka wrote: >

Re: [PATCH 4/4] kvm-unit-tests: VMX: Add test cases for instruction interception

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 4:40 PM, Jan Kiszka wrote: > On 2013-08-15 10:35, Arthur Chunqi Li wrote: >> On Thu, Aug 15, 2013 at 4:20 PM, Jan Kiszka wrote: >>> On 2013-08-15 10:16, Arthur Chunqi Li wrote: >>>> On Thu, Aug 15, 2013 at 4:06 PM, Jan Kiszka wrote: >

Re: [PATCH 4/4] kvm-unit-tests: VMX: Add test cases for instruction interception

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 4:20 PM, Jan Kiszka wrote: > On 2013-08-15 10:16, Arthur Chunqi Li wrote: >> On Thu, Aug 15, 2013 at 4:06 PM, Jan Kiszka wrote: >>> On 2013-08-13 17:56, Arthur Chunqi Li wrote: >>>> Add test cases for instruction interception, includin

Re: [PATCH 3/4] kvm-unit-tests: VMX: Add test cases for I/O bitmaps

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 4:13 PM, Jan Kiszka wrote: > On 2013-08-15 10:09, Arthur Chunqi Li wrote: >> On Thu, Aug 15, 2013 at 3:58 PM, Jan Kiszka wrote: >>> On 2013-08-15 09:51, Arthur Chunqi Li wrote: >>>> On Thu, Aug 15, 2013 at 3:40 PM, Jan Kiszka wrote: >

Re: [PATCH 4/4] kvm-unit-tests: VMX: Add test cases for instruction interception

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 4:06 PM, Jan Kiszka wrote: > On 2013-08-13 17:56, Arthur Chunqi Li wrote: >> Add test cases for instruction interception, including three types: >> 1. Primary Processor-Based VM-Execution Controls (HLT/INVLPG/MWAIT/ >> RDPMC/RDTSC/MONITOR/PAUSE) >

Re: [PATCH 3/4] kvm-unit-tests: VMX: Add test cases for I/O bitmaps

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 3:58 PM, Jan Kiszka wrote: > On 2013-08-15 09:51, Arthur Chunqi Li wrote: >> On Thu, Aug 15, 2013 at 3:40 PM, Jan Kiszka wrote: >>> On 2013-08-13 17:56, Arthur Chunqi Li wrote: >>>> Add test cases for I/O bitmaps, including corner cases. &g

Re: [PATCH 1/4] kvm-unit-tests: VMX: Add test cases for PAT and EFER

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 3:48 PM, Jan Kiszka wrote: > On 2013-08-15 09:41, Arthur Chunqi Li wrote: >> On Thu, Aug 15, 2013 at 3:17 PM, Jan Kiszka wrote: >>> On 2013-08-13 17:56, Arthur Chunqi Li wrote: >>>> Add test cases for ENT_LOAD_PAT, ENT_LOAD_EFER, E

Re: [PATCH 2/4] kvm-unit-tests: VMX: Add test cases for CR0/4 shadowing

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 3:47 PM, Jan Kiszka wrote: > On 2013-08-15 09:40, Arthur Chunqi Li wrote: >> On Thu, Aug 15, 2013 at 3:30 PM, Jan Kiszka wrote: >>> On 2013-08-13 17:56, Arthur Chunqi Li wrote: >>>> Add testing for CR0/4 shadowing. >>> >>&g

Re: [PATCH 3/4] kvm-unit-tests: VMX: Add test cases for I/O bitmaps

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 3:40 PM, Jan Kiszka wrote: > On 2013-08-13 17:56, Arthur Chunqi Li wrote: >> Add test cases for I/O bitmaps, including corner cases. > > Would be good to briefly list the corner cases here. > >> >> Signed-off-by: Arthur Chunqi Li >

Re: [PATCH 1/4] kvm-unit-tests: VMX: Add test cases for PAT and EFER

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 3:17 PM, Jan Kiszka wrote: > On 2013-08-13 17:56, Arthur Chunqi Li wrote: >> Add test cases for ENT_LOAD_PAT, ENT_LOAD_EFER, EXI_LOAD_PAT, >> EXI_SAVE_PAT, EXI_LOAD_EFER, EXI_SAVE_PAT flags in enter/exit >> control fields. >> >>

Re: [PATCH 2/4] kvm-unit-tests: VMX: Add test cases for CR0/4 shadowing

2013-08-15 Thread Arthur Chunqi Li
On Thu, Aug 15, 2013 at 3:30 PM, Jan Kiszka wrote: > On 2013-08-13 17:56, Arthur Chunqi Li wrote: >> Add testing for CR0/4 shadowing. > > A few sentences on the test strategy would be good. > >> >> Signed-off-by: Arthur Chunqi Li >> --- >> lib/x86/v

[PATCH 2/4] kvm-unit-tests: VMX: Add test cases for CR0/4 shadowing

2013-08-13 Thread Arthur Chunqi Li
Add testing for CR0/4 shadowing. Signed-off-by: Arthur Chunqi Li --- lib/x86/vm.h|4 + x86/vmx_tests.c | 218 +++ 2 files changed, 222 insertions(+) diff --git a/lib/x86/vm.h b/lib/x86/vm.h index eff6f72..6e0ce2b 100644 --- a/lib/x86

[PATCH 4/4] kvm-unit-tests: VMX: Add test cases for instruction interception

2013-08-13 Thread Arthur Chunqi Li
Add test cases for instruction interception, including three types: 1. Primary Processor-Based VM-Execution Controls (HLT/INVLPG/MWAIT/ RDPMC/RDTSC/MONITOR/PAUSE) 2. Secondary Processor-Based VM-Execution Controls (WBINVD) 3. No control flag (CPUID/INVD) Signed-off-by: Arthur Chunqi Li --- x86

[PATCH 1/4] kvm-unit-tests: VMX: Add test cases for PAT and EFER

2013-08-13 Thread Arthur Chunqi Li
Add test cases for ENT_LOAD_PAT, ENT_LOAD_EFER, EXI_LOAD_PAT, EXI_SAVE_PAT, EXI_LOAD_EFER, EXI_SAVE_PAT flags in enter/exit control fields. Signed-off-by: Arthur Chunqi Li --- x86/vmx.h |7 +++ x86/vmx_tests.c | 185 +++ 2 files

[PATCH 3/4] kvm-unit-tests: VMX: Add test cases for I/O bitmaps

2013-08-13 Thread Arthur Chunqi Li
Add test cases for I/O bitmaps, including corner cases. Signed-off-by: Arthur Chunqi Li --- x86/vmx.h |6 +- x86/vmx_tests.c | 167 +++ 2 files changed, 170 insertions(+), 3 deletions(-) diff --git a/x86/vmx.h b/x86/vmx.h index

[PATCH 0/4] kvm-unit-tests: Add a series of test cases

2013-08-13 Thread Arthur Chunqi Li
Add a series of test cases for nested VMX in kvm-unit-tests. Arthur Chunqi Li (4): kvm-unit-tests: VMX: Add test cases for PAT and EFER kvm-unit-tests: VMX: Add test cases for CR0/4 shadowing kvm-unit-tests: VMX: Add test cases for I/O bitmaps kvm-unit-tests: VMX: Add test cases for

Corner cases of I/O bitmap

2013-08-12 Thread Arthur Chunqi Li
ot;If an I/O operation “wraps around” the 16-bit I/O-port space (accesses ports H and H), the I/O instruction causes a VM exit." I cannot find the exact reaction of this case. Do you have any ideas about these? Arthur -- Arthur Chunqi Li Department of Computer Science School

Re: [PATCH] nVMX: Keep arch.pat in sync on L1-L2 switches

2013-08-06 Thread Arthur Chunqi Li
t; Signed-off-by: Jan Kiszka Tested-by: Arthur Chunqi Li Should cooperate with patch http://www.mail-archive.com/kvm@vger.kernel.org/msg94349.html, VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT should be advertised. > --- > > Arthur, please add your tested-by also officially.

[PATCH v3] KVM: nVMX: Advertise IA32_PAT in VM exit control

2013-08-06 Thread Arthur Chunqi Li
Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT. Signed-off-by: Arthur Chunqi Li --- arch/x86/kvm/vmx.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 396572d..c45adea 100644 --- a/arch/x86/kvm/vmx.c

  1   2   3   >