Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-17 Thread Amos Kong
On Thu, Jan 17, 2013 at 01:45:11PM +0800, Amos Kong wrote: On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote: ak...@redhat.com writes: @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, { struct virtio_net_ctrl_mac mac_data; +

Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-17 Thread Stefan Hajnoczi
On Thu, Jan 17, 2013 at 01:45:11PM +0800, Amos Kong wrote: On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote: ak...@redhat.com writes: @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, { struct virtio_net_ctrl_mac mac_data; +

Re: [PATCH 1/8] KVM: x86 emulator: Streamline SHLD, SHRD

2013-01-17 Thread Gleb Natapov
On Sat, Jan 12, 2013 at 04:32:50PM +0200, Avi Kivity wrote: Signed-off-by: Avi Kivity avi.kiv...@gmail.com --- arch/x86/kvm/emulate.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c

Re: [PATCH 3/8] KVM: x86 emulator: covert SETCC to fastop

2013-01-17 Thread Gleb Natapov
On Sat, Jan 12, 2013 at 04:32:52PM +0200, Avi Kivity wrote: This is a bit of a special case since we don't have the usual byte/word/long/quad switch; instead we switch on the condition code embedded in the instruction. Signed-off-by: Avi Kivity avi.kiv...@gmail.com This fails autotest. f9-32

Re: [PATCH 8/8] KVM: x86 emulator: convert a few freestanding emulations to fastop

2013-01-17 Thread Gleb Natapov
Missing Signed-off-by :( On Sat, Jan 12, 2013 at 04:32:57PM +0200, Avi Kivity wrote: --- arch/x86/kvm/emulate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index da2b903..1bb0af2 100644 ---

Re: [PATCH 5/8] KVM: PPC: debug stub interface parameter defined

2013-01-17 Thread Paul Mackerras
On Wed, Jan 16, 2013 at 01:54:42PM +0530, Bharat Bhushan wrote: This patch defines the interface parameter for KVM_SET_GUEST_DEBUG ioctl support. Follow up patches will use this for setting up hardware breakpoints, watchpoints and software breakpoints. [snip] diff --git

Re: VirtIO id X is not a head!

2013-01-17 Thread Stefan Hajnoczi
On Wed, Jan 16, 2013 at 08:58:50PM +0100, Matthias Leinweber wrote: i try to implement a virtual device/driver, but i ran into some trouble using the virtio api. My implementation looks as follows: A kthread exposes memory via add_buf, kicks and sleeps. If a callback is issued he is woken up

Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-17 Thread Michael S. Tsirkin
On Thu, Jan 17, 2013 at 09:39:54AM +0100, Stefan Hajnoczi wrote: On Thu, Jan 17, 2013 at 01:45:11PM +0800, Amos Kong wrote: On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote: ak...@redhat.com writes: @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n,

[PATCH v2] virtio-spec: set mac address by a new vq command

2013-01-17 Thread akong
From: Amos Kong ak...@redhat.com Virtio-net driver currently programs MAC address byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address in one time, and added a new feature flag VIRTIO_NET_F_MAC_ADDR for this

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-17 Thread Michael S. Tsirkin
On Wed, Jan 16, 2013 at 10:14:33AM -0600, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Wed, Jan 16, 2013 at 09:09:49AM -0600, Anthony Liguori wrote: Jason Wang jasow...@redhat.com writes: On 01/15/2013 03:44 AM, Anthony Liguori wrote: Jason Wang

[QEMU PATCH v3] virtio-net: introduce a new macaddr control

2013-01-17 Thread akong
From: Amos Kong ak...@redhat.com In virtio-net guest driver, currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address, it's atomic. VIRTIO_NET_F_CTRL_MAC_ADDR

Re: [PULL 0/8] ppc patch queue 2013-01-10

2013-01-17 Thread Alexander Graf
On 14.01.2013, at 10:03, Gleb Natapov wrote: On Thu, Jan 10, 2013 at 01:45:04PM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights this time: - Book3S: enable potential sPAPR guest emulation on PR KVM on pHyp - BookE:

[PATCH v3 2/2] virtio-net: introduce a new control to set macaddr

2013-01-17 Thread akong
From: Amos Kong ak...@redhat.com Currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address, it's atomic. VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for

[PATCH v3 1/2] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-17 Thread akong
From: Amos Kong ak...@redhat.com We will send vq command to set mac address in virtnet_set_mac_address() a little fix of coding style Signed-off-by: Amos Kong ak...@redhat.com --- drivers/net/virtio_net.c | 89 1 file changed, 44 insertions(+),

[PATCH v3 0/2] make mac programming for virtio net more robust

2013-01-17 Thread akong
From: Amos Kong ak...@redhat.com Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address, it's atomic. V2: check return of sending command, delay eth_mac_addr() V3: restore

RE: [PATCH 5/8] KVM: PPC: debug stub interface parameter defined

2013-01-17 Thread Bhushan Bharat-R65777
-Original Message- From: Paul Mackerras [mailto:pau...@samba.org] Sent: Thursday, January 17, 2013 12:53 PM To: Bhushan Bharat-R65777 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; ag...@suse.de; Bhushan Bharat- R65777 Subject: Re: [PATCH 5/8] KVM: PPC: debug stub interface

Re: [PULL 0/8] ppc patch queue 2013-01-10

2013-01-17 Thread Gleb Natapov
On Thu, Jan 17, 2013 at 11:53:38AM +0100, Alexander Graf wrote: On 14.01.2013, at 10:03, Gleb Natapov wrote: On Thu, Jan 10, 2013 at 01:45:04PM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights this time: -

Re: [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-17 Thread Michael S. Tsirkin
On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote: ak...@redhat.com writes: @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, { struct virtio_net_ctrl_mac mac_data; +if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET elem-out_num == 2 +

Re: Locking problem in KVM (or MM)

2013-01-17 Thread Marcelo Tosatti
Appears to be related to https://lkml.org/lkml/2013/1/15/542 On Wed, Jan 16, 2013 at 02:41:25PM -0800, Stephen Hemminger wrote: Lockdep splat, appears to be KVM related with 3.8-rc1 [24428.429305] [24428.429308] = [24428.429309] [ INFO: possible

Re: [QEMU PATCH v3] virtio-net: introduce a new macaddr control

2013-01-17 Thread Stefan Hajnoczi
On Thu, Jan 17, 2013 at 06:30:46PM +0800, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com In virtio-net guest driver, currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Gleb Natapov
On Fri, Jan 11, 2013 at 06:25:18PM +0900, Takuya Yoshikawa wrote: Patches 1 to 3 are trivial. Patch 4 is the main cause of the increased lines, but I think the new code makes it easier to understand why each condition in __kvm_set_memory_region() is there. If you don't agree with patch 4,

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Marcelo Tosatti
On Thu, Jan 17, 2013 at 11:20:43AM +0800, Xiao Guangrong wrote: On 01/17/2013 03:07 AM, Marcelo Tosatti wrote: On Fri, Jan 11, 2013 at 06:25:18PM +0900, Takuya Yoshikawa wrote: Patches 1 to 3 are trivial. Patch 4 is the main cause of the increased lines, but I think the new code makes

Re: [PATCH v6 1/3] KVM: x86: clean up reexecute_instruction

2013-01-17 Thread Gleb Natapov
For the series: Reviewed-by: Gleb Natapov g...@redhat.com On Sun, Jan 13, 2013 at 11:44:12PM +0800, Xiao Guangrong wrote: Little cleanup for reexecute_instruction, also use gpa_to_gfn in retry_instruction Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com ---

Re: [PATCH v11 2/3] x86, apicv: add virtual x2apic support

2013-01-17 Thread Gleb Natapov
On Wed, Jan 16, 2013 at 06:21:11PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need to enable virtualized x2apic mode. Currently, we only enable it when guest is really using x2apic. Also, clear MSR bitmap for corresponding x2apic

[PATCH 03/12] s390: Add mapping helper functions.

2013-01-17 Thread Cornelia Huck
Add s390_cpu_physical_memory_{map,unmap} with special handling for the lowcore. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- target-s390x/cpu.h| 4 target-s390x/helper.c | 26 ++ 2 files changed, 30 insertions(+) diff --git a/target-s390x/cpu.h

[PATCH v5 00/12] s390: channel I/O support in qemu.

2013-01-17 Thread Cornelia Huck
Hi, here's the latest incarnation of my channel I/O and virtio-ccw patchset for qemu, containing various changes over the last one. (Note that s390: Add a hypercall registration interface. has already been posted: http://marc.info/?l=qemu-develm=135834160607372w=2) Changes include: - Add

[PATCH 01/12] s390: Add a hypercall registration interface.

2013-01-17 Thread Cornelia Huck
Allow virtio machines to register for different diag500 function codes and convert s390-virtio to use it. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390-virtio.c | 90 +++- hw/s390-virtio.h | 22 +++

[PATCH 12/12] s390: Add s390-ccw-virtio machine.

2013-01-17 Thread Cornelia Huck
Add a new machine type, s390-ccw-virtio, making use of the virtio-ccw transport to present virtio devices as channel devices and make it the default on s390. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390-virtio.c | 1 - hw/s390-virtio.h | 1 +

[PATCH 07/12] s390: Add channel I/O instructions.

2013-01-17 Thread Cornelia Huck
Provide handlers for (most) channel I/O instructions. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- target-s390x/cpu.h| 101 target-s390x/ioinst.c | 673 ++ target-s390x/ioinst.h | 16 ++ trace-events | 6 + 4

[PATCH 09/12] s390: Wire up channel I/O in kvm.

2013-01-17 Thread Cornelia Huck
Trigger the code for our virtual css in case of instruction intercepts for I/O instructions. Handle the tsch exit for the subchannel-related part of tsch. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- target-s390x/cpu.h | 11 +++ target-s390x/kvm.c | 252

[PATCH 06/12] s390: I/O interrupt and machine check injection.

2013-01-17 Thread Cornelia Huck
I/O interrupts are queued per isc. Only crw pending machine checks are supported. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- target-s390x/cpu.h| 69 +++- target-s390x/helper.c | 143 ++ 2 files changed, 211

[PATCH 10/12] s390: Add new channel I/O based virtio transport.

2013-01-17 Thread Cornelia Huck
Add a new virtio transport that uses channel commands to perform virtio operations. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw.c | 906 + hw/s390x/virtio-ccw.h | 79 +

[PATCH 11/12] s390-virtio: Factor out some initialization code.

2013-01-17 Thread Cornelia Huck
Some of the machine initialization for s390-virtio will be reused by virtio-ccw. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390-virtio.c | 155 ++- hw/s390-virtio.h | 5 ++ 2 files changed, 91 insertions(+), 69 deletions(-)

[PATCH 04/12] Update linux headers.

2013-01-17 Thread Cornelia Huck
Base is kvm-next as of 2013/01/16. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- linux-headers/asm-generic/kvm_para.h | 4 linux-headers/asm-powerpc/kvm_para.h | 2 +- linux-headers/linux/kvm.h| 21 + 3 files changed, 26 insertions(+), 1

[PATCH 05/12] s390: Channel I/O basic defintions.

2013-01-17 Thread Cornelia Huck
Basic channel I/O structures and helper function. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- target-s390x/Makefile.objs | 2 +- target-s390x/cpu.h | 5 ++ target-s390x/ioinst.c | 36 target-s390x/ioinst.h | 207

[PATCH 08/12] s390: Virtual channel subsystem support.

2013-01-17 Thread Cornelia Huck
Provide a mechanism for qemu to provide fully virtual subchannels to the guest. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390x/Makefile.objs |1 + hw/s390x/css.c | 1131 hw/s390x/css.h | 92

[PATCH 02/12] s390: Lowcore mapping helper.

2013-01-17 Thread Cornelia Huck
Create a lowcore mapping helper that includes a check for sufficient length. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- target-s390x/helper.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/target-s390x/helper.c

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Takuya Yoshikawa
On Thu, 17 Jan 2013 14:42:02 +0200 Gleb Natapov g...@redhat.com wrote: Applied 1-3. It is not clear whether kvm_iommu_map_pages() should be called when flags change, so not applying 4 for now. Thank you. Although I confirmed that kvm_iommu_map_pages() does nothing with the flags, it needs to

Re: [kbuild] [vfio:vfio-vga 3/5] drivers/vfio/pci/vfio_pci_rdwr.c:169 vfio_pci_bar_rw() warn: always true condition '(done = 0) = (0-u32max = 0)'

2013-01-17 Thread Fengguang Wu
On Wed, Jan 16, 2013 at 08:47:57PM -0700, Alex Williamson wrote: On Thu, 2013-01-17 at 09:21 +0800, Fengguang Wu wrote: Hi Alex, FYI, there are new smatch warnings show up in tree: git://github.com/awilliam/linux-vfio.git vfio-vga Thanks for the bug report. I never would have

Re: [Qemu-devel] [PATCH 04/12] Update linux headers.

2013-01-17 Thread Peter Maydell
On 17 January 2013 14:23, Cornelia Huck cornelia.h...@de.ibm.com wrote: Base is kvm-next as of 2013/01/16. --- a/linux-headers/asm-powerpc/kvm_para.h +++ b/linux-headers/asm-powerpc/kvm_para.h @@ -78,7 +78,7 @@ struct kvm_vcpu_arch_shared { #define KVM_HCALL_TOKEN(num)

Re: [PATCH v6 14/15] KVM: ARM: Power State Coordination Interface implementation

2013-01-17 Thread Marc Zyngier
On 16/01/13 17:59, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com Implement the PSCI specification (ARM DEN 0022A) to control virtual CPUs being powered on or off. PSCI/KVM is detected using the KVM_CAP_ARM_PSCI capability. A virtual CPU can now be initialized in a

Re: [Qemu-devel] [PATCH 04/12] Update linux headers.

2013-01-17 Thread Cornelia Huck
On Thu, 17 Jan 2013 15:05:46 + Peter Maydell peter.mayd...@linaro.org wrote: On 17 January 2013 14:23, Cornelia Huck cornelia.h...@de.ibm.com wrote: Base is kvm-next as of 2013/01/16. --- a/linux-headers/asm-powerpc/kvm_para.h +++ b/linux-headers/asm-powerpc/kvm_para.h @@ -78,7

Re: [PATCH v6 15/15] KVM: ARM: Add maintainer entry for KVM/ARM

2013-01-17 Thread Will Deacon
On Wed, Jan 16, 2013 at 05:59:25PM +, Christoffer Dall wrote: Add an entry in the MAINTAINERS file for KVM/ARM. Cc: Russell King li...@arm.linux.org.uk Reviewed-by: Will Deacon will.dea...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- MAINTAINERS |8

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Gleb Natapov
On Thu, Jan 17, 2013 at 11:26:53PM +0900, Takuya Yoshikawa wrote: On Thu, 17 Jan 2013 14:42:02 +0200 Gleb Natapov g...@redhat.com wrote: Applied 1-3. It is not clear whether kvm_iommu_map_pages() should be called when flags change, so not applying 4 for now. Thank you. Although I

Re: [PATCH v6 13/15] KVM: ARM: Handle I/O aborts

2013-01-17 Thread Marc Zyngier
On 16/01/13 17:59, Christoffer Dall wrote: When the guest accesses I/O memory this will create data abort exceptions and they are handled by decoding the HSR information (physical address, read/write, length, register) and forwarding reads and writes to QEMU which performs the device

Re: [PATCH 0/5] vhost-scsi: Add support for host virtualized target

2013-01-17 Thread Michael S. Tsirkin
On Fri, Sep 07, 2012 at 06:48:14AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hello Anthony Co, This is the fourth installment to add host virtualized target support for the mainline tcm_vhost fabric driver using Linux v3.6-rc into QEMU 1.3.0-rc.

Re: [Qemu-devel] [PATCH 04/12] Update linux headers.

2013-01-17 Thread Alexander Graf
On 17.01.2013, at 17:20, Cornelia Huck wrote: On Thu, 17 Jan 2013 15:05:46 + Peter Maydell peter.mayd...@linaro.org wrote: On 17 January 2013 14:23, Cornelia Huck cornelia.h...@de.ibm.com wrote: Base is kvm-next as of 2013/01/16. --- a/linux-headers/asm-powerpc/kvm_para.h +++

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Alex Williamson
On Thu, 2013-01-17 at 09:29 +0200, Gleb Natapov wrote: On Thu, Jan 17, 2013 at 11:20:43AM +0800, Xiao Guangrong wrote: On 01/17/2013 03:07 AM, Marcelo Tosatti wrote: On Fri, Jan 11, 2013 at 06:25:18PM +0900, Takuya Yoshikawa wrote: Patches 1 to 3 are trivial. Patch 4 is the main

Re: [PATCH v6 13/15] KVM: ARM: Handle I/O aborts

2013-01-17 Thread Christoffer Dall
On Thu, Jan 17, 2013 at 11:37 AM, Marc Zyngier marc.zyng...@arm.com wrote: On 16/01/13 17:59, Christoffer Dall wrote: When the guest accesses I/O memory this will create data abort exceptions and they are handled by decoding the HSR information (physical address, read/write, length, register)

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Gleb Natapov
On Thu, Jan 17, 2013 at 10:12:06AM -0700, Alex Williamson wrote: On Thu, 2013-01-17 at 09:29 +0200, Gleb Natapov wrote: On Thu, Jan 17, 2013 at 11:20:43AM +0800, Xiao Guangrong wrote: On 01/17/2013 03:07 AM, Marcelo Tosatti wrote: On Fri, Jan 11, 2013 at 06:25:18PM +0900, Takuya

Re: [kvmarm] [PATCH v6 02/13] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-17 Thread Peter Maydell
On 16 January 2013 18:00, Christoffer Dall c.d...@virtualopensystems.com wrote: KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl Patch subject needs updating with new name of this ioctl (KVM_ARM_SET_DEVICE_ADDR)... On ARM (and possibly other architectures) some bits are specific to the model

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Alex Williamson
On Thu, 2013-01-17 at 19:20 +0200, Gleb Natapov wrote: On Thu, Jan 17, 2013 at 10:12:06AM -0700, Alex Williamson wrote: On Thu, 2013-01-17 at 09:29 +0200, Gleb Natapov wrote: On Thu, Jan 17, 2013 at 11:20:43AM +0800, Xiao Guangrong wrote: On 01/17/2013 03:07 AM, Marcelo Tosatti wrote:

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Gleb Natapov
On Thu, Jan 17, 2013 at 10:30:05AM -0700, Alex Williamson wrote: On Thu, 2013-01-17 at 19:20 +0200, Gleb Natapov wrote: On Thu, Jan 17, 2013 at 10:12:06AM -0700, Alex Williamson wrote: On Thu, 2013-01-17 at 09:29 +0200, Gleb Natapov wrote: On Thu, Jan 17, 2013 at 11:20:43AM +0800, Xiao

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Alex Williamson
On Thu, 2013-01-17 at 19:58 +0200, Gleb Natapov wrote: On Thu, Jan 17, 2013 at 10:30:05AM -0700, Alex Williamson wrote: On Thu, 2013-01-17 at 19:20 +0200, Gleb Natapov wrote: On Thu, Jan 17, 2013 at 10:12:06AM -0700, Alex Williamson wrote: On Thu, 2013-01-17 at 09:29 +0200, Gleb Natapov

Re: [Qemu-devel] [RFC 00/12] target-i386: Fix APIC-ID-based topology (v4)

2013-01-17 Thread Eduardo Habkost
On Wed, Jan 09, 2013 at 04:53:40PM -0200, Eduardo Habkost wrote: This series uses a much simpler approach than the previous versions: - The APIC ID calculation code is now inside cpu.c - It doesn't require touching the PC CPU creation code at all - It simply uses a static variable to

Re: [PATCH] tcm_vhost: Use llist for cmd completion list

2013-01-17 Thread Nicholas A. Bellinger
Hi Asias! On Sun, 2013-01-06 at 14:36 +0800, Asias He wrote: This drops the cmd completion list spin lock and makes the cmd completion queue lock-less. Signed-off-by: Asias He as...@redhat.com --- Apologies for the long delay to get back to this patch. After some initial testing, I'm

Re: [PATCH 0/5] vhost-scsi: Add support for host virtualized target

2013-01-17 Thread Nicholas A. Bellinger
Hi MST Co, On Thu, 2013-01-17 at 18:43 +0200, Michael S. Tsirkin wrote: On Fri, Sep 07, 2012 at 06:48:14AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hello Anthony Co, This is the fourth installment to add host virtualized target support for

Re: [PATCH v6 1/3] KVM: x86: clean up reexecute_instruction

2013-01-17 Thread Marcelo Tosatti
On Sun, Jan 13, 2013 at 11:44:12PM +0800, Xiao Guangrong wrote: Little cleanup for reexecute_instruction, also use gpa_to_gfn in retry_instruction Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 13 ++--- 1 files changed, 6 insertions(+),

[PATCH 0/3] KVM: PPC: e500: Shadow TLB Improvements

2013-01-17 Thread Alexander Graf
This patch set improves the shadow TLB handling of our e500 target. The really important bit here is that with these patches applied, we can map guest TLB1 entries into the host's TLB0. This gives a significant performance improvement as you can see below. Alex --- without patch, using 4k

[PATCH 3/3] KVM: PPC: e500: Implement TLB1-in-TLB0 mapping

2013-01-17 Thread Alexander Graf
When a host mapping fault happens in a guest TLB1 entry today, we map the translated guest entry into the host's TLB1. This isn't particularly clever when the guest is mapped by normal 4k pages, since these would be a lot better to put into TLB0 instead. This patch adds the required logic to map

[PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
When emulating tlbwe, we want to automatically map the entry that just got written in our shadow TLB map, because chances are quite high that it's going to be used very soon. Today this happens explicitly, duplicating all the logic that is in kvmppc_mmu_map() already. Just call that one instead.

[PATCH] KVM: PPC: Emulate dcbf

2013-01-17 Thread Alexander Graf
Guests can trigger MMIO exits using dcbf. Since we don't emulate cache incoherent MMIO, just do nothing and move on. Reported-by: Ben Collins be...@servergy.com Signed-off-by: Alexander Graf ag...@suse.de Tested-by: Ben Collins be...@servergy.com --- arch/powerpc/kvm/emulate.c |2 ++ 1 files

[PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-17 Thread Alexander Graf
Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. Please pull. It contains a bug fix for an issue that Ben Collins ran into, where a guest would just abort because it traps during an unknown instruction. Alex The following changes since commit

[PATCH 1/1] KVM: PPC: Emulate dcbf

2013-01-17 Thread Alexander Graf
Guests can trigger MMIO exits using dcbf. Since we don't emulate cache incoherent MMIO, just do nothing and move on. Reported-by: Ben Collins be...@servergy.com Signed-off-by: Alexander Graf ag...@suse.de Tested-by: Ben Collins be...@servergy.com CC: sta...@vger.kernel.org ---

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); struct tlbe_priv *priv; - struct kvm_book3e_206_tlb_entry *gtlbe, stlbe; +

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); struct tlbe_priv *priv; -struct

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:20, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 =

Re: [PATCH 3/3] KVM: PPC: e500: Implement TLB1-in-TLB0 mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 04:50:41 PM, Alexander Graf wrote: When a host mapping fault happens in a guest TLB1 entry today, we map the translated guest entry into the host's TLB1. This isn't particularly clever when the guest is mapped by normal 4k pages, since these would be a lot better to put into TLB0

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 06:29:56 PM, Alexander Graf wrote: On 18.01.2013, at 01:20, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: It also seems like it would be cleaner to just invalidate the old entry in tlbwe, and then this function doesn't need to change at all. I am a

Re: [PATCH] tcm_vhost: Use llist for cmd completion list

2013-01-17 Thread Asias He
On 01/18/2013 04:35 AM, Nicholas A. Bellinger wrote: Hi Asias! On Sun, 2013-01-06 at 14:36 +0800, Asias He wrote: This drops the cmd completion list spin lock and makes the cmd completion queue lock-less. Signed-off-by: Asias He as...@redhat.com --- Apologies for the long delay to get

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 06:20:03 PM, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 =

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:47, Scott Wood wrote: On 01/17/2013 06:20:03 PM, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, {

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:47, Scott Wood wrote: On 01/17/2013 06:20:03 PM, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, {

RE: [PATCH v11 2/3] x86, apicv: add virtual x2apic support

2013-01-17 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-17: On Wed, Jan 16, 2013 at 06:21:11PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com @@ -6103,6 +6206,53 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu, int tpr, int irr) vmcs_write32(TPR_THRESHOLD, irr); } +static void

[PATCH 1/6] KVM: PPC: E500: Move write_stlbe higher

2013-01-17 Thread Alexander Graf
Later patches want to call the function and it doesn't have dependencies on anything below write_host_tlbe. Move it higher up in the file. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c | 32 1 files changed, 16 insertions(+), 16

[PATCH 4/6] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
When emulating tlbwe, we want to automatically map the entry that just got written in our shadow TLB map, because chances are quite high that it's going to be used very soon. Today this happens explicitly, duplicating all the logic that is in kvmppc_mmu_map() already. Just call that one instead.

[PATCH 2/6] KVM: PPC: E500: Explicitly mark shadow maps invalid

2013-01-17 Thread Alexander Graf
When we invalidate shadow TLB maps on the host, we don't mark them as not valid. But we should. Fix this by removing the E500_TLB_VALID from their flags when invalidating. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c | 13 ++--- 1 files changed, 10

[PATCH 3/6] KVM: PPC: E500: Propagate errors when shadow mapping

2013-01-17 Thread Alexander Graf
When shadow mapping a page, mapping this page can fail. In that case we don't have a shadow map. Take this case into account, otherwise we might end up writing bogus TLB entries into the host TLB. While at it, also move the write_stlbe() calls into the respective TLBn handlers. Signed-off-by:

[PATCH v2 0/6] KVM: PPC: e500: Shadow TLB Improvements v2

2013-01-17 Thread Alexander Graf
This patch set improves the shadow TLB handling of our e500 target. The really important bit here is that with these patches applied, we can map guest TLB1 entries into the host's TLB0. This gives a significant performance improvement as you can see below. Alex v1 - v2: - new patch: Move

[PATCH 6/6] KVM: PPC: e500: Implement TLB1-in-TLB0 mapping

2013-01-17 Thread Alexander Graf
When a host mapping fault happens in a guest TLB1 entry today, we map the translated guest entry into the host's TLB1. This isn't particularly clever when the guest is mapped by normal 4k pages, since these would be a lot better to put into TLB0 instead. This patch adds the required logic to map

Re: [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-17 Thread Amos Kong
On Thu, Jan 17, 2013 at 02:13:08PM +0200, Michael S. Tsirkin wrote: On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote: ak...@redhat.com writes: @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, { struct virtio_net_ctrl_mac mac_data;

Re: [PATCH 2/6] KVM: PPC: E500: Explicitly mark shadow maps invalid

2013-01-17 Thread Scott Wood
On 01/17/2013 08:34:53 PM, Alexander Graf wrote: When we invalidate shadow TLB maps on the host, we don't mark them as not valid. But we should. Fix this by removing the E500_TLB_VALID from their flags when invalidating. Signed-off-by: Alexander Graf ag...@suse.de ---

Re: [PULL 0/8] ppc patch queue 2013-01-10

2013-01-17 Thread Alexander Graf
On 14.01.2013, at 10:03, Gleb Natapov wrote: On Thu, Jan 10, 2013 at 01:45:04PM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights this time: - Book3S: enable potential sPAPR guest emulation on PR KVM on pHyp - BookE:

RE: [PATCH 5/8] KVM: PPC: debug stub interface parameter defined

2013-01-17 Thread Bhushan Bharat-R65777
-Original Message- From: Paul Mackerras [mailto:pau...@samba.org] Sent: Thursday, January 17, 2013 12:53 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; ag...@suse.de; Bhushan Bharat- R65777 Subject: Re: [PATCH 5/8] KVM: PPC: debug stub interface

Re: [PULL 0/8] ppc patch queue 2013-01-10

2013-01-17 Thread Gleb Natapov
On Thu, Jan 17, 2013 at 11:53:38AM +0100, Alexander Graf wrote: On 14.01.2013, at 10:03, Gleb Natapov wrote: On Thu, Jan 10, 2013 at 01:45:04PM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights this time: -

[PATCH 3/3] KVM: PPC: e500: Implement TLB1-in-TLB0 mapping

2013-01-17 Thread Alexander Graf
When a host mapping fault happens in a guest TLB1 entry today, we map the translated guest entry into the host's TLB1. This isn't particularly clever when the guest is mapped by normal 4k pages, since these would be a lot better to put into TLB0 instead. This patch adds the required logic to map

[PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
When emulating tlbwe, we want to automatically map the entry that just got written in our shadow TLB map, because chances are quite high that it's going to be used very soon. Today this happens explicitly, duplicating all the logic that is in kvmppc_mmu_map() already. Just call that one instead.

[PATCH] KVM: PPC: Emulate dcbf

2013-01-17 Thread Alexander Graf
Guests can trigger MMIO exits using dcbf. Since we don't emulate cache incoherent MMIO, just do nothing and move on. Reported-by: Ben Collins be...@servergy.com Signed-off-by: Alexander Graf ag...@suse.de Tested-by: Ben Collins be...@servergy.com --- arch/powerpc/kvm/emulate.c |2 ++ 1 files

[PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-17 Thread Alexander Graf
Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. Please pull. It contains a bug fix for an issue that Ben Collins ran into, where a guest would just abort because it traps during an unknown instruction. Alex The following changes since commit

[PATCH 1/1] KVM: PPC: Emulate dcbf

2013-01-17 Thread Alexander Graf
Guests can trigger MMIO exits using dcbf. Since we don't emulate cache incoherent MMIO, just do nothing and move on. Reported-by: Ben Collins be...@servergy.com Signed-off-by: Alexander Graf ag...@suse.de Tested-by: Ben Collins be...@servergy.com CC: sta...@vger.kernel.org ---

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); struct tlbe_priv *priv; - struct kvm_book3e_206_tlb_entry *gtlbe, stlbe; +

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); struct tlbe_priv *priv; -struct

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:20, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 =

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 06:29:56 PM, Alexander Graf wrote: On 18.01.2013, at 01:20, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: It also seems like it would be cleaner to just invalidate the old entry in tlbwe, and then this function doesn't need to change at all. I am a

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Scott Wood
On 01/17/2013 06:20:03 PM, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, { struct kvmppc_vcpu_e500 *vcpu_e500 =

Re: [PATCH 1/3] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
On 18.01.2013, at 01:47, Scott Wood wrote: On 01/17/2013 06:20:03 PM, Alexander Graf wrote: On 18.01.2013, at 01:11, Scott Wood wrote: On 01/17/2013 04:50:39 PM, Alexander Graf wrote: @@ -1024,9 +1001,11 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 eaddr, gpa_t gpaddr, {

[PATCH 4/6] KVM: PPC: e500: Call kvmppc_mmu_map for initial mapping

2013-01-17 Thread Alexander Graf
When emulating tlbwe, we want to automatically map the entry that just got written in our shadow TLB map, because chances are quite high that it's going to be used very soon. Today this happens explicitly, duplicating all the logic that is in kvmppc_mmu_map() already. Just call that one instead.

[PATCH 6/6] KVM: PPC: e500: Implement TLB1-in-TLB0 mapping

2013-01-17 Thread Alexander Graf
When a host mapping fault happens in a guest TLB1 entry today, we map the translated guest entry into the host's TLB1. This isn't particularly clever when the guest is mapped by normal 4k pages, since these would be a lot better to put into TLB0 instead. This patch adds the required logic to map

[PATCH v2 0/6] KVM: PPC: e500: Shadow TLB Improvements v2

2013-01-17 Thread Alexander Graf
This patch set improves the shadow TLB handling of our e500 target. The really important bit here is that with these patches applied, we can map guest TLB1 entries into the host's TLB0. This gives a significant performance improvement as you can see below. Alex v1 - v2: - new patch: Move

Re: [PATCH 2/6] KVM: PPC: E500: Explicitly mark shadow maps invalid

2013-01-17 Thread Scott Wood
On 01/17/2013 08:34:53 PM, Alexander Graf wrote: When we invalidate shadow TLB maps on the host, we don't mark them as not valid. But we should. Fix this by removing the E500_TLB_VALID from their flags when invalidating. Signed-off-by: Alexander Graf ag...@suse.de ---

  1   2   >