Re: [Qemu-devel] [PATCH 6/6] scsi-disk: Check for supported commands

2011-07-27 Thread Markus Armbruster
Christoph Hellwig h...@lst.de writes: On Fri, Jul 22, 2011 at 04:51:17PM +0200, Hannes Reinecke wrote: Not every command is support for any device type. This patch adds a check for rejecting unsupported commands. Signed-off-by: Hannes Reinecke h...@suse.de This seems to conflic with

Re: [PATCH 03/11] KVM: x86: fast emulate repeat string write instructions

2011-07-27 Thread Xiao Guangrong
On 07/27/2011 12:26 PM, Gleb Natapov wrote: On Wed, Jul 27, 2011 at 09:47:52AM +0800, Xiao Guangrong wrote: On 07/26/2011 08:27 PM, Gleb Natapov wrote: On Tue, Jul 26, 2011 at 07:26:46PM +0800, Xiao Guangrong wrote: We usually use repeat string instructions to clear the page, for example, By

Unexpected behaviour when CDROM ISO can not be read

2011-07-27 Thread Igor Blanco
Hi everyone: I had a problem yesterday with a virtual machine and I was not very sure to whom I should report it so I much appreciate your opinion about it. I have a virtual machine that has a couple of CDROM drives attached with their ISO image each. The ISOs are read from a NFS mounted

Re: Unexpected behaviour when CDROM ISO can not be read

2011-07-27 Thread Stefan Hajnoczi
On Wed, Jul 27, 2011 at 8:17 AM, Igor Blanco ibla...@binovo.es wrote: Hi everyone: I had a problem yesterday with a virtual machine and I was not very sure to whom I should report it so I much appreciate your opinion about it. I have a virtual machine that has a couple of CDROM drives

Re: KVM autotest tip of the week - How to run KVM autotest tests on an existing guest image

2011-07-27 Thread Stefan Hajnoczi
On Mon, Jul 25, 2011 at 7:25 PM, Lucas Meneghel Rodrigues l...@redhat.com wrote: Hi folks, a little later than expected, here are the docs that explain how to run KVM autotest tests on an existing guest image: http://autotest.kernel.org/wiki/KVMAutotest/RunTestsExistingGuest Since we are

Re: [PATCH] dev-assignment: handle device with incorrect PCIe Cap structure size

2011-07-27 Thread Michael S. Tsirkin
On Tue, Jul 26, 2011 at 06:08:09PM -0400, Donald Dutile wrote: The bcm5761 provides a PCIe Cap structure (capid=0x10) that is invalid, providing one that is 8 bytes shorter than the v2 PCIe spec defines. This leads to a memory corruption when mapped for device-assigment. Add a check in

Re: [PATCH 03/11] KVM: x86: fast emulate repeat string write instructions

2011-07-27 Thread Gleb Natapov
On Wed, Jul 27, 2011 at 02:32:43PM +0800, Xiao Guangrong wrote: On 07/27/2011 12:26 PM, Gleb Natapov wrote: On Wed, Jul 27, 2011 at 09:47:52AM +0800, Xiao Guangrong wrote: On 07/26/2011 08:27 PM, Gleb Natapov wrote: On Tue, Jul 26, 2011 at 07:26:46PM +0800, Xiao Guangrong wrote: We

Re: [PATCH v2 0/7] qemu-kvm: device assignment cleanups and upstream diff reductions

2011-07-27 Thread Michael S. Tsirkin
On Thu, Jul 21, 2011 at 08:14:34PM +0200, Jan Kiszka wrote: Update of the unmerged half of this series. It logically depends on pci: Common overflow prevention, but not mechanically. Changes in this release only affect the 6th patch. It gained support for 3-byte config space accesses, received

Re: [PATCH v2 0/7] qemu-kvm: device assignment cleanups and upstream diff reductions

2011-07-27 Thread Avi Kivity
On 07/27/2011 11:00 AM, Michael S. Tsirkin wrote: On Thu, Jul 21, 2011 at 08:14:34PM +0200, Jan Kiszka wrote: Update of the unmerged half of this series. It logically depends on pci: Common overflow prevention, but not mechanically. Changes in this release only affect the 6th patch. It

Re: Windows7 crashes inside the VM when starting a certain program

2011-07-27 Thread Gleb Natapov
On Tue, Jul 26, 2011 at 12:57:44PM +0200, André Weidemann wrote: Hi, On 26.07.2011 12:08, Gleb Natapov wrote: On Tue, Jul 26, 2011 at 07:29:04AM +0200, André Weidemann wrote: On 07.07.2011 07:26, André Weidemann wrote: Hi, I am running Windows7 x64 in a VM which crashes after starting a

Re: [PATCH 01/11] KVM: MMU: avoid pte_list_desc run out in kvm_mmu_pte_write

2011-07-27 Thread Avi Kivity
On 07/26/2011 02:25 PM, Xiao Guangrong wrote: kvm_mmu_pte_write is unsafe since we need to alloc pte_list_desc in the function when spte is prefetched, unfortunately, we can not know how many spte need to be prefetched on this path, that means we can use out of the free pte_list_desc object in

Re: [PATCH 03/11] KVM: x86: fast emulate repeat string write instructions

2011-07-27 Thread Avi Kivity
On 07/26/2011 02:26 PM, Xiao Guangrong wrote: We usually use repeat string instructions to clear the page, for example, we call memset to clear a page table, stosb is used in this function, and repeated for 1024 times, that means we should occupy mmu lock for 1024 times and walking shadow page

Re: [PATCH 04/11] KVM: MMU: do not mark access bit on pte write path

2011-07-27 Thread Avi Kivity
On 07/26/2011 02:28 PM, Xiao Guangrong wrote: In current code, the accessed bit is always set when page fault occurred, do not need to set it on pte write path Is this true? a write with pte.w=pte.a=0 sets pte.a? -- error compiling committee.c: too many arguments to function -- To

Re: [PATCH 09/11] KVM: MMU: remove the mismatch shadow page

2011-07-27 Thread Avi Kivity
On 07/26/2011 02:31 PM, Xiao Guangrong wrote: If the shadow page has different cpu mode with current vcpu, we do better remove them since the OS does not changes cpu mode frequently This is true, but is it really needed? Won't such pages be torn down very quickly anyway, and will never be

Re: Unexpected behaviour when CDROM ISO can not be read

2011-07-27 Thread Igor Blanco
Thanks done: https://bugs.launchpad.net/qemu/+bug/816860 2011/7/27 Stefan Hajnoczi stefa...@gmail.com: On Wed, Jul 27, 2011 at 8:17 AM, Igor Blanco ibla...@binovo.es wrote: Hi everyone: I had a problem yesterday with a virtual machine and I was not very sure to whom I should report it so I

Re: [PATCH 09/11] KVM: MMU: remove the mismatch shadow page

2011-07-27 Thread Avi Kivity
On 07/27/2011 12:11 PM, Avi Kivity wrote: On 07/26/2011 02:31 PM, Xiao Guangrong wrote: If the shadow page has different cpu mode with current vcpu, we do better remove them since the OS does not changes cpu mode frequently This is true It's actually not true. With nested virtualization

Re: [PATCH 10/11] KVM: MMU: fix detecting misaligned accessed

2011-07-27 Thread Avi Kivity
On 07/26/2011 02:31 PM, Xiao Guangrong wrote: Sometimes, we only modify the last one byte of a pte to update status bit, for example, clear_bit is used to clear r/w bit in linux kernel and 'andb' instruction is used in this function, in this case, kvm_mmu_pte_write will treat it as misaligned

Re: [PATCH 11/11] KVM: MMU: improve write flooding detected

2011-07-27 Thread Avi Kivity
On 07/26/2011 02:32 PM, Xiao Guangrong wrote: Detecting write-flooding does not work well, when we handle page written, if the last speculative spte is not accessed, we treat the page is write-flooding, however, we can speculative spte on many path, such as pte prefetch, page synced, that means

Re: [PATCH] dev-assignment: handle device with incorrect PCIe Cap structure size

2011-07-27 Thread Avi Kivity
On 07/27/2011 01:08 AM, Donald Dutile wrote: The bcm5761 provides a PCIe Cap structure (capid=0x10) that is invalid, providing one that is 8 bytes shorter than the v2 PCIe spec defines. This leads to a memory corruption when mapped for device-assigment. Add a check in

Re: [PATCH 03/11] KVM: x86: fast emulate repeat string write instructions

2011-07-27 Thread Xiao Guangrong
On 07/27/2011 03:51 PM, Gleb Natapov wrote: On Wed, Jul 27, 2011 at 02:32:43PM +0800, Xiao Guangrong wrote: On 07/27/2011 12:26 PM, Gleb Natapov wrote: On Wed, Jul 27, 2011 at 09:47:52AM +0800, Xiao Guangrong wrote: On 07/26/2011 08:27 PM, Gleb Natapov wrote: On Tue, Jul 26, 2011 at

Re: [PATCH 01/11] KVM: MMU: avoid pte_list_desc run out in kvm_mmu_pte_write

2011-07-27 Thread Xiao Guangrong
On 07/27/2011 05:00 PM, Avi Kivity wrote: On 07/26/2011 02:25 PM, Xiao Guangrong wrote: kvm_mmu_pte_write is unsafe since we need to alloc pte_list_desc in the function when spte is prefetched, unfortunately, we can not know how many spte need to be prefetched on this path, that means we can

Re: [PATCH 03/11] KVM: x86: fast emulate repeat string write instructions

2011-07-27 Thread Xiao Guangrong
On 07/27/2011 05:04 PM, Avi Kivity wrote: On 07/26/2011 02:26 PM, Xiao Guangrong wrote: We usually use repeat string instructions to clear the page, for example, we call memset to clear a page table, stosb is used in this function, and repeated for 1024 times, that means we should occupy mmu

Re: [PATCH 04/11] KVM: MMU: do not mark access bit on pte write path

2011-07-27 Thread Xiao Guangrong
On 07/27/2011 05:08 PM, Avi Kivity wrote: On 07/26/2011 02:28 PM, Xiao Guangrong wrote: In current code, the accessed bit is always set when page fault occurred, do not need to set it on pte write path Is this true? a write with pte.w=pte.a=0 sets pte.a? Generally, we will call

Re: [PATCH 09/11] KVM: MMU: remove the mismatch shadow page

2011-07-27 Thread Xiao Guangrong
On 07/27/2011 05:13 PM, Avi Kivity wrote: On 07/27/2011 12:11 PM, Avi Kivity wrote: On 07/26/2011 02:31 PM, Xiao Guangrong wrote: If the shadow page has different cpu mode with current vcpu, we do better remove them since the OS does not changes cpu mode frequently This is true It's

Re: [PATCH 10/11] KVM: MMU: fix detecting misaligned accessed

2011-07-27 Thread Xiao Guangrong
On 07/27/2011 05:15 PM, Avi Kivity wrote: On 07/26/2011 02:31 PM, Xiao Guangrong wrote: Sometimes, we only modify the last one byte of a pte to update status bit, for example, clear_bit is used to clear r/w bit in linux kernel and 'andb' instruction is used in this function, in this case,

Re: [PATCH v2 1/1] The codes V2 for QEMU disk I/O limits.

2011-07-27 Thread Zhi Yong Wu
On Wed, Jul 27, 2011 at 3:26 AM, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 26, 2011 at 04:59:06PM +0800, Zhi Yong Wu wrote: Welcome to give me your comments, thanks. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com ---  Makefile.objs     |    2 +-  block.c           |  288

Re: [PATCH 11/11] KVM: MMU: improve write flooding detected

2011-07-27 Thread Xiao Guangrong
On 07/27/2011 05:23 PM, Avi Kivity wrote: On 07/26/2011 02:32 PM, Xiao Guangrong wrote: Detecting write-flooding does not work well, when we handle page written, if the last speculative spte is not accessed, we treat the page is write-flooding, however, we can speculative spte on many path,

Re: [PATCH 11/11] KVM: MMU: improve write flooding detected

2011-07-27 Thread Avi Kivity
On 07/27/2011 01:20 PM, Xiao Guangrong wrote: } I think this is a little dangerous. A guest kernel may be instantiating multiple gptes on a page fault, but guest userspace hits only one of them (the one which caused the page fault) - I think Windows does this, but I'm not sure. I

Re: [Patch v2] Disable API tests if dependencies are not met

2011-07-27 Thread Avi Kivity
On 07/25/2011 09:58 PM, Conny Seidel wrote: Add runtime detection of 32bit libraries to prevent build fails. 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

Re: [PATCH -next] kvm: fix TASK_DELAY_ACCT kconfig warning

2011-07-27 Thread Avi Kivity
On 07/25/2011 09:01 PM, Randy Dunlap wrote: From: Randy Dunlaprdun...@xenotime.net Fix kconfig dependency warning: warning: (KVM) selects TASK_DELAY_ACCT which has unmet direct dependencies (TASKSTATS) Applied, thanks. -- error compiling committee.c: too many arguments to function -- To

Re: [PATCH] Fix svm unit test

2011-07-27 Thread Avi Kivity
On 07/25/2011 03:48 PM, Conny Seidel wrote: Since the -enable-nesting option is no longer available remove the option from the config file. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: [PATCH v3] IO: Intelligent device lookup on bus

2011-07-27 Thread Avi Kivity
On 07/24/2011 09:15 AM, Sasha Levin wrote: Currently the method of dealing with an IO operation on a bus (PIO/MMIO) is to call the read or write callback for each device registered on the bus until we find a device which handles it. Since the number of devices on a bus can be significant due to

Re: [PATCH] kvm: Really fix HV_X64_MSR_APIC_ASSIST_PAGE

2011-07-27 Thread Avi Kivity
On 07/23/2011 10:31 AM, Mike Waychison wrote: Commit 0945d4b228 tried to fix the get_msr path for the HV_X64_MSR_APIC_ASSIST_PAGE msr, but was poorly tested. We should be returning 0 if the read succeeded, and passing the value back to the caller via the pdata out argument, not returning the

Re: [RFC 0/2] KVM: Fix kvm_exit trace event format

2011-07-27 Thread Avi Kivity
On 07/22/2011 02:46 PM, Stefan Hajnoczi wrote: Currently both perf and trace-cmd cannot parse the kvm:kvm_exit trace event format. This patch is an attempt to make formatting work without changing the kvm:kvm_exit prototype. Since this event is a core KVM operation, no doubt there are existing

Re: Adding 1366x768 VGA resolution

2011-07-27 Thread Avi Kivity
On 07/22/2011 03:47 AM, AP wrote: I am trying to add 1366x768 resolution for standard VGA. I looked at http://www.linux-kvm.org/page/FAQ#Can_I_have_higher_or_widescreen_resolutions_.28eg_1680_x_1050.29_in_KVM.3F and http://article.gmane.org/gmane.comp.emulators.kvm.devel/13557 I added a line

Re: Nested VMX - L1 hangs on running L2

2011-07-27 Thread Nadav Har'El
On Wed, Jul 20, 2011, Zachary Amsden wrote about Re: Nested VMX - L1 hangs on running L2: No, both patches are wrong. kvm_get_msr(vcpu, MSR_IA32_TSC, tsc) should always return the L1 TSC, regardless of the setting of any MSR bitmap. The reason why is that it is being called by the L0

Re: [PATCH v3] IO: Intelligent device lookup on bus

2011-07-27 Thread Sasha Levin
On Wed, 2011-07-27 at 14:35 +0300, Avi Kivity wrote: On 07/24/2011 09:15 AM, Sasha Levin wrote: Currently the method of dealing with an IO operation on a bus (PIO/MMIO) is to call the read or write callback for each device registered on the bus until we find a device which handles it.

Re: [PATCH v3] IO: Intelligent device lookup on bus

2011-07-27 Thread Avi Kivity
On 07/27/2011 03:01 PM, Sasha Levin wrote: -static inline struct kvm_pic *to_pic(struct kvm_io_device *dev) +static inline struct kvm_pic *to_pic(struct kvm_io_device *dev, gpa_t addr) { - return container_of(dev, struct kvm_pic, dev); + switch (addr) { + case

Re: [RFC 0/2] KVM: Fix kvm_exit trace event format

2011-07-27 Thread Stefan Hajnoczi
On Wed, Jul 27, 2011 at 02:47:20PM +0300, Avi Kivity wrote: On 07/22/2011 02:46 PM, Stefan Hajnoczi wrote: In practice both perf and trace-cmd are not happy with the new exit_reason formatting expression (omitting the details and split across lines for easy email reading here): print fmt:

Re: [Qemu-devel] [PATCH v2 1/1] The codes V2 for QEMU disk I/O limits.

2011-07-27 Thread Stefan Hajnoczi
On Wed, Jul 27, 2011 at 11:17 AM, Zhi Yong Wu zwu.ker...@gmail.com wrote: On Wed, Jul 27, 2011 at 3:26 AM, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 26, 2011 at 04:59:06PM +0800, Zhi Yong Wu wrote: Welcome to give me your comments, thanks. Signed-off-by: Zhi Yong Wu

Re: [RFC 0/2] KVM: Fix kvm_exit trace event format

2011-07-27 Thread Avi Kivity
On 07/27/2011 03:55 PM, Stefan Hajnoczi wrote: trace-cmd has a plugin API (and a kvm plugin) that you can use for this, and I expect perf either does as well or can make use of one. I don't think it's useful to complicate the print format description further to support our weird use

[PATCH v4] IO: Intelligent device lookup on bus

2011-07-27 Thread Sasha Levin
Currently the method of dealing with an IO operation on a bus (PIO/MMIO) is to call the read or write callback for each device registered on the bus until we find a device which handles it. Since the number of devices on a bus can be significant due to ioeventfds and coalesced MMIO zones, this

Re: [RFC 0/2] KVM: Fix kvm_exit trace event format

2011-07-27 Thread Steven Rostedt
On Wed, 2011-07-27 at 15:59 +0300, Avi Kivity wrote: On 07/27/2011 03:55 PM, Stefan Hajnoczi wrote: trace-cmd has a plugin API (and a kvm plugin) that you can use for this, and I expect perf either does as well or can make use of one. I don't think it's useful to complicate the

Re: [PATCH v2 1/1] The codes V2 for QEMU disk I/O limits.

2011-07-27 Thread Marcelo Tosatti
On Wed, Jul 27, 2011 at 06:17:15PM +0800, Zhi Yong Wu wrote: +        wait_time = 1; +    } + +    wait_time = wait_time + (slice_time - elapsed_time); +    if (wait) { +        *wait = wait_time * BLOCK_IO_SLICE_TIME * 10 + 1; +    } The guest can keep submitting requests where

Re: [PATCH] cpu hotplug issue

2011-07-27 Thread Vasilis Liaskovitis
Hi, On Mon, Jul 25, 2011 at 3:18 PM, Jan Kiszka jan.kis...@siemens.com wrote: OK, hacks below plus the following three patches make CPU hotplug work again - with some exceptions. Here are the patches: 1. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/76484 2.

How to assign devices with VT-d in KVM

2011-07-27 Thread Valeri Kuchansky
Folks, I'm looking for some help on guest network configuration when enabling VT-d. I have fully completed steps given on http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM on detaching and assigning VFs to KVM. I can see Virtual Functions PCIs on the guest. However I cannot

Re: [GIT PULL v2] Native Linux KVM tool for v3.1

2011-07-27 Thread Linus Torvalds
On Mon, Jul 25, 2011 at 10:27 AM, Pekka Enberg penb...@kernel.org wrote: Here's the same pull request with a small fixlet for a compile-time problem reported by Ingo Molnar. Ok, having thought this over, I'm going to skip the KVM tool merge this merge window. You'll need to convince me it's

Strange MySQL behaviour

2011-07-27 Thread Boris Dolgov
Hello! I am using Fedora 14 with kernel and qemu-kvm from Fedora 15: [root@serv ~]# qemu-kvm --help | head -1 QEMU emulator version 0.14.0 (qemu-kvm-0.14.0), Copyright (c) 2003-2008 Fabrice Bellard [root@serv ~]# uname -a Linux serv 2.6.38.8-35.fc15.x86_64 #1 SMP Wed Jul 6 13:58:54 UTC 2011

Re: [Qemu-devel] [PATCH v2 1/1] The codes V2 for QEMU disk I/O limits.

2011-07-27 Thread Zhi Yong Wu
On Wed, Jul 27, 2011 at 8:58 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Wed, Jul 27, 2011 at 11:17 AM, Zhi Yong Wu zwu.ker...@gmail.com wrote: On Wed, Jul 27, 2011 at 3:26 AM, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 26, 2011 at 04:59:06PM +0800, Zhi Yong Wu wrote: Welcome

Re: [PATCH 11/11] KVM: MMU: improve write flooding detected

2011-07-27 Thread Xiao Guangrong
On 07/27/2011 07:08 PM, Avi Kivity wrote: On 07/27/2011 01:20 PM, Xiao Guangrong wrote: } I think this is a little dangerous. A guest kernel may be instantiating multiple gptes on a page fault, but guest userspace hits only one of them (the one which caused the page fault) - I

Re: [PATCH v2 1/1] The codes V2 for QEMU disk I/O limits.

2011-07-27 Thread Zhi Yong Wu
On Wed, Jul 27, 2011 at 11:49 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Wed, Jul 27, 2011 at 06:17:15PM +0800, Zhi Yong Wu wrote: +        wait_time = 1; +    } + +    wait_time = wait_time + (slice_time - elapsed_time); +    if (wait) { +        *wait = wait_time *

Re: [Qemu-devel] [PATCH v2 1/1] The codes V2 for QEMU disk I/O limits.

2011-07-27 Thread Zhi Yong Wu
On Wed, Jul 27, 2011 at 8:58 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Wed, Jul 27, 2011 at 11:17 AM, Zhi Yong Wu zwu.ker...@gmail.com wrote: On Wed, Jul 27, 2011 at 3:26 AM, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 26, 2011 at 04:59:06PM +0800, Zhi Yong Wu wrote: Welcome