Re: [PATCH 1/2] KVM: Discard shadow_mt_mask

2009-04-27 Thread Sheng Yang
On Tuesday 28 April 2009 06:27:22 Marcelo Tosatti wrote: > 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. > > > >

Re: [patch 0/4] use smp_send_reschedule in vcpu_kick / assigned dev host intx race fix

2009-04-28 Thread Sheng Yang
Ack all. This also solved one bug by my hand. Thanks! I observe one point: the performance of high workload interrupt(e.g. 10 gigabyte oplin card) dropped dramatically with smp_send_reschedule() method... In one environment(the speed of oplin card also limited by cpu performance), Using smp_call

[PATCH] KVM: VMX: Disable VMX when system shutdown

2009-04-28 Thread Sheng Yang
Intel TXT(Trusted Execution Technology) required VMX off for all cpu to work when system shutdown. CC: Joseph Cihula Signed-off-by: Sheng Yang --- virt/kvm/kvm_main.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm

Re: [patch 0/4] use smp_send_reschedule in vcpu_kick / assigned dev host intx race fix

2009-04-29 Thread Sheng Yang
On Thursday 30 April 2009 01:47:57 Marcelo Tosatti wrote: > On Tue, Apr 28, 2009 at 03:08:46PM +0800, Sheng Yang wrote: > > Ack all. This also solved one bug by my hand. Thanks! > > > > I observe one point: the performance of high workload interrupt(e.g. 10 > > g

Re: [patch 0/4] use smp_send_reschedule in vcpu_kick / assigned dev host intx race fix

2009-04-29 Thread Sheng Yang
On Thursday 30 April 2009 08:56:57 Sheng Yang wrote: > On Thursday 30 April 2009 01:47:57 Marcelo Tosatti wrote: > > On Tue, Apr 28, 2009 at 03:08:46PM +0800, Sheng Yang wrote: > > > Ack all. This also solved one bug by my hand. Thanks! > > > > > > I observ

[PATCH] KVM: No disable_irq for MSI/MSI-X interrupt on device assignment

2009-04-29 Thread Sheng Yang
s one for MSI/MSI-X. But AFAIK, the drivers handle it well. The patch fixed the oplin card performance issue(MSI-X performance is half of MSI/INTx). Signed-off-by: Sheng Yang --- virt/kvm/kvm_main.c | 22 -- 1 files changed, 8 insertions(+), 14 deletions(-) diff --git a

Re: KVM x86_64 with SR-IOV..?

2009-05-02 Thread Sheng Yang
On Thu, Apr 30, 2009 at 01:22:54PM -0700, Nicholas A. Bellinger wrote: > Greetings KVM folks, > > I wondering if any information exists for doing SR-IOV on the new VT-d > capable chipsets with KVM..? From what I understand the patches for > doing this with KVM are floating around, but I have been

Re: KVM x86_64 with SR-IOV..?

2009-05-03 Thread Sheng Yang
On Monday 04 May 2009 08:53:07 Nicholas A. Bellinger wrote: > On Sat, 2009-05-02 at 18:22 +0800, Sheng Yang wrote: > > On Thu, Apr 30, 2009 at 01:22:54PM -0700, Nicholas A. Bellinger wrote: > > > Greetings KVM folks, > > > > > > I wondering if any information e

Re: KVM x86_64 with SR-IOV..?

2009-05-04 Thread Sheng Yang
On Monday 04 May 2009 12:36:04 Nicholas A. Bellinger wrote: > On Mon, 2009-05-04 at 10:09 +0800, Sheng Yang wrote: > > On Monday 04 May 2009 08:53:07 Nicholas A. Bellinger wrote: > > > On Sat, 2009-05-02 at 18:22 +0800, Sheng Yang wrote: > > > > On Thu, Apr 30, 2009 a

Re: [PATCH] KVM: No disable_irq for MSI/MSI-X interrupt on device assignment

2009-05-04 Thread Sheng Yang
On Monday 04 May 2009 16:25:55 Avi Kivity wrote: > Sheng Yang wrote: > > Disable interrupt at interrupt handler and enable it when guest ack is > > for the level triggered interrupt, to prevent reinjected interrupt. > > MSI/MSI-X don't need it. > > > > One po

Re: [PATCH] KVM: No disable_irq for MSI/MSI-X interrupt on device assignment

2009-05-04 Thread Sheng Yang
On Monday 04 May 2009 16:34:00 Avi Kivity wrote: > Sheng Yang wrote: > > On Monday 04 May 2009 16:25:55 Avi Kivity wrote: > >> Sheng Yang wrote: > >>> Disable interrupt at interrupt handler and enable it when guest ack is > >>> for the level triggered

Re: KVM x86_64 with SR-IOV..?

2009-05-04 Thread Sheng Yang
On Monday 04 May 2009 17:11:59 Nicholas A. Bellinger wrote: > On Mon, 2009-05-04 at 16:20 +0800, Sheng Yang wrote: > > On Monday 04 May 2009 12:36:04 Nicholas A. Bellinger wrote: > > > On Mon, 2009-05-04 at 10:09 +0800, Sheng Yang wrote: > > > > On Monday 04 May 2009

[PATCH] kvm: discard masking checking when initial MSI-X entries

2009-05-04 Thread Sheng Yang
This meant to be with commit: adcf3594f9580bdf9b5e71f271b6088b185e017e, otherwise QEmu only counts the MSI-X entries, but won't fill it... Signed-off-by: Sheng Yang --- hw/device-assignment.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/hw/device-assignment.c

[PATCH] kvm: add iommu_domain_has_cap to module compatible

2009-05-04 Thread Sheng Yang
Signed-off-by: Sheng Yang --- kvm/kernel/external-module-compat-comm.h | 10 ++ kvm/kernel/external-module-compat.c |9 + 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/kvm/kernel/external-module-compat-comm.h b/kvm/kernel/external-module-compat

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-05 Thread Sheng Yang
> > On Tue, May 05, 2009 at 12:51:36PM +0300, Michael S. Tsirkin wrote: > > > > > On Mon, Apr 27, 2009 at 10:30:17PM +0800, Sheng Yang wrote: > > > > > > > > > > If guest can write to the real device MSI-X table > > > > > > > &g

Re: PCI device assignment over KVM

2009-05-05 Thread Sheng Yang
4.jpg > > Log into guest OS(RHEL5u2), run dmesg, it shows errors about my device > which means it is not passed successfully. > Picture 5.jpg > > > I tried other device :06:00.1 which is OK. > > Regards > Tong > > > -Original Message- > From: Sheng

Re: KVM_ASSIGN_SET_MSIX_NR and KVM_ASSIGN_SET_MSIX_ENTRY should support MSI?

2009-05-05 Thread Sheng Yang
On Tuesday 05 May 2009 20:08:40 Avi Kivity wrote: > Michael S. Tsirkin wrote: > > On Tue, May 05, 2009 at 02:57:10PM +0300, Avi Kivity wrote: > >> Michael S. Tsirkin wrote: > >>> On Tue, May 05, 2009 at 08:04:15AM -0300, Marcelo Tosatti wrote: > On Tue, May 05, 2009 at 01:30:28PM +0300, Michae

Re: KVM x86_64 with SR-IOV..? (device passthrough with LIO-Target v3.0)

2009-05-05 Thread Sheng Yang
> now, as it seemed to have an effect on stability with all of MSI-X > interrupts enabled on the KVM host for 16 virtual adapters. That's great! :) -- regards Yang, Sheng > > I will keep testing with e1000e ports and let the list know the > progress. Thanks for your comm

Re: KVM x86_64 with SR-IOV..? (device passthrough with LIO-Target v3.0)

2009-05-05 Thread Sheng Yang
t; Attached are the v2.6.30-rc3 KVM host and v2.6.29.2 KVM guest dmesg > > output. When the 'Unbalanced enable for IRQ 59' happens on the KVM > > host, I do not see any exceptions in KVM guest (other than the iSCSI > > connections drop), but it requires a restart of KVM+q

Re: KVM x86_64 with SR-IOV..? (device passthrough with LIO-Target v3.0)

2009-05-05 Thread Sheng Yang
On Wednesday 06 May 2009 01:45:47 Nicholas A. Bellinger wrote: > On Tue, 2009-05-05 at 04:28 -0700, Nicholas A. Bellinger wrote: > > On Tue, 2009-05-05 at 03:43 -0700, Nicholas A. Bellinger wrote: > > > On Tue, 2009-05-05 at 09:42 +0800, Yu Zhao wrote: > > > > Hi, > > > > > > > > The VF also works

Re: [patch 0/4] use smp_send_reschedule in vcpu_kick / assigned dev host intx race fix

2009-05-05 Thread Sheng Yang
On Thursday 30 April 2009 09:59:56 Sheng Yang wrote: > On Thursday 30 April 2009 08:56:57 Sheng Yang wrote: > > On Thursday 30 April 2009 01:47:57 Marcelo Tosatti wrote: > > > On Tue, Apr 28, 2009 at 03:08:46PM +0800, Sheng Yang wrote: > > > > Ack all. This also sol

Re: [PATCH 3/9] Remove irq_pending bitmap

2009-05-05 Thread Sheng Yang
On Tuesday 05 May 2009 16:14:29 Gleb Natapov wrote: > Only one interrupt vector can be injected from userspace irqchip at > any given time so no need to store it in a bitmap. Put it into interrupt > queue directly. > > Signed-off-by: Gleb Natapov > --- > arch/x86/include/asm/kvm_host.h |2 --

Re: [PATCH 3/9] Remove irq_pending bitmap

2009-05-05 Thread Sheng Yang
On Wednesday 06 May 2009 13:55:44 Sheng Yang wrote: > On Tuesday 05 May 2009 16:14:29 Gleb Natapov wrote: > > Only one interrupt vector can be injected from userspace irqchip at > > any given time so no need to store it in a bitmap. Put it into interrupt > > queue directly.

Re: [PATCH 5/9] [VMX] Do not re-execute INTn instruction.

2009-05-05 Thread Sheng Yang
On Tuesday 05 May 2009 16:14:31 Gleb Natapov wrote: > Re-inject event instead. This is what Intel suggest. Also use correct > instruction length when re-injecting soft fault/interrupt. Thanks for fixing this! > Signed-off-by: Gleb Natapov > --- > arch/x86/include/asm/kvm_host.h |5 - >

Re: qemu/hw/device-assignment: questions about msix_table_page

2009-05-06 Thread Sheng Yang
On Wednesday 06 May 2009 15:31:18 Michael S. Tsirkin wrote: > On Wed, May 06, 2009 at 10:35:27AM +0800, Sheng Yang wrote: > > On Tuesday 05 May 2009 20:46:04 Michael S. Tsirkin wrote: > > > On Tue, May 05, 2009 at 07:49:10AM -0300, Marcelo Tosatti wrote: > > > > On T

Re: [PATCH] msi-x: let drivers retry when not enough vectors

2009-05-07 Thread Sheng Yang
On Thursday 07 May 2009 16:28:41 Michael S. Tsirkin wrote: > pci_enable_msix currently returns -EINVAL if you ask > for more vectors than supported by the device, which would > typically cause fallback to regular interrupts. > > It's better to return the table size, making the driver retry > MSI-X

Re: [PATCH] msi-x: let drivers retry when not enough vectors

2009-05-07 Thread Sheng Yang
On Thursday 07 May 2009 17:05:06 Michael S. Tsirkin wrote: > On Thu, May 07, 2009 at 04:51:24PM +0800, Sheng Yang wrote: > > On Thursday 07 May 2009 16:28:41 Michael S. Tsirkin wrote: > > > pci_enable_msix currently returns -EINVAL if you ask > > > for more vectors t

Re: [PATCH] msi-x: let drivers retry when not enough vectors

2009-05-07 Thread Sheng Yang
On Thursday 07 May 2009 17:27:31 Matthew Wilcox wrote: > On Thu, May 07, 2009 at 04:51:24PM +0800, Sheng Yang wrote: > > On Thursday 07 May 2009 16:28:41 Michael S. Tsirkin wrote: > > > pci_enable_msix currently returns -EINVAL if you ask > > > for more vectors than sup

Re: [PATCH] msi-x: let drivers retry when not enough vectors

2009-05-07 Thread Sheng Yang
On Thursday 07 May 2009 17:53:02 Matthew Wilcox wrote: > On Thu, May 07, 2009 at 05:40:15PM +0800, Sheng Yang wrote: > > It's indeed weird. Why the semantic of pci_enable_msix can be changed to > > "enable msix, or tell me how many vector do you have"? You can simpl

Re: [PATCH] msi-x: let drivers retry when not enough vectors

2009-05-07 Thread Sheng Yang
On Thursday 07 May 2009 18:23:50 Michael Ellerman wrote: > On Thu, 2009-05-07 at 03:53 -0600, Matthew Wilcox wrote: > > On Thu, May 07, 2009 at 05:40:15PM +0800, Sheng Yang wrote: > > > It's indeed weird. Why the semantic of pci_enable_msix can be changed > > > to &

Re: [PATCH] KVM: Fix assigned device with no irq

2009-05-07 Thread Sheng Yang
On Thursday 07 May 2009 20:28:12 Marcelo Tosatti wrote: > On Thu, May 07, 2009 at 03:24:15PM +0300, Avi Kivity wrote: > > Sheng Yang wrote: > >> Some device like VF of SRIOV only support MSI-X. > >> > >> With this patch, SRIOV can be enabled with KVM assigned

Re: [PATCH] kvm: device-assignment: Catch GSI overflow

2009-05-08 Thread Sheng Yang
On Friday 08 May 2009 01:16:53 Alex Williamson wrote: > On Thu, 2009-05-07 at 11:09 -0600, Alex Williamson wrote: > > Fix the index at which we return -ENOSPC since the kernel side will > > reject a GSI >= KVM_MAX_IRQ_ROUTES. Also, mask as a signed int before > > testing for error. > > Even with t

[PATCH 1/1] KVM: Fix potentially recursively get kvm lock

2009-05-12 Thread Sheng Yang
ported-by: Alex Williamson Signed-off-by: Sheng Yang --- virt/kvm/kvm_main.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4d00942..3c69655 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -215,6

Re: [PATCH] kvm: discard masking checking when initial MSI-X entries

2009-05-14 Thread Sheng Yang
On Tuesday 05 May 2009 11:41:55 Sheng Yang wrote: > This meant to be with commit: adcf3594f9580bdf9b5e71f271b6088b185e017e, > otherwise QEmu only counts the MSI-X entries, but won't fill it... > > Signed-off-by: Sheng Yang > --- > hw/device-assignment.c |2 -- > 1 f

Re: KVM_ASSIGN_SET_MSIX_NR and KVM_ASSIGN_SET_MSIX_ENTRY should support MSI?

2009-05-20 Thread Sheng Yang
On Tuesday 05 May 2009 19:29:14 Gregory Haskins wrote: > Michael S. Tsirkin wrote: > > The new KVM_ASSIGN_SET_MSIX_NR and KVM_ASSIGN_SET_MSIX_ENTRY ioctls have > > been merged for 2.6.30. However, I note that PCI spec allows devices to > > support multiple vectors with MSI as well (support will be

[PATCH] KVM: Downsize max support MSI-X entry to 256

2009-05-20 Thread Sheng Yang
We only trap one page for MSI-X entry now, so it's 4k/(128/8) = 256 entries at most. Signed-off-by: Sheng Yang --- include/linux/kvm.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 3db5d8d..533e864 100644 --- a/in

[PATCH] Fix qemu-img can't create qcow image based on read-only image

2010-01-27 Thread Sheng Yang
Commit 03cbdac7 "Disable fall-back to read-only when cannot open drive's file for read-write" result in read-only image can't be used as backed image in qemu-img. CC: Naphtali Sprei Signed-off-by: Sheng Yang --- This issue blocked our QA's KVM nightly test. But in fact

Re: [Qemu-devel] [PATCH] Fix qemu-img can't create qcow image based on read-only image

2010-01-28 Thread Sheng Yang
On Thursday 28 January 2010 17:17:22 Kevin Wolf wrote: > Am 28.01.2010 06:22, schrieb Sheng Yang: > > Commit 03cbdac7 "Disable fall-back to read-only when cannot open drive's > > file for read-write" result in read-only image can't be used as backed > >

[PATCH v2] qemu-img: Fix qemu-img can't create qcow image based on read-only image

2010-01-28 Thread Sheng Yang
Commit 03cbdac7 "Disable fall-back to read-only when cannot open drive's file for read-write" result in read-only image can't be used as backed image in qemu-img. Cc: Naphtali Sprei Signed-off-by: Sheng Yang --- qemu-img.c | 15 ++- 1 files changed, 10 insert

Re: [PATCH] KVM: Remove redundant check in vm_need_virtualize_apic_accesses()

2010-01-28 Thread Sheng Yang
On Friday 29 January 2010 15:36:59 Gui Jianfeng wrote: > flexpriority_enabled implies cpu_has_vmx_virtualize_apic_accesses() > returning true, so we don't need this check here. > Looks fine to me. -- regards Yang, Sheng > Signed-off-by: Gui Jianfeng > --- > arch/x86/kvm/vmx.c |4 +--- >

Re: Question about guest MSR loading/saving (Intel)

2010-02-01 Thread Sheng Yang
On Tuesday 02 February 2010 09:57:08 Kurt Kiefer wrote: > Hi all, > > This is a vague/general question. For some background: I have a reason > (control of IA32_PERF_GLOBAL_CTRL) for loading/saving MSRs on VM-entry/ > exit. To get this to work correctly, I made changes to use the > conventional VMX

[PATCH] KVM: VMX: Rename VMX_EPT_IGMT_BIT to VMX_EPT_IPAT_BIT

2010-02-09 Thread Sheng Yang
Following the new SDM. Now the bit is named "Ignore PAT memory type". Signed-off-by: Sheng Yang --- arch/x86/include/asm/vmx.h |2 +- arch/x86/kvm/vmx.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/i

[PATCH] x86/kvm: Show guest system/user cputime in cpustat

2010-03-10 Thread Sheng Yang
Currently we can only get the cpu_stat of whole guest as one. This patch enhanced cpu_stat with more detail, has guest_system and guest_user cpu time statistics with a little overhead. Signed-off-by: Sheng Yang --- This draft patch based on KVM upstream to show the idea. I would split it into

Re: [PATCH] x86/kvm: Show guest system/user cputime in cpustat

2010-03-10 Thread Sheng Yang
On Thursday 11 March 2010 15:36:01 Avi Kivity wrote: > On 03/11/2010 09:20 AM, Sheng Yang wrote: > > Currently we can only get the cpu_stat of whole guest as one. This patch > > enhanced cpu_stat with more detail, has guest_system and guest_user cpu > > time statistics w

Make QEmu HPET disabled by default for KVM?

2010-03-10 Thread Sheng Yang
I think we have already suffered enough timer issues due to this(e.g. I can't boot up well on 2.6.18 kernel)... I have kept --no-hpet in my setup for months... -- regards Yang, Sheng -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.ker

Re: Make QEmu HPET disabled by default for KVM?

2010-03-11 Thread Sheng Yang
On Thursday 11 March 2010 15:58:12 Avi Kivity wrote: > On 03/11/2010 09:52 AM, Sheng Yang wrote: > > I think we have already suffered enough timer issues due to this(e.g. I > > can't boot up well on 2.6.18 kernel)... > > 2.6.18 as guest or as host? Guest > > I

Re: Make QEmu HPET disabled by default for KVM?

2010-03-11 Thread Sheng Yang
On Thursday 11 March 2010 16:31:57 Gleb Natapov wrote: > On Thu, Mar 11, 2010 at 10:28:12AM +0200, Avi Kivity wrote: > > On 03/11/2010 10:23 AM, Sheng Yang wrote: > > >>>I have kept --no-hpet in my setup for > > >>>months... > > >> > > >

Re: [PATCH] x86/kvm: Show guest system/user cputime in cpustat

2010-03-11 Thread Sheng Yang
On Thursday 11 March 2010 15:50:54 Avi Kivity wrote: > On 03/11/2010 09:46 AM, Sheng Yang wrote: > > On Thursday 11 March 2010 15:36:01 Avi Kivity wrote: > >> On 03/11/2010 09:20 AM, Sheng Yang wrote: > >>> Currently we can only get the cpu_stat of whole guest as

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Sheng Yang
On Wednesday 17 March 2010 10:34:33 Zhang, Yanmin wrote: > On Tue, 2010-03-16 at 11:32 +0200, Avi Kivity wrote: > > On 03/16/2010 09:48 AM, Zhang, Yanmin wrote: > > > Right, but there is a scope between kvm_guest_enter and really running > > > in guest os, where a perf event might overflow. Anyway,

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Sheng Yang
On Wednesday 17 March 2010 17:41:58 Avi Kivity wrote: > On 03/17/2010 11:28 AM, Sheng Yang wrote: > >> I'm not sure if vmexit does break NMI context or not. Hardware NMI > >> context isn't reentrant till a IRET. YangSheng would like to double > >> check i

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Sheng Yang
On Thursday 18 March 2010 05:14:52 Zachary Amsden wrote: > On 03/16/2010 11:28 PM, Sheng Yang wrote: > > On Wednesday 17 March 2010 10:34:33 Zhang, Yanmin wrote: > >> On Tue, 2010-03-16 at 11:32 +0200, Avi Kivity wrote: > >>> On 03/16/2010 09:48 AM, Zhang, Yanmin wro

Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled

2010-03-17 Thread Sheng Yang
On Thursday 18 March 2010 02:37:10 Alexander Graf wrote: > Marcelo Tosatti wrote: > > On Fri, Nov 27, 2009 at 04:46:26PM +0800, Sheng Yang wrote: > >> Otherwise would cause VMEntry failure when using ept=0 on unrestricted > >> guest supported processors. > >

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Sheng Yang
On Thursday 18 March 2010 12:50:58 Zachary Amsden wrote: > On 03/17/2010 03:19 PM, Sheng Yang wrote: > > On Thursday 18 March 2010 05:14:52 Zachary Amsden wrote: > >> On 03/16/2010 11:28 PM, Sheng Yang wrote: > >>> On Wednesday 17 March 2010 10:34:33 Zhang, Yanmin wr

Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side

2010-03-17 Thread Sheng Yang
On Thursday 18 March 2010 13:22:28 Sheng Yang wrote: > On Thursday 18 March 2010 12:50:58 Zachary Amsden wrote: > > On 03/17/2010 03:19 PM, Sheng Yang wrote: > > > On Thursday 18 March 2010 05:14:52 Zachary Amsden wrote: > > >> On 03/16/2010 11:28 PM, Sheng Yang

Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled

2010-03-17 Thread Sheng Yang
On Thursday 18 March 2010 13:51:41 Alexander Graf wrote: > On 18.03.2010, at 02:50, Sheng Yang wrote: > > On Thursday 18 March 2010 02:37:10 Alexander Graf wrote: > >> Marcelo Tosatti wrote: > >>> On Fri, Nov 27, 2009 at 04:46:26PM +0800, Sheng Yang wrote: > &

[PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled

2010-03-17 Thread Sheng Yang
Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest supported processors. Signed-off-by: Sheng Yang --- Please apply this to 2.6.32 stable. Thanks! Patch already in the upstream, commit: 046d87103addc117f0d397196e85189722d4d7de arch/x86/kvm/vmx.c |4 +++- 1 files

Re: [PATCH] KMV: VMX: consult IA32_VMX_EPT_VPID_CAP to determine EPT paging-structure memory type

2010-03-22 Thread Sheng Yang
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 > --- > arch/x86/include/asm/vmx.h |2 ++ > arch/x86/kvm/vmx.c | 12 +--- >

Re: Completing big real mode emulation

2010-03-24 Thread Sheng Yang
On Saturday 20 March 2010 23:00:49 Alexander Graf wrote: > Am 20.03.2010 um 15:02 schrieb Mohammed Gamal : > > On Sat, Mar 20, 2010 at 3:18 PM, Avi Kivity wrote: > >> On 03/20/2010 10:55 AM, Alexander Graf wrote: > > I'd say that a GSoC project would rather focus on making a guest > > OS w

Re: MSI-X not enabled for ixgbe device-passthrough

2010-03-24 Thread Sheng Yang
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 res

Re: [Qemu-devel] [PATCH v2 0/2] Use kvm64/kvm32 when running under KVM

2010-08-25 Thread Sheng Yang
On Wednesday 28 July 2010 20:42:22 jes.soren...@redhat.com wrote: > From: Jes Sorensen > > This set of patches adds default CPU types to the PC compat > definitions, and patch #2 sets the CPU type to kvm64/kvm32 when > running under KVM. > > Long term we might want to qdev'ify the CPUs but I thi

Re: KVM Test report, kernel e6a9246... qemu 94f964d...

2010-09-07 Thread Sheng Yang
On Tuesday 07 September 2010 16:15:05 Avi Kivity wrote: > On 09/07/2010 10:22 AM, Hao, Xudong wrote: > >> I never assigned a pci device in my life... > > > > Avi, I assumed your platform has no EPT hardware feature, right? > > Correct. > > > I tried sevral platforms, if I used no EPT suported

Re: KVM Test report, kernel e6a9246... qemu 94f964d...

2010-09-07 Thread Sheng Yang
On Tuesday 07 September 2010 21:23:29 Avi Kivity wrote: > On 09/07/2010 03:31 PM, Avi Kivity wrote: > > On 09/07/2010 03:04 PM, Avi Kivity wrote: > >> On 09/07/2010 02:27 PM, Avi Kivity wrote: > >>> On 09/07/2010 11:54 AM, Sheng Yang wrote:

Re: [PATCH] KVM: x86: fixup set_efer()

2010-09-09 Thread Sheng Yang
On Wednesday 08 September 2010 18:04:18 Avi Kivity wrote: > On 09/04/2010 04:29 PM, Hillf Danton wrote: > > The second call to kvm_mmu_reset_context() seems unnecessary and is > > removed. > > > > > > @@ -783,10 +783,6 @@ static int set_efer(struct kvm_vcpu *vcp > > vcpu->arch.mmu.base_role.nxe

Re: [PATCH 18/24] Exiting from L2 to L1

2010-09-12 Thread Sheng Yang
On Monday 13 September 2010 01:21:29 Avi Kivity wrote: > On 09/12/2010 07:05 PM, Nadav Har'El wrote: > >> I don't think so. We write this field as part of guest entry (that is, > >> after the decision re which vmcs to use, yes?), so guest entry will > >> always follow writing this field. Since

[PATCH] KVM: x86 emulator: Eliminate compilation warning in x86_decode_insn()

2010-09-28 Thread Sheng Yang
Eliminate: arch/x86/kvm/emulate.c:801: warning: ‘sv’ may be used uninitialized in this function on gcc 4.1.2 Signed-off-by: Sheng Yang --- arch/x86/kvm/emulate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[PATCH] qemu-kvm: device assignment: Reflect assigned device's MSI data/address modification to KVM

2010-09-28 Thread Sheng Yang
Device driver can modify MSI data/address when MSI is enabled. This patch reflect the moditication to KVM. Signed-off-by: Sheng Yang --- hw/device-assignment.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index

[PATCH 0/3] Emulate MSI-X mask bits for assigned devices

2010-09-28 Thread Sheng Yang
Hi Avi & Marcelo This patchset would add emulation of MSI-X mask bit for assigned devices in QEmu. BTW: We are also purposed an acceleration of MSI-X mask bit for KVM - to get it done in kernel. That's because sometime MSI-X mask bit was accessed very frequently by guest and emulation in QEmu cos

[PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-09-28 Thread Sheng Yang
This patch enable per-vector mask for assigned devices using MSI-X. Signed-off-by: Sheng Yang --- arch/x86/kvm/x86.c |1 + include/linux/kvm.h |9 - include/linux/kvm_host.h |1 + virt/kvm/assigned-dev.c | 39 +++ 4 files

[PATCH 2/3] qemu-kvm: device assignment: Some clean up for MSI-X code

2010-09-28 Thread Sheng Yang
Signed-off-by: Sheng Yang --- hw/device-assignment.c | 75 --- 1 files changed, 51 insertions(+), 24 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 87f7418..4edae52 100644 --- a/hw/device-assignment.c +++ b/hw

[PATCH 3/3] qemu-kvm: device assignment: emulate MSI-X mask bits

2010-09-28 Thread Sheng Yang
This patch emulated MSI-X per vector mask bit on assigned device. Signed-off-by: Sheng Yang --- hw/device-assignment.c | 127 +++- 1 files changed, 126 insertions(+), 1 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-09-28 Thread Sheng Yang
On Tuesday 28 September 2010 21:36:00 Michael S. Tsirkin wrote: > On Tue, Sep 28, 2010 at 05:44:10PM +0800, Sheng Yang wrote: > > This patch enable per-vector mask for assigned devices using MSI-X. > > > > Signed-off-by: Sheng Yang > > --- > > > > arch/x8

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-09-29 Thread Sheng Yang
On Wednesday 29 September 2010 16:36:25 Avi Kivity wrote: > On 09/28/2010 11:44 AM, Sheng Yang wrote: > > This patch enable per-vector mask for assigned devices using MSI-X. > > > > + > > > > struct kvm_assigned_msix_entry { > > > >

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-10-11 Thread Sheng Yang
On Sunday 03 October 2010 19:12:47 Michael S. Tsirkin wrote: > On Tue, Sep 28, 2010 at 05:44:10PM +0800, Sheng Yang wrote: > > This patch enable per-vector mask for assigned devices using MSI-X. > > > > Signed-off-by: Sheng Yang > > I think I see an issue here,

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-10-11 Thread Sheng Yang
On Sunday 03 October 2010 21:03:16 Avi Kivity wrote: > On 09/30/2010 07:41 AM, Sheng Yang wrote: > > On Wednesday 29 September 2010 16:36:25 Avi Kivity wrote: > > >On 09/28/2010 11:44 AM, Sheng Yang wrote: > > > > This patch enable per-vector mask fo

Re: [PATCH 0/3] Emulate MSI-X mask bits for assigned devices

2010-10-11 Thread Sheng Yang
On Friday 01 October 2010 00:44:51 Marcelo Tosatti wrote: > On Tue, Sep 28, 2010 at 05:44:09PM +0800, Sheng Yang wrote: > > Hi Avi & Marcelo > > > > This patchset would add emulation of MSI-X mask bit for assigned devices > > in QEmu. > > > > BTW: We

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-10-11 Thread Sheng Yang
On Friday 01 October 2010 00:18:10 Marcelo Tosatti wrote: > On Tue, Sep 28, 2010 at 05:44:10PM +0800, Sheng Yang wrote: > > This patch enable per-vector mask for assigned devices using MSI-X. > > > > Signed-off-by: Sheng Yang > > --- > > > > arch/x86/kvm/

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-10-11 Thread Sheng Yang
On Monday 11 October 2010 18:01:00 Michael S. Tsirkin wrote: > On Mon, Oct 11, 2010 at 05:28:30PM +0800, Sheng Yang wrote: > > On Sunday 03 October 2010 19:12:47 Michael S. Tsirkin wrote: > > > On Tue, Sep 28, 2010 at 05:44:10PM +0800, Sheng Yang wrote: > > > > Thi

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-10-12 Thread Sheng Yang
On Wednesday 13 October 2010 02:30:30 Michael S. Tsirkin wrote: > On Tue, Oct 12, 2010 at 02:49:58PM +0800, Sheng Yang wrote: > > On Monday 11 October 2010 18:01:00 Michael S. Tsirkin wrote: > > > On Mon, Oct 11, 2010 at 05:28:30PM +0800, Sheng Yang wrote: > > > > O

Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices

2010-10-12 Thread Sheng Yang
On Wednesday 13 October 2010 02:28:59 Michael S. Tsirkin wrote: > On Tue, Oct 12, 2010 at 02:49:58PM +0800, Sheng Yang wrote: > > On Monday 11 October 2010 18:01:00 Michael S. Tsirkin wrote: > > > On Mon, Oct 11, 2010 at 05:28:30PM +0800, Sheng Yang wrote: > > > > O

[PATCH 0/8][v2] MSI-X mask emulation support for assigned device

2010-10-20 Thread Sheng Yang
odule... Also add flush_work() according to Marcelo's comments. Sheng Yang (8): PCI: MSI: Move MSI-X entry definition to pci_regs.h irq: Export irq_to_desc() to modules KVM: x86: Enable ENABLE_CAP capability for x86 KVM: Move struct kvm_io_device to kvm_host.h KVM: Add kvm_get_irq_rou

[PATCH 4/8] KVM: Move struct kvm_io_device to kvm_host.h

2010-10-20 Thread Sheng Yang
Then it can be used in struct kvm_assigned_dev_kernel later. Signed-off-by: Sheng Yang --- include/linux/kvm_host.h | 23 +++ virt/kvm/iodev.h | 25 + 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/linux

[PATCH 2/8] irq: Export irq_to_desc() to modules

2010-10-20 Thread Sheng Yang
KVM need to execute mask/unmask directly on MSI/MSI-X devices. The alternative way of doing this is export mask_msi_irq(), but it lacks of checking if IRQ type was really MSI. Cc: linux-ker...@vger.kernel.org Signed-off-by: Sheng Yang --- kernel/irq/handle.c |2 ++ 1 files changed, 2

[PATCH 7/8] KVM: assigned dev: Introduce io_device for MSI-X MMIO accessing

2010-10-20 Thread Sheng Yang
It would be work with KVM_CAP_DEVICE_MSIX_MASK, which we would enable in the last patch. Signed-off-by: Sheng Yang --- include/linux/kvm.h |7 +++ include/linux/kvm_host.h |2 + virt/kvm/assigned-dev.c | 131 ++ 3 files changed, 140

[PATCH 6/8] KVM: assigned dev: Preparation for mask support in userspace

2010-10-20 Thread Sheng Yang
The feature wouldn't be enabled until later patch set msix_flags_enabled. It would be enabled along with mask support in kernel. Signed-off-by: Sheng Yang --- arch/x86/include/asm/kvm_host.h |2 ++ include/linux/kvm.h |6 +- include/linux/kvm_host.h|1 +

[PATCH 5/8] KVM: Add kvm_get_irq_routing_entry() func

2010-10-20 Thread Sheng Yang
We need to query the entry later. Signed-off-by: Sheng Yang --- include/linux/kvm_host.h |2 ++ virt/kvm/irq_comm.c | 20 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 7f9e4b7..30f83cd

[PATCH 3/8] KVM: x86: Enable ENABLE_CAP capability for x86

2010-10-20 Thread Sheng Yang
It would be used later by KVM_CAP_MSIX_MASK related interfaces. Signed-off-by: Sheng Yang --- Documentation/kvm/api.txt |8 +--- arch/x86/kvm/x86.c| 26 ++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Documentation/kvm/api.txt b

[PATCH 1/8] PCI: MSI: Move MSI-X entry definition to pci_regs.h

2010-10-20 Thread Sheng Yang
It would be used by KVM later. Cc: Jesse Barnes Cc: linux-...@vger.kernel.org Signed-off-by: Sheng Yang --- drivers/pci/msi.h|6 -- include/linux/pci_regs.h |7 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h

[PATCH 8/8] KVM: Emulation MSI-X mask bits for assigned devices

2010-10-20 Thread Sheng Yang
This patch enable per-vector mask for assigned devices using MSI-X. Signed-off-by: Sheng Yang --- Documentation/kvm/api.txt | 22 arch/x86/kvm/x86.c|6 include/linux/kvm.h |8 +- virt/kvm/assigned-dev.c | 60

[PATCH 1/5] qemu-kvm: Add kvm_enable_cap() interface for x86

2010-10-20 Thread Sheng Yang
Signed-off-by: Sheng Yang --- qemu-kvm.c | 16 qemu-kvm.h |8 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 733d0a9..fbb68f6 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -540,6 +540,22 @@ int kvm_set_xcrs(CPUState

[PATCH 0/5] MSI-X mask support for assigned device on userspace

2010-10-20 Thread Sheng Yang
Sheng Yang (5): qemu-kvm: Add kvm_enable_cap() interface for x86 qemu-kvm: Ioctl for in-kernel mask support qemu-kvm: device assignment: Some clean up about MSI-X code qemu-kvm: device assignment: emulate MSI-X mask bits qemu-kvm: device assignment: Enable in-kernel MSI-X mask support

[PATCH 5/5] qemu-kvm: device assignment: Enable in-kernel MSI-X mask support

2010-10-20 Thread Sheng Yang
Signed-off-by: Sheng Yang --- hw/device-assignment.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index d1a6282..aa3358e 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -269,6 +269,9

[PATCH 3/5] qemu-kvm: device assignment: Some clean up about MSI-X code

2010-10-20 Thread Sheng Yang
Signed-off-by: Sheng Yang --- hw/device-assignment.c | 77 --- 1 files changed, 52 insertions(+), 25 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 2605bd1..8a98876 100644 --- a/hw/device-assignment.c +++ b/hw

[PATCH 4/5] qemu-kvm: device assignment: emulate MSI-X mask bits

2010-10-20 Thread Sheng Yang
This patch emulated MSI-X per vector mask bit on assigned device. Signed-off-by: Sheng Yang --- hw/device-assignment.c | 151 ++-- 1 files changed, 145 insertions(+), 6 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index

[PATCH 2/5] qemu-kvm: Ioctl for in-kernel mask support

2010-10-20 Thread Sheng Yang
Signed-off-by: Sheng Yang --- qemu-kvm.c |9 + qemu-kvm.h |4 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index fbb68f6..bb817d6 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1108,6 +1108,15 @@ int kvm_assign_set_msix_entry

Re: [PATCH 5/8] KVM: Add kvm_get_irq_routing_entry() func

2010-10-20 Thread Sheng Yang
On Wednesday 20 October 2010 16:53:02 Avi Kivity wrote: > On 10/20/2010 10:26 AM, Sheng Yang wrote: > > We need to query the entry later. > > > > > > +struct kvm_kernel_irq_routing_entry *kvm_get_irq_routin

[PATCH 5/8] KVM: Add kvm_get_irq_routing_entry() func

2010-10-20 Thread Sheng Yang
We need to query the entry later. Signed-off-by: Sheng Yang --- include/linux/kvm_host.h |2 ++ virt/kvm/irq_comm.c | 20 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 7f9e4b7..e2ecbac

[PATCH 5/8] KVM: Add kvm_get_irq_routing_entry() func

2010-10-20 Thread Sheng Yang
We need to query the entry later. Signed-off-by: Sheng Yang --- include/linux/kvm_host.h |2 ++ virt/kvm/irq_comm.c | 20 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 7f9e4b7..e2ecbac

Re: [PATCH 7/8] KVM: assigned dev: Introduce io_device for MSI-X MMIO accessing

2010-10-20 Thread Sheng Yang
On Wednesday 20 October 2010 17:46:47 Avi Kivity wrote: > On 10/20/2010 10:26 AM, Sheng Yang wrote: > > It would be work with KVM_CAP_DEVICE_MSIX_MASK, which we would enable in > > the last patch. > > > > > > +struct kvm_assigned_msix_mmio { > > +

Re: [PATCH 0/8][v2] MSI-X mask emulation support for assigned device

2010-10-21 Thread Sheng Yang
On Thursday 21 October 2010 03:02:24 Marcelo Tosatti wrote: > On Wed, Oct 20, 2010 at 04:26:24PM +0800, Sheng Yang wrote: > > Here is v2. > > > > Changelog: > > > > v1->v2 > > > > The major change from v1 is I've added the in-kernel MSI-X ma

Re: [PATCH 5/5] qemu-kvm: device assignment: Enable in-kernel MSI-X mask support

2010-10-21 Thread Sheng Yang
On Thursday 21 October 2010 06:36:56 Michael S. Tsirkin wrote: > On Wed, Oct 20, 2010 at 04:29:55PM +0800, Sheng Yang wrote: > > Signed-off-by: Sheng Yang > > --- > > > > hw/device-assignment.c | 13 + > > 1 files changed, 13 insertions(+), 0 dele

<    1   2   3   4   5   6   7   8   9   10   >