Re: [RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-19 Thread James Bottomley
On Thu, 2012-07-19 at 08:00 +0200, Paolo Bonzini wrote: > Il 18/07/2012 21:12, Anthony Liguori ha scritto: > Windows does this with a points system and I do believe that INQUIRY > > responses from any local disks are included in this tally. > > INQUIRY responses (at least vendor/product/type) sho

Re: [RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-19 Thread Paolo Bonzini
Il 19/07/2012 09:28, James Bottomley ha scritto: >> > INQUIRY responses (at least vendor/product/type) should not change. > INQUIRY responses often change for arrays because a firmware upgrade > enables new features and new features have to declare themselves, > usually in the INQUIRY data. What y

Re: [PATCHv3 0/5] improve speed of "rep ins" emulation

2012-07-19 Thread Gleb Natapov
NACK. Found bugs. On Thu, Jul 12, 2012 at 02:56:36PM +0300, Gleb Natapov wrote: > With this patches loading 100M initrd takes ~10s instead of ~40s without. > > Changelog: > v2->v3 > - Fix incorrect size parameter for linearize() notices by Marcelo. > - Get rid of linearize() callback in emul

[PATCHv4 0/5] improve speed of "rep ins" emulation

2012-07-19 Thread Gleb Natapov
With this patches loading 100M initrd takes ~10s instead of ~40s without. Changelog: v3->v4: - check rcx for zero after applying address mask - check for page boundary after linearizing address v2->v3 - Fix incorrect size parameter for linearize() notices by Marcelo. - Get rid of linear

[PATCHv4 1/5] Provide userspace IO exit completion callback.

2012-07-19 Thread Gleb Natapov
Current code assumes that IO exit was due to instruction emulation and handles execution back to emulator directly. This patch adds new userspace IO exit completion callback that can be set by any other code that caused IO exit to userspace. Signed-off-by: Gleb Natapov --- arch/x86/include/asm/k

[PATCHv4 2/5] KVM: emulator: make x86 emulation modes enum instead of defines

2012-07-19 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_emulate.h | 22 ++ arch/x86/kvm/emulate.c |4 +++- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 1ac46c

[PATCHv4 3/5] KVM: emulator: move some address manipulation function out of emulator code.

2012-07-19 Thread Gleb Natapov
The functions will be used outside of the emulator. Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 25 + arch/x86/kvm/emulate.c | 15 ++- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/arch/x86/include/asm/kvm_

[PATCHv4 4/5] KVM: emulator: make linearize() callable from outside of emulator

2012-07-19 Thread Gleb Natapov
The function will be used outside of the emulator. Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_emulate.h | 16 + arch/x86/kvm/emulate.c | 114 2 files changed, 79 insertions(+), 51 deletions(-) diff --git a/arch/x86/include/as

[PATCHv4 5/5] KVM: Provide fast path for "rep ins" emulation if possible.

2012-07-19 Thread Gleb Natapov
"rep ins" emulation is going through emulator now. This is slow because emulator knows how to write back only one datum at a time. This patch provides fast path for the instruction in certain conditions. The conditions are: DF flag is not set, destination memory is RAM and single datum does not cro

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Gleb Natapov
On Wed, Jul 18, 2012 at 05:20:40PM -0600, Alex Williamson wrote: > On Thu, 2012-07-19 at 01:49 +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 18, 2012 at 04:26:41PM -0600, Alex Williamson wrote: > > > On Thu, 2012-07-19 at 00:52 +0300, Michael S. Tsirkin wrote: > > > > When more than 1 source id

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 01:44:59AM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 04:16:14PM -0600, Alex Williamson wrote: > > On Thu, 2012-07-19 at 00:52 +0300, Michael S. Tsirkin wrote: > > > When more than 1 source id is in use for the same GSI, we have the > > > following race relat

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 01:11:53AM +0300, Michael S. Tsirkin wrote: > This creates a way to detect when kvm_set_irq(...,0) was run > twice with the same source id by returning 0 in this case. > > Signed-off-by: Michael S. Tsirkin > --- > > This is on top of my bugfix patch. Uncompiled and untes

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 05:20:40PM -0600, Alex Williamson wrote: > On Thu, 2012-07-19 at 01:49 +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 18, 2012 at 04:26:41PM -0600, Alex Williamson wrote: > > > On Thu, 2012-07-19 at 00:52 +0300, Michael S. Tsirkin wrote: > > > > When more than 1 source id

Re: [Qemu-devel] [RFC v9 18/27] virtio-blk: Call ioctl() directly instead of irqfd

2012-07-19 Thread Stefan Hajnoczi
On Wed, Jul 18, 2012 at 4:40 PM, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 04:07:45PM +0100, Stefan Hajnoczi wrote: >> Optimize for the MSI-X enabled and vector unmasked case where it is >> possible to issue the KVM ioctl() directly instead of using irqfd. > > Why? Is an ioctl faster? I

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 05:22:42PM -0600, Alex Williamson wrote: > I hate reviewing code > > > where I have to differentiate 'l' vs '1'. > > > > l is an illegal variable name? Switch to a different font. > > WTF Really, you should use a font where these differ. I currently use Monospace but the

Re: [Qemu-devel] [RFC v9 06/27] virtio-blk: Take PCI memory range into account

2012-07-19 Thread Stefan Hajnoczi
On Wed, Jul 18, 2012 at 7:29 PM, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 04:07:33PM +0100, Stefan Hajnoczi wrote: >> Support >4 GB physical memory accesses. >> >> Signed-off-by: Stefan Hajnoczi > > Need some sane APIs, this is just too scary. Yes, this prototype has (at least) two la

Re: [Qemu-devel] [RFC v9 06/27] virtio-blk: Take PCI memory range into account

2012-07-19 Thread Stefan Hajnoczi
On Thu, Jul 19, 2012 at 10:14 AM, Stefan Hajnoczi wrote: > On Wed, Jul 18, 2012 at 7:29 PM, Michael S. Tsirkin wrote: >> On Wed, Jul 18, 2012 at 04:07:33PM +0100, Stefan Hajnoczi wrote: >>> Support >4 GB physical memory accesses. >>> >>> Signed-off-by: Stefan Hajnoczi >> >> Need some sane APIs,

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 10:53:37AM +0300, Gleb Natapov wrote: > On Thu, Jul 19, 2012 at 01:11:53AM +0300, Michael S. Tsirkin wrote: > > This creates a way to detect when kvm_set_irq(...,0) was run > > twice with the same source id by returning 0 in this case. > > > > Signed-off-by: Michael S. Tsir

[RESEND PATCH RFC V3 0/3] kvm: Improving directed yield in PLE handler

2012-07-19 Thread Raghavendra K T
From: Raghavendra K T Currently, on a large vcpu guests, there is a high probability of yielding to the same vcpu who had recently done a pause-loop exit or cpu relax intercepted. Such a yield can lead to the vcpu spinning again and hence degrade the performance. The patchset keeps track of the

Re: [Qemu-devel] [RFC v9 18/27] virtio-blk: Call ioctl() directly instead of irqfd

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 10:11:49AM +0100, Stefan Hajnoczi wrote: > On Wed, Jul 18, 2012 at 4:40 PM, Michael S. Tsirkin wrote: > > On Wed, Jul 18, 2012 at 04:07:45PM +0100, Stefan Hajnoczi wrote: > >> Optimize for the MSI-X enabled and vector unmasked case where it is > >> possible to issue the KVM

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 12:17:19PM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 19, 2012 at 10:53:37AM +0300, Gleb Natapov wrote: > > On Thu, Jul 19, 2012 at 01:11:53AM +0300, Michael S. Tsirkin wrote: > > > This creates a way to detect when kvm_set_irq(...,0) was run > > > twice with the same so

Re: [Qemu-devel] [RFC v9 06/27] virtio-blk: Take PCI memory range into account

2012-07-19 Thread Avi Kivity
On 07/19/2012 12:16 PM, Stefan Hajnoczi wrote: > On Thu, Jul 19, 2012 at 10:14 AM, Stefan Hajnoczi wrote: >> On Wed, Jul 18, 2012 at 7:29 PM, Michael S. Tsirkin wrote: >>> On Wed, Jul 18, 2012 at 04:07:33PM +0100, Stefan Hajnoczi wrote: Support >4 GB physical memory accesses. Signe

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 12:21:07PM +0300, Gleb Natapov wrote: > On Thu, Jul 19, 2012 at 12:17:19PM +0300, Michael S. Tsirkin wrote: > > On Thu, Jul 19, 2012 at 10:53:37AM +0300, Gleb Natapov wrote: > > > On Thu, Jul 19, 2012 at 01:11:53AM +0300, Michael S. Tsirkin wrote: > > > > This creates a way

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 12:33:29PM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 19, 2012 at 12:21:07PM +0300, Gleb Natapov wrote: > > On Thu, Jul 19, 2012 at 12:17:19PM +0300, Michael S. Tsirkin wrote: > > > On Thu, Jul 19, 2012 at 10:53:37AM +0300, Gleb Natapov wrote: > > > > On Thu, Jul 19, 201

Re: [Qemu-devel] [RFC v9 00/27] virtio: virtio-blk data plane

2012-07-19 Thread Stefan Hajnoczi
On Wed, Jul 18, 2012 at 4:49 PM, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 04:07:27PM +0100, Stefan Hajnoczi wrote: >> This series implements a dedicated thread for virtio-blk processing using >> Linux >> AIO for raw image files only. It is based on qemu-kvm.git a0bc8c3 and >> somewha

[RESEND PATCH RFC V5 3/3] kvm: Choose better candidate for directed yield

2012-07-19 Thread Raghavendra K T
Currently, on a large vcpu guests, there is a high probability of yielding to the same vcpu who had recently done a pause-loop exit or cpu relax intercepted. Such a yield can lead to the vcpu spinning again and hence degrade the performance. The patchset keeps track of the pause loop exit/cpu rela

Re: [PATCH 07/10] KVM: introduce readonly_fault_pfn

2012-07-19 Thread Avi Kivity
On 07/17/2012 05:44 PM, Xiao Guangrong wrote: > Introduce readonly_fault_pfn, in the later patch, it indicates failure > when we try to get a writable pfn from the readonly memslot > > + > inline int kvm_is_mmio_pfn(pfn_t pfn) > { > if (pfn_valid(pfn)) { > @@ -949,13 +952,15 @@ EXPORT_SYMB

Re: [PATCH 08/10] KVM: introduce readonly_bad_hva

2012-07-19 Thread Avi Kivity
On 07/17/2012 05:45 PM, Xiao Guangrong wrote: > In the later patch, it indicates failure when we try to get a writable > hva from the readonly slot > > Signed-off-by: Xiao Guangrong > --- > virt/kvm/kvm_main.c | 12 +++- > 1 files changed, 11 insertions(+), 1 deletions(-) > > diff --g

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 12:41:24PM +0300, Gleb Natapov wrote: > On Thu, Jul 19, 2012 at 12:33:29PM +0300, Michael S. Tsirkin wrote: > > On Thu, Jul 19, 2012 at 12:21:07PM +0300, Gleb Natapov wrote: > > > On Thu, Jul 19, 2012 at 12:17:19PM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Jul 19, 201

Re: [PATCHv4 4/5] KVM: emulator: make linearize() callable from outside of emulator

2012-07-19 Thread Avi Kivity
On 07/19/2012 10:40 AM, Gleb Natapov wrote: > The function will be used outside of the emulator. > > Signed-off-by: Gleb Natapov > --- > arch/x86/include/asm/kvm_emulate.h | 16 + > arch/x86/kvm/emulate.c | 114 > > 2 files changed, 79 ins

Re: [PATCHv4 5/5] KVM: Provide fast path for "rep ins" emulation if possible.

2012-07-19 Thread Avi Kivity
On 07/19/2012 10:40 AM, Gleb Natapov wrote: > "rep ins" emulation is going through emulator now. This is slow because > emulator knows how to write back only one datum at a time. This patch > provides fast path for the instruction in certain conditions. The > conditions are: DF flag is not set, des

Re: [PATCHv4 3/5] KVM: emulator: move some address manipulation function out of emulator code.

2012-07-19 Thread Avi Kivity
On 07/19/2012 10:40 AM, Gleb Natapov wrote: > The functions will be used outside of the emulator. > > Signed-off-by: Gleb Natapov > --- > arch/x86/include/asm/kvm_host.h | 25 + > arch/x86/kvm/emulate.c | 15 ++- > 2 files changed, 27 insertions(+

[PATCHv2] kvm: fix race with level interrupts

2012-07-19 Thread Michael S. Tsirkin
When more than 1 source id is in use for the same GSI, we have the following race related to handling irq_states race: CPU 0 clears bit 0. CPU 0 read irq_state as 0. CPU 1 sets level to 1. CPU 1 calls kvm_ioapic_set_irq(1). CPU 0 calls kvm_ioapic_set_irq(0). Now ioapic thinks the level is 0 but ir

Re: [PATCHv4 3/5] KVM: emulator: move some address manipulation function out of emulator code.

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 01:42:31PM +0300, Avi Kivity wrote: > On 07/19/2012 10:40 AM, Gleb Natapov wrote: > > The functions will be used outside of the emulator. > > > > Signed-off-by: Gleb Natapov > > --- > > arch/x86/include/asm/kvm_host.h | 25 + > > arch/x86/kvm/emu

Re: [PATCHv4 4/5] KVM: emulator: make linearize() callable from outside of emulator

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 01:32:59PM +0300, Avi Kivity wrote: > On 07/19/2012 10:40 AM, Gleb Natapov wrote: > > The function will be used outside of the emulator. > > > > Signed-off-by: Gleb Natapov > > --- > > arch/x86/include/asm/kvm_emulate.h | 16 + > > arch/x86/kvm/emulate.c

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 01:26:48PM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 19, 2012 at 12:41:24PM +0300, Gleb Natapov wrote: > > On Thu, Jul 19, 2012 at 12:33:29PM +0300, Michael S. Tsirkin wrote: > > > On Thu, Jul 19, 2012 at 12:21:07PM +0300, Gleb Natapov wrote: > > > > On Thu, Jul 19, 201

[PATCH] kvm: switch to symbolic name for irq_states size

2012-07-19 Thread Michael S. Tsirkin
Use PIC_NUM_PINS instead of hard-coded 16 for pic pins. Signed-off-by: Michael S. Tsirkin --- arch/x86/kvm/irq.h | 2 +- virt/kvm/irq_comm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/irq.h b/arch/x86/kvm/irq.h index 2086f2b..2d03568 100644 --- a/arch/

Re: [PATCHv4 5/5] KVM: Provide fast path for "rep ins" emulation if possible.

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 01:37:32PM +0300, Avi Kivity wrote: > On 07/19/2012 10:40 AM, Gleb Natapov wrote: > > "rep ins" emulation is going through emulator now. This is slow because > > emulator knows how to write back only one datum at a time. This patch > > provides fast path for the instruction

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 01:54:53PM +0300, Gleb Natapov wrote: > On Thu, Jul 19, 2012 at 01:26:48PM +0300, Michael S. Tsirkin wrote: > > On Thu, Jul 19, 2012 at 12:41:24PM +0300, Gleb Natapov wrote: > > > On Thu, Jul 19, 2012 at 12:33:29PM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Jul 19, 201

[PATCH] kvm: drop parameter validation

2012-07-19 Thread Michael S. Tsirkin
We validate irq pin number when routing is setup, so code handling illegal irq # in pic and ioapic on each injection is never called. Drop it. Signed-off-by: Michael S. Tsirkin --- Note: this is on top of [PATCHv2] kvm: fix race with level interrupts as these patches touch the same code.

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 02:12:13PM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 19, 2012 at 01:54:53PM +0300, Gleb Natapov wrote: > > On Thu, Jul 19, 2012 at 01:26:48PM +0300, Michael S. Tsirkin wrote: > > > On Thu, Jul 19, 2012 at 12:41:24PM +0300, Gleb Natapov wrote: > > > > On Thu, Jul 19, 201

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 02:12:13PM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 19, 2012 at 01:54:53PM +0300, Gleb Natapov wrote: > > On Thu, Jul 19, 2012 at 01:26:48PM +0300, Michael S. Tsirkin wrote: > > > On Thu, Jul 19, 2012 at 12:41:24PM +0300, Gleb Natapov wrote: > > > > On Thu, Jul 19, 201

Re: Latest Centos6.3 kernel, rebooting from inside centos6.3 VM - gets stuck on seabios/grub loop - previous kernels fine

2012-07-19 Thread Morgan Cox
Marcelo your awesome ! thank fixed it. Thank you. Is this an issue just with centos kernel or is rhel effected also ? i.e shall I submit a bugzilla report? Regards On 18 July 2012 22:06, Marcelo Tosatti wrote: > On Wed, Jul 11, 2012 at 10:54:34PM +0100, Morgan Cox wrote: >> Hi >> >> I have an

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 02:25:29PM +0300, Gleb Natapov wrote: > On Thu, Jul 19, 2012 at 02:12:13PM +0300, Michael S. Tsirkin wrote: > > On Thu, Jul 19, 2012 at 01:54:53PM +0300, Gleb Natapov wrote: > > > On Thu, Jul 19, 2012 at 01:26:48PM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Jul 19, 201

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 12:15 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 05:22:42PM -0600, Alex Williamson wrote: > > I hate reviewing code > > > > where I have to differentiate 'l' vs '1'. > > > > > > l is an illegal variable name? Switch to a different font. > > > > WTF > > Real

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 06:06:31AM -0600, Alex Williamson wrote: > On Thu, 2012-07-19 at 12:15 +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 18, 2012 at 05:22:42PM -0600, Alex Williamson wrote: > > > I hate reviewing code > > > > > where I have to differentiate 'l' vs '1'. > > > > > > > > l is

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 12:07 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 05:20:40PM -0600, Alex Williamson wrote: > > On Thu, 2012-07-19 at 01:49 +0300, Michael S. Tsirkin wrote: > > > On Wed, Jul 18, 2012 at 04:26:41PM -0600, Alex Williamson wrote: > > > > On Thu, 2012-07-19 at 00:52

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-19 Thread Chris Clayton
On 07/15/12 20:52, Chris Clayton wrote: On 07/11/12 08:22, Gleb Natapov wrote: On Wed, Jul 11, 2012 at 08:18:17AM +0100, Chris Clayton wrote: On 07/11/12 08:12, Gleb Natapov wrote: On Wed, Jul 11, 2012 at 08:09:42AM +0100, Chris Clayton wrote: Ping. Have I committed a bug-reporting sin in th

[PATCH] KVM: x86 emulator: access GPRs on demand

2012-07-19 Thread Avi Kivity
Instead of populating the the entire register file, read in registers as they are accessed, and write back only the modified ones. This saves a VMREAD and VMWRITE on Intel (for rsp, since it is not usually used during emulation), and a two 128-byte copies for the registers. Signed-off-by: Avi Kiv

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-19 Thread Avi Kivity
On 07/19/2012 03:14 PM, Chris Clayton wrote: >> Change of diagnostics, unfortunately. qemu-kvm-1.0.1 can, in fact, crash >> on 3.5.0-rc6 (and rc7). I didn't get it earlier because it takes many >> times more invocations before the crash occurs with 1.0.1 and I haven't >> used qemu-kvm much in the

Re: [PATCH] kvm: fix race with level interrupts

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 06:11:15AM -0600, Alex Williamson wrote: > On Thu, 2012-07-19 at 12:07 +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 18, 2012 at 05:20:40PM -0600, Alex Williamson wrote: > > > On Thu, 2012-07-19 at 01:49 +0300, Michael S. Tsirkin wrote: > > > > On Wed, Jul 18, 2012 at 04:

Re: [PATCHv4 4/5] KVM: emulator: make linearize() callable from outside of emulator

2012-07-19 Thread Avi Kivity
On 07/19/2012 01:51 PM, Gleb Natapov wrote: >> > +int x86_linearize(struct x86_linearize_params *p, ulong *linear) >> > { >> > - struct desc_struct desc; >> > - bool usable; >> >ulong la; >> >u32 lim; >> > - u16 sel; >> >unsigned cpl, rpl; >> > >> > - la = seg_base(ctxt, addr.se

Re: [PATCHv4 4/5] KVM: emulator: make linearize() callable from outside of emulator

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 03:52:15PM +0300, Avi Kivity wrote: > On 07/19/2012 01:51 PM, Gleb Natapov wrote: > > >> > +int x86_linearize(struct x86_linearize_params *p, ulong *linear) > >> > { > >> > -struct desc_struct desc; > >> > -bool usable; > >> > ulong la; > >> >

Re: [PATCH RESEND 5/5] vhost-blk: Add vhost-blk support

2012-07-19 Thread Anthony Liguori
Asias He writes: > vhost-blk is a in kernel virito-blk device accelerator. > > This patch is based on Liu Yuan's implementation with various > improvements and bug fixes. Notably, this patch makes guest notify and > host completion processing in parallel which gives about 60% performance > improv

Re: [PATCH RESEND 5/5] vhost-blk: Add vhost-blk support

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 08:05:42AM -0500, Anthony Liguori wrote: > Asias He writes: > > > vhost-blk is a in kernel virito-blk device accelerator. > > > > This patch is based on Liu Yuan's implementation with various > > improvements and bug fixes. Notably, this patch makes guest notify and > > ho

Re: [PATCH RESEND 5/5] vhost-blk: Add vhost-blk support

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 08:05:42AM -0500, Anthony Liguori wrote: > Of course, the million dollar question is why would using AIO in the > kernel be faster than using AIO in userspace? Actually for me a more important question is how does it compare with virtio-blk dataplane? -- MST -- To unsubsc

Re: [PATCHv4 3/5] KVM: emulator: move some address manipulation function out of emulator code.

2012-07-19 Thread Avi Kivity
On 07/19/2012 01:49 PM, Gleb Natapov wrote: >> All those exports suggest it's better to move the fast path into the >> emulator. > > We've already being through that. Putting the code into emulator gives > us nothing unless it also works on emulator context and working on > partially initialized

Re: [PATCHv4 3/5] KVM: emulator: move some address manipulation function out of emulator code.

2012-07-19 Thread Gleb Natapov
On Thu, Jul 19, 2012 at 04:34:50PM +0300, Avi Kivity wrote: > On 07/19/2012 01:49 PM, Gleb Natapov wrote: > >> All those exports suggest it's better to move the fast path into the > >> emulator. > > > > We've already being through that. Putting the code into emulator gives > > us nothing unless i

kvm-kmod 3.4 compile against a centos 6.3 kernel

2012-07-19 Thread Patrick Wolfe
Hi, I was wondering if it is possible to compile against 2.6.32-279.1.1.el6.x86-64 kernel with kvm-kmod 3.4 source code? It seems like it can be done but with some work. Here are the two references I am referring to: http://www.mail-archive.com/kvm@vger.kernel.org/msg70727.html http://article.gm

Re: vga passthrough // questions about pci passthrough

2012-07-19 Thread Martin Wolf
i tried now the alpha of ubuntu 12.10 that includes qemu-kvm 1.1 and a 3.5 kernel version. the "msr" problem is gone now, i was able to select "sandybridge" as cpu topology, this removed the MSR error messages. thats the positive part... unfortunately i had no success with the other topics (rebo

solar lala shared photos with you

2012-07-19 Thread solar lala
Dear sir We supply solar PV system (including solar panels , frame, cable ,inverter and controller , power distribution cabinet) with 1.6$/w FOB shenzhen. Email me or just call me directly if needed. Thank you! Best wishes lala Ecosol PV Tech Co

Re: vga passthrough // questions about pci passthrough

2012-07-19 Thread Jan Kiszka
On 2012-07-19 16:54, Martin Wolf wrote: > i tried now the alpha of ubuntu 12.10 that includes qemu-kvm 1.1 > and a 3.5 kernel version. > > the "msr" problem is gone now, i was able to select "sandybridge" as > cpu topology, this removed the MSR error messages. > thats the positive part... > > unf

Re: vga passthrough // questions about pci passthrough

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 16:54 +0200, Martin Wolf wrote: > i tried now the alpha of ubuntu 12.10 that includes qemu-kvm 1.1 > and a 3.5 kernel version. > > the "msr" problem is gone now, i was able to select "sandybridge" as > cpu topology, this removed the MSR error messages. > thats the positive pa

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 14:57 +0300, Michael S. Tsirkin wrote: > On Thu, Jul 19, 2012 at 02:25:29PM +0300, Gleb Natapov wrote: > > On Thu, Jul 19, 2012 at 02:12:13PM +0300, Michael S. Tsirkin wrote: > > > On Thu, Jul 19, 2012 at 01:54:53PM +0300, Gleb Natapov wrote: > > > > On Thu, Jul 19, 2012 at 01

Re: [PATCH RFC untested] kvm_set_irq: report coalesced for clear

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 10:38:03AM -0600, Alex Williamson wrote: > Yes, the problem isn't the state. The original patch works just fine to > mask and assert the interrupt every time the device signals and > de-assert and unmask on every EOI. KVM doesn't need to track this for > migration (not tha

Re: [PATCH v5 0/4] kvm: level irqfd and new eoifd

2012-07-19 Thread Michael S. Tsirkin
On Mon, Jul 16, 2012 at 02:33:38PM -0600, Alex Williamson wrote: > v5: > - irqfds now have a one-to-one mapping with eoifds to prevent users >from consuming all of kernel memory by repeatedly creating eoifds >from a single irqfd. > - implement a kvm_clear_irq() which does a test_and_clear

Re: [PATCH v5 0/4] kvm: level irqfd and new eoifd

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 19:59 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 16, 2012 at 02:33:38PM -0600, Alex Williamson wrote: > > v5: > > - irqfds now have a one-to-one mapping with eoifds to prevent users > >from consuming all of kernel memory by repeatedly creating eoifds > >from a sin

Re: [PATCH v5 0/4] kvm: level irqfd and new eoifd

2012-07-19 Thread Michael S. Tsirkin
On Thu, Jul 19, 2012 at 11:29:38AM -0600, Alex Williamson wrote: > On Thu, 2012-07-19 at 19:59 +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 16, 2012 at 02:33:38PM -0600, Alex Williamson wrote: > > > v5: > > > - irqfds now have a one-to-one mapping with eoifds to prevent users > > >from con

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-19 Thread Chris Clayton
On 07/19/12 13:17, Avi Kivity wrote: On 07/19/2012 03:14 PM, Chris Clayton wrote: Change of diagnostics, unfortunately. qemu-kvm-1.0.1 can, in fact, crash on 3.5.0-rc6 (and rc7). I didn't get it earlier because it takes many times more invocations before the crash occurs with 1.0.1 and I haven'

Re: [PATCH v5 0/4] kvm: level irqfd and new eoifd

2012-07-19 Thread Alex Williamson
On Thu, 2012-07-19 at 20:45 +0300, Michael S. Tsirkin wrote: > On Thu, Jul 19, 2012 at 11:29:38AM -0600, Alex Williamson wrote: > > On Thu, 2012-07-19 at 19:59 +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 16, 2012 at 02:33:38PM -0600, Alex Williamson wrote: > > > > v5: > > > > - irqfds now h

Re: [PATCH 2/2 v4] KVM: PPC: booke: Add watchdog emulation

2012-07-19 Thread Scott Wood
On 07/19/2012 12:35 AM, Bhushan Bharat-R65777 wrote: > > >> -Original Message- >> From: Wood Scott-B07421 >> Sent: Thursday, July 19, 2012 7:56 AM >> To: Bhushan Bharat-R65777 >> Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; ag...@suse.de; Bhushan >> Bharat- >> R65777 >> Subject: Re:

[PATCHSET] kthread_worker: reimplement flush_kthread_work() to allow freeing during execution

2012-07-19 Thread Tejun Heo
Hello, kthread_worker was introduced together with concurrency managed workqueue to serve workqueue users which need a special dedicated worker - e.g. RT scheduling. This is minimal queue / flush / flush all iterface on top of kthread and each provided interface matches the workqueue counterpart

[PATCH 1/2] kthread_worker: reorganize to prepare for flush_kthread_work() reimplementation

2012-07-19 Thread Tejun Heo
>From c9bba34243a86fb3ac82d1bdd0ce4bf796b79559 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 19 Jul 2012 13:52:53 -0700 Make the following two non-functional changes. * Separate out insert_kthread_work() from queue_kthread_work(). * Relocate struct kthread_flush_work and kthread_flush_wor

[PATCH 2/2] kthread_worker: reimplement flush_kthread_work() to allow freeing the work item being executed

2012-07-19 Thread Tejun Heo
>From 06f9a06f4aeecdb9d07014713ab41b548ae219b5 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 19 Jul 2012 13:52:53 -0700 kthread_worker provides minimalistic workqueue-like interface for users which need a dedicated worker thread (e.g. for realtime priority). It has basic queue, flush_work,

Re: [PATCH 3/9] KVM: x86: introduce set_mmio_exit_info

2012-07-19 Thread Marcelo Tosatti
On Tue, Jul 17, 2012 at 09:52:13PM +0800, Xiao Guangrong wrote: > Introduce set_mmio_exit_info to cleanup the common code > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/x86.c | 33 + > 1 files changed, 17 insertions(+), 16 deletions(-) This makes the co

Re: [PATCH 1/9] KVM: x86: remvoe unnecessary mark_page_dirty

2012-07-19 Thread Marcelo Tosatti
Applied all patches except 2, 3 and 5, thanks. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/9] KVM: x86: simplify read_emulated

2012-07-19 Thread Marcelo Tosatti
On Tue, Jul 17, 2012 at 09:51:34PM +0800, Xiao Guangrong wrote: > No need split mmio read region into 8-bits pieces since we do it in > emulator_read_write_onepage > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/emulate.c | 29 - > 1 files changed, 12 inserti

Re: [PATCH 4/9] KVM: MMU: track the refcount when unmap the page

2012-07-19 Thread Marcelo Tosatti
On Tue, Jul 17, 2012 at 09:52:52PM +0800, Xiao Guangrong wrote: > It will trigger a WARN_ON if the page has been freed but it is still > used in mmu, it can help us to detect mm bug early > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |8 > 1 files changed, 8 insertion

Re: [PATCH 5/9] KVM: MMU: fask check write-protect for direct mmu

2012-07-19 Thread Marcelo Tosatti
On Tue, Jul 17, 2012 at 09:53:29PM +0800, Xiao Guangrong wrote: > If it have no indirect shadow pages we need not protect any gfn, > this is always true for direct mmu without nested > > Signed-off-by: Xiao Guangrong Xiao, What is the motivation? Numbers please. In fact, what case was the orig

Re: [PATCH] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-07-19 Thread Takuya Yoshikawa
On Wed, 18 Jul 2012 17:52:46 -0300 Marcelo Tosatti wrote: > Can't understand, can you please expand more clearly? I think mmu pages are not worth freeing under usual memory pressure, especially when we have EPT/NPT on. What's happening: shrink_slab() vainly calls mmu_shrink() with the default

Re: Latest Centos6.3 kernel, rebooting from inside centos6.3 VM - gets stuck on seabios/grub loop - previous kernels fine

2012-07-19 Thread Marcelo Tosatti
On Thu, Jul 19, 2012 at 12:27:27PM +0100, Morgan Cox wrote: > Marcelo your awesome ! I agree :) > thank fixed it. > > Thank you. > > Is this an issue just with centos kernel or is rhel effected also ? Not sure - either way disabling kvmclock is not recommended (it handles a number of problems

Re: [PATCH 2/9] KVM: x86: simplify read_emulated

2012-07-19 Thread Xiao Guangrong
On 07/20/2012 07:58 AM, Marcelo Tosatti wrote: >> -} >> +rc = ctxt->ops->read_emulated(ctxt, addr, mc->data + mc->end, size, >> + &ctxt->exception); >> +if (rc != X86EMUL_CONTINUE) >> +return rc; >> + >> +mc->end += size; >> + >> +read_c

Re: [PATCH 3/9] KVM: x86: introduce set_mmio_exit_info

2012-07-19 Thread Xiao Guangrong
On 07/20/2012 08:03 AM, Marcelo Tosatti wrote: > On Tue, Jul 17, 2012 at 09:52:13PM +0800, Xiao Guangrong wrote: >> Introduce set_mmio_exit_info to cleanup the common code >> >> Signed-off-by: Xiao Guangrong >> --- >> arch/x86/kvm/x86.c | 33 + >> 1 files changed

Re: [PATCH 5/9] KVM: MMU: fask check write-protect for direct mmu

2012-07-19 Thread Xiao Guangrong
On 07/20/2012 08:39 AM, Marcelo Tosatti wrote: > On Tue, Jul 17, 2012 at 09:53:29PM +0800, Xiao Guangrong wrote: >> If it have no indirect shadow pages we need not protect any gfn, >> this is always true for direct mmu without nested >> >> Signed-off-by: Xiao Guangrong > > Xiao, > > What is the

Re: [PATCH 07/10] KVM: introduce readonly_fault_pfn

2012-07-19 Thread Xiao Guangrong
On 07/19/2012 06:15 PM, Avi Kivity wrote: > On 07/17/2012 05:44 PM, Xiao Guangrong wrote: >> Introduce readonly_fault_pfn, in the later patch, it indicates failure >> when we try to get a writable pfn from the readonly memslot >> >> + >> inline int kvm_is_mmio_pfn(pfn_t pfn) >> { >> if (pfn_

Re: [PATCH 08/10] KVM: introduce readonly_bad_hva

2012-07-19 Thread Xiao Guangrong
On 07/19/2012 06:16 PM, Avi Kivity wrote: > On 07/17/2012 05:45 PM, Xiao Guangrong wrote: >> In the later patch, it indicates failure when we try to get a writable >> hva from the readonly slot >> >> Signed-off-by: Xiao Guangrong >> --- >> virt/kvm/kvm_main.c | 12 +++- >> 1 files chang

Re: [PATCH 5/9] KVM: MMU: fask check write-protect for direct mmu

2012-07-19 Thread Xiao Guangrong
BTW, they are some bug fix patches on -master branch, but it is not existed on -next branch: commit: f411930442e01f9cf1bf4df41ff7e89476575c4d commit: 85b7059169e128c57a3a8a3e588fb89cb2031da1 It causes code conflict if we do the development on -next. On 07/20/2012 08:39 AM, Marcelo Tosatti wrote:c

[PATCH 2/2] KVM: PPC: booke: Add watchdog emulation

2012-07-19 Thread Bharat Bhushan
This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_WDT) ioctl. The kernel timer are used for watchdog emulation and emulates h/w watchdog state machine. On watchdog timer expiry, it exit to QEMU if TCR.WRC is non ZERO. QEMU can reset/shutd

[PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

2012-07-19 Thread Bharat Bhushan
This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_WDT) ioctl. The kernel timer are used for watchdog emulation and emulates h/w watchdog state machine. On watchdog timer expiry, it exit to QEMU if TCR.WRC is non ZERO. QEMU can reset/shutd

RE: [PATCH 2/2] KVM: PPC: booke: Add watchdog emulation

2012-07-19 Thread Bhushan Bharat-R65777
Please ignore this as I forget to get [v5] is subject.. Thanks -Bharat > -Original Message- > From: Bhushan Bharat-R65777 > Sent: Friday, July 20, 2012 10:29 AM > To: kvm-...@vger.kernel.org; kvm@vger.kernel.org; ag...@suse.de > Cc: Bhushan Bharat-R65777 > Subject: [PATCH 2/2] KVM: PPC: