Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Michael S. Tsirkin
On Sun, Jun 17, 2012 at 04:15:44PM -0600, Alex Williamson wrote: On Sun, Jun 17, 2012 at 3:38 PM, Alex Williamson alex.william...@redhat.com wrote: On Sun, 2012-06-17 at 21:44 +0300, Michael S. Tsirkin wrote: On Sat, Jun 16, 2012 at 10:34:39AM -0600, Alex Williamson wrote: I'm looking for

[PATCH v2 0/3] Improve virtio-blk performance

2012-06-18 Thread Asias He
This patchset implements bio-based IO path for virito-blk to improve performance. Fio test shows it gives, 28%, 24%, 21%, 16% IOPS boost and 32%, 17%, 21%, 16% latency improvement for sequential read/write, random read/write respectively. Asias He (3): block: Introduce __blk_segment_map_sg()

[PATCH 1/3] block: Introduce __blk_segment_map_sg() helper

2012-06-18 Thread Asias He
Split the mapping code in blk_rq_map_sg() to a helper __blk_segment_map_sg(), so that other mapping function, e.g. blk_bio_map_sg(), can share the code. Cc: Jens Axboe ax...@kernel.dk Cc: Tejun Heo t...@kernel.org Cc: Shaohua Li s...@kernel.org Cc: linux-ker...@vger.kernel.org Suggested-by: Tejun

[PATCH v2 2/3] block: Add blk_bio_map_sg() helper

2012-06-18 Thread Asias He
Add a helper to map a bio to a scatterlist, modelled after blk_rq_map_sg. This helper is useful for any driver that wants to create a scatterlist from its -make_request_fn method. Changes in v2: - Use __blk_segment_map_sg to avoid duplicated code - Add cocbook style function comment Cc: Jens

[PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Asias He
This patch introduces bio-based IO path for virtio-blk. Compared to request-based IO path, bio-based IO path uses driver provided -make_request_fn() method to bypasses the IO scheduler. It handles the bio to device directly without allocating a request in block layer. This reduces the IO path in

RE: Bug? 100% load on core after physically removing USB storage from host

2012-06-18 Thread Veruca Salt
Date: Sat, 16 Jun 2012 13:19:53 +0800 Subject: Re: Bug? 100% load on core after physically removing USB storage from host From: centos.ad...@gmail.com To: verucasal...@hotmail.co.uk CC: stefa...@gmail.com; kvm@vger.kernel.org; kra...@redhat.com

Re: [PATCH v2 0/5] Export offsets of VMCS fields as note information for kdump

2012-06-18 Thread YOSHIDA Masanori
Hi, Avi, Yanfei I'm YOSHIDA Masanori from Hitachi, a developer of livedump. And here is a new case from the LinuxCon Japan: Developers from Hitach are now developing a new livedump mechanism for the same reason as ours. They have come to the situation *many times* that guest machines

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Rusty Russell
On Mon, 18 Jun 2012 14:53:10 +0800, Asias He as...@redhat.com wrote: This patch introduces bio-based IO path for virtio-blk. Why make it optional? Thanks, Rusty. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Asias He
On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He as...@redhat.com wrote: This patch introduces bio-based IO path for virtio-blk. Why make it optional? request-based IO path is useful for users who do not want to bypass the IO scheduler in guest

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/16/2012 07:34 PM, Alex Williamson wrote: I'm looking for opinions on this approach. For vfio device assignment we minimally need a way to get EOIs from the in-kernel irqchip out to userspace. Getting that out via an eventfd would allow us to bounce all level interrupts out to

Re: Bug? 100% load on core after physically removing USB storage from host

2012-06-18 Thread Stefan Hajnoczi
On Sat, Jun 16, 2012 at 6:16 AM, Emmanuel Noobadmin centos.ad...@gmail.com wrote: On 6/13/12, Stefan Hajnoczi stefa...@gmail.com wrote: Since system time is a large chunk you could use strace -f -p $(pgrep qemu-kvm) or other system call tracing tools to see what the qemu-kvm process is doing.

Biweekly KVM Test report, kernel 25e531a9... qemu 0a948cbb...

2012-06-18 Thread Ren, Yongjie
Hi All, This is KVM upstream test result against kvm.git next branch and qemu-kvm.git master branch. kvm.git next branch: 25e531a988ea5a64bd97a72dc9d3c65ad5850120 based on kernel 3.5.0-rc1 qemu-kvm.git master branch: 0a948cbb1835e5f36990e173966d30bc4c8cc038 We found 1 new bug

RE: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-18 Thread Ren, Yongjie
-Original Message- From: Michael S. Tsirkin [mailto:m...@redhat.com] Sent: Monday, June 11, 2012 6:22 PM To: Avi Kivity Cc: Jan Kiszka; Thomas Gleixner; Alex Williamson; kvm@vger.kernel.org; mtosa...@redhat.com; linux-ker...@vger.kernel.org; Ren, Yongjie Subject: Re: [PATCH] KVM:

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Jan Kiszka
On 2012-06-18 10:02, Avi Kivity wrote: On 06/16/2012 07:34 PM, Alex Williamson wrote: I'm looking for opinions on this approach. For vfio device assignment we minimally need a way to get EOIs from the in-kernel irqchip out to userspace. Getting that out via an eventfd would allow us to

Re: [PATCH v2 0/3] Improve virtio-blk performance

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 7:53 AM, Asias He as...@redhat.com wrote: Fio test shows it gives, 28%, 24%, 21%, 16% IOPS boost and 32%, 17%, 21%, 16% latency improvement for sequential read/write, random read/write respectively. Sounds great. What storage configuration did you use (single spinning

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 11:52 AM, Jan Kiszka wrote: I don't understand how this works. A level IRQ isn't de-asserted by the EOI, it's de-asserted by its source. Consider the following sequence: deviceguest event assert interrupt interrupt handler

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 7:53 AM, Asias He as...@redhat.com wrote: +static void virtblk_add_buf_wait(struct virtio_blk *vblk, +                                struct virtblk_req *vbr, +                                unsigned long out, +                                unsigned long in) +{ +  

Re: [PATCH v2 0/3] Improve virtio-blk performance

2012-06-18 Thread Asias He
On 06/18/2012 05:14 PM, Stefan Hajnoczi wrote: On Mon, Jun 18, 2012 at 7:53 AM, Asias He as...@redhat.com wrote: Fio test shows it gives, 28%, 24%, 21%, 16% IOPS boost and 32%, 17%, 21%, 16% latency improvement for sequential read/write, random read/write respectively. Sounds great. What

Re: [PATCH v3 6/6] KVM: introduce readonly memslot

2012-06-18 Thread Avi Kivity
On 06/16/2012 05:11 AM, Marcelo Tosatti wrote: Can you introduce a separate exit reason, say KVM_EXIT_READ_FAULT, with information about the fault? I think you mean WRITE_FAULT. But what's wrong with the normal mmio exit? Then perform this exit only if userspace allows it by explicit

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 12:33:01PM +0300, Avi Kivity wrote: On 06/18/2012 11:52 AM, Jan Kiszka wrote: I don't understand how this works. A level IRQ isn't de-asserted by the EOI, it's de-asserted by its source. Consider the following sequence: deviceguest event

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: (vhost, msi-less ivshmem clone)? I guess vhost can poll eventfd and reinject an interrupt. Of course to bypass qemu completely we also need to support reads over ioeventfd somehow. eventfd is not suitable for level triggered interrupts

Re: [PATCH v3 4/6] KVM: pass slot to hva_to_pfn

2012-06-18 Thread Avi Kivity
On 06/12/2012 05:48 AM, Xiao Guangrong wrote: This parameter will be used in the later patch - return hva_to_pfn(kvm, addr, atomic, async, write_fault, writable); + return hva_to_pfn(kvm, slot, addr, atomic, async, write_fault, + writable); } pfn_t

Re: [PATCH v3 5/6] KVM: introduce gfn_to_hva_read/kvm_read_hva/kvm_read_hva_atomic

2012-06-18 Thread Avi Kivity
On 06/12/2012 05:48 AM, Xiao Guangrong wrote: This set of functions is only used to read data from host space, read is a special case in the later patch +/* + * The hva returned by this function is only allowed to be read. + * It should pair with kvm_read_hva() or kvm_read_hva_atomic().

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Rusty Russell
On Mon, 18 Jun 2012 16:03:23 +0800, Asias He as...@redhat.com wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He as...@redhat.com wrote: This patch introduces bio-based IO path for virtio-blk. Why make it optional? request-based IO path is

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 02:53:10PM +0800, Asias He wrote: +static void virtblk_make_request(struct request_queue *q, struct bio *bio) +{ + struct virtio_blk *vblk = q-queuedata; + unsigned int num, out = 0, in = 0; + struct virtblk_req *vbr; + + BUG_ON(bio-bi_phys_segments +

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 11:21 AM, Michael S. Tsirkin m...@redhat.com wrote: On Mon, Jun 18, 2012 at 02:53:10PM +0800, Asias He wrote: +static void virtblk_make_request(struct request_queue *q, struct bio *bio) +{ +     struct virtio_blk *vblk = q-queuedata; +     unsigned int num, out = 0, in

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 01:14:13PM +0300, Avi Kivity wrote: On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: (vhost, msi-less ivshmem clone)? I guess vhost can poll eventfd and reinject an interrupt. Of course to bypass qemu completely we also need to support reads over ioeventfd

Re: [PATCH v2 0/3] Improve virtio-blk performance

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 10:39 AM, Asias He as...@redhat.com wrote: On 06/18/2012 05:14 PM, Stefan Hajnoczi wrote: On Mon, Jun 18, 2012 at 7:53 AM, Asias He as...@redhat.com wrote: Fio test shows it gives, 28%, 24%, 21%, 16% IOPS boost and 32%, 17%, 21%, 16% latency improvement for

Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

2012-06-18 Thread Avi Kivity
On 06/11/2012 01:21 PM, Michael S. Tsirkin wrote: On Mon, Jun 11, 2012 at 01:01:41PM +0300, Avi Kivity wrote: On 06/08/2012 05:50 PM, Jan Kiszka wrote: Pls correct me if I'm wrong. Well, IIRC, the don't loop over all vcpus with IRQs or preemption disabled was one argument against

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 01:55 PM, Michael S. Tsirkin wrote: On Mon, Jun 18, 2012 at 01:14:13PM +0300, Avi Kivity wrote: On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: (vhost, msi-less ivshmem clone)? I guess vhost can poll eventfd and reinject an interrupt. Of course to bypass qemu

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Dor Laor
On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias Heas...@redhat.com wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias Heas...@redhat.com wrote: This patch introduces bio-based IO path for virtio-blk. Why

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 02:03:40PM +0300, Avi Kivity wrote: On 06/18/2012 01:55 PM, Michael S. Tsirkin wrote: On Mon, Jun 18, 2012 at 01:14:13PM +0300, Avi Kivity wrote: On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: (vhost, msi-less ivshmem clone)? I guess vhost can poll

[Bug 43501] all 32bit binaries produce Illegal Instruction after KVM migration from AMD - Intel host

2012-06-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=43501 --- Comment #5 from Avi Kivity a...@redhat.com 2012-06-18 11:22:21 --- I'm not sure that the vendor string is passed correctly. Please verify that when starting the guest on an Intel host, /proc/cpuinfo shows AuthenticAMD for vendor_id. --

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Sasha Levin
On Mon, 2012-06-18 at 14:14 +0300, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias Heas...@redhat.com wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias Heas...@redhat.com wrote: This patch

Re: [PATCH RFC] virtio-spec: flexible configuration layout

2012-06-18 Thread Michael S. Tsirkin
On Wed, Nov 09, 2011 at 02:36:43PM +0200, Pekka Enberg wrote: On Wed, 9 Nov 2011, Sasha Levin wrote: They don't exist in kernel code either, for same reason as above. Nothing will break if we remove it since no one really used it, we were probably the first and only implementation of the

Re: [PATCH 2/4] KVM: Introduce hva_to_gfn() for kvm_handle_hva()

2012-06-18 Thread Avi Kivity
On 06/15/2012 02:31 PM, Takuya Yoshikawa wrote: This restricts hva handling in mmu code and makes it easier to extend kvm_handle_hva() so that it can treat a range of addresses later in this patch series. kvm_for_each_memslot(memslot, slots) { - unsigned long start =

Re: [PATCH RFC] virtio-spec: flexible configuration layout

2012-06-18 Thread Sasha Levin
On Mon, 2012-06-18 at 14:54 +0300, Michael S. Tsirkin wrote: On Wed, Nov 09, 2011 at 02:36:43PM +0200, Pekka Enberg wrote: On Wed, 9 Nov 2011, Sasha Levin wrote: They don't exist in kernel code either, for same reason as above. Nothing will break if we remove it since no one really used

Re: [Qemu-devel] [PATCH RFC] virtio-pci: add MMIO property

2012-06-18 Thread Michael S. Tsirkin
On Tue, Mar 20, 2012 at 10:22:42AM +1030, Rusty Russell wrote: On Mon, 19 Mar 2012 17:13:06 -0500, Anthony Liguori anth...@codemonkey.ws wrote: Maybe just make this a hidden option like x-miio? x-violate-the-virtio-spec-to-trick-old-linux-drivers-into-working-on-power? To configure

Re: [PATCH RFC] virtio-spec: flexible configuration layout

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 02:05:17PM +0200, Sasha Levin wrote: On Mon, 2012-06-18 at 14:54 +0300, Michael S. Tsirkin wrote: On Wed, Nov 09, 2011 at 02:36:43PM +0200, Pekka Enberg wrote: On Wed, 9 Nov 2011, Sasha Levin wrote: They don't exist in kernel code either, for same reason as above.

Re: [PATCH 3/4] KVM: MMU: Make kvm_handle_hva() handle range of addresses

2012-06-18 Thread Avi Kivity
On 06/15/2012 02:32 PM, Takuya Yoshikawa wrote: When guest's memory is backed by THP pages, MMU notifier needs to call kvm_unmap_hva(), which in turn leads to kvm_handle_hva(), in a loop to invalidate a range of pages which constitute one huge page: for each guest page for each

[Bug 43501] all 32bit binaries produce Illegal Instruction after KVM migration from AMD - Intel host

2012-06-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=43501 --- Comment #6 from Avi Kivity a...@redhat.com 2012-06-18 12:44:18 --- (In reply to comment #4) (In reply to comment #1) What host kernel are you using? 2.6.32-220.17.1.el6.x86_64 (SL 6.2) This bugzilla is for upstream kernels. Use

Re: [PATCH v8 02/15] KVM: use KVM_CAP_IRQ_ROUTING to protect the routing related code

2012-06-18 Thread Avi Kivity
On 06/15/2012 10:07 PM, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com The KVM code sometimes uses CONFIG_HAVE_KVM_IRQCHIP to protect code that is related to IRQ routing, which not all in-kernel irqchips may support. Use KVM_CAP_IRQ_ROUTING instead. Thanks, applied. --

Re: [PATCH v8 03/15] KVM: Introduce __KVM_HAVE_IRQ_LINE

2012-06-18 Thread Avi Kivity
On 06/15/2012 10:07 PM, Christoffer Dall wrote: This is a preparatory patch for the KVM/ARM implementation. KVM/ARM will use the KVM_IRQ_LINE ioctl, which is currently conditional on __KVM_HAVE_IOAPIC, but ARM obviously doesn't have any IOAPIC support and we need a separate define. Thanks,

Re: [PATCH v8 04/15] KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER

2012-06-18 Thread Avi Kivity
On 06/15/2012 10:07 PM, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com In order to avoid compilation failure when KVM is not compiled in, guard the mmu_notifier specific sections with both CONFIG_MMU_NOTIFIER and KVM_ARCH_WANT_MMU_NOTIFIER, like it is being done in the rest

Re: [PATCH v8 06/15] ARM: KVM: Hypervisor identity mapping

2012-06-18 Thread Avi Kivity
On 06/15/2012 10:07 PM, Christoffer Dall wrote: Adds support in the identity mapping feature that allows KVM to setup identity mapping for the Hyp mode with the AP[1] bit set as required by the specification and also supports freeing created sub pmd's after finished use. These two

Re: [PATCH 3/4] KVM: MMU: Make kvm_handle_hva() handle range of addresses

2012-06-18 Thread Takuya Yoshikawa
On Mon, 18 Jun 2012 15:11:42 +0300 Avi Kivity a...@redhat.com wrote: kvm_for_each_memslot(memslot, slots) { - gfn_t gfn = hva_to_gfn(hva, memslot); + gfn_t gfn = hva_to_gfn(start_hva, memslot); + gfn_t end_gfn = hva_to_gfn(end_hva, memslot); These

[Bug 14836] memory allocation bug. The used memory of host is not freed after close of virtual machine(s).

2012-06-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=14836 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug 14836] memory allocation bug. The used memory of host is not freed after close of virtual machine(s).

2012-06-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=14836 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Status|RESOLVED|CLOSED -- Configure

Re: [PATCH v8 10/15] ARM: KVM: Inject IRQs and FIQs from userspace

2012-06-18 Thread Avi Kivity
On 06/15/2012 10:08 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. This ioctl is used since the sematics are in fact two lines that can be either raised or lowered on the VCPU - the IRQ and FIQ

Re: [PATCH v8 11/15] ARM: KVM: World-switch implementation

2012-06-18 Thread Avi Kivity
On 06/15/2012 10:08 PM, Christoffer Dall wrote: Provides complete world-switch implementation to switch to other guests running in non-secure modes. Includes Hyp exception handlers that capture necessary exception information and stores the information on the VCPU and KVM structures.

Re: [PATCH v8 13/15] ARM: KVM: Handle guest faults in KVM

2012-06-18 Thread Avi Kivity
On 06/15/2012 10:09 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu Handles the guest faults in KVM by mapping in corresponding user pages in the 2nd stage page tables. Introduces new ARM-specific kernel memory types, PAGE_KVM_GUEST and pgprot_guest variables used

Re: [PATCH v8 14/15] ARM: KVM: Handle I/O aborts

2012-06-18 Thread Avi Kivity
On 06/15/2012 10:09 PM, Christoffer Dall wrote: When the guest accesses I/O memory this will create data abort exceptions and they are handled by decoding the HSR information (physical address, read/write, length, register) and forwarding reads and writes to QEMU which performs the device

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 09:00 +0300, Michael S. Tsirkin wrote: On Sun, Jun 17, 2012 at 04:15:44PM -0600, Alex Williamson wrote: On Sun, Jun 17, 2012 at 3:38 PM, Alex Williamson alex.william...@redhat.com wrote: On Sun, 2012-06-17 at 21:44 +0300, Michael S. Tsirkin wrote: On Sat, Jun 16,

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 08:51 +0300, Michael S. Tsirkin wrote: On Sun, Jun 17, 2012 at 03:38:57PM -0600, Alex Williamson wrote: On Sun, 2012-06-17 at 21:44 +0300, Michael S. Tsirkin wrote: On Sat, Jun 16, 2012 at 10:34:39AM -0600, Alex Williamson wrote: I'm looking for opinions on this

[RFC 1/2] virtio-ring: Use threshold for switching to indirect descriptors

2012-06-18 Thread Sasha Levin
Currently if VIRTIO_RING_F_INDIRECT_DESC is enabled we will use indirect descriptors even if we have plenty of space in the ring. This means that we take a performance hit at all times due to the overhead of creating indirect descriptors. Instead, use it only after we're below a configurable

[RFC 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-06-18 Thread Sasha Levin
Currently if VIRTIO_RING_F_INDIRECT_DESC is enabled we will use indirect descriptors and allocate them using a simple kmalloc(). This patch adds a cache which will allow indirect buffers under a configurable size to be allocated from that cache instead. Signed-off-by: Sasha Levin

Re: [PATCH 05/21] KVM: x86 emulator: allow loading null SS in long mode

2012-06-18 Thread Kevin Wolf
Am 12.06.2012 19:34, schrieb Avi Kivity: Null SS is valid in long mode; allow loading it. Signed-off-by: Avi Kivity a...@redhat.com The documentation suggests that trying to load it in CPL 3 should still fail in long mode. Kevin -- To unsubscribe from this list: send the line unsubscribe kvm

Re: [PATCHv7 3/8] kvm_para: guest side for eoi avoidance

2012-06-18 Thread Avi Kivity
On 06/14/2012 04:53 PM, Michael S. Tsirkin wrote: The idea is simple: there's a bit, per APIC, in guest memory, that tells the guest that it does not need EOI. Guest tests it using a single est and clear operation - this is necessary so that host can detect interrupt nesting - and if set, it

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 11:02 +0300, Avi Kivity wrote: On 06/16/2012 07:34 PM, Alex Williamson wrote: I'm looking for opinions on this approach. For vfio device assignment we minimally need a way to get EOIs from the in-kernel irqchip out to userspace. Getting that out via an eventfd would

Re: [PATCHv7 5/8] kvm: eoi msi documentation

2012-06-18 Thread Avi Kivity
On 06/14/2012 04:53 PM, Michael S. Tsirkin wrote: Document the new EOI MSR. Couldn't decide whether this change belongs conceptually on guest or host side, so a separate patch. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Documentation/virtual/kvm/msr.txt | 32

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 13:11 +0300, Michael S. Tsirkin wrote: On Mon, Jun 18, 2012 at 12:33:01PM +0300, Avi Kivity wrote: On 06/18/2012 11:52 AM, Jan Kiszka wrote: I don't understand how this works. A level IRQ isn't de-asserted by the EOI, it's de-asserted by its source.

Re: [PATCH 05/21] KVM: x86 emulator: allow loading null SS in long mode

2012-06-18 Thread Avi Kivity
On 06/18/2012 05:14 PM, Kevin Wolf wrote: Am 12.06.2012 19:34, schrieb Avi Kivity: Null SS is valid in long mode; allow loading it. Signed-off-by: Avi Kivity a...@redhat.com The documentation suggests that trying to load it in CPL 3 should still fail in long mode. Right, good catch. --

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 13:14 +0300, Avi Kivity wrote: On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: (vhost, msi-less ivshmem clone)? I guess vhost can poll eventfd and reinject an interrupt. Of course to bypass qemu completely we also need to support reads over ioeventfd

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 14:17 +0300, Michael S. Tsirkin wrote: On Mon, Jun 18, 2012 at 02:03:40PM +0300, Avi Kivity wrote: On 06/18/2012 01:55 PM, Michael S. Tsirkin wrote: On Mon, Jun 18, 2012 at 01:14:13PM +0300, Avi Kivity wrote: On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote:

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 05:27 PM, Alex Williamson wrote: On Mon, 2012-06-18 at 13:14 +0300, Avi Kivity wrote: On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: (vhost, msi-less ivshmem clone)? I guess vhost can poll eventfd and reinject an interrupt. Of course to bypass qemu completely we

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 05:18 PM, Alex Williamson wrote: I don't understand how this works. A level IRQ isn't de-asserted by the EOI, it's de-asserted by its source. Consider the following sequence: deviceguest event assert interrupt interrupt

Re: [PATCHv7 3/8] kvm_para: guest side for eoi avoidance

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 05:17:24PM +0300, Avi Kivity wrote: On 06/14/2012 04:53 PM, Michael S. Tsirkin wrote: The idea is simple: there's a bit, per APIC, in guest memory, that tells the guest that it does not need EOI. Guest tests it using a single est and clear operation - this is

Re: [PATCHv7 5/8] kvm: eoi msi documentation

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 05:20:01PM +0300, Avi Kivity wrote: On 06/14/2012 04:53 PM, Michael S. Tsirkin wrote: Document the new EOI MSR. Couldn't decide whether this change belongs conceptually on guest or host side, so a separate patch. Signed-off-by: Michael S. Tsirkin m...@redhat.com

Re: [PATCHv7 5/8] kvm: eoi msi documentation

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 05:20:01PM +0300, Avi Kivity wrote: On 06/14/2012 04:53 PM, Michael S. Tsirkin wrote: Document the new EOI MSR. Couldn't decide whether this change belongs conceptually on guest or host side, so a separate patch. Signed-off-by: Michael S. Tsirkin m...@redhat.com

Re: [PATCHv7 3/8] kvm_para: guest side for eoi avoidance

2012-06-18 Thread Avi Kivity
On 06/18/2012 05:50 PM, Michael S. Tsirkin wrote: +/* size alignment is implied but just to make it explicit. */ +static DEFINE_PER_CPU(unsigned long, kvm_apic_eoi) __aligned(2) = + KVM_PV_EOI_DISABLED; You're actually breaking the alignment. ulong has 8 byte alignment sometimes

Re: [PATCHv7 5/8] kvm: eoi msi documentation

2012-06-18 Thread Avi Kivity
On 06/18/2012 05:56 PM, Michael S. Tsirkin wrote: On Mon, Jun 18, 2012 at 05:20:01PM +0300, Avi Kivity wrote: On 06/14/2012 04:53 PM, Michael S. Tsirkin wrote: Document the new EOI MSR. Couldn't decide whether this change belongs conceptually on guest or host side, so a separate patch.

KVM call agenda for Tuesday, June 19th

2012-06-18 Thread Juan Quintela
Hi Please send in any agenda items you are interested in covering. Anthony suggested for last week: - multithreading vhost (and general vhost improvements) I suggest: - status of migration: post-copy, IDL, XBRLE, huge memory, ... Will send an email with an status before tomorrow call.

Re: [PATCHv7 5/8] kvm: eoi msi documentation

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 06:03:42PM +0300, Avi Kivity wrote: On 06/18/2012 05:56 PM, Michael S. Tsirkin wrote: On Mon, Jun 18, 2012 at 05:20:01PM +0300, Avi Kivity wrote: On 06/14/2012 04:53 PM, Michael S. Tsirkin wrote: Document the new EOI MSR. Couldn't decide whether this change belongs

Re: git access via http to kvm-kmod

2012-06-18 Thread Juan Lorenzo del Castillo
Thanks, Jan I changed the URL in .git/config and 'git submodule update --init' worked and populated the ./linux directory. Then, I ran ./configure make sync make but I got a build error: $ make make -C /lib/modules/2.6.32-71.el6.x86_64/build M=`pwd` \ LINUXINCLUDE=-I`pwd`/include -Iinclude

Re: git access via http to kvm-kmod

2012-06-18 Thread Jan Kiszka
On 2012-06-18 18:01, Juan Lorenzo del Castillo wrote: Thanks, Jan I changed the URL in .git/config and 'git submodule update --init' worked and populated the ./linux directory. Then, I ran ./configure make sync make but I got a build error: $ make make -C

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 17:33 +0300, Avi Kivity wrote: On 06/18/2012 05:27 PM, Alex Williamson wrote: On Mon, 2012-06-18 at 13:14 +0300, Avi Kivity wrote: On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: (vhost, msi-less ivshmem clone)? I guess vhost can poll eventfd and

Re: [PATCHv7 3/8] kvm_para: guest side for eoi avoidance

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 06:01:59PM +0300, Avi Kivity wrote: On 06/18/2012 05:50 PM, Michael S. Tsirkin wrote: +/* size alignment is implied but just to make it explicit. */ +static DEFINE_PER_CPU(unsigned long, kvm_apic_eoi) __aligned(2) = +KVM_PV_EOI_DISABLED;

Re: [PATCH v8 04/15] KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER

2012-06-18 Thread Christoffer Dall
On Mon, Jun 18, 2012 at 9:08 AM, Avi Kivity a...@redhat.com wrote: On 06/15/2012 10:07 PM, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com In order to avoid compilation failure when KVM is not compiled in, guard the mmu_notifier specific sections with both CONFIG_MMU_NOTIFIER

Re: [PATCH v8 06/15] ARM: KVM: Hypervisor identity mapping

2012-06-18 Thread Christoffer Dall
On Mon, Jun 18, 2012 at 9:12 AM, Avi Kivity a...@redhat.com wrote: On 06/15/2012 10:07 PM, Christoffer Dall wrote: Adds support in the identity mapping feature that allows KVM to setup identity mapping for the Hyp mode with the AP[1] bit set as required by the specification and also supports

Re: [PATCH v2] PCI: Mark INTx masking support of Chelsio T310 10GbE NIC as broken

2012-06-18 Thread Bjorn Helgaas
On Thu, Jun 7, 2012 at 2:30 AM, Jan Kiszka jan.kis...@web.de wrote: From: Jan Kiszka jan.kis...@siemens.com According to http://thread.gmane.org/gmane.comp.emulators.kvm.devel/91388 the T310 does not properly support INTx masking as it fails to keep the PCI_STATUS_INTERRUPT bit updated

Re: [PATCH v2] PCI: Add Ralink RT2800 broken INTx masking quirk

2012-06-18 Thread Bjorn Helgaas
On Thu, Jun 7, 2012 at 11:01 AM, Alex Williamson alex.william...@redhat.com wrote: Passes pci_intx_mask_supported test but continues to send interrupts as discovered through VFIO-based device assignment. http://www.spinics.net/lists/kvm/msg73738.html Signed-off-by: Alex Williamson

Re: [PATCH v6 6/9] KVM: MMU: fast path of handling guest page fault

2012-06-18 Thread Marcelo Tosatti
On Thu, Jun 14, 2012 at 10:22:14AM +0900, Takuya Yoshikawa wrote: On Wed, 13 Jun 2012 19:40:02 -0300 Marcelo Tosatti mtosa...@redhat.com wrote: mmu_spte_update is handling several different cases. Please rewrite it, add a comment on top of it (or spread comments on top of each

SOLVED: RE: Garbled audio - Windows 7 64 bit guest on Debian

2012-06-18 Thread Jimmy Crossley
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Jimmy Crossley Sent: Friday, June 08, 2012 17:29 To: kvm@vger.kernel.org Subject: Garbled audio - Windows 7 64 bit guest on Debian I am experiencing garbled sound on a Windows 7 64

Re: [PATCH v6 6/9] KVM: MMU: fast path of handling guest page fault

2012-06-18 Thread Marcelo Tosatti
On Thu, Jun 14, 2012 at 11:00:14AM +0800, Xiao Guangrong wrote: On 06/14/2012 06:40 AM, Marcelo Tosatti wrote: On Tue, May 29, 2012 at 02:50:32PM +0800, Xiao Guangrong wrote: If the the present bit of page fault error code is set, it indicates the shadow page is populated on all levels,

Re: [PATCH v3 6/6] KVM: introduce readonly memslot

2012-06-18 Thread Marcelo Tosatti
On Mon, Jun 18, 2012 at 12:50:10PM +0300, Avi Kivity wrote: On 06/16/2012 05:11 AM, Marcelo Tosatti wrote: Can you introduce a separate exit reason, say KVM_EXIT_READ_FAULT, with information about the fault? I think you mean WRITE_FAULT. Yes. But what's wrong with the normal mmio

Re: [Qemu-devel] [PATCH] Fixes related to processing of qemu's -numa option

2012-06-18 Thread Eduardo Habkost
On Sun, Jun 17, 2012 at 01:12:31PM -0700, Chegu Vinod wrote: The -numa option to qemu is used to create [fake] numa nodes and expose them to the guest OS instance. There are a couple of issues with the -numa option: a) Max VCPU's that can be specified for a guest while using the qemu's

Re: [PATCH v8 10/15] ARM: KVM: Inject IRQs and FIQs from userspace

2012-06-18 Thread Christoffer Dall
On Mon, Jun 18, 2012 at 9:32 AM, Avi Kivity a...@redhat.com wrote: On 06/15/2012 10:08 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. This ioctl is used since the sematics are in fact two lines

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Tejun Heo
Hello, guys. On Mon, Jun 18, 2012 at 07:35:22PM +0930, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He as...@redhat.com wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He as...@redhat.com wrote: This patch introduces

Re: [PATCH 1/3] block: Introduce __blk_segment_map_sg() helper

2012-06-18 Thread Tejun Heo
Hello, Asias. On Mon, Jun 18, 2012 at 02:53:08PM +0800, Asias He wrote: Split the mapping code in blk_rq_map_sg() to a helper __blk_segment_map_sg(), so that other mapping function, e.g. blk_bio_map_sg(), can share the code. Cc: Jens Axboe ax...@kernel.dk Cc: Tejun Heo t...@kernel.org Cc:

Re: [Qemu-devel] [PATCH] Fixes related to processing of qemu's -numa option

2012-06-18 Thread Chegu Vinod
On 6/18/2012 1:29 PM, Eduardo Habkost wrote: On Sun, Jun 17, 2012 at 01:12:31PM -0700, Chegu Vinod wrote: The -numa option to qemu is used to create [fake] numa nodes and expose them to the guest OS instance. There are a couple of issues with the -numa option: a) Max VCPU's that can be

Re: [Qemu-devel] [PATCH] Fixes related to processing of qemu's -numa option

2012-06-18 Thread Andreas Färber
Am 17.06.2012 22:12, schrieb Chegu Vinod: diff --git a/vl.c b/vl.c index 204d85b..1906412 100644 --- a/vl.c +++ b/vl.c @@ -28,6 +28,7 @@ #include errno.h #include sys/time.h #include zlib.h +#include sched.h Did you check whether this and the macros you're using are available on POSIX

Re: [PATCH v8 11/15] ARM: KVM: World-switch implementation

2012-06-18 Thread Christoffer Dall
On Mon, Jun 18, 2012 at 9:41 AM, Avi Kivity a...@redhat.com wrote: On 06/15/2012 10:08 PM, Christoffer Dall wrote: Provides complete world-switch implementation to switch to other guests running in non-secure modes. Includes Hyp exception handlers that capture necessary exception information

Re: [Qemu-devel] [PATCH] Fixes related to processing of qemu's -numa option

2012-06-18 Thread Eric Blake
On 06/18/2012 04:05 PM, Andreas Färber wrote: Am 17.06.2012 22:12, schrieb Chegu Vinod: diff --git a/vl.c b/vl.c index 204d85b..1906412 100644 --- a/vl.c +++ b/vl.c @@ -28,6 +28,7 @@ #include errno.h #include sys/time.h #include zlib.h +#include sched.h Did you check whether this

Re: [Qemu-devel] [PATCH] Fixes related to processing of qemu's -numa option

2012-06-18 Thread Chegu Vinod
On 6/18/2012 3:11 PM, Eric Blake wrote: On 06/18/2012 04:05 PM, Andreas Färber wrote: Am 17.06.2012 22:12, schrieb Chegu Vinod: diff --git a/vl.c b/vl.c index 204d85b..1906412 100644 --- a/vl.c +++ b/vl.c @@ -28,6 +28,7 @@ #includeerrno.h #includesys/time.h #includezlib.h

Re: [PATCH v8 13/15] ARM: KVM: Handle guest faults in KVM

2012-06-18 Thread Christoffer Dall
On Mon, Jun 18, 2012 at 9:45 AM, Avi Kivity a...@redhat.com wrote: On 06/15/2012 10:09 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu Handles the guest faults in KVM by mapping in corresponding user pages in the 2nd stage page tables. Introduces new ARM-specific

Re: [PATCH v8 14/15] ARM: KVM: Handle I/O aborts

2012-06-18 Thread Christoffer Dall
On Mon, Jun 18, 2012 at 9:48 AM, Avi Kivity a...@redhat.com wrote: On 06/15/2012 10:09 PM, Christoffer Dall wrote: When the guest accesses I/O memory this will create data abort exceptions and they are handled by decoding the HSR information (physical address, read/write, length, register) and

Re: [PATCH 1/3] block: Introduce __blk_segment_map_sg() helper

2012-06-18 Thread Asias He
On 06/19/2012 05:31 AM, Tejun Heo wrote: Hello, Asias. On Mon, Jun 18, 2012 at 02:53:08PM +0800, Asias He wrote: Split the mapping code in blk_rq_map_sg() to a helper __blk_segment_map_sg(), so that other mapping function, e.g. blk_bio_map_sg(), can share the code. Cc: Jens Axboe

Re: [PATCH v6 6/9] KVM: MMU: fast path of handling guest page fault

2012-06-18 Thread Xiao Guangrong
On 06/19/2012 03:32 AM, Marcelo Tosatti wrote: Ok, if you/Avi want to avoid an atomic read-and-update, please introduce it later an as optimization patch. Good to me, let's discus it in the separate patch. Thank you, Marcelo! -- To unsubscribe from this list: send the line unsubscribe kvm

Re: [PATCH v6 6/9] KVM: MMU: fast path of handling guest page fault

2012-06-18 Thread Takuya Yoshikawa
On Mon, 18 Jun 2012 16:21:20 -0300 Marcelo Tosatti mtosa...@redhat.com wrote: [not about this patch] EPT accessed/dirty bits will be used for more things in the future. Are there any rules for using these bits? Same as other bits? Do you mean hardware rules or KVM rules? KVM

Re: [PATCH v3 6/6] KVM: introduce readonly memslot

2012-06-18 Thread Xiao Guangrong
On 06/18/2012 06:11 PM, Avi Kivity wrote: static int check_memory_region_flags(struct kvm_userspace_memory_region *mem) { -if (mem-flags ~KVM_MEM_LOG_DIRTY_PAGES) +if (mem-flags ~(KVM_MEM_LOG_DIRTY_PAGES | KVM_MEM_READONLY)) return -EINVAL; Only x86 supports

  1   2   >