[COMMIT master] Merge branch 'upstream-merge'

2010-03-25 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (88 commits) qemu-img rebase: Document -f option mips: add header to mips_int.c and mips_timer.c tcg: declare internal helpers as const and pure Fix corner case in chardev udp: parameter Don't set default monitor when there is

[COMMIT master] KVM: x86: Add debug register saving and restoring

2010-03-25 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Make use of the new KVM_GET/SET_DEBUGREGS to save/restore the x86 debug registers. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm-all.c b/kvm-all.c index 8ca480d..c469b6a 100644 ---

[COMMIT master] Bail out when VCPU_CREATE fails

2010-03-25 Thread Avi Kivity
From: Alexander Graf ag...@suse.de When we fail to create a VCPU we have no way to tell our callers that something failed. So the caller happily uses a completely broken state. This code should become deprecated in the process of converting qemu-kvm to qemu anyways, so let's not care about

[COMMIT master] qemu-kvm: x86: Add support for savingrestoring debug registers

2010-03-25 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Corresponding support for qemu-kvm. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index ad58d87..d1e1dfc 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@

[COMMIT master] add xchg ax, reg emulator test

2010-03-25 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Add test for opcodes 0x90-0x9f emulation Signed-off-by: Gleb Natapov g...@redhat.com Reviewed-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/user/test/x86/realmode.c b/kvm/user/test/x86/realmode.c index

[COMMIT master] qemu-kvm: remove unused qemu_kvm_get_dirty_pages

2010-03-25 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu-kvm.c b/qemu-kvm.c index 290fe26..f3ef999 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -2357,11 +2357,6 @@ int kvm_set_irq(int irq, int level,

[COMMIT master] remove references to qemu sub-dir

2010-03-25 Thread Avi Kivity
From: Naphtali Sprei nsp...@redhat.com without this removal configure doesn't work at all Signed-off-by: Naphtali Sprei nsp...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kvm/configure b/kvm/configure index 249c743..a41ab72 100755 --- a/kvm/configure +++ b/kvm/configure @@

[COMMIT master] make cpu_physical_memory_set_dirty_tracking equal to upstream

2010-03-25 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Probably introduced by mismerge. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/exec.c b/exec.c index 3b4426e..e8fe3c4 100644 --- a/exec.c +++ b/exec.c @@ -2043,7 +2043,7 @@ void

[COMMIT master] remove kvm_update_dirty_pages_log call from ram_save_block

2010-03-25 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com There is no need to update the dirty log from inside ram_save_block, since this happens through cpu_physical_sync_dirty_bitmap. In stage 3, where the VM is stopped, cpu_physical_sync_dirty_bitmap guarantees dirty log is synchronized before migration

[COMMIT master] qemu-kvm: use upstream kvm_flush_coalesced_mmio_buffer

2010-03-25 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu-kvm.c b/qemu-kvm.c index c9ad87a..290fe26 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -939,19 +939,7 @@ int kvm_run(CPUState *env)

[COMMIT master] qemu-kvm: use reset handler for vcpus

2010-03-25 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Hook into the reset handlers instead of using custom code in qemu_kvm_system_reset. Also move kvm_arch_init_vcpu to kvm_create_vcpu. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu-kvm.c

[COMMIT master] remove unused bios_mem variable

2010-03-25 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/cpu-all.h b/cpu-all.h index 336eb3e..fd51a76 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -859,7 +859,6 @@ extern int phys_ram_fd; extern uint8_t

[COMMIT master] KVM: x86 emulator: add decoding of CMPXCHG8B dst operand

2010-03-25 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Decode CMPXCHG8B destination operand in decoding stage. Fixes regression introduced by If LOCK prefix is used dest arg should be memory commit. This commit relies on dst operand be decoded at the beginning of an instruction emulation. Signed-off-by: Gleb

[COMMIT master] KVM: x86 emulator: fix unlocked CMPXCHG8B emulation

2010-03-25 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com When CMPXCHG8B is executed without LOCK prefix it is racy. Preserve this behaviour in emulator too. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[COMMIT master] KVM: x86: Fix TSS size check for 16-bit tasks

2010-03-25 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com A 16-bit TSS is only 44 bytes long. So make sure to test for the correct size on task switch. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[COMMIT master] KVM MMU: check reserved bits only if CR4.PSE=1 or CR4.PAE=1

2010-03-25 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com - Check reserved bits only if CR4.PAE=1 or CR4.PSE=1 when guest #PF occurs - Fix a typo in reset_rsvds_bits_mask() Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Reviewed-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi

[COMMIT master] KVM: MMU: Disassociate direct maps from guest levels

2010-03-25 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Direct maps are linear translations for a section of memory, used for real mode or with large pages. As such, they are independent of the guest levels. Teach the mmu about this by making page-role.glevels = 0 for direct maps. This allows direct maps to be shared

[PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Cam Macdonell
Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository. Changes in this version are using the qdev format

[PATCH v3 1/2] Support adding a file to qemu's ram allocation

2010-03-25 Thread Cam Macdonell
This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a host file into guest RAM. This function mmaps the opened file anywhere and adds the memory to the ram blocks. Usage is qemu_ram_mmap(fd, size, MAP_SHARED, offset); --- cpu-common.h |1 + exec.c | 33

[PATCH v3 2/2] Inter-VM shared memory PCI device

2010-03-25 Thread Cam Macdonell
Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository. -device ivshmem,size=size in MB[,shm=shm name]

[PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Cam Macdonell
This patch adds a driver for my shared memory PCI device using the uio_pci interface. The driver has three memory regions. The first memory region is for device registers for sending interrupts. The second BAR is for receiving MSI-X interrupts and the third memory region maps the shared memory.

Re: [RFC] vhost-blk implementation

2010-03-25 Thread Avi Kivity
On 03/24/2010 10:05 PM, Christoph Hellwig wrote: On Tue, Mar 23, 2010 at 12:03:14PM +0200, Avi Kivity wrote: I also think it should be done at the bio layer. File I/O is going to be slower, if we do vhost-blk we should concentrate on maximum performance. The block layer also exposes more

Re: qemu-kvm crashes with Assertion ... failed.

2010-03-25 Thread André Weidemann
Hi, On 24.03.2010 17:23, Avi Kivity wrote: On 03/24/2010 06:20 PM, André Weidemann wrote: Does this happen with a guest installed on kvm, or just with the guest that (guessing from the name) was imported from vmware? I booted the VM via PXE into an Ubuntu Live CD image. I only added the

Re: [RFC] vhost-blk implementation

2010-03-25 Thread Avi Kivity
On 03/24/2010 10:22 PM, Badari Pulavarty wrote: Which caching mode is this? I assume data=writeback, because otherwise you'd be doing synchronous I/O directly from the handler. Yes. This is with default (writeback) cache model. As mentioned earlier, readhead is helping here and most cases,

Re: [PATCH 3/3] perf events: Change perf parameter --pid to process-wide collection instead of thread-wide

2010-03-25 Thread Li Zefan
Zhang, Yanmin wrote: From: Zhang, Yanmin yanmin_zh...@linux.intel.com Parameter --pid (or -p) of perf currently means a thread-wide collection. For exmaple, if a process whose id is has 10 threads, 'perf top -p ' just collects the main thread statistics. That's misleading. Users are

Re: [PATCH 3/3] perf events: Change perf parameter --pid to process-wide collection instead of thread-wide

2010-03-25 Thread Zhang, Yanmin
On Thu, 2010-03-25 at 16:02 +0800, Li Zefan wrote: Zhang, Yanmin wrote: From: Zhang, Yanmin yanmin_zh...@linux.intel.com Parameter --pid (or -p) of perf currently means a thread-wide collection. For exmaple, if a process whose id is has 10 threads, 'perf top -p ' just

Re: [PATCH 3/3] perf events: Change perf parameter --pid to process-wide collection instead of thread-wide

2010-03-25 Thread Li Zefan
Parameter --pid (or -p) of perf currently means a thread-wide collection. For exmaple, if a process whose id is has 10 threads, 'perf top -p ' just collects the main thread statistics. That's misleading. Users are used to attach a whole process when debugging a process by gdb. To

Re: [RFC] Unify KVM kernel-space and user-space code into a single project

2010-03-25 Thread Zhang, Yanmin
On Wed, 2010-03-24 at 20:20 +0200, Avi Kivity wrote: On 03/24/2010 07:47 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Mar 24, 2010 at 06:09:30PM +0200, Avi Kivity escreveu: Doesn't perf already has a dependency on naming conventions for finding debug information? It looks at

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Avi Kivity
On 03/25/2010 08:08 AM, Cam Macdonell wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository.

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface. The driver has three memory regions. The first memory region is for device registers for sending interrupts. The second BAR is for receiving

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface. The driver has three memory regions. The first memory region is for device registers for sending interrupts. The second BAR is for receiving

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 11:04:54AM +0200, Avi Kivity wrote: Again, I recommend Rusty's virtio-pci for inspiration. Not just inspiration, how about building on virtio-pci? -- MST -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Markus Armbruster
Avi Kivity a...@redhat.com writes: Please put the spec somewhere publicly accessible with a permanent URL. I suggest a new qemu.git directory specs/. It's more important than the code IMO. What about docs/? It already exists. [...] -- To unsubscribe from this list: send the line

Re: __ratelimit: 172527 callbacks suppressed

2010-03-25 Thread Sebastian Hetze
On Sat, Mar 20, 2010 at 09:49:46AM +0200, Avi Kivity wrote: On 03/19/2010 11:17 AM, Sebastian Hetze wrote: On Fri, Mar 19, 2010 at 10:37:00AM +0200, Avi Kivity wrote: On 03/19/2010 09:30 AM, Sebastian Hetze wrote: Hi *, in the dmesg/kern.log of my ubuntu 2.6.31-16-generic-pae

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Avi Kivity
On 03/25/2010 11:26 AM, Markus Armbruster wrote: Avi Kivitya...@redhat.com writes: Please put the spec somewhere publicly accessible with a permanent URL. I suggest a new qemu.git directory specs/. It's more important than the code IMO. What about docs/? It already exists.

Re: [Qemu-devel] Re: KVM call agenda for Mar 23

2010-03-25 Thread Jan Kiszka
Zhang, Xiantao wrote: Jes Sorensen wrote: On 03/23/10 13:45, Anthony Liguori wrote: I don't think we can pull in: - extboot - ia64 - in-kernel pit[1] - associated command line options - device passthrough The question is, if we dropped those things, would people actually use qemu.git

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Avi Kivity
On 03/25/2010 11:15 AM, Michael S. Tsirkin wrote: - Why are you using 32 bit long memory accesses for interrupts? 16 bit IO eould be enough and it's faster. This what virtio-pci does. Why is 16 bit io faster? -- error compiling committee.c: too many arguments to function -- To

Re: [Qemu-devel] Re: KVM call agenda for Mar 23

2010-03-25 Thread Jes Sorensen
On 03/25/10 10:39, Jan Kiszka wrote: Zhang, Xiantao wrote: For ia64 part, maybe we can keep the current qemu-kvm.git for the users. And it is not a must to push it into Qemu upstream. Xiantao Does it still build work? Does someone test it at least infrequently? Or are there users? There

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Avi Kivity
On 03/25/2010 08:09 AM, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface. The driver has three memory regions. The first memory region is for device registers for sending interrupts. The second BAR is for receiving MSI-X interrupts and

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 11:40:09AM +0200, Avi Kivity wrote: On 03/25/2010 11:15 AM, Michael S. Tsirkin wrote: - Why are you using 32 bit long memory accesses for interrupts? 16 bit IO eould be enough and it's faster. This what virtio-pci does. Why is 16 bit io faster? Something to

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 11:58:30AM +0200, Avi Kivity wrote: On 03/25/2010 11:44 AM, Michael S. Tsirkin wrote: On Thu, Mar 25, 2010 at 11:40:09AM +0200, Avi Kivity wrote: On 03/25/2010 11:15 AM, Michael S. Tsirkin wrote: - Why are you using 32 bit long memory accesses for

[PATCH 1/2] KVM: Document KVM_SET_USER_MEMORY_REGION

2010-03-25 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/kvm/api.txt | 43 +++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index d170cb4..22af28a 100644 ---

[PATCH 2/2] KVM: Document KVM_SET_TSS_ADDR

2010-03-25 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/kvm/api.txt | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 22af28a..8f45099 100644 --- a/Documentation/kvm/api.txt +++

[PATCH 0/2] Document KVM_SET_USER_MEMORY_REGION and KVM_SET_TSS_ADDR

2010-03-25 Thread Avi Kivity
Avi Kivity (2): KVM: Document KVM_SET_USER_MEMORY_REGION KVM: Document KVM_SET_TSS_ADDR Documentation/kvm/api.txt | 59 + 1 files changed, 59 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: [PATCH 1/2] KVM: Document KVM_SET_USER_MEMORY_REGION

2010-03-25 Thread Pekka Enberg
Avi Kivity kirjoitti: Signed-off-by: Avi Kivity a...@redhat.com Acked-by: Pekka Enberg penb...@cs.helsinki.fi --- Documentation/kvm/api.txt | 43 +++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt

Re: [PATCH 2/2] KVM: Document KVM_SET_TSS_ADDR

2010-03-25 Thread Pekka Enberg
Hi Avi, Avi Kivity kirjoitti: Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/kvm/api.txt | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 22af28a..8f45099 100644 ---

Re: [PATCH 2/2] KVM: Document KVM_SET_TSS_ADDR

2010-03-25 Thread Avi Kivity
On 03/25/2010 12:36 PM, Pekka Enberg wrote: +4.35 KVM_SET_TSS_ADDR + +Capability: KVM_CAP_SET_TSS_ADDR +Architectures: x86 +Type: vm ioctl +Parameters: unsigned long tss_address (in) +Returns: 0 on success, -1 on error + +This ioctl defines the physical address of a three-page region in the

Re: [PATCH 1/2] KVM: Document KVM_SET_USER_MEMORY_REGION

2010-03-25 Thread Alexander Graf
Am 25.03.2010 um 11:31 schrieb Avi Kivity a...@redhat.com: +It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl. Why? What's wrong with SET_MEM_REGION? Alex -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH 1/2] KVM: Document KVM_SET_USER_MEMORY_REGION

2010-03-25 Thread Avi Kivity
On 03/25/2010 01:10 PM, Alexander Graf wrote: Am 25.03.2010 um 11:31 schrieb Avi Kivity a...@redhat.com: +It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl. Why? What's wrong with SET_MEM_REGION? It doesn't allow any control over the memory. So it found its

Re: [PATCH 1/2] KVM: Document KVM_SET_USER_MEMORY_REGION

2010-03-25 Thread Alexander Graf
Am 25.03.2010 um 12:49 schrieb Avi Kivity a...@redhat.com: On 03/25/2010 01:10 PM, Alexander Graf wrote: Am 25.03.2010 um 11:31 schrieb Avi Kivity a...@redhat.com: +It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl. Why? What's wrong with SET_MEM_REGION?

Re: OEM version of Windows in kvm (SLIC Co)

2010-03-25 Thread Avi Kivity
On 03/24/2010 05:35 PM, Michael Tokarev wrote: At least having a way to accept complete acpi table (with header and checksum and everything) is - IMHO - a good thing. Agreed. But I'm not sure about the OEM ID strings in other tables in seabios, -- it is quite ugly, both in implementation

Re: [PATCH 1/2] KVM: Document KVM_SET_USER_MEMORY_REGION

2010-03-25 Thread Avi Kivity
On 03/25/2010 01:54 PM, Alexander Graf wrote: Am 25.03.2010 um 12:49 schrieb Avi Kivity a...@redhat.com: On 03/25/2010 01:10 PM, Alexander Graf wrote: Am 25.03.2010 um 11:31 schrieb Avi Kivity a...@redhat.com: +It is recommended to use this API instead of the KVM_SET_MEMORY_REGION

Re: [PATCH 2/2] KVM: Document KVM_SET_TSS_ADDR

2010-03-25 Thread Pekka Enberg
Avi Kivity kirjoitti: On 03/25/2010 12:36 PM, Pekka Enberg wrote: +4.35 KVM_SET_TSS_ADDR + +Capability: KVM_CAP_SET_TSS_ADDR +Architectures: x86 +Type: vm ioctl +Parameters: unsigned long tss_address (in) +Returns: 0 on success, -1 on error + +This ioctl defines the physical address of a

Re: [PATCH 2/2] KVM: Document KVM_SET_TSS_ADDR

2010-03-25 Thread Avi Kivity
On 03/25/2010 02:00 PM, Pekka Enberg wrote: I don't think such a technical description of an implementation detail has a place in the API reference; maybe in internal documentation. Sure but it would be nice to have something along the lines of This is needed on Intel hardware because of a

Re: [PATCH] KVM: allow bit 10 to be cleared in MSR_IA32_MC4_CTL

2010-03-25 Thread Avi Kivity
On 03/24/2010 06:46 PM, Andre Przywara wrote: There is a quirk for AMD K8 CPUs in many Linux kernels (see arch/x86/kernel/cpu/mcheck/mce.c:__mcheck_cpu_apply_quirks()) that clears bit 10 in that MCE related MSR. KVM can only cope with all zeros or all ones, so it will inject a #GP into the

[PATCH] KVM test: Removing system_powerdown from windows set

2010-03-25 Thread Lucas Meneghel Rodrigues
Windows guests will display a dialog for the user and refuse to shutdown when the system_powerdown command is sent. Let's just remove this test from the windows set of tests. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |2 +- 1 files

Re: [PATCH 3/3] perf events: Change perf parameter --pid to process-wide collection instead of thread-wide

2010-03-25 Thread Arnaldo Carvalho de Melo
Em Thu, Mar 25, 2010 at 04:47:44PM +0800, Zhang, Yanmin escreveu: On Thu, 2010-03-25 at 16:02 +0800, Li Zefan wrote: Thanks for reporting it. Arnaldo, could you pick up below patch? Zefan, Could you try it? Sure thing, will stash them in today's push to Ingo, thanks! - Arnaldo -- To

Re: [RFC] vhost-blk implementation

2010-03-25 Thread Badari Pulavarty
Avi Kivity wrote: On 03/24/2010 10:22 PM, Badari Pulavarty wrote: Which caching mode is this? I assume data=writeback, because otherwise you'd be doing synchronous I/O directly from the handler. Yes. This is with default (writeback) cache model. As mentioned earlier, readhead is helping

Re: [RFC] vhost-blk implementation

2010-03-25 Thread Asdo
Avi Kivity wrote: For the case where the file is actually a partition, use submit_bio(). When the file is a file, keep it in qemu, that path is going to be slower anyway. [CUT] Christoph Hellwig wrote: On Tue, Mar 23, 2010 at 12:03:14PM +0200, Avi Kivity wrote: I also think it should

[PATCH 0/2] Trace emulated instrucions

2010-03-25 Thread Avi Kivity
Add a trace of instruction emulation into ftrace. This can help analyze performance issues, or, in the case of failed emulation, identify the missing instructions. Avi Kivity (2): KVM: x86 emulator: Don't overwrite decode cache KVM: Trace emulated instructions arch/x86/kvm/emulate.c | 19

[PATCH 1/2] KVM: x86 emulator: Don't overwrite decode cache

2010-03-25 Thread Avi Kivity
Currently if we an instruction spans a page boundary, when we fetch the second half we overwrite the first half. This prevents us from tracing the full instruction opcodes. Fix by appending the second half to the first. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c |

[PATCH 2/2] KVM: Trace emulated instructions

2010-03-25 Thread Avi Kivity
Log emulated instructions in ftrace, especially if they failed. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/trace.h | 86 ++ arch/x86/kvm/x86.c |4 ++ 2 files changed, 90 insertions(+), 0 deletions(-) diff --git

Re: MSI-X not enabled for ixgbe device-passthrough

2010-03-25 Thread Hannes Reinecke
Sheng Yang wrote: On Wednesday 24 March 2010 23:54:15 Hannes Reinecke wrote: Hi all, I'm trying to setup a system with device-passthrough for an ixgbe NIC. The device itself seems to work, but it isn't using MSI-X. So some more advanced features like DCB offloading etc won't work. How

Re: [RFC] vhost-blk implementation

2010-03-25 Thread Christoph Hellwig
On Thu, Mar 25, 2010 at 08:29:03AM +0200, Avi Kivity wrote: We still have a virtio implementation in userspace for file-based images. In any case, the file APIs are not asynchronous so we'll need a thread pool. That will probably minimize the difference in performance between the

Re: [RFC] vhost-blk implementation

2010-03-25 Thread Avi Kivity
On 03/25/2010 05:48 PM, Christoph Hellwig wrote: On Thu, Mar 25, 2010 at 08:29:03AM +0200, Avi Kivity wrote: We still have a virtio implementation in userspace for file-based images. In any case, the file APIs are not asynchronous so we'll need a thread pool. That will probably minimize

Re: [RFC] vhost-blk implementation

2010-03-25 Thread Christoph Hellwig
On Wed, Mar 24, 2010 at 01:22:37PM -0700, Badari Pulavarty wrote: Yes. This is with default (writeback) cache model. As mentioned earlier, readhead is helping here and most cases, data would be ready in the pagecache. Ok. cache=writeback performance is something I haven't bothered looking

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Cam Macdonell
On Thu, Mar 25, 2010 at 3:21 AM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Mar 25, 2010 at 11:04:54AM +0200, Avi Kivity wrote: Again, I recommend Rusty's virtio-pci for inspiration. Not just inspiration, how about building on virtio-pci? Virtio was discussed at good length last year

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Cam Macdonell
On Thu, Mar 25, 2010 at 3:15 AM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface.  The driver has three memory regions.  The first memory region is for

Re: [KVM PATCH] pci passthrough: zap option rom scanning.

2010-03-25 Thread Avi Kivity
On 03/24/2010 04:21 PM, Alexander Graf wrote: The same code works with qemu-kvm.git. Cherry picking this commit (51c0dad5ce383be94ca7c46e491ada17cc9ec416) also makes it work in 0.12-stable. Thus I'd incline we also take this patch into 0.12-stable. Done. -- error compiling committee.c:

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Anthony Liguori
On 03/25/2010 11:18 AM, Cam Macdonell wrote: On Thu, Mar 25, 2010 at 3:15 AM, Michael S. Tsirkinm...@redhat.com wrote: On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface. The driver has

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Cam Macdonell
On Thu, Mar 25, 2010 at 3:46 AM, Avi Kivity a...@redhat.com wrote: On 03/25/2010 08:09 AM, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface.  The driver has three memory regions.  The first memory region is for device registers for

Re: [patch 1/8] test: allow functions to execute on non-irq context remotely

2010-03-25 Thread Avi Kivity
On 03/24/2010 11:24 PM, Marcelo Tosatti wrote: Which allows code to execute on remote cpus while receiving interrupts. Also move late smp initialization to common code, and the smp loop to C code. + +void smp_loop(void) +{ +void (*fn)(void *data); +void *data; + +asm

Re: [patch 5/8] testdev: add port to create/delete memslots

2010-03-25 Thread Avi Kivity
On 03/24/2010 11:24 PM, Marcelo Tosatti wrote: Signed-off-by: Marcelo Tosattimtosa...@redhat.com Whoa, memory hotplug. -- 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 v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Cam Macdonell
On Thu, Mar 25, 2010 at 3:05 AM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface.  The driver has three memory regions.  The first memory region is for

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Avi Kivity
On 03/25/2010 06:23 PM, Anthony Liguori wrote: There has been previous discussion of virtio, however while virtio is good for exporting guest memory, it's not ideal for importing memory into a guest. virtio is a DMA-based API which means that it doesn't assume cache coherent shared memory.

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Avi Kivity
On 03/25/2010 11:05 AM, Michael S. Tsirkin wrote: +static struct pci_device_id ivshmem_pci_ids[] __devinitdata = { +{ +.vendor =0x1af4, +.device =0x1110, vendor ids must be registered with PCI SIG. this one does not seem to be registered. That's the

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 11:23:05AM -0500, Anthony Liguori wrote: On 03/25/2010 11:18 AM, Cam Macdonell wrote: On Thu, Mar 25, 2010 at 3:15 AM, Michael S. Tsirkinm...@redhat.com wrote: On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 10:30:42AM -0600, Cam Macdonell wrote: On Thu, Mar 25, 2010 at 3:05 AM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface.  The

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 06:36:02PM +0200, Avi Kivity wrote: On 03/25/2010 11:05 AM, Michael S. Tsirkin wrote: +static struct pci_device_id ivshmem_pci_ids[] __devinitdata = { +{ +.vendor =0x1af4, +.device =0x1110, vendor ids must be registered with PCI

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 06:32:15PM +0200, Avi Kivity wrote: On 03/25/2010 06:23 PM, Anthony Liguori wrote: There has been previous discussion of virtio, however while virtio is good for exporting guest memory, it's not ideal for importing memory into a guest. virtio is a DMA-based API which

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 10:24:20AM -0600, Cam Macdonell wrote: On Thu, Mar 25, 2010 at 3:46 AM, Avi Kivity a...@redhat.com wrote: On 03/25/2010 08:09 AM, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface.  The driver has three memory

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Cam Macdonell
On Thu, Mar 25, 2010 at 3:04 AM, Avi Kivity a...@redhat.com wrote: On 03/25/2010 08:08 AM, Cam Macdonell wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest.  This patch also supports interrupts between guest by communicating over a

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Avi Kivity
On 03/25/2010 06:40 PM, Michael S. Tsirkin wrote: On Thu, Mar 25, 2010 at 06:32:15PM +0200, Avi Kivity wrote: On 03/25/2010 06:23 PM, Anthony Liguori wrote: There has been previous discussion of virtio, however while virtio is good for exporting guest memory, it's not ideal for

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Avi Kivity
On 03/25/2010 06:37 PM, Michael S. Tsirkin wrote: On Thu, Mar 25, 2010 at 06:36:02PM +0200, Avi Kivity wrote: On 03/25/2010 11:05 AM, Michael S. Tsirkin wrote: +static struct pci_device_id ivshmem_pci_ids[] __devinitdata = { +{ +.vendor =0x1af4, +

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Avi Kivity
On 03/25/2010 06:50 PM, Cam Macdonell wrote: Please put the spec somewhere publicly accessible with a permanent URL. I suggest a new qemu.git directory specs/. It's more important than the code IMO. Sorry to be pedantic, do you want a URL or the spec as part of a patch that adds it as

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Cam Macdonell
On Thu, Mar 25, 2010 at 10:34 AM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Mar 25, 2010 at 10:30:42AM -0600, Cam Macdonell wrote: On Thu, Mar 25, 2010 at 3:05 AM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds

KVM on MIPS?

2010-03-25 Thread Dale Farnsworth
I'm beginning to look at implementing KVM on MIPS. I've tried to search for any work-in-progress on this but haven't found much at all. If you know of anyone who is working on this or of pitfalls I should consider before jumping in, please let me know. Thanks, -Dale -- To unsubscribe from this

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Cam Macdonell
On Thu, Mar 25, 2010 at 11:02 AM, Avi Kivity a...@redhat.com wrote: On 03/25/2010 06:50 PM, Cam Macdonell wrote: Please put the spec somewhere publicly accessible with a permanent URL.  I suggest a new qemu.git directory specs/.  It's more important than the code IMO. Sorry to be

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Avi Kivity
On 03/25/2010 07:35 PM, Cam Macdonell wrote: Ah, I see. You adjusted for the different behaviours in the driver. Still I recommend dropping the status register: this allows single-msi and PIRQ to behave the same way. Also it is racy, if two guests signal a third, they will overwrite each

Re: MSI-X not enabled for ixgbe device-passthrough

2010-03-25 Thread Chris Wright
* Hannes Reinecke (h...@suse.de) wrote: Hi all, I'm trying to setup a system with device-passthrough for an ixgbe NIC. The device itself seems to work, but it isn't using MSI-X. So some more advanced features like DCB offloading etc won't work. Please send the relevant dmesg from the

Re: [patch 1/8] test: allow functions to execute on non-irq context remotely

2010-03-25 Thread Marcelo Tosatti
On Thu, Mar 25, 2010 at 06:25:56PM +0200, Avi Kivity wrote: On 03/24/2010 11:24 PM, Marcelo Tosatti wrote: Which allows code to execute on remote cpus while receiving interrupts. Also move late smp initialization to common code, and the smp loop to C code. + +void smp_loop(void) +{ +

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Cam Macdonell
On Thu, Mar 25, 2010 at 11:48 AM, Avi Kivity a...@redhat.com wrote: On 03/25/2010 07:35 PM, Cam Macdonell wrote: Ah, I see.  You adjusted for the different behaviours in the driver. Still I recommend dropping the status register: this allows single-msi and PIRQ to behave the same way.  Also

Re: pekka-vm and kvm documentation

2010-03-25 Thread Pekka Enberg
Hi Avi, Avi Kivity wrote: When you come up against something that is undocumented or badly described, please complain on k...@. We will then update the documentation. So one thing I'm wondering is in what mode do we enter the guest? Is that entirely specified with KVM_SET_REGS and

Re: pekka-vm and kvm documentation

2010-03-25 Thread Avi Kivity
On 03/25/2010 10:23 PM, Pekka Enberg wrote: Hi Avi, Avi Kivity wrote: When you come up against something that is undocumented or badly described, please complain on k...@. We will then update the documentation. So one thing I'm wondering is in what mode do we enter the guest? Is that

Re: KVM on MIPS?

2010-03-25 Thread Avi Kivity
On 03/25/2010 06:54 PM, Dale Farnsworth wrote: I'm beginning to look at implementing KVM on MIPS. I've tried to search for any work-in-progress on this but haven't found much at all. Google comes up with some hits, but nothing concrete. If you know of anyone who is working on this or of

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Avi Kivity
On 03/25/2010 08:17 PM, Cam Macdonell wrote: I had a hunch it was probably considered. That explains why irqfd doesn't have a datamatch field. I guess supporting multiple MSI vectors with one doorbell per guest isn't possible if one 1 bit of information can be communicated.

Re: KVM on MIPS?

2010-03-25 Thread Alexander Graf
Am 25.03.2010 um 22:04 schrieb Avi Kivity a...@redhat.com: On 03/25/2010 06:54 PM, Dale Farnsworth wrote: I'm beginning to look at implementing KVM on MIPS. I've tried to search for any work-in-progress on this but haven't found much at all. Google comes up with some hits, but nothing

Re: [Qemu-devel] Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Jamie Lokier
Cam Macdonell wrote: An irqfd can only trigger a single vector in a guest. Right now I only have one eventfd per guest.So ioeventfd/irqfd restricts the current implementation to a single vector that a guest can trigger. Without irqfd, eventfds can be used like registers a write the number

Re: [PATCH] KMV: VMX: consult IA32_VMX_EPT_VPID_CAP to determine EPT paging-structure memory type

2010-03-25 Thread Gui Jianfeng
Avi Kivity wrote: On 03/22/2010 11:13 AM, Sheng Yang wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 06108f3..f971b9b 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1804,9 +1804,15 @@ static u64 construct_eptp(unsigned long root_hpa) { u64 eptp; -

Re: PCI passthrough resource remapping

2010-03-25 Thread Kenni Lund
2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device that I'd like to pass through to KVM. In order to do that, I'm reading that the PCI memory region must be 4K-page aligned and the PCI memory resources itself must also

  1   2   >