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 University

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 jan.kis...@web.de 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 one vmexit (e.g. nmi

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

2014-05-15 Thread Arthur Chunqi Li
On Thu, May 15, 2014 at 2:39 PM, Jan Kiszka jan.kis...@web.de 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 hardware support of DMA

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 majordomo info at http

CPUs support APIC virtualization

2014-04-21 Thread Arthur Chunqi Li
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://vger.kernel.org

The action of Accessed and Dirty bit for EPT

2014-03-06 Thread Arthur Chunqi Li
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 of a message

Guest VMs access a strange address

2014-03-04 Thread Arthur Chunqi Li
); } 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 Li Department of Computer Science School of EECS Peking

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 pbonz...@redhat.com 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 pbonz...@redhat.com wrote: Il 17/12/2013 07:11, Arthur Chunqi

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 pbonz...@redhat.com wrote: Il 20/11/2013 08:55, Arthur Chunqi Li ha scritto: Hi Paolo, Currently I can trap every first write

Re: How to trace every memory access

2013-12-20 Thread Arthur Chunqi Li
Bonzini pbonz...@redhat.com 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 they're per-VCPU. Paolo -- Arthur

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 pbonz...@redhat.com 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

About preemption timer

2013-12-17 Thread Arthur Chunqi Li
. 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 More majordomo info

Re: About preemption timer

2013-12-17 Thread Arthur Chunqi Li
Hi Jan, On Tue, Dec 17, 2013 at 7:21 PM, Jan Kiszka jan.kis...@siemens.com 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 and give them the same

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 pbonz...@redhat.com 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, sleeping etc

Re: About preemption timer

2013-12-17 Thread Arthur Chunqi Li
On Tue, Dec 17, 2013 at 8:43 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2013-12-17 12:31, Arthur Chunqi Li wrote: Hi Jan, On Tue, Dec 17, 2013 at 7:21 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2013-12-17 10:32, Arthur Chunqi Li wrote: Hi Jan and Paolo, I've tried to use

How to get to know vcpu status from outside

2013-12-16 Thread Arthur Chunqi Li
the 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 to majord

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.kernel.org/majordomo

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 pbonz...@redhat.com 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 though

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 pbonz...@redhat.com 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 version

Re: Calling to kvm_mmu_load

2013-10-30 Thread Arthur Chunqi Li
On Tue, Oct 29, 2013 at 8:55 PM, Paolo Bonzini pbonz...@redhat.com 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 version of tracking

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 pbonz...@redhat.com 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 pbonz...@redhat.com wrote: Il 21/10/2013 08:56, Arthur Chunqi Li ha scritto

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 pbonz...@redhat.com 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 this function when

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 message to majord

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 jan.kis...@siemens.com 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: This patch contains the following two

[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 yzt...@gmail.com --- x86/vmx.c | 30 ++ x86/vmx_tests.c | 13 + 2 files changed, 43 insertions(+) diff --git

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

2013-09-16 Thread Arthur Chunqi Li
, nested VMX preemption timer features are fully supported. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- 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| 44

[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 yzt...@gmail.com --- x86/vmx.c | 25 + x86/vmx_tests.c | 13 + 2 files changed, 38 insertions(+) diff --git a/x86

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 jan.kis...@web.de 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) +preempt_val_l2 = 0

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 pbonz...@redhat.com 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, preemption timer

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 g...@redhat.com 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 emulated by L1

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

2013-09-13 Thread Arthur Chunqi Li
-off-by: Arthur Chunqi Li yzt...@gmail.com --- 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

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

2013-09-13 Thread Arthur Chunqi Li
. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- 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

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

2013-09-13 Thread Arthur Chunqi Li
will 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

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

2013-09-13 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 yzt...@gmail.com wrote: This series implement a framework

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 -- Arthur Chunqi Li

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: 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 g...@redhat.com 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 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 9:03 PM, Gleb Natapov g...@redhat.com 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

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
(vcpu, vmcs12-host_cr0); /* * 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

[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 yzt...@gmail.com --- x86/vmx.h |2 +- x86/vmx_tests.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

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 yzt...@gmail.com 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 yzt...@gmail.com --- x86

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 jan.kis...@web.de 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: The framework of EPT

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 pbonz...@redhat.com 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? The preempt value

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 pbonz...@redhat.com 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

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 yzt...@gmail.com 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

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

2013-09-09 Thread Arthur Chunqi Li
and will return unexpected value when read. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- 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

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 g...@redhat.com 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 2/2] kvm-unit-tests: VMX: Test cases for nested EPT

2013-09-08 Thread Arthur Chunqi Li
Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- 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

[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 yzt...@gmail.com --- x86/vmx.c | 159 +++-- x86/vmx.h | 76

[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

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 yang.z.zh...@intel.com 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 value

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 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 yang.z.zh...@intel.com wrote: Arthur Chunqi Li wrote on 2013-09-05: On Thu, Sep 5, 2013 at 3:45 PM, Zhang, Yang Z yang.z.zh...@intel.com wrote: Arthur Chunqi Li wrote on 2013-09-04: This patch contains the following two changes: 1. Fix the bug

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 yang.z.zh...@intel.com 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 yang.z.zh...@intel.com wrote: Arthur Chunqi Li wrote on 2013-09-04: This patch

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

2013-09-05 Thread Arthur Chunqi Li
, nested VMX preemption timer features are fully supported. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- 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/x86/kvm/vmx.c

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

2013-09-05 Thread Arthur Chunqi Li
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 yzt...@gmail.com --- ChangeLog to v1: 1. Add test of EXI_SAVE_PREEMPT enable and PIN_PREEMPT disable 2. Add test of PIN_PREEMPT enable

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

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

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

2013-09-04 Thread Arthur Chunqi Li
trigger if the value is large enough. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- 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

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

2013-09-04 Thread Arthur Chunqi Li
, Arthur On Mon, Sep 2, 2013 at 5:38 PM, Arthur Chunqi Li yzt...@gmail.com 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 must have ideas

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 g...@redhat.com 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 bit late but... A little earlier

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 g...@redhat.com 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 g...@redhat.com wrote: On Mon, Aug 12, 2013 at 08:35:57PM +0800, Arthur Chunqi Li wrote: Hi Gleb and Paolo

Information of EPT violation VMEXIT

2013-09-03 Thread Arthur Chunqi Li
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 unsubscribe kvm in the body of a message to majord

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 yzt...@gmail.com wrote: Add a series of test cases for nested VMX in kvm

[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 yzt...@gmail.com --- x86/vmx.c | 132

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

2013-09-02 Thread Arthur Chunqi Li
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 yzt...@gmail.com wrote: Add a framework of EPT in nested VMX testing, including a set of functions to construct and read EPT paging structures

Some questions about nested EPT

2013-08-30 Thread Arthur Chunqi Li
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.kernel.org More majordomo info

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 jan.kis...@web.de 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 timer value

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

2013-08-25 Thread Arthur Chunqi Li
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 yzt...@gmail.com --- arch/x86/kvm/vmx.c | 30 +- 1 file

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 jan.kis...@web.de wrote: On 2013-08-25 09:24, Arthur Chunqi Li wrote: On Sun, Aug 25, 2013 at 2:44 PM, Jan Kiszka jan.kis...@web.de wrote: On 2013-08-24 20:44, root wrote: This patch contains the following two changes: 1. Fix the bug in nested

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:37 PM, Abel Gordon ab...@il.ibm.com wrote: From: Jan Kiszka jan.kis...@web.de To: 李春奇 Arthur Chunqi Li yzt...@gmail.com, Cc: kvm@vger.kernel.org, g...@redhat.com, pbonz...@redhat.com Date: 25/08/2013 09:44 AM Subject: Re: [PATCH] KVM: nVMX: Fully support of nested

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 jan.kis...@web.de wrote: On 2013-08-25 09:37, Arthur Chunqi Li wrote: On Sun, Aug 25, 2013 at 3:28 PM, Jan Kiszka jan.kis...@web.de wrote: On 2013-08-25 09:24, Arthur Chunqi Li wrote: On Sun, Aug 25, 2013 at 2:44 PM, Jan Kiszka jan.kis...@web.de

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

2013-08-25 Thread Arthur Chunqi Li
Arthur Chunqi Li yzt...@gmail.com Date: 25/08/2013 10:43 AM Subject: Re: [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer Sent by: kvm-ow...@vger.kernel.org On 2013-08-25 09:37, Abel Gordon wrote: From: Jan Kiszka jan.kis...@web.de To: 李春奇 Arthur Chunqi Li yzt

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:18 PM, Abel Gordon ab...@il.ibm.com wrote: kvm-ow...@vger.kernel.org wrote on 25/08/2013 10:54:13 AM: From: Jan Kiszka jan.kis...@web.de To: Abel Gordon/Haifa/IBM@IBMIL, Cc: g...@redhat.com, kvm kvm@vger.kernel.org, pbonz...@redhat.com, 李春奇 Arthur Chunqi Li yzt

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 jan.kis...@web.de wrote: On 2013-08-25 10:41, Arthur Chunqi Li wrote: On Sun, Aug 25, 2013 at 4:18 PM, Abel Gordon ab...@il.ibm.com wrote: kvm-ow...@vger.kernel.org wrote on 25/08/2013 10:54:13 AM: From: Jan Kiszka jan.kis...@web.de To: Abel

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

2013-08-25 Thread Arthur Chunqi Li
, nested VMX preemption timer features are fully supported. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- 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 index

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 jan.kis...@web.de 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 yzt...@gmail.com --- lib/x86/vm.h|4 + x86

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 jan.kis...@web.de 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. Signed-off-by: Arthur Chunqi Li yzt

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 jan.kis...@web.de 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 yzt...@gmail.com --- x86/vmx.h

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 jan.kis...@web.de wrote: On 2013-08-15 09:40, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 3:30 PM, Jan Kiszka jan.kis...@web.de wrote: On 2013-08-13 17:56, Arthur Chunqi Li wrote: Add testing for CR0/4 shadowing. A few sentences on the test

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 jan.kis...@web.de wrote: On 2013-08-15 09:41, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 3:17 PM, Jan Kiszka jan.kis...@web.de wrote: On 2013-08-13 17:56, Arthur Chunqi Li wrote: Add test cases for ENT_LOAD_PAT, ENT_LOAD_EFER, EXI_LOAD_PAT

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 jan.kis...@web.de wrote: On 2013-08-15 09:51, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 3:40 PM, Jan Kiszka jan.kis...@web.de wrote: On 2013-08-13 17:56, Arthur Chunqi Li wrote: Add test cases for I/O bitmaps, including corner cases. Would

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 jan.kis...@web.de 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) 2. Secondary

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 jan.kis...@web.de wrote: On 2013-08-15 10:09, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 3:58 PM, Jan Kiszka jan.kis...@web.de wrote: On 2013-08-15 09:51, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 3:40 PM, Jan Kiszka jan.kis...@web.de

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 jan.kis...@web.de wrote: On 2013-08-15 10:16, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 4:06 PM, Jan Kiszka jan.kis...@web.de wrote: On 2013-08-13 17:56, Arthur Chunqi Li wrote: Add test cases for instruction interception, including three types

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 jan.kis...@web.de wrote: On 2013-08-15 10:35, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 4:20 PM, Jan Kiszka jan.kis...@web.de wrote: On 2013-08-15 10:16, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 4:06 PM, Jan Kiszka jan.kis...@web.de

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 jan.kis...@web.de wrote: On 2013-08-15 10:20, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 4:13 PM, Jan Kiszka jan.kis...@web.de wrote: On 2013-08-15 10:09, Arthur Chunqi Li wrote: On Thu, Aug 15, 2013 at 3:58 PM, Jan Kiszka jan.kis...@web.de

[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 yzt...@gmail.com --- x86/vmx.h |6 +-- x86/vmx_tests.c | 159

[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 yzt...@gmail.com --- x86/vmx.h |7 +++ x86/vmx_tests.c | 185

[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 yzt...@gmail.com --- 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

[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 yzt...@gmail.com --- 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

[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

[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

[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 yzt...@gmail.com --- x86/vmx.h |6 +- x86/vmx_tests.c | 167 +++ 2 files changed, 170 insertions(+), 3 deletions(-) diff --git a/x86/vmx.h b/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 yzt...@gmail.com --- x86/vmx.h |7 +++ x86/vmx_tests.c | 185

[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 yzt...@gmail.com --- 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

[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 yzt

Corner cases of I/O bitmap

2013-08-12 Thread Arthur Chunqi Li
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 of EECS Peking University

[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 yzt...@gmail.com --- 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

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

2013-08-06 Thread Arthur Chunqi Li
content. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Tested-by: Arthur Chunqi Li yzt...@gmail.com 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

  1   2   3   >