Re: [RFC PATCH] KVM: optimize apic interrupt delivery

2012-09-11 Thread Avi Kivity
On 09/11/2012 12:57 PM, Gleb Natapov wrote: If you get -ENOMEM when allocating a page without GFP_ATOMIC (or GFP_NOIO etc) then the entire host is dead anyway. The same thing can happen if the guest (or userspace) touches a yet-unallocated page, or if the page fault path fails to

Re: [PATCHv2] KVM: optimize apic interrupt delivery

2012-09-11 Thread Avi Kivity
On 09/11/2012 04:02 PM, Gleb Natapov wrote: Most interrupt are delivered to only one vcpu. Use pre-build tables to find interrupt destination instead of looping through all vcpus. In case of logical mode loop only through vcpus in a logical cluster irq is sent to. * fix rcu issues

Re: [PATCHv2] KVM: optimize apic interrupt delivery

2012-09-11 Thread Avi Kivity
On 09/11/2012 05:46 PM, Gleb Natapov wrote: On Tue, Sep 11, 2012 at 04:26:17PM +0300, Avi Kivity wrote: On 09/11/2012 04:02 PM, Gleb Natapov wrote: Most interrupt are delivered to only one vcpu. Use pre-build tables to find interrupt destination instead of looping through all vcpus. In case

Re: [PATCHv2] KVM: optimize apic interrupt delivery

2012-09-11 Thread Avi Kivity
On 09/11/2012 08:13 PM, Paul E. McKenney wrote: Is there a risk of DOS if RCU is delayed while lots of memory is queued up in this way? If yes is this a generic problem with kfree_rcu that should be addressed in core kernel? There is indeed a risk. The kfree_rcu() implementation cannot

Re: [PATCH v2] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-10 Thread Avi Kivity
On 09/10/2012 06:29 AM, Hao, Xudong wrote: Doesn't help. We can have: host: deactivate fpu for some reason guest: set cr4.osxsave, xcr0.bit3 host: enter guest with deactivated fpu guest: touch fpu result: host fpu corrupted. Avi, I'm not sure if I fully understand of you. Do you

Re: [PATCH] KVM: tsc deadline timer works only when hrtimer high resolution configured

2012-09-10 Thread Avi Kivity
On 09/09/2012 06:10 PM, Liu, Jinsong wrote: Avi Kivity wrote: On 09/09/2012 05:54 PM, Liu, Jinsong wrote: hrtimers is an intrusive feature, I don't think we should force-enable it. Please change it to a depends on. Hmm, if it changed as config KVM depends on HIGH_RES_TIMERS

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-10 Thread Avi Kivity
On 09/10/2012 04:26 AM, Asias He wrote: Or you can make the guest talk to an internal unix-domain socket, tunnel that through virtio-serial, terminate virtio-serial in lkvm, and direct it towards the local X socket. Doesn't this require some user agent or config modification to the guest?

Re: [PATCH 1/3] KVM: MMU: release noslot pfn on the fail path properly

2012-09-10 Thread Avi Kivity
On 09/07/2012 09:13 AM, Xiao Guangrong wrote: We can not directly call kvm_release_pfn_clean to release the pfn since we can meet noslot pfn which is used to cache mmio info into spte Introduce mmu_release_pfn_clean to do this kind of thing Signed-off-by: Xiao Guangrong

Re: [PATCH 3/3] KVM: MMU: remove unnecessary check

2012-09-10 Thread Avi Kivity
On 09/07/2012 09:15 AM, Xiao Guangrong wrote: Checking the return of kvm_mmu_get_page is unnecessary since it is guaranteed by memory cache Thanks, applied. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in

Re: [PATCH 2/3] KVM: fix release error page

2012-09-10 Thread Avi Kivity
On 09/07/2012 09:14 AM, Xiao Guangrong wrote: This bug was triggered: [ 4220.198458] BUG: unable to handle kernel paging request at fffe [ 4220.203907] IP: [81104d85] put_page+0xf/0x34 .. [ 4220.237326] Call Trace: [ 4220.237361] [a03830d0]

Re: [PATCH 1/3] KVM: MMU: release noslot pfn on the fail path properly

2012-09-10 Thread Avi Kivity
On 09/10/2012 11:37 AM, Xiao Guangrong wrote: On 09/10/2012 04:22 PM, Avi Kivity wrote: On 09/07/2012 09:13 AM, Xiao Guangrong wrote: We can not directly call kvm_release_pfn_clean to release the pfn since we can meet noslot pfn which is used to cache mmio info into spte Introduce

Re: [PATCH v2] KVM: trace the events of mmu_notifier

2012-09-10 Thread Avi Kivity
On 09/07/2012 09:16 AM, Xiao Guangrong wrote: mmu_notifier is the interface to broadcast the mm events to KVM, the tracepoints introduced in this patch can trace all these events, it is very helpful for us to notice and fix the bug caused by mm There is nothing kvm specific here. Perhaps this

[ANNOUNCE] qemu-kvm-1.1.2

2012-09-10 Thread Avi Kivity
qemu-kvm-1.1.2 is now available. This release is based on the upstream qemu 1.1.2, plus kvm-specific enhancements. Please see the original QEMU 1.1.2 release announcement [1] for details. This release can be used with the kvm kernel modules provided by your distribution kernel, or by the modules

[ANNOUNCE] qemu-kvm-1.2.0

2012-09-10 Thread Avi Kivity
qemu-kvm-1.2.0 is now available. This release is based on the upstream qemu 1.2.0, plus kvm-specific enhancements. Please see the original QEMU 1.2.0 release announcement [1] for details. This release can be used with the kvm kernel modules provided by your distribution kernel, or by the modules

Re: memtest 4.20+ does not work with -cpu host

2012-09-10 Thread Avi Kivity
On 09/10/2012 02:29 PM, Paolo Bonzini wrote: Il 10/09/2012 13:06, Peter Lieven ha scritto: qemu-kvm-1.0.1-5107 [007] 410771.148000: kvm_entry: vcpu 0 qemu-kvm-1.0.1-5107 [007] 410771.148000: kvm_exit: reason MSR_READ rip 0x11478 info 0 0 qemu-kvm-1.0.1-5107 [007] 410771.148000: kvm_msr:

Re: [PATCH v3 4/4] kvm: i386: Add classic PCI device assignment

2012-09-10 Thread Avi Kivity
On 09/10/2012 12:26 PM, Jan Kiszka wrote: Is patch 4 the only one that is at v3, and the rest are to be taken from the original posting? That is correct. Thanks, applied to uq/master, will push shortly. -- error compiling committee.c: too many arguments to function -- To unsubscribe

Re: memtest 4.20+ does not work with -cpu host

2012-09-10 Thread Avi Kivity
On 09/10/2012 03:29 PM, Peter Lieven wrote: On 09/10/12 14:21, Gleb Natapov wrote: On Mon, Sep 10, 2012 at 02:15:49PM +0200, Paolo Bonzini wrote: Il 10/09/2012 13:52, Peter Lieven ha scritto: dd if=/dev/cpu/0/msr skip=$((0x194)) bs=8 count=1 | xxd dd if=/dev/cpu/0/msr skip=$((0xCE)) bs=8

Re: [Qemu-devel] qemu-kvm log

2012-09-10 Thread Avi Kivity
On 09/10/2012 01:44 PM, Liu, Jinsong wrote: Hi, I'm recently debugging a qemu-kvm issue. I add some print code like 'fprintf(stderr, ...)', however I fail to see any info at stdio. Anyone can tell me where is qemu-kvm logfile, or, what I need do to record my fprintf info? If you're

Re: [RFC PATCH] KVM: optimize apic interrupt delivery

2012-09-10 Thread Avi Kivity
On 09/10/2012 04:09 PM, Gleb Natapov wrote: Most interrupt are delivered to only one vcpu. Use pre-build tables to find interrupt destination instead of looping through all vcpus. + +static inline int recalculate_apic_map(struct kvm *kvm) +{ + struct kvm_apic_map *new, *old = NULL; +

[PULL] KVM updates

2012-09-10 Thread Avi Kivity
Please pull from: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master to merge some kvm updates, most notably a port of qemu-kvm's pre-vfio device assignment. With this there are no significant changes left between qemu and qemu-kvm (though some work remains).

[GIT PULL] KVM updates for 3.6-rc5

2012-09-10 Thread Avi Kivity
Linus, please pull from the repo and branch at: git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/kvm-3.6-2 to receive a trio of KVM fixes: incorrect lookup of guest cpuid, an uninitialized variable fix, and error path cleanup fix. Shortlog/diffstat follow.

Re: [PULL] KVM updates

2012-09-10 Thread Avi Kivity
On 09/10/2012 06:49 PM, Marcelo Tosatti wrote: On Mon, Sep 10, 2012 at 05:32:39PM +0200, Jan Kiszka wrote: On 2012-09-10 17:25, Avi Kivity wrote: Please pull from: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master to merge some kvm updates, most notably a port of qemu

Re: Export offsets of VMCS fields as note information for kdump

2012-09-09 Thread Avi Kivity
On 08/27/2012 10:06 AM, Zhang Yanfei wrote: Hello Avi, Hi, About this VMCSINFO patch, we really need this functionality in our development. And YOSHIDA Masanori(masanori.yoshida...@hitachi.com), the developer from Hitachi, has said they need this too. So could you please tell us why

Re: [PATCH] KVM: Improve wording of KVM_SET_USER_MEMORY_REGION documentation

2012-09-09 Thread Avi Kivity
On 09/07/2012 02:17 PM, Jan Kiszka wrote: Signed-off-by: Jan Kiszka jan.kis...@siemens.com Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v6 11/12] KVM: introduce readonly memslot

2012-09-09 Thread Avi Kivity
On 09/07/2012 02:14 PM, Jan Kiszka wrote: $ grep __KVM_HAVE include/linux/kvm.h | wc -l 20 Yes, mistakes of the past. As your suggestion, userspace will always use the CAP even if the CAP is not really supported. We do not need care the overload on other arches? Generally,

Re: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-09 Thread Avi Kivity
On 09/07/2012 12:56 PM, Xiao Guangrong wrote: On 09/06/2012 10:09 PM, Avi Kivity wrote: On 08/22/2012 03:47 PM, Xiao Guangrong wrote: On 08/22/2012 08:06 PM, Avi Kivity wrote: On 08/21/2012 06:03 AM, Xiao Guangrong wrote: Introduce write_readonly_mem in mmio-exit-info to indicate this exit

Re: [PATCH uq/master] kvm: Clean up irqfd API

2012-09-09 Thread Avi Kivity
On 08/20/2012 11:55 AM, Jan Kiszka wrote: No need to expose the fd-based interface, everyone will already be fine with the more handy EventNotifier variant. Rename the latter to clarify that we are still talking about irqfds here. Thanks, applied. -int kvm_irqchip_add_irqfd(KVMState *s,

Re: KVM: x86: do not retain disabled or invalid pvclock address

2012-09-09 Thread Avi Kivity
On 08/23/2012 02:16 PM, Marcelo Tosatti wrote: In case an invalid or disabled gpa is written to the SYSTEM_TIME MSR, do not retain its value. This is not documented behaviour, nor should be supported. Also clear it on system reset. Not doing so can hide bugs. Signed-off-by: Marcelo

Re: [PATCH v3 4/4] kvm: i386: Add classic PCI device assignment

2012-09-09 Thread Avi Kivity
On 09/06/2012 11:44 AM, Jan Kiszka wrote: On 2012-08-30 20:30, Jan Kiszka wrote: This adds PCI device assignment for i386 targets using the classic KVM interfaces. This version is 100% identical to what is being maintained in qemu-kvm for several years and is supported by libvirt as well. It

Re: [PATCH] KVM: tsc deadline timer works only when hrtimer high resolution configured

2012-09-09 Thread Avi Kivity
On 09/07/2012 03:07 PM, Liu, Jinsong wrote: Avi Kivity wrote: diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 148ed66..0e64997 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2210,7 +2210,11 @@ int kvm_dev_ioctl_check_extension(long ext) r

Re: [PATCH v2] KVM: x86: Check INVPCID feature bit in EBX of leaf 7

2012-09-09 Thread Avi Kivity
On 09/07/2012 10:36 AM, Ren, Yongjie wrote: Checks and operations on the INVPCID feature bit should use EBX of CPUID leaf 7 instead of ECX. Changes from v1: - fixed patch format issue. Thanks, applied to master for 3.6. -- error compiling committee.c: too many arguments to

Re: [PATCH] KVM: tsc deadline timer works only when hrtimer high resolution configured

2012-09-09 Thread Avi Kivity
On 09/09/2012 05:54 PM, Liu, Jinsong wrote: hrtimers is an intrusive feature, I don't think we should force-enable it. Please change it to a depends on. Hmm, if it changed as config KVM depends on HIGH_RES_TIMERS The item 'Kernel-based Virtual Machine (KVM) support (NEW)' even

Re: [PATCH 3/3] support readonly memory feature in qemu

2012-09-09 Thread Avi Kivity
On 09/07/2012 11:26 AM, Liu Sheng wrote: as readonly memory is support in kvm, this patch supports this feature in qemu, mainly pluging the memory region with KVM_MEM_READONLY flag to kvm. @@ -1607,10 +1623,19 @@ int kvm_cpu_exec(CPUArchState *env) break; case

Re: [PATCH 3/3] support readonly memory feature in qemu

2012-09-09 Thread Avi Kivity
On 09/07/2012 11:50 AM, Jan Kiszka wrote: +} else { +cpu_physical_memory_rw(run-mmio.phys_addr, + run-mmio.data, + run-mmio.len, +

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-06 Thread Avi Kivity
On 09/06/2012 06:32 AM, Asias He wrote: On Wed, Sep 5, 2012 at 7:56 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 01:14 PM, Asias He wrote: On Wed, Sep 5, 2012 at 5:53 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 12:46 PM, Asias He wrote: Ok. Then the socat command not only

Re: [PATCH] KVM: VMX: invalidate vpid for invlpg instruction

2012-09-06 Thread Avi Kivity
On 09/06/2012 12:54 AM, Davidlohr Bueso wrote: On Mon, 2012-09-03 at 12:11 +0300, Avi Kivity wrote: On 09/03/2012 02:27 AM, Davidlohr Bueso wrote: On Fri, 2012-08-31 at 14:37 -0300, Marcelo Tosatti wrote: On Fri, Aug 31, 2012 at 06:10:48PM +0200, Davidlohr Bueso wrote: For processors

Re: [PATCH v2] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-06 Thread Avi Kivity
On 09/06/2012 05:13 AM, Hao, Xudong wrote: -Original Message- From: Avi Kivity [mailto:a...@redhat.com] Sent: Wednesday, September 05, 2012 9:13 PM To: Hao, Xudong Cc: kvm@vger.kernel.org; Zhang, Xiantao; joerg.roe...@amd.com Subject: Re: [PATCH v2] kvm/fpu: Enable fully eager

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-06 Thread Avi Kivity
On 09/05/2012 10:04 PM, Blue Swirl wrote: Reinventing a disassembler for ever growing x86 assembly is no fun. We can try linking to a disassembler library. I use udis86 to disassemble instructions in kvm tracepoints

Re: [RFC v2 PATCH 01/21] x86: Split memory hotplug function from cpu_up() as cpu_memory_up()

2012-09-06 Thread Avi Kivity
On 09/06/2012 02:27 PM, Tomoki Sekiyama wrote: Split memory hotplug function from cpu_up() as cpu_memory_up(), which will be used for assigning memory area to off-lined cpus at following patch in this series. Can post a summary containing both the general outline for people reading this for

Re: [RFC v2 PATCH 01/21] x86: Split memory hotplug function from cpu_up() as cpu_memory_up()

2012-09-06 Thread Avi Kivity
On 09/06/2012 02:31 PM, Avi Kivity wrote: On 09/06/2012 02:27 PM, Tomoki Sekiyama wrote: Split memory hotplug function from cpu_up() as cpu_memory_up(), which will be used for assigning memory area to off-lined cpus at following patch in this series. Can post a summary containing both

Re: [RFC v2 PATCH 00/21] KVM: x86: CPU isolation and direct interrupts delivery to guests

2012-09-06 Thread Avi Kivity
On 09/06/2012 02:27 PM, Tomoki Sekiyama wrote: This RFC patch series provides facility to dedicate CPUs to KVM guests and enable the guests to handle interrupts from passed-through PCI devices directly (without VM exit and relay by the host). With this feature, we can improve throughput and

Re: [patch 0/3] kvm: split kvm_arch_flush_shadow and move mmio spte invalidation to x86

2012-09-06 Thread Avi Kivity
On 08/24/2012 09:54 PM, Marcelo Tosatti wrote: Paul, does that work for you. Thanks, applied. -- error compiling committee.c: too many arguments to function -- 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] KVM: tsc deadline timer works only when hrtimer high resolution configured

2012-09-06 Thread Avi Kivity
On 09/04/2012 06:07 PM, Liu, Jinsong wrote: From 728a17e2de591b557c3c8ba31076b4bf2ca5ab42 Mon Sep 17 00:00:00 2001 From: Liu, Jinsong jinsong@intel.com Date: Wed, 5 Sep 2012 03:18:15 +0800 Subject: [PATCH] KVM: tsc deadline timer works only when hrtimer high resolution configured This

Re: [PATCH] Documentation for kvm_stat.

2012-09-06 Thread Avi Kivity
On 08/28/2012 08:38 AM, Bo Yang wrote: Signed-off-by: Bo Yang boy...@suse.com Please copy the qemu mailing list on qemu patches. I'm not sure whether we should document kvm_stat; I'd like to remove it once 'perf' (from the kernel tools/perf directory) gains the same capabilities. -- error

Re: [qemu-kvm] source code compile error: No rule to make target `../libhw64/virtio-console.o', needed by `qemu-system-x86_64'

2012-09-06 Thread Avi Kivity
On 08/23/2012 03:07 PM, Wangpan wrote: Hi all, I got this error when I compile the source tarball qemu-kvm-1.1.1.tar.gz and qemu-kvm-1.1.0.tar.gz and as well as codes clone from git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git, the compile command I used is ./configure make. I google

Re: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-06 Thread Avi Kivity
On 08/22/2012 03:47 PM, Xiao Guangrong wrote: On 08/22/2012 08:06 PM, Avi Kivity wrote: On 08/21/2012 06:03 AM, Xiao Guangrong wrote: Introduce write_readonly_mem in mmio-exit-info to indicate this exit is caused by write access on readonly memslot Please document this in chapter 5

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Avi Kivity
On 09/04/2012 04:59 PM, Alexander Graf wrote: Not is you pack the pointer in a __u64, which is what we do to preserve padding. Then it is only s390 which needs extra love. I doubt that anyone wants to run 31-bit user space on an s390x system. In fact, I wouldn't be surprised if exactly

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Avi Kivity
On 09/05/2012 09:48 AM, Rusty Russell wrote: Peter Maydell peter.mayd...@linaro.org writes: On 1 September 2012 13:28, Rusty Russell ru...@rustcorp.com.au wrote: Rusty Russell (8): KVM: ARM: Fix walk_msrs() KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code. KVM: Add

Re: memtest 4.20+ does not work with -cpu host

2012-09-06 Thread Avi Kivity
On 08/22/2012 06:06 PM, Peter Lieven wrote: Hi, has anyone ever tested to run memtest with -cpu host flag passed to qemu-kvm? For me it resets when probing the chipset. With -cpu qemu64 it works just fine. Maybe this is specific to memtest, but it might be sth that can happen in other

Re: Character device assignment

2012-09-06 Thread Avi Kivity
On 08/16/2012 10:28 PM, siddhesh phadke wrote: I want to assign my own character device to guest. I tried going through code and found -chardev option.-chardev defines several backend options but I could not understand how they interact with guest. I also tried to search online but I got

Re: [PATCH REBASE RESEND 0/4] improve speed of rep ins emulation

2012-09-06 Thread Avi Kivity
On 09/03/2012 03:24 PM, Gleb Natapov wrote: This series (or rather the last patch of it) takes different approach to rep ins optimization. Instead of writing separate fast path for it do the fast path inside emulator itself. This way nobody can say the code is not reused! Patch 1,2 are now,

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Avi Kivity
On 09/06/2012 06:08 PM, Alexander Graf wrote: On 06.09.2012, at 10:48, Avi Kivity a...@redhat.com wrote: On 09/05/2012 09:48 AM, Rusty Russell wrote: Peter Maydell peter.mayd...@linaro.org writes: On 1 September 2012 13:28, Rusty Russell ru...@rustcorp.com.au wrote: Rusty Russell (8

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-06 Thread Avi Kivity
On 09/06/2012 06:23 PM, Peter Maydell wrote: On 6 September 2012 16:16, Avi Kivity a...@redhat.com wrote: (and the APIC, if treated as one-large-register) is 4k) ...so don't do that then. Trying to treat the whole APIC as a single register means you don't get any of the advantages of does

Re: [PATCH] kvm/x86: use symbolic constant for nr interrupts

2012-09-06 Thread Avi Kivity
On 09/05/2012 08:00 PM, Michael S. Tsirkin wrote: interrupt_bitmap is KVM_NR_INTERRUPTS bits in size, so just use that instead of hard-coded constants and math. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

Re: [PATCH 0/5]KVM:Enable APIC-Register Virtualization and Virtual-interrupt delivery

2012-09-06 Thread Avi Kivity
On 09/05/2012 08:40 AM, Li, Jiongxi wrote: The VMCS includes controls that enable the virtualization of interrupts and the Advanced Programmable Interrupt Controller (APIC). When these controls are used, the processor will emulate many accesses to the APIC, track the state of the virtual

Re: [PATCH 1/5]KVM: x86, apicv: add APICv register virtualization support

2012-09-06 Thread Avi Kivity
On 09/05/2012 08:41 AM, Li, Jiongxi wrote: - APIC read doesn't cause VM-Exit - APIC write becomes trap-like +/* emulate APIC access in a trap manner */ +int kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset) +{ + u32 val; + + /* hw has done the conditional check and

Re: [PATCH 2/5]KVM:x86, apicv: adjust for virtual interrupt delivery

2012-09-06 Thread Avi Kivity
On 09/05/2012 08:41 AM, Li, Jiongxi wrote: Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection path: - for pending interrupt, instead of direct

Re: [PATCH 3/5]KVM:x86, apicv: enable virtual interrupt delivery for VMX

2012-09-06 Thread Avi Kivity
On 09/05/2012 08:41 AM, Li, Jiongxi wrote: - before returning to guest, RVI should be updated if any pending IRRs process pending interrupts does that for you, so you only need this with KVM_SET_APIC. - EOI exit bitmap controls whether an EOI write should cause VM-Exit. if set, a trap-like

Re: [PATCH 4/5]KVM:x86, apicv: add interface for poking EOI exit bitmap

2012-09-06 Thread Avi Kivity
On 09/05/2012 08:41 AM, Li, Jiongxi wrote: With APICv virtual interrupt delivery feature, EOI write from non root mode doesn't cause VM-Exit unless set in EOI exit bitmap VMCS field. Basically there're two methods to manipulate EOI exit bitmap: Should be folded into the previous patch,

Re: expanding virtual disk based on lvm

2012-09-05 Thread Avi Kivity
On 09/04/2012 09:58 PM, Ross Boylan wrote: On Tue, 2012-09-04 at 15:53 +0300, Avi Kivity wrote: On 08/28/2012 11:26 PM, Ross Boylan wrote: My vm launches with -hda /dev/turtle/VD0 -hdb /dev/turtle/VD1, where VD0 and VD1 are lvm logical volumes. I used lvextend to expand them, but the VM

Re: [PATCH v2 1/7] s390/kvm: Support for I/O interrupts.

2012-09-05 Thread Avi Kivity
On 09/04/2012 06:13 PM, Cornelia Huck wrote: Add support for handling I/O interrupts (standard, subchannel-related ones and rudimentary adapter interrupts). The subchannel-identifying parameters are encoded into the interrupt type. I/O interrupts are floating, so they can't be injected on

Re: [RFC PATCH v2 0/7] s390: virtual css host support.

2012-09-05 Thread Avi Kivity
On 09/04/2012 06:13 PM, Cornelia Huck wrote: Hi, here's the second revision of the virtual channel subsystem support for s390. I changed the representation of the channel subsystem, introducing channel subsystem images, which brings it closer to the actual implementation. A new ioctl for

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Avi Kivity
On 09/05/2012 09:03 AM, Asias He wrote: On Tue, Sep 4, 2012 at 9:07 PM, Avi Kivity a...@redhat.com wrote: On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest and display it on host. 1) Make host's x server listen to localhost:6000 host_shell$ socat -d -d TCP

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Avi Kivity
On 09/05/2012 12:19 PM, Asias He wrote: On Wed, Sep 5, 2012 at 3:56 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 09:03 AM, Asias He wrote: On Tue, Sep 4, 2012 at 9:07 PM, Avi Kivity a...@redhat.com wrote: On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest

Re: [PATCH 2/8] KVM: x86 emulator: use aligned variants of SSE register ops

2012-09-05 Thread Avi Kivity
On 09/04/2012 03:51 PM, Mathias Krause wrote: On Tue, Sep 4, 2012 at 2:13 PM, Avi Kivity a...@redhat.com wrote: On 09/04/2012 03:09 PM, Avi Kivity wrote: On 08/30/2012 02:30 AM, Mathias Krause wrote: As the the compiler ensures that the memory operand is always aligned to a 16 byte memory

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Avi Kivity
On 09/05/2012 12:46 PM, Asias He wrote: Ok. Then the socat command not only exposes the display to the guest, but also to any local process with access to localhost:6000. Yes. It is a trick for people with 'Xorg -nolisten tcp' enabled. Which is hopefully everyone. -- error compiling

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Avi Kivity
On 09/05/2012 01:14 PM, Asias He wrote: On Wed, Sep 5, 2012 at 5:53 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 12:46 PM, Asias He wrote: Ok. Then the socat command not only exposes the display to the guest, but also to any local process with access to localhost:6000. Yes

Re: [PATCH v2] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-05 Thread Avi Kivity
On 09/05/2012 04:26 AM, Xudong Hao wrote: Enable KVM FPU fully eager restore, if there is other FPU state which isn't tracked by CR0.TS bit. Changes from v1: Expand KVM_XSTATE_LAZY to 64 bits before negating it. Signed-off-by: Xudong Hao xudong@intel.com ---

Re: NFS over RDMA small block DIRECT_IO bug

2012-09-05 Thread Avi Kivity
On 09/04/2012 03:04 PM, Myklebust, Trond wrote: On Tue, 2012-09-04 at 11:31 +0200, Andrew Holway wrote: Hello. # Avi Kivity avi(a)redhat recommended I copy kvm in on this. It would also seem relevent to libvirt. # I have a Centos 6.2 server and Centos 6.2 client. [root@store ~]# cat

Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-09-05 Thread Avi Kivity
On 09/04/2012 09:41 PM, Michael S. Tsirkin wrote: On Tue, Sep 04, 2012 at 07:34:19PM +0300, Avi Kivity wrote: On 08/31/2012 12:56 PM, Michael S. Tsirkin wrote: On Fri, Aug 31, 2012 at 11:36:07AM +0200, Sasha Levin wrote: On 08/30/2012 03:38 PM, Michael S. Tsirkin wrote: +static unsigned

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you were pointing out the level vs edge interaction. If we call that a userspace bug, I can just drop this. Thanks, Alex level is userspace bug I think :) I don't see how it's a bug. Suppose we have a vfio device that shares

Re: [PATCH v9 0/2] kvm: level irqfd support

2012-09-05 Thread Avi Kivity
On 08/21/2012 10:28 PM, Alex Williamson wrote: Here's the much anticipated re-write of support for level irqfds. As Michael suggested, I've rolled the eoi/ack notification fd into KVM_IRQFD as a new mode. For lack of a better name, as there seems to be objections to associating this

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 08/21/2012 10:29 PM, Alex Williamson wrote: KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID which is also shared with userspace injection methods like KVM_IRQ_LINE. This can cause a conflict if an irqfd triggers on a GSI asserted through KVM_IRQ_LINE. Move irqfd to it's

Re: [PATCH v9 2/2] kvm: On Ack, De-assert Notify KVM_IRQFD extension

2012-09-05 Thread Avi Kivity
On 08/21/2012 10:29 PM, Alex Williamson wrote: For VFIO based device assignment we'd like a mechanism to allow level triggered interrutps to be directly injected into KVM. KVM_IRQFD already allows this for edge triggered interrupts, but for level, we need to watch for acknowledgement of the

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you were pointing out the level vs edge interaction. If we call that a userspace bug, I can just drop this. Thanks

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:09 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:51:53PM +0300, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you were pointing out the level vs edge

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:07 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:46:17PM +0300, Avi Kivity wrote: On 08/21/2012 10:29 PM, Alex Williamson wrote: KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID which is also shared with userspace injection methods like

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:13 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:59:46PM +0300, Avi Kivity wrote: On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-05 Thread Avi Kivity
On 09/05/2012 12:00 AM, Anthony Liguori wrote: Why? The way this is being submitted I don't see why we should treat Jan's patch any different from a patch by IBM or Samsung where we've asked folks to fix the license to comply with what I thought was our new policy (it does not even contain a

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:28 PM, Michael S. Tsirkin wrote: gsi 3 is configured as edge in the ioapic. It has (unusually) two inputs: one driven by userspace, the other by irqfd. cpu 0cpu 1 - irqfd: set to 1 ioapic: recognize

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:41 PM, Anthony Liguori wrote: Avi Kivity a...@redhat.com writes: On 09/05/2012 12:00 AM, Anthony Liguori wrote: Why? The way this is being submitted I don't see why we should treat Jan's patch any different from a patch by IBM or Samsung where we've asked folks to fix

Re: [PATCH v4 0/8] KVM paravirt remote flush tlb

2012-09-04 Thread Avi Kivity
On 09/04/2012 04:30 AM, Nikunj A Dadhania wrote: On Mon, 03 Sep 2012 17:33:46 +0300, Avi Kivity a...@redhat.com wrote: On 08/21/2012 02:25 PM, Nikunj A. Dadhania wrote: kernbench(lower is better) == base pvflushv4 %improvement 1VM48.5800

Re: KVM call agenda for Tuesday, September 4th

2012-09-04 Thread Avi Kivity
On 09/04/2012 11:17 AM, liu ping fan wrote: On Mon, Sep 3, 2012 at 7:48 PM, Avi Kivity a...@redhat.com wrote: On 09/03/2012 09:44 AM, Juan Quintela wrote: Hi Please send in any agenda items you are interested in covering. - protecting MemoryRegion::opaque during dispatch I'm guessing

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-04 Thread Avi Kivity
On 09/03/2012 10:32 PM, Blue Swirl wrote: On Mon, Sep 3, 2012 at 4:14 PM, Avi Kivity a...@redhat.com wrote: On 08/29/2012 11:27 AM, Markus Armbruster wrote: I don't see a point in making contributors avoid non-problems that might conceivably become trivial problems some day. Especially when

Re: [PATCH v4 0/8] KVM paravirt remote flush tlb

2012-09-04 Thread Avi Kivity
On 09/04/2012 11:08 AM, Nikunj A Dadhania wrote: On Tue, 04 Sep 2012 10:51:06 +0300, Avi Kivity a...@redhat.com wrote: On 09/04/2012 04:30 AM, Nikunj A Dadhania wrote: On Mon, 03 Sep 2012 17:33:46 +0300, Avi Kivity a...@redhat.com wrote: On 08/21/2012 02:25 PM, Nikunj A. Dadhania wrote

Re: [libvirt-users] vm pxe fail

2012-09-04 Thread Avi Kivity
On 09/04/2012 02:31 PM, Alex Jia wrote: - Original Message - From: Avi Kivity a...@redhat.com To: Alex Jia a...@redhat.com Cc: Andrew Holway a.hol...@syseleven.de, kvm@vger.kernel.org Sent: Monday, September 3, 2012 9:27:08 PM Subject: Re: [libvirt-users] vm pxe fail On 08/31/2012

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-04 Thread Avi Kivity
On 09/03/2012 03:33 PM, Rusty Russell wrote: Avi Kivity a...@redhat.com writes: On 09/01/2012 03:35 PM, Rusty Russell wrote: Passing an address in a struct is pretty bad, since it involves compatibility wrappers. Right, some s390 thing. Err, no, i386 on x86-64, or ppc32 on ppc64, or arm

Re: [PATCH RESEND] KVM: cleanup pic reset

2012-09-04 Thread Avi Kivity
On 09/03/2012 02:47 PM, Gleb Natapov wrote: kvm_pic_reset() is not used anywhere. Move reset logic from pic_ioport_write() there. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: [PATCH] KVM: x86: Check INVPCID feature bit in EBX of leaf 7

2012-09-04 Thread Avi Kivity
On 09/01/2012 11:12 AM, Mao, Junjie wrote: Checks and operations on the INVPCID feature bit should use EBX of CPUID leaf 7 instead of ECX. Signed-off-by: Junjie Mao junjie@intel.com --- arch/x86/kvm/vmx.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] Restore cr3 after tests on PCID

2012-09-04 Thread Avi Kivity
On 09/01/2012 11:12 AM, Mao, Junjie wrote: The INVPCID enabling test assumes cr3[11:0] is 0. But at present PCID enabling test sets cr3[11:0] to 1 for its own purpose and doesn't restore the register, which leads to a failure when INVPCID test tries to enable PCIDE. This patch restores cr3

Re: [PATCH 2/8] KVM: x86 emulator: use aligned variants of SSE register ops

2012-09-04 Thread Avi Kivity
On 08/30/2012 02:30 AM, Mathias Krause wrote: As the the compiler ensures that the memory operand is always aligned to a 16 byte memory location, I'm not sure it does. Is V4SI aligned? Do we use alignof() to propagate the alignment to the vcpu allocation code? use the aligned variant of

Re: [PATCH 2/8] KVM: x86 emulator: use aligned variants of SSE register ops

2012-09-04 Thread Avi Kivity
On 09/04/2012 03:09 PM, Avi Kivity wrote: On 08/30/2012 02:30 AM, Mathias Krause wrote: As the the compiler ensures that the memory operand is always aligned to a 16 byte memory location, I'm not sure it does. Is V4SI aligned? Do we use alignof() to propagate the alignment to the vcpu

Re: [PATCH] KVM: PIC: fix use of uninitialised variable.

2012-09-04 Thread Avi Kivity
On 08/30/2012 01:32 PM, Jamie Iles wrote: Commit aea218f3cbbc (KVM: PIC: call ack notifiers for irqs that are dropped form irr) used an uninitialised variable to track whether an appropriate apic had been found. This could result in calling the ack notifier incorrectly. Thanks, applied to

Re: ping latency using vhost_net, macvtap and virtio

2012-09-04 Thread Avi Kivity
On 08/29/2012 11:34 AM, Pozsár Balázs wrote: Hi all, I have been testing network throughput and latency and I was wondering if my measurements are as expected. For the test, I used Fedora 17 for both host and guest, using kernel 3.5.2-3.fc17.86_64. Pinging an external server on the LAN

Re: expanding virtual disk based on lvm

2012-09-04 Thread Avi Kivity
On 08/28/2012 11:26 PM, Ross Boylan wrote: My vm launches with -hda /dev/turtle/VD0 -hdb /dev/turtle/VD1, where VD0 and VD1 are lvm logical volumes. I used lvextend to expand them, but the VM, started after the expansion, does not seem to see the extra space. What do I need to so that the

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-04 Thread Avi Kivity
On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest and display it on host. 1) Make host's x server listen to localhost:6000 host_shell$ socat -d -d TCP-LISTEN:6000,fork,bind=localhost \ UNIX-CONNECT:/tmp/.X11-unix/X0 2) Start the guest and

Re: KVM-enabled Linux 3.2 won't boot in kvm

2012-09-04 Thread Avi Kivity
On 08/24/2012 06:14 AM, Neal Murphy wrote: On Saturday 18 August 2012 22:04:20 Neal Murphy wrote: I've been using KVM for a few years now. I've had little trouble with it. But now it's got me treed. I cannot get a KVM-enabled Linux 3.2.27 kernel to boot in qemu-kvm unless I specify '-no-kvm'.

Re: KVM call agenda for Tuesday, September 4th

2012-09-04 Thread Avi Kivity
On 09/04/2012 04:16 PM, Juan Quintela wrote: Avi Kivity a...@redhat.com wrote: On 09/03/2012 04:35 PM, Jan Kiszka wrote: On 2012-09-03 13:48, Avi Kivity wrote: On 09/03/2012 09:44 AM, Juan Quintela wrote: Hi Please send in any agenda items you are interested in covering. - protecting

Re: [PATCH v2] add acpi pmtimer support

2012-09-04 Thread Avi Kivity
On 09/02/2012 11:42 PM, Kevin O'Connor wrote: On Tue, Aug 14, 2012 at 07:29:19AM +0200, Gerd Hoffmann wrote: This patch makes seabios use the acpi pmtimer instead of tsc for timekeeping. The pmtimer has a fixed frequency and doesn't need calibration, thus it doesn't suffer from calibration

Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-09-04 Thread Avi Kivity
On 08/31/2012 12:56 PM, Michael S. Tsirkin wrote: On Fri, Aug 31, 2012 at 11:36:07AM +0200, Sasha Levin wrote: On 08/30/2012 03:38 PM, Michael S. Tsirkin wrote: +static unsigned int indirect_alloc_thresh = 16; Why 16? Please make is MAX_SG + 1 this makes some sense. Wouldn't MAX_SG mean

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