Re: [PATCH 0/1] x2apic implementation for kvm

2009-05-24 Thread Sheng Yang
On Friday 22 May 2009 01:37:53 Gleb Natapov wrote: > This is implementation of x2apic for KVM that I wrote a while ago. > Unfortunately there is no guest that can take advantage of it since > Linux doesn't (yet?) use x2apic if interrupt remapping is not enabled > and I don't feel like implement int

Re: [PATCH 0/1] x2apic implementation for kvm

2009-05-24 Thread Sheng Yang
On Monday 25 May 2009 14:13:23 Gleb Natapov wrote: > On Mon, May 25, 2009 at 02:08:26PM +0800, Sheng Yang wrote: > > On Friday 22 May 2009 01:37:53 Gleb Natapov wrote: > > > This is implementation of x2apic for KVM that I wrote a while ago. > > > Unfortunately ther

Re: [PATCH 0/1] x2apic implementation for kvm

2009-05-24 Thread Sheng Yang
On Monday 25 May 2009 14:38:11 Gleb Natapov wrote: > On Mon, May 25, 2009 at 02:30:05PM +0800, Sheng Yang wrote: > > On Monday 25 May 2009 14:13:23 Gleb Natapov wrote: > > > On Mon, May 25, 2009 at 02:08:26PM +0800, Sheng Yang wrote: > > > > On Friday 22 May 20

Re: [PATCH 0/1] x2apic implementation for kvm

2009-05-25 Thread Sheng Yang
On Monday 25 May 2009 17:07:33 Avi Kivity wrote: > Sheng Yang wrote: > > OK, you are totally talking about PV. For PV, I think let host kernel > > accept the modification is more important here. (And for PV, using > > hypercall seems more directly). > > Microsoft alrea

Re: [PATCH 0/1] x2apic implementation for kvm

2009-05-25 Thread Sheng Yang
On Monday 25 May 2009 17:22:34 Avi Kivity wrote: > Sheng Yang wrote: > > I think that means the PV interface for lapic. And yes, we can support it > > follow MS's interface, but x2apic still seems another story as you > > noted... I still don't think support

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Sheng Yang
On Monday 01 June 2009 21:22:02 Avi Kivity wrote: > Instead of reading the PDPTRs from memory after every exit (which is slow > and wrong, as the PDPTRs are stored on the cpu), sync the PDPTRs from > memory to the VMCS before entry, and from the VMCS to memory after exit. > Do the same for cr3. >

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Sheng Yang
On Tuesday 02 June 2009 17:26:27 Avi Kivity wrote: > Sheng Yang wrote: > > On Monday 01 June 2009 21:22:02 Avi Kivity wrote: > >> Instead of reading the PDPTRs from memory after every exit (which is > >> slow and wrong, as the PDPTRs are stored on the cpu), sync the PDP

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Sheng Yang
On Tuesday 02 June 2009 17:46:39 Avi Kivity wrote: > Sheng Yang wrote: > > No, no, not with the new code. For CPU can load pdptrs if EPT enabled > > with PAE from VM exit, there should not be necessary load it explicitly. > > So I estimate the ept_load_pdptr() in exit handl

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Sheng Yang
On Tuesday 02 June 2009 18:16:14 Avi Kivity wrote: > Sheng Yang wrote: > > On Tuesday 02 June 2009 17:46:39 Avi Kivity wrote: > >> Sheng Yang wrote: > >>> No, no, not with the new code. For CPU can load pdptrs if EPT enabled > >>> with PAE from VM e

Re: kvm: emulation failure

2009-06-21 Thread Sheng Yang
On Saturday 20 June 2009 03:23:40 Ram Pai wrote: > I see this problem with a x86 sles10 guest running on x86_64 intel host. > If the guest is reset abruptly and rebooted, some where > before grub sequence it hangs and the following message is seen in the > logs > > emulation failed (pagetable) rip

Re: kvm: emulation failure

2009-06-22 Thread Sheng Yang
On Monday 22 June 2009 14:55:46 Ram Pai wrote: > On Mon, 2009-06-22 at 13:12 +0800, Sheng Yang wrote: > > On Saturday 20 June 2009 03:23:40 Ram Pai wrote: > > > I see this problem with a x86 sles10 guest running on x86_64 intel > > > host. If the guest is reset abrupt

Re: [PATCH] enable x2APIC without interrupt remapping under KVM

2009-06-29 Thread Sheng Yang
On Sunday 28 June 2009 20:51:14 Gleb Natapov wrote: > KVM would like to provide x2APIC interface to a guest without emulating > interrupt remapping device. The reason KVM prefers guest to use x2APIC > is that x2APIC interface is better virtualizable and provides better > performance than mmio x

Re: Device assignment hotplug broken

2009-06-29 Thread Sheng Yang
On Friday 26 June 2009 01:24:03 Avi Kivity wrote: > The impact of the hotplug changes on device assignment were too > difficult for me to fix up during the merge, so I disabled it > temporarily. Please take a look at qemu-kvm.git commit a3b371477e3. When the device assignment can come back? 4 day

Re: Device assignment hotplug broken

2009-06-30 Thread Sheng Yang
On Tuesday 30 June 2009 20:28:08 Markus Armbruster wrote: > Sheng Yang writes: > > On Friday 26 June 2009 01:24:03 Avi Kivity wrote: > >> The impact of the hotplug changes on device assignment were too > >> difficult for me to fix up during the merge, so I disabled i

[PATCH] KVM: Fix IA32e Windows can't boot issue

2009-07-01 Thread Sheng Yang
est RMW it, then got trouble. Signed-off-by: Sheng Yang --- arch/x86/kvm/vmx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 119fa47..3a75db3 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2903,7 +2903,7 @@

Re: [PATCH] KVM: Fix IA32e Windows can't boot issue

2009-07-01 Thread Sheng Yang
On Wednesday 01 July 2009 16:21:13 Avi Kivity wrote: > On 07/01/2009 11:07 AM, Sheng Yang wrote: > > One typo in commit: "KVM: convert custom marker based tracing to > > event traces" caused: > > > > set_cr8: #GP, reserved bits 0x7f > > > > whe

[PATCH] KVM: Fix apic_mmio_write return for unaligned write

2009-07-05 Thread Sheng Yang
Some in-famous OS do unaligned writing for APIC MMIO, and the return value has been missed in recent change, then the OS hangs. (it's curious that the compilation warning have been ignored...) Signed-off-by: Sheng Yang --- arch/x86/kvm/lapic.c |2 +- 1 files changed, 1 insertions(

Re: [PATCH][KVM][retry 4] Add support for Pause Filtering to AMD SVM

2009-07-07 Thread Sheng Yang
On Thursday 21 May 2009 06:25:17 Mark Langsdorf wrote: > This feature creates a new field in the VMCB called Pause > Filter Count. If Pause Filter Count is greater than 0 and > intercepting PAUSEs is enabled, the processor will increment > an internal counter when a PAUSE instruction occurs instea

Re: [PATCH][KVM][retry 4] Add support for Pause Filtering to AMD SVM

2009-07-08 Thread Sheng Yang
o you have time to work on it recently? Maybe we can help to push the scheduler part. (oh, as you know, we need to push our PLE...) -- regards Yang, Sheng > -Mark Langsdorf > Operating System Research Center > AMD > > > -Original Message- > > From: Sheng Yang [mailt

[PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load()

2009-07-09 Thread Sheng Yang
set_cr3() should already cover the TLB flushing. Signed-off-by: Sheng Yang --- arch/x86/kvm/mmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 231d880..501c11e 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c

Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load()

2009-07-13 Thread Sheng Yang
On Thursday 09 July 2009 17:00:42 Sheng Yang wrote: > set_cr3() should already cover the TLB flushing. > Comments? -- regards Yang, Sheng > Signed-off-by: Sheng Yang > --- > arch/x86/kvm/mmu.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --gi

Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load()

2009-07-13 Thread Sheng Yang
On Monday 13 July 2009 20:23:58 Avi Kivity wrote: > On 07/09/2009 12:00 PM, Sheng Yang wrote: > > set_cr3() should already cover the TLB flushing. > > > > Signed-off-by: Sheng Yang > > --- > > arch/x86/kvm/mmu.c |2 +- > > 1 files changed, 1 insertion

Re: [PATCH] Update qemu-kvm to allow a larger BIOS image.

2009-07-15 Thread Sheng Yang
On Thursday 16 July 2009 08:12:15 Jordan Justen wrote: > Previously the KVM kernel module would allocate the address range > of 0xfffbc000-0xfffbcfff for the EPT Indentity Page Tables. > A separate patch is moving that to 0xfeffc000-0xfeffcfff. Hi Jordan You need one more patch for upstream kvm,

Re: [PATCH] always report x2apic as supported feature

2009-07-15 Thread Sheng Yang
On Thursday 16 July 2009 07:01:30 Marcelo Tosatti wrote: > On Sun, Jul 12, 2009 at 04:10:55PM +0300, Gleb Natapov wrote: > > We emulate x2apic in software, so host support is not required. > > > > Signed-off-by: Gleb Natapov > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > index 00844e

Re: [PATCH] Update qemu-kvm to allow a larger BIOS image.

2009-07-15 Thread Sheng Yang
On Thursday 16 July 2009 10:58:53 Jordan Justen wrote: > On Wed, Jul 15, 2009 at 6:34 PM, Sheng Yang wrote: > > On Thursday 16 July 2009 08:12:15 Jordan Justen wrote: > > > Previously the KVM kernel module would allocate the address range > > > of 0xfffbc000-0xfffbcfff

Re: [PATCH] Update qemu-kvm to allow a larger BIOS image.

2009-07-15 Thread Sheng Yang
On Thursday 16 July 2009 12:57:02 Jordan Justen wrote: > On Wed, Jul 15, 2009 at 8:08 PM, Sheng Yang wrote: > > On Thursday 16 July 2009 10:58:53 Jordan Justen wrote: > >> On Wed, Jul 15, 2009 at 6:34 PM, Sheng Yang wrote: > >> > On Thursday 16 July 200

Re: [PATCH] always report x2apic as supported feature

2009-07-15 Thread Sheng Yang
On Thursday 16 July 2009 14:00:15 Gleb Natapov wrote: > On Thu, Jul 16, 2009 at 09:46:21AM +0800, Sheng Yang wrote: > > On Thursday 16 July 2009 07:01:30 Marcelo Tosatti wrote: > > > On Sun, Jul 12, 2009 at 04:10:55PM +0300, Gleb Natapov wrote: > > > > We emula

Re: [PATCHv4] uio: add generic driver for PCI 2.3 devices

2009-07-16 Thread Sheng Yang
On Thursday 16 July 2009 20:31:01 Michael S. Tsirkin wrote: > On Wed, Jul 15, 2009 at 03:08:29PM -0700, Greg KH wrote: > > On Wed, Jul 15, 2009 at 11:13:40PM +0300, Michael S. Tsirkin wrote: > > > This adds a generic uio driver that can bind to any PCI device. First > > > user will be virtualizati

Re: Failed to compile kvm-88

2009-07-16 Thread Sheng Yang
On Friday 17 July 2009 11:34:03 Jun Koi wrote: > Hi, > > I am trying to compile kvm-88, like followings: > > ./configure --disable-xen > make > > Then I get following errors. Why do I have such a problem, if I > already disalbe Xen support, like above? How to fix this problem? Comment out all XEN

Re: Failed to compile kvm-88

2009-07-16 Thread Sheng Yang
On Friday 17 July 2009 13:55:02 Jun Koi wrote: > On Fri, Jul 17, 2009 at 2:45 PM, Sheng Yang wrote: > > On Friday 17 July 2009 11:34:03 Jun Koi wrote: > >> Hi, > >> > >> I am trying to compile kvm-88, like followings: > >> > >> ./configure

[PATCH 1/2] KVM: Introduce KVM_SET_IDENTITY_MAP_ADDR ioctl

2009-07-17 Thread Sheng Yang
Now KVM allow guest to modify guest's physical address of EPT's identity mapping page. Signed-off-by: Sheng Yang --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/vmx.c | 13 + arch/x86/kvm/x86.c | 16 include/l

[PATCH 2/2] kvm: allow qemu to set EPT identity mapping address

2009-07-17 Thread Sheng Yang
If we use larger BIOS image than current 256KB, we would need move reserved TSS and EPT identity mapping pages. Currently TSS support this, but not EPT. Signed-off-by: Sheng Yang --- kvm/include/linux/kvm.h |2 ++ qemu-kvm-x86.c | 45

Re: How much physical memory can be used to run domains in a KVM machine?

2009-07-19 Thread Sheng Yang
On Friday 17 July 2009 17:56:49 sudhir kumar wrote: > On Fri, Jul 17, 2009 at 12:47 PM, Dor Laor wrote: > > On 07/17/2009 08:50 AM, Zhang Qian wrote: > >> Hi, > >> > >> I have a KVM box which has 4GB physical memory totally, I'd like to > >> know how much I can use to run my domains, and how much w

[PATCH 1/2] KVM: Introduce KVM_SET_IDENTITY_MAP_ADDR ioctl

2009-07-20 Thread Sheng Yang
Now KVM allow guest to modify guest's physical address of EPT's identity mapping page. (discard uncessary check when setting address) Signed-off-by: Sheng Yang --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/vmx.c | 13 + arch/x86

[PATCH 1/2][v2] KVM: Introduce KVM_SET_IDENTITY_MAP_ADDR ioctl

2009-07-20 Thread Sheng Yang
Now KVM allow guest to modify guest's physical address of EPT's identity mapping page. (change from v1, discard unnecessary check, change ioctl to accept parameter address rather than value) Signed-off-by: Sheng Yang --- arch/x86/include/asm/kvm_host.h |1 + arch/x86

[PATCH 2/2][v2] kvm: allow qemu to set EPT identity mapping address

2009-07-20 Thread Sheng Yang
If we use larger BIOS image than current 256KB, we would need move reserved TSS and EPT identity mapping pages. Currently TSS support this, but not EPT. (change from v1, use parameter address instead of value for ioctl) Signed-off-by: Sheng Yang --- kvm/include/linux/kvm.h |2 ++ qemu-kvm

Re: [PATCH] Update qemu-kvm to allow a larger BIOS image.

2009-07-22 Thread Sheng Yang
On Thursday 23 July 2009 03:04:33 Cristi Magherusan wrote: > On Thu, 2009-07-16 at 10:57 -0700, Jordan Justen wrote: > > On Wed, Jul 15, 2009 at 10:37 PM, Sheng Yang wrote: > > > Make sense to me. So what's mattered here is not bios, but qemu-kvm and > > > kvm

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-01-17 Thread Sheng Yang
On Monday 17 January 2011 19:54:47 Marcelo Tosatti wrote: > On Thu, Jan 06, 2011 at 06:19:44PM +0800, Sheng Yang wrote: > > Then we can support mask bit operation of assigned devices now. > > > > Signed-off-by: Sheng Yang > > --- > > > > arch/x86/kvm/Make

Re: [PATCH 3/3] KVM: Add documents for MSI-X MMIO API

2011-01-17 Thread Sheng Yang
On Monday 17 January 2011 20:21:45 Avi Kivity wrote: > On 01/06/2011 12:19 PM, Sheng Yang wrote: > > Signed-off-by: Sheng Yang > > --- > > > > Documentation/kvm/api.txt | 41 > > + 1 files changed, 41 > > inse

Re: [PATCH 3/3] KVM: Add documents for MSI-X MMIO API

2011-01-19 Thread Sheng Yang
On Monday 17 January 2011 20:45:55 Avi Kivity wrote: > On 01/17/2011 02:35 PM, Sheng Yang wrote: > > On Monday 17 January 2011 20:21:45 Avi Kivity wrote: > > > On 01/06/2011 12:19 PM, Sheng Yang wrote: > > > > Signed-off-by: Sheng Yang > > > > --

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-01-19 Thread Sheng Yang
On Monday 17 January 2011 20:39:30 Marcelo Tosatti wrote: > On Mon, Jan 17, 2011 at 08:18:22PM +0800, Sheng Yang wrote: > > > > + goto out; > > > > + > > > > + mmio = &mmio_dev->mmio[idx]; > > > > + en

Re: [PATCH 3/3] KVM: Add documents for MSI-X MMIO API

2011-01-26 Thread Sheng Yang
On Tuesday 25 January 2011 20:47:38 Avi Kivity wrote: > On 01/19/2011 10:21 AM, Sheng Yang wrote: > > > > We already got an guest MMIO address for that in the exit > > > > information. I've created a chain of handler in qemu to handle it. > > > &g

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-01-29 Thread Sheng Yang
(Sorry, missed this mail...) On Mon, Jan 17, 2011 at 02:29:44PM +0200, Avi Kivity wrote: > On 01/06/2011 12:19 PM, Sheng Yang wrote: > >Then we can support mask bit operation of assigned devices now. > > > > > > > >+int kvm_assigned_device_upd

[PATCH 3/3] KVM: Add documents for MSI-X MMIO API

2011-01-29 Thread Sheng Yang
Signed-off-by: Sheng Yang --- Documentation/kvm/api.txt | 47 + 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index e1a9297..e6b7a1d 100644 --- a/Documentation/kvm/api.txt +++ b

[PATCH 1/3] KVM: Move struct kvm_io_device to kvm_host.h

2011-01-29 Thread Sheng Yang
Then it can be used by other struct in kvm_host.h 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/kvm_host.h b/include

[PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-01-29 Thread Sheng Yang
Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang --- arch/x86/kvm/Makefile|2 +- arch/x86/kvm/x86.c |8 +- include/linux/kvm.h | 21 include/linux/kvm_host.h | 25 virt/kvm/assigned-dev.c | 44 +++ virt/kvm

[PATCH 0/3 v8] MSI-X MMIO support for KVM

2011-01-29 Thread Sheng Yang
Change from v7: Update according to Marcelo and Avi's comments. BTW: I would be on vacation for Chinese New Year soon, and would be back mid Feb. Sheng Yang (3): KVM: Move struct kvm_io_device to kvm_host.h KVM: Emulate MSI-X table in kernel KVM: Add documents for MSI-X MMI

[PATCH 0/4 v8] qemu-kvm: MSI-X MMIO support for assigned device

2011-01-29 Thread Sheng Yang
Update with kernel patches v8. Sheng Yang (4): qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit qemu-kvm: Ioctl for MSIX MMIO support qemu-kvm: Header file update for MSI-X MMIO support qemu-kvm: MSI-X MMIO support for assigned device hw/d

[PATCH 4/4] qemu-kvm: MSI-X MMIO support for assigned device

2011-01-29 Thread Sheng Yang
Signed-off-by: Sheng Yang --- hw/device-assignment.c | 93 +-- hw/device-assignment.h |3 ++ qemu-kvm.c | 40 qemu-kvm.h | 11 ++ 4 files changed, 135 insertions(+), 12 deletions(-) diff

[PATCH 2/4] qemu-kvm: Ioctl for MSIX MMIO support

2011-01-29 Thread Sheng Yang
Signed-off-by: Sheng Yang --- qemu-kvm.c | 14 ++ qemu-kvm.h |7 +++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 471306b..956b62a 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1050,6 +1050,20 @@ int kvm_assign_set_msix_entry

[PATCH 3/4] qemu-kvm: Header file update for MSI-X MMIO support

2011-01-29 Thread Sheng Yang
Signed-off-by: Sheng Yang --- kvm/include/linux/kvm.h | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index e46729e..7b6d5b9 100644 --- a/kvm/include/linux/kvm.h +++ b/kvm/include/linux/kvm.h

[PATCH 1/4] qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit

2011-01-29 Thread Sheng Yang
The old MSI-X enabling method assume the entries are written before MSI-X enabled, but some OS didn't obey this, e.g. FreeBSD. This patch would fix this. Also, according to the PCI spec, mask bit of MSI-X table should be set after reset. Signed-off-by: Sheng Yang --- hw/device-assignm

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-01-31 Thread Sheng Yang
On Mon, Jan 31, 2011 at 03:09:09PM +0200, Avi Kivity wrote: > On 01/30/2011 06:38 AM, Sheng Yang wrote: > >(Sorry, missed this mail...) > > > >On Mon, Jan 17, 2011 at 02:29:44PM +0200, Avi Kivity wrote: > >> On 01/06/2011 12:19 PM, Sheng Yang wrote: > >>

Re: [PATCH 3/3] KVM: Add documents for MSI-X MMIO API

2011-01-31 Thread Sheng Yang
On Mon, Jan 31, 2011 at 03:24:27PM +0200, Avi Kivity wrote: > On 01/26/2011 11:05 AM, Sheng Yang wrote: > >On Tuesday 25 January 2011 20:47:38 Avi Kivity wrote: > >> On 01/19/2011 10:21 AM, Sheng Yang wrote: > >> > > > We already got an gue

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-18 Thread Sheng Yang
On Thursday 03 February 2011 09:05:55 Marcelo Tosatti wrote: > On Sun, Jan 30, 2011 at 01:11:15PM +0800, Sheng Yang wrote: > > Then we can support mask bit operation of assigned devices now. > > > > Signed-off-by: Sheng Yang > > > > +int kvm_vm_ioctl_r

[PATCH 0/4 v9] MSI-X MMIO support for KVM

2011-02-18 Thread Sheng Yang
. Sheng Yang (4): KVM: Move struct kvm_io_device to kvm_host.h KVM: Add kvm_io_ext_data to IO handler KVM: Emulate MSI-X table in kernel KVM: Add documents for MSI-X MMIO API Documentation/kvm/api.txt | 58 + arch/x86/kvm/Makefile |2 +- arch/x86/kvm/i8254.c |6

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

2011-02-18 Thread Sheng Yang
Then it can be used by other struct in kvm_host.h 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/kvm_host.h b/include

[PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-18 Thread Sheng Yang
Add a new parameter to IO writing handler, so that we can transfer information from IO handler to caller. Signed-off-by: Sheng Yang --- arch/x86/kvm/i8254.c |6 -- arch/x86/kvm/i8259.c |3 ++- arch/x86/kvm/lapic.c |3 ++- arch/x86/kvm/x86.c| 13

[PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-18 Thread Sheng Yang
Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang --- arch/x86/kvm/Makefile|2 +- arch/x86/kvm/x86.c | 29 - include/linux/kvm.h | 28 + include/linux/kvm_host.h | 32 + virt/kvm/assigned-dev.c | 44 +++ virt

[PATCH 4/4] KVM: Add documents for MSI-X MMIO API

2011-02-18 Thread Sheng Yang
Signed-off-by: Sheng Yang --- Documentation/kvm/api.txt | 58 + 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index e1a9297..dd10c3b 100644 --- a/Documentation/kvm/api.txt +++ b

[PATCH 0/4 v9] qemu-kvm: MSI-X MMIO support for assigned device

2011-02-18 Thread Sheng Yang
Update with kernel patches v9. Sheng Yang (4): qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit qemu-kvm: Ioctl for MSIX MMIO support qemu-kvm: Header file update for MSI-X MMIO support qemu-kvm: MSI-X MMIO support for assigned device hw/d

[PATCH 4/4] qemu-kvm: MSI-X MMIO support for assigned device

2011-02-18 Thread Sheng Yang
Signed-off-by: Sheng Yang --- hw/device-assignment.c | 106 +-- hw/device-assignment.h |3 + qemu-kvm.c | 46 + qemu-kvm.h | 19 + 4 files changed, 160 insertions(+), 14 deletions(-) diff

[PATCH 2/4] qemu-kvm: Ioctl for MSIX MMIO support

2011-02-18 Thread Sheng Yang
Signed-off-by: Sheng Yang --- qemu-kvm.c | 14 ++ qemu-kvm.h |7 +++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 49cd683..d282c95 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1050,6 +1050,20 @@ int kvm_assign_set_msix_entry

[PATCH 3/4] qemu-kvm: Header file update for MSI-X MMIO support

2011-02-18 Thread Sheng Yang
Signed-off-by: Sheng Yang --- kvm/include/linux/kvm.h | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index e46729e..dcb8f54 100644 --- a/kvm/include/linux/kvm.h +++ b/kvm/include/linux/kvm.h

[PATCH 1/4] qemu-kvm: device assignment: Enabling MSI-X according to the entries' mask bit

2011-02-18 Thread Sheng Yang
The old MSI-X enabling method assume the entries are written before MSI-X enabled, but some OS didn't obey this, e.g. FreeBSD. This patch would fix this. Also, according to the PCI spec, mask bit of MSI-X table should be set after reset. Signed-off-by: Sheng Yang --- hw/device-assignm

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-22 Thread Sheng Yang
On Wednesday 23 February 2011 08:19:21 Alex Williamson wrote: > On Sun, 2011-01-30 at 13:11 +0800, Sheng Yang wrote: > > Then we can support mask bit operation of assigned devices now. > > Looks pretty good overall. A few comments below. It seems like we > should be able to h

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Sheng Yang
On Wednesday 23 February 2011 16:45:37 Michael S. Tsirkin wrote: > On Wed, Feb 23, 2011 at 02:59:04PM +0800, Sheng Yang wrote: > > On Wednesday 23 February 2011 08:19:21 Alex Williamson wrote: > > > On Sun, 2011-01-30 at 13:11 +0800, Sheng Yang wrote: > > > > Then we

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Sheng Yang
On Wednesday 23 February 2011 16:45:37 Michael S. Tsirkin wrote: > On Wed, Feb 23, 2011 at 02:59:04PM +0800, Sheng Yang wrote: > > On Wednesday 23 February 2011 08:19:21 Alex Williamson wrote: > > > On Sun, 2011-01-30 at 13:11 +0800, Sheng Yang wrote: > > > > Then we

[PATCH 0/4 v10] MSI-X MMIO support for KVM

2011-02-24 Thread Sheng Yang
Change from v8: 1. Fix one MSI-X routing update exit bug. 2. Update according to the comments of Alex and Michael. Notice this patchset still based on 2.6.37 due to a block bug on assigned device in the upstream now. Sheng Yang (4): KVM: Move struct kvm_io_device to kvm_host.h KVM: Add

[PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-24 Thread Sheng Yang
Add a new parameter to IO writing handler, so that we can transfer information from IO handler to caller. Signed-off-by: Sheng Yang --- arch/x86/kvm/i8254.c |6 -- arch/x86/kvm/i8259.c |3 ++- arch/x86/kvm/lapic.c |3 ++- arch/x86/kvm/x86.c| 13

[PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Sheng Yang
Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/Makefile |2 +- arch/x86/kvm/mmu.c |2 + arch/x86/kvm/x86.c | 40 - include/linux/kvm.h

[PATCH 4/4] KVM: Add documents for MSI-X MMIO API

2011-02-24 Thread Sheng Yang
Signed-off-by: Sheng Yang --- Documentation/kvm/api.txt | 58 + 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index e1a9297..dd10c3b 100644 --- a/Documentation/kvm/api.txt +++ b

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

2011-02-24 Thread Sheng Yang
Then it can be used by other struct in kvm_host.h 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/kvm_host.h b/include

Re: [PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-24 Thread Sheng Yang
On Thursday 24 February 2011 18:22:19 Michael S. Tsirkin wrote: > On Thu, Feb 24, 2011 at 05:51:03PM +0800, Sheng Yang wrote: > > Add a new parameter to IO writing handler, so that we can transfer > > information from IO handler to caller. > > > > Signed-off-by: Sheng Y

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Sheng Yang
On Thursday 24 February 2011 18:11:44 Michael S. Tsirkin wrote: > On Thu, Feb 24, 2011 at 04:08:22PM +0800, Sheng Yang wrote: > > On Wednesday 23 February 2011 16:45:37 Michael S. Tsirkin wrote: > > > On Wed, Feb 23, 2011 at 02:59:04PM +0800, Sheng Yang wrote: > > > >

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Sheng Yang
On Thursday 24 February 2011 18:17:34 Michael S. Tsirkin wrote: > On Thu, Feb 24, 2011 at 05:44:20PM +0800, Sheng Yang wrote: > > On Wednesday 23 February 2011 16:45:37 Michael S. Tsirkin wrote: > > > On Wed, Feb 23, 2011 at 02:59:04PM +0800, Sheng Yang wrote: > > > >

Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Sheng Yang
On Thursday 24 February 2011 18:45:08 Michael S. Tsirkin wrote: > On Thu, Feb 24, 2011 at 05:51:04PM +0800, Sheng Yang wrote: > > Then we can support mask bit operation of assigned devices now. > > > > Signed-off-by: Sheng Yang > > Doesn't look like all comm

[PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Sheng Yang
Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/Makefile |2 +- arch/x86/kvm/mmu.c |2 + arch/x86/kvm/x86.c | 40 - include/linux/kvm.h

[PATCH 3/4 v10 UPDATED] KVM: Emulate MSI-X table in kernel

2011-02-24 Thread Sheng Yang
Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/Makefile |2 +- arch/x86/kvm/mmu.c |2 + arch/x86/kvm/x86.c | 40 - include/linux/kvm.h

Re: [PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-27 Thread Sheng Yang
On Friday 25 February 2011 16:12:30 Michael S. Tsirkin wrote: > On Fri, Feb 25, 2011 at 11:23:30AM +0800, Sheng Yang wrote: > > On Thursday 24 February 2011 18:22:19 Michael S. Tsirkin wrote: > > > On Thu, Feb 24, 2011 at 05:51:03PM +0800, Sheng Yang wrote: > > >

Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-27 Thread Sheng Yang
On Friday 25 February 2011 16:29:38 Michael S. Tsirkin wrote: > On Fri, Feb 25, 2011 at 02:28:02PM +0800, Sheng Yang wrote: > > On Thursday 24 February 2011 18:45:08 Michael S. Tsirkin wrote: > > > On Thu, Feb 24, 2011 at 05:51:04PM +0800, Sheng Yang wrote: > > > >

[PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-02-27 Thread Sheng Yang
Add a new parameter to IO writing handler, so that we can transfer information from IO handler to caller. Signed-off-by: Sheng Yang --- arch/x86/kvm/i8254.c |6 -- arch/x86/kvm/i8259.c |3 ++- arch/x86/kvm/lapic.c |3 ++- arch/x86/kvm/x86.c| 13

[PATCH 0/4 v11] MSI-X MMIO support for KVM

2011-02-27 Thread Sheng Yang
Change from v9: Update according to the comments of Alex and Michael. Notice this patchset still based on 2.6.37 due to a block bug on assigned device in the upstream now. Sheng Yang (4): KVM: Move struct kvm_io_device to kvm_host.h KVM: Add kvm_io_ext_data to IO handler KVM: Emulate MSI-X

[PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-27 Thread Sheng Yang
Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/Makefile |2 +- arch/x86/kvm/mmu.c |2 + arch/x86/kvm/x86.c | 40 - include/linux/kvm.h

[PATCH 4/4] KVM: Add documents for MSI-X MMIO API

2011-02-27 Thread Sheng Yang
Signed-off-by: Sheng Yang --- Documentation/kvm/api.txt | 58 + 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index e1a9297..dd10c3b 100644 --- a/Documentation/kvm/api.txt +++ b

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

2011-02-27 Thread Sheng Yang
Then it can be used by other struct in kvm_host.h 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/kvm_host.h b/include

Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-02-28 Thread Sheng Yang
On Monday 28 February 2011 19:27:29 Michael S. Tsirkin wrote: > On Mon, Feb 28, 2011 at 03:20:04PM +0800, Sheng Yang wrote: > > Then we can support mask bit operation of assigned devices now. > > > > Signed-off-by: Sheng Yang > > A general question: we implement mmio

Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-03-01 Thread Sheng Yang
On Tue, Mar 01, 2011 at 02:20:02PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 01, 2011 at 02:10:37PM +0800, Sheng Yang wrote: > > On Monday 28 February 2011 19:27:29 Michael S. Tsirkin wrote: > > > On Mon, Feb 28, 2011 at 03:20:04PM +0800, Sheng Yang wrote: > > > >

Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-03-01 Thread Sheng Yang
On Tue, Mar 01, 2011 at 02:20:02PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 01, 2011 at 02:10:37PM +0800, Sheng Yang wrote: > > On Monday 28 February 2011 19:27:29 Michael S. Tsirkin wrote: > > > On Mon, Feb 28, 2011 at 03:20:04PM +0800, Sheng Yang wrote: > >

Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-03-01 Thread Sheng Yang
On Wednesday 02 March 2011 04:18:58 Marcelo Tosatti wrote: > On Fri, Feb 25, 2011 at 10:29:38AM +0200, Michael S. Tsirkin wrote: > > On Fri, Feb 25, 2011 at 02:28:02PM +0800, Sheng Yang wrote: > > > On Thursday 24 February 2011 18:45:08 Michael S. Tsirkin wrote: > > > &

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

2011-03-01 Thread Sheng Yang
Then it can be used by other struct in kvm_host.h 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/kvm_host.h b/include

[PATCH 3/4] KVM: Emulate MSI-X table in kernel

2011-03-01 Thread Sheng Yang
Then we can support mask bit operation of assigned devices now. Signed-off-by: Sheng Yang --- arch/x86/kvm/Makefile|2 +- arch/x86/kvm/x86.c | 31 - include/linux/kvm.h | 28 + include/linux/kvm_host.h | 34 ++ virt/kvm/assigned-dev.c | 41 +++ virt

[PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler

2011-03-01 Thread Sheng Yang
Add a new parameter to IO writing handler, so that we can transfer information from IO handler to caller. Signed-off-by: Sheng Yang --- arch/x86/kvm/i8254.c |6 -- arch/x86/kvm/i8259.c |3 ++- arch/x86/kvm/lapic.c |3 ++- arch/x86/kvm/x86.c| 13

[PATCH 0/4 v12] MSI-X MMIO support for KVM

2011-03-01 Thread Sheng Yang
Change from v10: 1. Update according to the comments of Michael. 2. Use mmio_needed to exit to userspace according to Marcelo's comments. Sheng Yang (4): KVM: Move struct kvm_io_device to kvm_host.h KVM: Add kvm_io_ext_data to IO handler KVM: Emulate MSI-X table in kernel KVM

[PATCH 4/4] KVM: Add documents for MSI-X MMIO API

2011-03-01 Thread Sheng Yang
Signed-off-by: Sheng Yang --- Documentation/kvm/api.txt | 58 + 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index e1a9297..dd10c3b 100644 --- a/Documentation/kvm/api.txt +++ b

Re: [PATCH 0/4 v12] MSI-X MMIO support for KVM

2011-03-03 Thread Sheng Yang
On Wed, Mar 02, 2011 at 03:51:20PM -0300, Marcelo Tosatti wrote: > On Wed, Mar 02, 2011 at 11:23:14AM +0200, Michael S. Tsirkin wrote: > > On Wed, Mar 02, 2011 at 03:26:53PM +0800, Sheng Yang wrote: > > > Change from v10: > > > 1. Update according to the commen

[PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Sheng Yang
er to accelerate. Userspace shouldn't access the device MMIO directly for the information, instead it should uses provided API to do so. Signed-off-by: Sheng Yang --- Documentation/kvm/api.txt | 48 arch/x86/kvm/x86.c|1 + include/linux/kvm.h | 22 - inc

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Sheng Yang
On Friday 05 November 2010 16:43:33 Michael S. Tsirkin wrote: > On Fri, Nov 05, 2010 at 10:44:19AM +0800, Sheng Yang wrote: > > > > +}; > > > > + > > > > +This ioctl would enable in-kernel MSI-X emulation, which would > > > > handle MSI-X +m

Re: [PATCH 5/5] KVM: assigned dev: MSI-X mask support

2010-11-05 Thread Sheng Yang
On Friday 05 November 2010 16:51:33 Michael S. Tsirkin wrote: > On Fri, Nov 05, 2010 at 03:16:23PM +0800, Sheng Yang wrote: > > This patch enable per-vector mask for assigned devices using MSI-X. > > > > This patch provided two new APIs: one is for guest to specific dev

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

2010-11-05 Thread Sheng Yang
On Friday 05 November 2010 17:05:32 Michael S. Tsirkin wrote: > On Fri, Nov 05, 2010 at 11:20:37AM +0800, Sheng Yang wrote: > > On Thursday 04 November 2010 17:44:27 Michael S. Tsirkin wrote: > > > > Thanks very much for reviewing this! Seems nobody cares about use

  1   2   3   4   5   6   7   8   9   10   >