On Monday 22 March 2010 17:06:42 Gui Jianfeng wrote:
According to SDM, we need to configure EPT paging-structure memory type
by consulting IA32_VMX_EPT_VPID_CAP.
Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com
---
arch/x86/include/asm/vmx.h |2 ++
arch/x86/kvm/vmx.c |
On Saturday 20 March 2010 23:00:49 Alexander Graf wrote:
Am 20.03.2010 um 15:02 schrieb Mohammed Gamal m.gamal...@gmail.com:
On Sat, Mar 20, 2010 at 3:18 PM, Avi Kivity a...@redhat.com wrote:
On 03/20/2010 10:55 AM, Alexander Graf wrote:
I'd say that a GSoC project would rather focus on
On Wednesday 24 March 2010 23:54:15 Hannes Reinecke wrote:
Hi all,
I'm trying to setup a system with device-passthrough for
an ixgbe NIC.
The device itself seems to work, but it isn't using MSI-X.
So some more advanced features like DCB offloading etc
won't work.
How about lspci result in
On Wednesday 14 April 2010 17:20:15 Avi Kivity wrote:
On 04/14/2030 12:05 PM, Zhang, Yanmin wrote:
Here is the new patch of V3 against tip/master of April 13th
if anyone wants to try it.
Thanks for persisting despite the flames.
Can you please separate arch/x86/kvm part of the patch?
On Wednesday 14 April 2010 17:57:50 Avi Kivity wrote:
On 04/14/2010 12:43 PM, Sheng Yang wrote:
On Wednesday 14 April 2010 17:20:15 Avi Kivity wrote:
On 04/14/2030 12:05 PM, Zhang, Yanmin wrote:
Here is the new patch of V3 against tip/master of April 13th
if anyone wants to try
On Wednesday 14 April 2010 18:33:37 Avi Kivity wrote:
On 04/14/2010 01:27 PM, Sheng Yang wrote:
Yes, interesting to see what the latency is. If it's reasonably short
(and I expect it will be so), we can do the busy wait solution.
If we have an NMI counter somewhere, we can simply wait
On Thursday 15 April 2010 18:44:15 Avi Kivity wrote:
On 04/15/2010 01:40 PM, Joerg Roedel wrote:
That means an NMI that happens outside guest code (for example, in the
mmu, or during the exit itself) would be counted as if in guest code.
Hmm, true. The same is true for an NMI that happens
On Monday 19 April 2010 16:25:17 Avi Kivity wrote:
On 04/17/2010 09:12 PM, Avi Kivity wrote:
I think you were right the first time around.
Re-reading again (esp. the part about treatment of indirect NMI
vmexits), I think this was wrong, and that the code is correct. I am
now thoroughly
mmu.free() already set root_hpa to INVALID_PAGE, no need to do it again in the
destory_kvm_mmu().
kvm_x86_ops-set_cr4() and set_efer() already assign cr4/efer to
vcpu-arch.cr4/efer, no need to do it again later.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/mmu.c |5
Only modifying some bits of CR0/CR4 needs paging mode switch.
Add update_rsvd_bits_mask() to address EFER.NX bit updating for reserved bits.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/kvm/mmu.c | 17
Modify EFER won't result in mode switch directly. After EFER.LME set, the
following set CR0.PG would result in mode switch to IA32e. And the later
action already covered by kvm_set_cr0().
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/x86.c |1 -
1 files changed, 0
kvm_x86_ops-set_efer() would execute vcpu-arch.efer = efer, so the
checking of LMA bit didn't work.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/x86.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index
Only modifying some bits of CR0/CR4 needs paging mode switch.
Add update_rsvd_bits_mask() to address EFER.NX bit updating for reserved bits.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/kvm/mmu.c | 17
kvm_x86_ops-set_efer() would execute vcpu-arch.efer = efer, so the
checking of LMA bit didn't work.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/x86.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index
Only modifying some bits of CR0/CR4 needs paging mode switch.
Add update_rsvd_bits_mask() to address EFER.NX bit updating for reserved bits.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/kvm/mmu.c | 17
Modify EFER won't result in mode switch directly. After EFER.LME set, the
following set CR0.PG would result in mode switch to IA32e. And the later
action already covered by kvm_set_cr0().
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/x86.c |1 -
1 files changed, 0
mmu.free() already set root_hpa to INVALID_PAGE, no need to do it again in the
destory_kvm_mmu().
kvm_x86_ops-set_cr4() and set_efer() already assign cr4/efer to
vcpu-arch.cr4/efer, no need to do it again later.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/mmu.c |5
On Wednesday 12 May 2010 14:59:14 Avi Kivity wrote:
On 05/12/2010 09:33 AM, Sheng Yang wrote:
Only modifying some bits of CR0/CR4 needs paging mode switch.
Add update_rsvd_bits_mask() to address EFER.NX bit updating for reserved
bits.
@@ -2335,6 +2335,19 @@ static void
Sheng Yang (3):
KVM: x86: Check LMA bit before set_efer
KVM: Clean up duplicate assignment
VMX: x86: Only reset MMU when necessary
arch/x86/kvm/mmu.c |5 ++---
arch/x86/kvm/x86.c | 22 --
2 files changed, 18 insertions(+), 9 deletions(-)
--
To unsubscribe from
kvm_x86_ops-set_efer() would execute vcpu-arch.efer = efer, so the
checking of LMA bit didn't work.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/x86.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index
mmu.free() already set root_hpa to INVALID_PAGE, no need to do it again in the
destory_kvm_mmu().
kvm_x86_ops-set_cr4() and set_efer() already assign cr4/efer to
vcpu-arch.cr4/efer, no need to do it again later.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/mmu.c |5
Only modifying some bits of CR0/CR4 needs paging mode switch.
Modify EFER.NXE bit would result in reserved bit updates.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/x86.c | 16 ++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm
Also add some more constants.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
Do we need to rename task_xstate_cachep? It's not only for task struct now.
arch/x86/include/asm/i387.h |2 ++
arch/x86/include/asm/xsave.h |3 +++
arch/x86/kernel/i387.c |3 ++-
arch/x86
fpu_save() would be used later by KVM.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/i387.h | 71 ++-
1 files changed, 43 insertions(+), 28 deletions(-)
diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h
This patchset based on Avi's FPU API patchset.
Sheng Yang (3):
x86: Split fpu_save_init() to fpu_save() and fpu_clear()
x86: Export FPU API for KVM use
KVM: x86: Use FPU API
arch/x86/include/asm/i387.h | 73 ---
arch/x86/include/asm/kvm_host.h
Convert KVM to use generic FPU API.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h | 18 +-
arch/x86/kvm/x86.c | 73 ---
2 files changed, 23 insertions(+), 68 deletions(-)
diff --git a/arch/x86
Convert KVM to use generic FPU API.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
Like this? (Drop patch 1)
arch/x86/include/asm/kvm_host.h | 18 +-
arch/x86/kvm/x86.c | 70 ++-
2 files changed, 19 insertions(+), 69 deletions
On Monday 17 May 2010 16:18:22 Avi Kivity wrote:
On 05/17/2010 11:09 AM, Sheng Yang wrote:
Convert KVM to use generic FPU API.
Signed-off-by: Sheng Yangsh...@linux.intel.com
---
Like this? (Drop patch 1)
Will be more readable with a patch that converts host_fx_image to
unlazy_fpu
Change from v1:
Use unlazy_fpu() to handle host FPU, avoiding save/restore of host FPU states.
Sheng Yang (3):
x86: Export FPU API for KVM use
KVM: x86: Use unlazy_fpu() for host FPU
KVM: x86: Use FPU API
arch/x86/include/asm/i387.h |2 +
arch/x86/include/asm/kvm_host.h | 18
Convert KVM to use generic FPU API.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h | 17 +
arch/x86/kvm/x86.c | 52 ---
2 files changed, 17 insertions(+), 52 deletions(-)
diff --git a/arch/x86
We can avoid unnecessary fpu load when userspace process
didn't use FPU frequently.
Derived from Avi's idea.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h |1 -
arch/x86/kvm/x86.c | 18 ++
2 files changed, 2 insertions
On Monday 17 May 2010 17:19:02 Avi Kivity wrote:
On 05/17/2010 12:08 PM, Sheng Yang wrote:
Also add some constants.
+++ b/arch/x86/kernel/process.c
@@ -28,6 +28,7 @@ unsigned long idle_nomwait;
EXPORT_SYMBOL(idle_nomwait);
struct kmem_cache *task_xstate_cachep
Also add some constants.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/i387.h |2 ++
arch/x86/include/asm/xsave.h |3 +++
arch/x86/kernel/i387.c |3 ++-
arch/x86/kernel/process.c|1 +
4 files changed, 8 insertions(+), 1 deletions(-)
diff
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
target-i386/cpuid.c | 32
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index eebf038..21e94f3 100644
--- a/target-i386/cpuid.c
+++ b/target-i386
@intel.com
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/vmx.c | 28 +
arch/x86/kvm/x86.c | 85 +++---
4 files changed, 108
.
Signed-off-by: Dexuan Cui dexuan@intel.com
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
Avi, could you help to review this kernel patch first? Testcase and LM are in
progress now.
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/vmx.c
On Thursday 20 May 2010 17:46:40 Avi Kivity wrote:
On 05/20/2010 12:16 PM, Sheng Yang wrote:
From: Dexuan Cuidexuan@intel.com
Enable XSAVE/XRSTORE for guest.
Change from V2:
Addressed comments from Avi.
Change from V1:
1. Use FPU API.
2. Fix CPUID issue.
3. Save
API.
2. Fix CPUID issue.
3. Save/restore all possible guest xstate fields when switching. Because we
don't know which fields guest has already touched.
Signed-off-by: Dexuan Cui dexuan@intel.com
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
I am still not clear about why we need to reload
On Monday 24 May 2010 21:36:12 Avi Kivity wrote:
On 05/24/2010 01:03 PM, Sheng Yang wrote:
From: Dexuan Cuidexuan@intel.com
Enable XSAVE/XRSTORE for guest.
Change from V3:
1. Enforced the assumption that host OS would use all available xstate
bits. 2. Various fixes, addressed
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
I've done a prototype of LM support, would send out tomorrow. But the test
case in QEmu side seems got something wrong. I always got an segfault at:
qemu-kvm/hw/fw_cfg.c:223
223 s-entries[arch][key].data = data;
Haven't looked into it yet
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h |2 +
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/kvm_cache_regs.h |6 ++
arch/x86/kvm/vmx.c | 16 +
arch/x86/kvm/x86.c | 120
This patch enable save/restore of xsave state.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm.h | 29
arch/x86/kvm/x86.c | 79
include/linux/kvm.h|6 +++
3 files changed, 114
We can support it in KVM now. The initial values are the minimal requirement
of XSAVE capable processor.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
target-i386/cpuid.c | 32
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/target-i386
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
qemu-kvm-x86.c| 77 +
qemu-kvm.c| 12 +++
qemu-kvm.h| 14 +
target-i386/cpu.h |5 +++
target-i386/machine.c | 20 +
5 files
On Thursday 27 May 2010 17:52:36 Avi Kivity wrote:
On 05/27/2010 12:47 PM, Sheng Yang wrote:
From: Dexuan Cuidexuan@intel.com
This patch enable guest to use XSAVE/XRSTOR instructions.
We assume that host_xcr0 would use all possible bits that OS supported.
And we loaded xcr0
On Thursday 27 May 2010 18:02:31 Avi Kivity wrote:
On 05/27/2010 12:48 PM, Sheng Yang wrote:
This patch enable save/restore of xsave state.
Signed-off-by: Sheng Yangsh...@linux.intel.com
---
arch/x86/include/asm/kvm.h | 29
arch/x86/kvm/x86.c | 79
On Thursday 27 May 2010 20:56:17 Avi Kivity wrote:
On 05/27/2010 12:50 PM, Sheng Yang wrote:
We can support it in KVM now. The initial values are the minimal
requirement of XSAVE capable processor.
Signed-off-by: Sheng Yangsh...@linux.intel.com
---
target-i386/cpuid.c | 32
Only test legal action so far, we can extend it later.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
kvm/test/config-x86-common.mak |5 +-
kvm/test/x86/xsave.c | 173
2 files changed, 177 insertions(+), 1 deletions(-)
create mode
On Thursday 27 May 2010 18:02:31 Avi Kivity wrote:
On 05/27/2010 12:48 PM, Sheng Yang wrote:
This patch enable save/restore of xsave state.
Signed-off-by: Sheng Yangsh...@linux.intel.com
---
arch/x86/include/asm/kvm.h | 29
arch/x86/kvm/x86.c | 79
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
Change from v6:
Make kvm_set_xcr() generically.
arch/x86/include/asm/kvm_host.h |2 +
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/kvm_cache_regs.h |6 ++
arch/x86/kvm/vmx.c | 13
arch/x86/kvm/x86.c
Would use it later for XSAVE related CPUID.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
kvm.h |2 +-
qemu-kvm-x86.c|8
target-i386/kvm.c | 19 +++
3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/kvm.h b/kvm.h
index
We can support it in KVM now. The 0xd leaf is queried from KVM.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
target-i386/cpuid.c | 21 +
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index eebf038..ec47950
On Tuesday 01 June 2010 16:51:05 Avi Kivity wrote:
On 05/31/2010 02:17 PM, Sheng Yang wrote:
Only test legal action so far, we can extend it later.
The legal actions are tested by guests, so it's more important for unit
tests to check illegal (and potentially subversive) actions.
Yes
We only support 4 levels EPT pagetable now.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/vmx.c |8 +++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 99ae513..d400fbb 100644
--- a/arch/x86/kvm/vmx.c
+++ b
On Thursday 03 June 2010 16:44:34 Gui Jianfeng wrote:
According to SDM, we need check whether single-context INVVPID type is
supported before issuing invvpid instruction.
Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com
---
arch/x86/include/asm/vmx.h |2 ++
arch/x86/kvm/vmx.c
On Thursday 03 June 2010 17:45:22 Gui Jianfeng wrote:
According to SDM, we need check whether single-context INVVPID type is
supported before issuing invvpid instruction.
Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com
---
arch/x86/include/asm/vmx.h |2 ++
arch/x86/kvm/vmx.c
On Friday 04 June 2010 08:51:39 Gui Jianfeng wrote:
According to SDM, we need check whether single-context INVVPID type is
supported before issuing invvpid instruction.
Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com
Reviewed-by: Sheng Yang sh...@linux.intel.com
--
regards
Yang
On Tuesday 20 October 2009 20:37:20 Marcelo Tosatti wrote:
GUEST_CR3 is updated via kvm_set_cr3 whenever CR3 value
changes.
The description is not that accuracy... If CR3 value change in guest when EPT
enabled, no VM Exit would happen, then no kvm_set_cr3...
--
regards
Yang, Sheng
commit 75fe7882 Test for libpci, not only for header compile a libpci
test file. But the pciutils with defined PCI_COMPRESSED_IDS also need zlib
when compile, otherwise the compile would fail, and detection fail then
CC: Juan Quintela quint...@redhat.com
Signed-off-by: Sheng Yang sh
commit 52ea5897fa9fdadf0cc1a5242a23ce3dab599769 Use DESTDIR consitently on
installation add -b ${DESTDIR} to depmod. But the DESTDIR is default NULL,
then depmod would report error.
Set DESTDIR=/ as default
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
Makefile |2 +-
1 files changed
don't use INTx these days...)
CC: Gerd Hoffmann kra...@redhat.com
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
hw/device-assignment.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index 516cf14..64f3dc2 100644
--- a/hw
The new pci_dev-dev.config is a uint_8 pointer, but get_real_device()
still using sizeof(pci_dev-dev.config) to fill the configuration space,
which lost most of information.
Spot the issue when INTx cannot work again after previous fix...
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
hw
Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest
supported processors.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/vmx.c |4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index
One possible order is:
KVM_CREATE_IRQCHIP ioctl(took kvm-lock) - kvm_iobus_register_dev() -
down_write(kvm-slots_lock).
The other one is in kvm_vm_ioctl_assign_device(), which take kvm-slots_lock
first, then kvm-lock.
Observe it due to kernel locking debug warnings.
Signed-off-by: Sheng Yang
On Monday 07 December 2009 18:47:10 Avi Kivity wrote:
Some bits of cr4 can be owned by the guest on vmx, so when we read them,
we copy them to the vcpu structure. In preparation for making the set of
guest-owned bits dynamic, use helpers to access these bits so we don't need
to know where the
On Tue, Dec 08, 2009 at 11:36:59AM +0200, Avi Kivity wrote:
On 12/08/2009 09:57 AM, Sheng Yang wrote:
vcpu-arch.cr0 = cr0;
- vmx_set_cr4(vcpu, vcpu-arch.cr4);
+ vmx_set_cr4(vcpu, kvm_read_cr4(vcpu));
}
Another place accessed cr4 directly, in ept_update_paging_mode_cr4
Before enabling, execution of rdtscp in guest would result in #UD.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/vmx.c |3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/vmx.h b/arch/x86
On Wednesday 09 December 2009 17:54:46 Avi Kivity wrote:
On 12/09/2009 11:11 AM, Sheng Yang wrote:
Before enabling, execution of rdtscp in guest would result in #UD.
Signed-off-by: Sheng Yangsh...@linux.intel.com
---
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/vmx.c
On Mon, Apr 27, 2009 at 05:47:44PM +0800, Sheng Yang wrote:
mt_mask is out of date, now it have only been used as a flag to indicate if
TDP
enabled. Get rid of it and use tdp_enabled instead.
I realized this one break NPT on my way home... Would update the patches
soon.
--
regards
Yang
On Monday 07 December 2009 16:58:04 Sheng Yang wrote:
One possible order is:
KVM_CREATE_IRQCHIP ioctl(took kvm-lock) - kvm_iobus_register_dev() -
down_write(kvm-slots_lock).
The other one is in kvm_vm_ioctl_assign_device(), which take
kvm-slots_lock first, then kvm-lock.
Observe
We don't support these instructions, but guest can execute them even if the
feature('monitor') haven't been exposed in CPUID. So we would trap and inject
a #UD if guest try this way.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/vmx.c
We don't support these instructions, but guest can execute them even if the
feature('monitor') haven't been exposed in CPUID. So we would trap and inject
a #UD if guest try this way.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/vmx.c
After discussion with Avi, we decided to take this chance to extend the shared
MSR framework, discard the limitation of All CPU should have same value for
the MSRs. But the limitation of The MSRs' value shouldn't be modified after
they were read still apply.
I have tested this patchset using
It's no longer necessary.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/vmx.c |2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 9a0a2cf..5c464ed 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
Also replaced the hardcode value in write_tsc() and write_tscp_aux().
CC: Ingo Molnar mi...@elte.hu
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/msr-index.h |1 +
arch/x86/include/asm/msr.h |4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff
the shared_msr_global still have one assumption: it can only deal
with the MSRs that won't change in host after KVM module loaded.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/x86.c | 64 ++--
1 files changed, 42 insertions(+), 22
Before enabling, execution of rdtscp in guest would result in #UD.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/svm.c |6 ++
arch/x86/kvm/vmx.c | 31
the shared_msr_global still have one assumption: it can only deal
with the MSRs that won't change in host after KVM module loaded.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
How about this?
Move the all initialization to hardware_enable(). And only initialized once
for each cpu.
arch/x86/kvm
Before enabling, execution of rdtscp in guest would result in #UD.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
Reflect guest CPUID on vmcs fields as well, but it involved some more code
which would only executed once... Do we need a callback there for post-cpuid
setting?
arch/x86
On Thursday 17 December 2009 18:39:22 Avi Kivity wrote:
On 12/17/2009 11:33 AM, Sheng Yang wrote:
Before enabling, execution of rdtscp in guest would result in #UD.
Signed-off-by: Sheng Yangsh...@linux.intel.com
---
Reflect guest CPUID on vmcs fields as well, but it involved some more
On Thursday 17 December 2009 18:32:08 Avi Kivity wrote:
On 12/17/2009 11:32 AM, Sheng Yang wrote:
shared_msr_global saved host value of relevant MSRs, but it have an
assumption that all MSRs it tracked shared the value across the different
CPUs. It's not true with some MSRs, e.g
--
regards
Yang, Sheng
arch/x86/include/asm/kvm_host.h |2 +
arch/x86/include/asm/msr-index.h |1 +
arch/x86/include/asm/msr.h |4 +-
arch/x86/include/asm/vmx.h |1 +
arch/x86/kernel/vsyscall_64.c|3 +-
arch/x86/kvm/svm.c | 13 +++
It's no longer necessary.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/vmx.c |2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 9a0a2cf..5c464ed 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
Also replaced the hardcode value in write_tsc() and write_tscp_aux().
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
(Already applied by Ingo)
arch/x86/include/asm/msr-index.h |1 +
arch/x86/include/asm/msr.h |4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff
the shared_msr_global still have one assumption: it can only deal
with the MSRs that won't change in host after KVM module loaded.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/kvm/x86.c | 55 +++
1 files changed, 33 insertions(+), 22
KVM need vsyscall_init() to initialize MSR_TSC_AUX before it read the value.
Per Avi's suggestion, this patch raised vsyscall priority on hotplug notifier
chain, to 30.
CC: Ingo Molnar mi...@elte.hu
CC: linux-ker...@vger.kernel.org
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86
Sometime, we need to adjust some state in order to reflect guest CPUID
setting, e.g. if we don't expose rdtscp to guest, we won't want to enable
it on hardware. cpuid_update() is introduced for this purpose.
Also export kvm_find_cpuid_entry() for later use.
Signed-off-by: Sheng Yang sh
Before enabling, execution of rdtscp in guest would result in #UD.
Signed-off-by: Sheng Yang sh...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/include/asm/vmx.h |1 +
arch/x86/kvm/svm.c |7
arch/x86/kvm/vmx.c | 60
On Thursday 24 December 2009 14:51:23 Simon Horman wrote:
On Thu, Dec 24, 2009 at 01:45:34AM +0100, Alexander Graf wrote:
Am 23.12.2009 um 23:40 schrieb Chris Wright chr...@sous-sol.org:
[ resend, fixing email header, sorry for duplicate ]
The default mode for device assignment is to
On Thursday 24 December 2009 22:56:38 Gleb Natapov wrote:
On Thu, Dec 24, 2009 at 10:30:24AM +0200, Avi Kivity wrote:
On 12/23/2009 06:35 PM, Marcelo Tosatti wrote:
Addressing comments.
Looks good.
Looks good to me too.
One small comment on the naming:
kvm-memslots-memslots[i]
(Sorry, forgot to switch to plain text in Gmail, rejected by vger.kernel.org...)
On Wed, Jul 30, 2008 at 10:15 PM, Marcelo Tosatti [EMAIL PROTECTED] wrote:
Hi Dor,
On Wed, Jul 30, 2008 at 12:50:06AM +0300, Dor Laor wrote:
Marcelo Tosatti wrote:
The in-kernel PIT emulation can either inject
Signed-off-by: Sheng Yang [EMAIL PROTECTED]
---
arch/x86/kvm/mmu.c | 115 +++-
arch/x86/kvm/svm.c |6 ++
arch/x86/kvm/vmx.c | 24 -
arch/x86/kvm/x86.c |2 +-
include/asm-x86/kvm_host.h |3 +-
5 files
Separate msr_bitmap for each vcpu, prepared for guest PAT support.
Signed-off-by: Sheng Yang [EMAIL PROTECTED]
---
arch/x86/kvm/vmx.c | 53 +--
1 files changed, 30 insertions(+), 23 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm
Hi, Avi
This patchset add memory type support for EPT, including MTRR and PAT.
The patch restruct the MTRR structure to make it easy to use, also take host
kernel MTRR as a reference.
The function guest_mtrr_type_lookup() is copied from host kernel rather than
reuse, for I think it may be much
Signed-off-by: Sheng Yang [EMAIL PROTECTED]
---
arch/x86/kvm/vmx.c | 18 +-
arch/x86/kvm/vmx.h |4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 81c121c..7b41241 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch
For MSR_IA32_FEATURE_CONTROL is already there.
Signed-off-by: Sheng Yang [EMAIL PROTECTED]
---
arch/x86/kvm/vmx.h |3 ---
include/asm-x86/msr-index.h |3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/vmx.h b/arch/x86/kvm/vmx.h
index cef2dd8
They are hardware specific MSRs, and we would use them in virtualization
feature detection later.
Signed-off-by: Sheng Yang [EMAIL PROTECTED]
---
arch/x86/kvm/vmx.h | 15 ---
include/asm-x86/msr-index.h | 16
2 files changed, 16 insertions(+), 15
Signed-off-by: Sheng Yang [EMAIL PROTECTED]
---
arch/x86/kvm/x86.c | 78
1 files changed, 42 insertions(+), 36 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b9d15f7..43fb049 100644
--- a/arch/x86/kvm/x86.c
+++ b
Hi, Avi
This patchset enable MSI support for KVM VT-d.
And here are only kernel space ones. The third patch would go to also goto x86
upstream.
The userspace code would looks like this:
assigned_irq_data.guest_msi_addr = *(uint32_t *)(d-msi_cap + 4);
assigned_irq_data.guest_msi_data =
Signed-off-by: Sheng Yang [EMAIL PROTECTED]
---
arch/x86/kvm/x86.c |8
include/linux/kvm_host.h |3 ++-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 43fb049..4836323 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch
1 - 100 of 950 matches
Mail list logo