Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 10:09:06AM +0900, Takuya Yoshikawa wrote: On Thu, 30 Aug 2012 01:51:20 +0300 Michael S. Tsirkin m...@redhat.com wrote: This text: + if (likely(!word_offset !word[0])) + return -1; is a left-over from the original implementation. There

[PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Sasha Levin
Add a HOME env var when booting a hostfs guest. This will point out to a home dir within the given guest name. This will make several apps happier when being run under hostfs. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/guest/init.c | 5 - 1 file changed, 4

[PATCH 2/7] kvm tools: clean garbage from ioeventfd code

2012-08-30 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/ioeventfd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/kvm/ioeventfd.c b/tools/kvm/ioeventfd.c index 226876f..742b008 100644 --- a/tools/kvm/ioeventfd.c +++ b/tools/kvm/ioeventfd.c @@ -44,7 +44,6 @@ static void

[PATCH 3/7] kvm tools: Use the new KVM_SIGNAL_MSI ioctl to inject interrupts directly.

2012-08-30 Thread Sasha Levin
We still create GSIs and keep them for two reasons: - They're required by virtio-* devices. - There's not much overhead since we just create them when starting the guest, they don't use anything when the guest is running. Signed-off-by: Sasha Levin levinsasha...@gmail.com ---

[PATCH 4/7] kvm tools: fix warnings in virtio-blk

2012-08-30 Thread Sasha Levin
Fix up warnings related to not checking return value of read/write by actually handling errors there. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/virtio/blk.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/kvm/virtio/blk.c

[PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Sasha Levin
Build with -flto set, which should enable link-time-optimizations. I'm not sure if it provides a significant performance increase, but it's probably just worth it for catching issues which it may cause. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/Makefile | 2 +- 1 file

[PATCH 6/7] kvm tools: 9p don't nuke fids on attach

2012-08-30 Thread Sasha Levin
We're not supposed to kill all fids when a new attach request arrives. This used to cause issues when the guest would send multiple attach requests. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/virtio/9p.c | 22 -- 1 file changed, 22 deletions(-) diff

[PATCH 7/7] kvm tools: simplify virtio config handling

2012-08-30 Thread Sasha Levin
Instead of a get/set for config values, just request the address of the config region, and handle that by simply reading directly from that region. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/virtio.h | 3 +-- tools/kvm/virtio/9p.c | 12 ++--

Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Cyrill Gorcunov
On Thu, Aug 30, 2012 at 09:36:37AM +0200, Sasha Levin wrote: + char *new_env[] = { TERM=linux, DISPLAY=192.168.33.1:0, + HOME=/virt/home, NULL }; + + mkdir(/virt/home, 0755); Please add check for mkdir error code. Frankly, this is a bad habbit to assume

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Pekka Enberg
On Thu, Aug 30, 2012 at 10:36 AM, Sasha Levin levinsasha...@gmail.com wrote: Build with -flto set, which should enable link-time-optimizations. I'm not sure if it provides a significant performance increase, but it's probably just worth it for catching issues which it may cause.

Re: [PATCH 0/5] Multiqueue virtio-scsi

2012-08-30 Thread Stefan Hajnoczi
On Tue, Aug 28, 2012 at 01:54:12PM +0200, Paolo Bonzini wrote: this series adds multiqueue support to the virtio-scsi driver, based on Jason Wang's work on virtio-net. It uses a simple queue steering algorithm that expects one queue per CPU. LUNs in the same target always use the same queue

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Ingo Molnar
* Pekka Enberg penb...@kernel.org wrote: On Thu, Aug 30, 2012 at 10:36 AM, Sasha Levin levinsasha...@gmail.com wrote: Build with -flto set, which should enable link-time-optimizations. I'm not sure if it provides a significant performance increase, but it's probably just worth it for

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Cyrill Gorcunov
On Thu, Aug 30, 2012 at 10:16:54AM +0200, Ingo Molnar wrote: * Pekka Enberg penb...@kernel.org wrote: On Thu, Aug 30, 2012 at 10:36 AM, Sasha Levin levinsasha...@gmail.com wrote: Build with -flto set, which should enable link-time-optimizations. I'm not sure if it provides a

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Sasha Levin
On 08/30/2012 10:22 AM, Cyrill Gorcunov wrote: On Thu, Aug 30, 2012 at 10:16:54AM +0200, Ingo Molnar wrote: * Pekka Enberg penb...@kernel.org wrote: On Thu, Aug 30, 2012 at 10:36 AM, Sasha Levin levinsasha...@gmail.com wrote: Build with -flto set, which should enable

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Cyrill Gorcunov
On Thu, Aug 30, 2012 at 10:33:21AM +0200, Sasha Levin wrote: Ingo, any objections to this? No objections if you can live with a 2x-4x increase in build time - at worst it might cause funnies with the BIOS linker script and such. Maybe we could enable it via some make option?

Re: [PATCH] Add a page cache-backed balloon device driver.

2012-08-30 Thread Michael S. Tsirkin
On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: +static void fill_balloon(struct virtio_balloon *vb, size_t num) +{ + int err; + + /* We can only do one array worth at a time. */ + num = min(num, ARRAY_SIZE(vb-pfns)); + + for (vb-num_pfns = 0; vb-num_pfns

Re: [PATCH 5/7] kvm tools: enable LTO

2012-08-30 Thread Pekka Enberg
On Thu, Aug 30, 2012 at 11:22 AM, Cyrill Gorcunov gorcu...@openvz.org wrote: Maybe we could enable it via some make option? Say make LTO=1 or something? That is not going to help much in catching LTO issues early. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Sasha Levin
On 08/30/2012 09:50 AM, Cyrill Gorcunov wrote: On Thu, Aug 30, 2012 at 09:36:37AM +0200, Sasha Levin wrote: +char *new_env[] = { TERM=linux, DISPLAY=192.168.33.1:0, +HOME=/virt/home, NULL }; + +mkdir(/virt/home, 0755); Please add check for mkdir error

Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Pekka Enberg
On Thu, Aug 30, 2012 at 12:44 PM, Sasha Levin levinsasha...@gmail.com wrote: On 08/30/2012 09:50 AM, Cyrill Gorcunov wrote: On Thu, Aug 30, 2012 at 09:36:37AM +0200, Sasha Levin wrote: +char *new_env[] = { TERM=linux, DISPLAY=192.168.33.1:0, +HOME=/virt/home,

Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs

2012-08-30 Thread Sasha Levin
On 08/30/2012 11:48 AM, Pekka Enberg wrote: On Thu, Aug 30, 2012 at 12:44 PM, Sasha Levin levinsasha...@gmail.com wrote: On 08/30/2012 09:50 AM, Cyrill Gorcunov wrote: On Thu, Aug 30, 2012 at 09:36:37AM +0200, Sasha Levin wrote: +char *new_env[] = { TERM=linux, DISPLAY=192.168.33.1:0, +

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-30 Thread Takuya Yoshikawa
On Thu, 30 Aug 2012 09:37:02 +0300 Michael S. Tsirkin m...@redhat.com wrote: After staring at your code for a while it does appear to do the right thing, and looks cleaner than what we have now. commit log could be clearer. It should state something like: Clean up code in

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 06:50:52PM +0900, Takuya Yoshikawa wrote: On Thu, 30 Aug 2012 09:37:02 +0300 Michael S. Tsirkin m...@redhat.com wrote: After staring at your code for a while it does appear to do the right thing, and looks cleaner than what we have now. commit log could be

Re: KVM: MMU: Tracking guest writes through EPT entries ?

2012-08-30 Thread Xiao Guangrong
On 08/28/2012 11:30 AM, Felix wrote: Xiao Guangrong xiaoguangrong at linux.vnet.ibm.com writes: On 07/31/2012 01:18 AM, Sunil wrote: Hello List, I am a KVM newbie and studying KVM mmu code. On the existing guest, I am trying to track all guest writes by marking page table entry as

Re: [PATCH v10] kvm: notify host when the guest is panicked

2012-08-30 Thread Sasha Levin
On 08/30/2012 04:03 AM, Wen Congyang wrote: At 08/29/2012 07:56 PM, Sasha Levin Wrote: On 08/29/2012 07:18 AM, Wen Congyang wrote: diff --git a/Documentation/virtual/kvm/pv_event.txt b/Documentation/virtual/kvm/pv_event.txt new file mode 100644 index 000..bb04de0 --- /dev/null +++

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-30 Thread Takuya Yoshikawa
On Thu, 30 Aug 2012 13:10:33 +0300 Michael S. Tsirkin m...@redhat.com wrote: OK, I'll do these on top of this patch. Tweaking these 5 lines for readability across multiple patches is just not worth it. As long as we do random cleanups of this function it's probably easier to just do them

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

2012-08-30 Thread Jamie Iles
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. Cc: Gleb Natapov g...@redhat.com Cc: Avi Kivity a...@redhat.com

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

2012-08-30 Thread Sasha Levin
On 08/29/2012 05:14 PM, Michael S. Tsirkin wrote: Note that these are simple tests with netperf listening on one end and a simple 'netperf -H [host]' within the guest. If there are other tests which may be interesting please let me know. Checking that host CPU utilization did not jump

Re: How KVM sync guest page table with corresponding shadow page table?

2012-08-30 Thread Xiao Guangrong
On 08/24/2012 03:29 PM, 陳韋任 (Wei-Ren Chen) wrote: Hi Guangrong, I am not familiar with the term used in paging world, so I need to ask some dumb questions. It is controlled by shadow page table, guest-page-tables are write-protected on shadow pages (the W bit on PTE is cleared).

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 07:24:39PM +0900, Takuya Yoshikawa wrote: On Thu, 30 Aug 2012 13:10:33 +0300 Michael S. Tsirkin m...@redhat.com wrote: OK, I'll do these on top of this patch. Tweaking these 5 lines for readability across multiple patches is just not worth it. As long as we

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

2012-08-30 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

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

2012-08-30 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

Biweekly upstream qemu-kvm test report (using autotest) - Week 35

2012-08-30 Thread santwana
Hi All, Please find the results of upstream testing. We are evaluating the failures and will be raising the issues with the appropriate community. Environment: Host Kernel: 3.5.0-rc6 KVM Version: 1.1.90 Date: Thu Aug 30 15:29:06 2012 Stats: 41 tests executed (26 tests passed, 15 tests failed)

[PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-08-30 Thread Takuya Yoshikawa
find_highest_vector() and count_vectors(): - Instead of using magic values, define and use proper interfaces to access registers. find_highest_vector(): - Remove likely() which is there only for historical reasons and not doing correct branch predictions anymore. Using such heuristics

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 09:30:19PM +0900, Takuya Yoshikawa wrote: find_highest_vector() and count_vectors(): - Instead of using magic values, define and use proper interfaces to access registers. find_highest_vector(): - Remove likely() which is there only for historical reasons and

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

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 01:21:58PM +0200, Sasha Levin wrote: 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

[Bug 42600] Live migration of very large vm get's stuck

2012-08-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42600 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Status|NEW |RESOLVED

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

2012-08-30 Thread Michael S. Tsirkin
On Thu, Aug 30, 2012 at 01:21:57PM +0200, Sasha Levin wrote: 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

[Bug 42782] IO_PAGE_FAULT while starting xorg

2012-08-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42782 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added CC||a...@lxorguk.ukuu.org.uk

Re: [PATCH 0/5] Multiqueue virtio-scsi

2012-08-30 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 01:54:12PM +0200, Paolo Bonzini wrote: Hi all, this series adds multiqueue support to the virtio-scsi driver, based on Jason Wang's work on virtio-net. It uses a simple queue steering algorithm that expects one queue per CPU. LUNs in the same target always use the

Re: Biweekly upstream qemu-kvm test report (using autotest) - Week 35

2012-08-30 Thread Lucas Meneghel Rodrigues
On Thu, Aug 30, 2012 at 8:37 AM, santwana santw...@linux.vnet.ibm.com wrote: Hi All, Please find the results of upstream testing. We are evaluating the failures and will be raising the issues with the appropriate community. Environment: Host Kernel: 3.5.0-rc6 KVM Version: 1.1.90 Date:

Re: [PATCH 0/5] Multiqueue virtio-scsi

2012-08-30 Thread Paolo Bonzini
Il 30/08/2012 16:53, Michael S. Tsirkin ha scritto: this series adds multiqueue support to the virtio-scsi driver, based on Jason Wang's work on virtio-net. It uses a simple queue steering algorithm that expects one queue per CPU. LUNs in the same target always use the same queue (so

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-08-30 Thread Takuya Yoshikawa
On Thu, 30 Aug 2012 16:21:31 +0300 Michael S. Tsirkin m...@redhat.com wrote: +static u32 apic_read_reg(int reg_off, void *bitmap) +{ + return *((u32 *)(bitmap + reg_off)); +} + Contrast with apic_set_reg which gets apic, add fact that all callers invoke REG_POS and you will see

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-08-30 Thread Michael S. Tsirkin
On Fri, Aug 31, 2012 at 01:09:56AM +0900, Takuya Yoshikawa wrote: On Thu, 30 Aug 2012 16:21:31 +0300 Michael S. Tsirkin m...@redhat.com wrote: +static u32 apic_read_reg(int reg_off, void *bitmap) +{ + return *((u32 *)(bitmap + reg_off)); +} + Contrast with apic_set_reg

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-30 Thread David Ahern
In addition to Andrew's comment about making the stats struct and functions generic... On 8/27/12 3:51 AM, Dong Hao wrote: ---8--- +static void exit_event_decode_key(struct event_key *key, char decode[20]) +{ + const char *exit_reason = get_exit_reason(key-key); + +

Re: KVM: MMU: Tracking guest writes through EPT entries ?

2012-08-30 Thread Hugo
On Thu, Aug 30, 2012 at 5:22 AM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: On 08/28/2012 11:30 AM, Felix wrote: Xiao Guangrong xiaoguangrong at linux.vnet.ibm.com writes: On 07/31/2012 01:18 AM, Sunil wrote: Hello List, I am a KVM newbie and studying KVM mmu code. On the

[PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-08-30 Thread Don Slutz
This is primarily done so that the guest will think it is running under vmware when hypervisor=vmware is specified as a property of a cpu. Also allow this to work in accel=tcg mode. The new cpu properties hyper_level, hyper_extra, hyper_extra_a, and hyper_extra_b can be used to further adjust

[PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-08-30 Thread Don Slutz
This is primarily done so that the guest will think it is running under vmware when hypervisor=vmware is specified as a property of a cpu. Also allow this to work in accel=tcg mode. The new cpu properties hyper_level, hyper_extra, hyper_extra_a, and hyper_extra_b can be used to further adjust

[PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-08-30 Thread Don Slutz
This is primarily done so that the guest will think it is running under vmware when hypervisor=vmware is specified as a property of a cpu. Also allow this to work in accel=tcg mode. The new cpu properties hyper_level, hyper_extra, hyper_extra_a, and hyper_extra_b can be used to further adjust

[PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-08-30 Thread Don Slutz
This is primarily done so that the guest will think it is running under vmware when hypervisor=vmware is specified as a property of a cpu. Also allow this to work in accel=tcg mode. The new cpu properties hyper_level, hyper_extra, hyper_extra_a, and hyper_extra_b can be used to further adjust

Re: KVM: MMU: Tracking guest writes through EPT entries ?

2012-08-30 Thread Davidlohr Bueso
On Tue, 2012-07-31 at 14:53 -0400, Sunil Agham wrote: On Mon, Jul 30, 2012 at 10:49 PM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: On 07/31/2012 01:18 AM, Sunil wrote: Hello List, I am a KVM newbie and studying KVM mmu code. On the existing guest, I am trying to track all

Re: KVM: MMU: Tracking guest writes through EPT entries ?

2012-08-30 Thread Xiao Guangrong
On 08/31/2012 02:59 AM, Hugo wrote: On Thu, Aug 30, 2012 at 5:22 AM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: On 08/28/2012 11:30 AM, Felix wrote: Xiao Guangrong xiaoguangrong at linux.vnet.ibm.com writes: On 07/31/2012 01:18 AM, Sunil wrote: Hello List, I am a KVM newbie

Re: SDM Updates available

2012-08-30 Thread Jan Kiszka
On 2012-08-31 06:52, Nakajima, Jun wrote: It includes the new VT features for interrupt/APIC virtualization that I mentioned at XenSummit and Linux Plumbers Conference. http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html Cool features ahead :),