Re: [RFC 2/9] virtio-pci: support host notifiers in TCG mode

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 00:33, Nicholas A. Bellinger ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Normally host notifiers are only used together with vhost-net in KVM mode. It is occassionally useful to use vhost with TCG mode, mainly for testing and development. This isn't hard to

Re: [RFC 1/9] notifier: add validity check and notify function

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 00:33, Nicholas A. Bellinger ha scritto: +int event_notifier_notify(EventNotifier *e) +{ +uint64_t value = 1; +int r; + +assert(event_notifier_valid(e)); +r = write(e-fd, value, sizeof(value)); +if (r 0) { +return -errno; +} +assert(r

Re: [RFC 9/9] vhost-scsi: add -vhost-scsi host device

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 00:34, Nicholas A. Bellinger ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The virtio-scsi

Re: [RFC 7/9] virtio-scsi: Start/stop vhost

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 00:34, Nicholas A. Bellinger ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized,

Re: [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan qemul...@gmail.com wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com iohandler/bh/timer may use DeviceState when its refcnt=0, postpone the reclaimer till they have done with it. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com ---

Re: [RFC 7/9] virtio-scsi: Start/stop vhost

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 09:01, Paolo Bonzini ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized, which

Re: [RFC 6/9] virtio-scsi: Open and initialize /dev/vhost-scsi

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 00:34, Nicholas A. Bellinger ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Begin adding vhost support by opening /dev/vhost-scsi. (v2: Drop legacy -vhost_vqs[] usage) Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu

Re: [PATCH 5/5] e1000: using new interface--unmap to unplug

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan qemul...@gmail.com wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- hw/e1000.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/e1000.c

Re: [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 09:03, Stefan Hajnoczi ha scritto: From: Liu Ping Fan pingf...@linux.vnet.ibm.com iohandler/bh/timer may use DeviceState when its refcnt=0, It's not clear how to me. The only reference to devices from an iohandler/bh/timer can be in the opaque. Now, if you have a

Re: [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan qemul...@gmail.com wrote: @@ -3396,13 +3420,25 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, uint32_t val; target_phys_addr_t page; MemoryRegionSection *section; +Object *bk; while (len 0) {

Re: [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread liu ping fan
On Wed, Jul 25, 2012 at 3:43 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan qemul...@gmail.com wrote: @@ -3396,13 +3420,25 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, uint32_t val; target_phys_addr_t page;

Re: [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread liu ping fan
On Wed, Jul 25, 2012 at 3:37 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 25/07/2012 09:03, Stefan Hajnoczi ha scritto: From: Liu Ping Fan pingf...@linux.vnet.ibm.com iohandler/bh/timer may use DeviceState when its refcnt=0, It's not clear how to me. The only reference to devices from an

Re: [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread liu ping fan
On Wed, Jul 25, 2012 at 3:03 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan qemul...@gmail.com wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com iohandler/bh/timer may use DeviceState when its refcnt=0, postpone the reclaimer till they have

Re: [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 10:16, liu ping fan ha scritto: It's not clear how to me. The only reference to devices from an iohandler/bh/timer can be in the opaque. Now, if you have a iohandler/bh/timer whose opaque is a DeviceState, you should bump the refcount before setting it up, and unref after

Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree

2012-07-25 Thread Avi Kivity
On 07/25/2012 12:00 AM, a...@linux-foundation.org wrote: The patch titled Subject: ppc: e500_tlb memset clears nothing has been added to the -mm tree. Its filename is ppc-e500_tlb-memset-clears-nothing.patch The kvm tree is maintained. Alex, please pick up this patch; I guess

Re: [RFC 0/2] virtio: provide a way for host to monitor critical events in the device

2012-07-25 Thread Amit Shah
On (Wed) 25 Jul 2012 [10:06:37], Rusty Russell wrote: On Tue, 24 Jul 2012 15:01:59 +0200, Sasha Levin levinsasha...@gmail.com wrote: virtio on it's own was introduced to help solve the fragmentation around virtualized devices, so I don't think that the main purpose of doing virtio drivers

Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree

2012-07-25 Thread Alexander Graf
On 25.07.2012, at 10:32, Avi Kivity a...@redhat.com wrote: On 07/25/2012 12:00 AM, a...@linux-foundation.org wrote: The patch titled Subject: ppc: e500_tlb memset clears nothing has been added to the -mm tree. Its filename is ppc-e500_tlb-memset-clears-nothing.patch The kvm

Re: [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 05:31, Liu Ping Fan ha scritto: From: Liu Ping Fan pingf...@linux.vnet.ibm.com rwlock: qemu_device_tree_mutex rd side: --device_del(destruction of device will be postphoned until unplug ack from guest), --pci hot-unplug --iteration (qdev_reset_all) wr side:

Re: [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 10:12, liu ping fan ha scritto: +qemu_rwlock_rdlock_devtree(); section = phys_page_find(page TARGET_PAGE_BITS); +if (!(memory_region_is_ram(section-mr) || +memory_region_is_romd(section-mr)) !is_write) { +bk =

Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree

2012-07-25 Thread Avi Kivity
On 07/25/2012 12:00 PM, Alexander Graf wrote: On 25.07.2012, at 10:32, Avi Kivity a...@redhat.com wrote: On 07/25/2012 12:00 AM, a...@linux-foundation.org wrote: The patch titled Subject: ppc: e500_tlb memset clears nothing has been added to the -mm tree. Its filename is

Re: vhost-scsi port to v1.1.0 + MSI-X performance regression

2012-07-25 Thread Jan Kiszka
On 2012-07-24 22:20, Nicholas A. Bellinger wrote: On Tue, 2012-07-24 at 09:57 +0200, Jan Kiszka wrote: On 2012-07-24 09:42, Nicholas A. Bellinger wrote: Hi Anthony, Stefan QEMU folks, SNIP However, thus far I've not been able to get virtio-scsi - tcm_vhost I/O to actually work against

Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree

2012-07-25 Thread Alan Cox
Yeah, not sure what's going on here. Alan sent me the patch a while back in a private mail, so I asked him to resend it to the ML, so it's available for review. Next thing that happens is this mail a few weeks later. I don't recall seeing your your reply and I really wasn't sure where it

Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree

2012-07-25 Thread Alan Cox
I wonder how many such bugs a memzero()/bzero() will prevent. If the compiler-foo is possible with gcc then a 0 length constant memset warning and a warning if the set value is 255 would both probably be useful. Fortunately a lot of other validation/verification tools do pick it up already.

Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree

2012-07-25 Thread Avi Kivity
On 07/25/2012 01:12 PM, Alan Cox wrote: I wonder how many such bugs a memzero()/bzero() will prevent. If the compiler-foo is possible with gcc then a 0 length constant memset warning and a warning if the set value is 255 would both probably be useful. It's pretty easy with BUILD_BUG_ON(),

Re: [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread Avi Kivity
On 07/25/2012 06:31 AM, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com acquire device's refcnt with qemu_device_tree_mutex rwlock, so we can safely handle it when mmio dispatch. If in radix-tree, leaf is subpage, then move further step to acquire opaque which is the

Re: [PATCH 3/5] hotplug: introduce qdev_unplug_ack() to remove device from views

2012-07-25 Thread Avi Kivity
On 07/25/2012 06:31 AM, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com When guest confirm the removal of device, we should --unmap from MemoryRegion view --isolated from device tree view + +void qdev_unplug_ack(DeviceState *dev, Error **errp) +{ +

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Stefan Hajnoczi
On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org As requested by Anthony, here is a

Re: [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread Avi Kivity
On 07/25/2012 01:58 PM, Avi Kivity wrote: while (len 0) { page = addr TARGET_PAGE_MASK; l = (page + TARGET_PAGE_SIZE) - addr; if (l len) l = len; + +qemu_rwlock_rdlock_devtree(); section = phys_page_find(page

[PATCH] KVM: emulator: drop unneeded call to get_segment()

2012-07-25 Thread Gleb Natapov
setup_syscalls_segments() calls get_segment() and than overwrites all but one of the structure fields and this one should also be overwritten anyway, so we can drop call to get_segment() and avoid a couple of vmreads on vmx. Also drop zeroing ss/cs structures since most of the fields are set

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Avi Kivity
On 07/24/2012 11:45 PM, Nicholas A. Bellinger wrote: diff --git a/drivers/vhost/tcm_vhost.h b/drivers/vhost/tcm_vhost.h index e942df9..3d5378f 100644 --- a/drivers/vhost/tcm_vhost.h +++ b/drivers/vhost/tcm_vhost.h @@ -80,7 +80,17 @@ struct tcm_vhost_tport { #include linux/vhost.h

Re: [PATCH v9 12/16] ARM: KVM: World-switch implementation

2012-07-25 Thread Christoffer Dall
On Tue, Jul 3, 2012 at 12:07 PM, Avi Kivity a...@redhat.com wrote: On 07/03/2012 12:01 PM, Christoffer Dall wrote: Provides complete world-switch implementation to switch to other guests running in non-secure modes. Includes Hyp exception handlers that capture necessary exception information

virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 15:26, Boaz Harrosh ha scritto: In SCSI land most LLDs should support chaining just by virtu of using the for_each_sg macro. That all it takes. Your code above does support it. Yes, it supports it but still has to undo them before passing to virtio. What my LLD does is add a

[GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-25 Thread Alex Williamson
Hi Linus, This series includes the VFIO userspace driver interface for the 3.6 kernel merge window. This driver is intended to provide a secure interface for device access using IOMMU protection for applications like assignment of physical devices to virtual machines. Qemu will be the first

[PATCH 1/4] vfio: VFIO core

2012-07-25 Thread Alex Williamson
VFIO is a secure user level driver for use with both virtual machines and user level drivers. VFIO makes use of IOMMU groups to ensure the isolation of devices in use, allowing unprivileged user access. It's intended that VFIO will replace KVM device assignment and UIO drivers (in cases where

[PATCH 3/4] vfio: Type1 IOMMU implementation

2012-07-25 Thread Alex Williamson
This VFIO IOMMU backend is designed primarily for AMD-Vi and Intel VT-d hardware, but is potentially usable by anything supporting similar mapping functionality. We arbitrarily call this a Type1 backend for lack of a better name. This backend has no IOVA or host memory mapping restrictions for

Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-25 Thread Boaz Harrosh
On 07/25/2012 05:17 PM, Paolo Bonzini wrote: Il 25/07/2012 15:26, Boaz Harrosh ha scritto: In SCSI land most LLDs should support chaining just by virtu of using the for_each_sg macro. That all it takes. Your code above does support it. Yes, it supports it but still has to undo them before

Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 17:28, Boaz Harrosh ha scritto: 1) what I get is a scsi_cmnd which contains an N-element scatterlist. 2) virtio-scsi has to build the packet that is passed to the hardware (it does not matter that the hardware is virtual). This packet (per virtio-scsi spec) has an N+1-element

Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-25 Thread Boaz Harrosh
On 07/25/2012 08:43 PM, Paolo Bonzini wrote: Il 25/07/2012 17:28, Boaz Harrosh ha scritto: 1) what I get is a scsi_cmnd which contains an N-element scatterlist. 2) virtio-scsi has to build the packet that is passed to the hardware (it does not matter that the hardware is virtual). This

Re: [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-25 Thread Avi Kivity
On 07/25/2012 08:03 PM, Alex Williamson wrote: This adds PCI based device assignment to Qemu using the Linux VFIO userspace driver interface. After setting up VFIO device access, devices can be added to Qemu guests using the vfio-pci device option: -device vfio-pci,host=1:10.1,id=net0

[Bug 43328] VT-d/SR-IOV doesn't work in guest

2012-07-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=43328 Florian Mickler flor...@mickler.org changed: What|Removed |Added CC||flor...@mickler.org

Re: [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-25 Thread Alex Williamson
On Wed, 2012-07-25 at 22:30 +0300, Avi Kivity wrote: On 07/25/2012 08:03 PM, Alex Williamson wrote: This adds PCI based device assignment to Qemu using the Linux VFIO userspace driver interface. After setting up VFIO device access, devices can be added to Qemu guests using the vfio-pci

Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 21:16, Boaz Harrosh ha scritto: The picture confused me. It looked like the first element is the virtio_scsi_cmd_req not an sgilist-element that points to the struct's buffer. In that case then yes your plan of making a two-elements fragment that points to the original

Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-25 Thread Boaz Harrosh
On 07/25/2012 11:06 PM, Paolo Bonzini wrote: Il 25/07/2012 21:16, Boaz Harrosh ha scritto: The picture confused me. It looked like the first element is the virtio_scsi_cmd_req not an sgilist-element that points to the struct's buffer. In that case then yes your plan of making a

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 16:10 +0300, Avi Kivity wrote: On 07/24/2012 11:45 PM, Nicholas A. Bellinger wrote: diff --git a/drivers/vhost/tcm_vhost.h b/drivers/vhost/tcm_vhost.h index e942df9..3d5378f 100644 --- a/drivers/vhost/tcm_vhost.h +++ b/drivers/vhost/tcm_vhost.h @@ -80,7

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 02:14:50PM -0700, Nicholas A. Bellinger wrote: On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: On Tue, Jul 24, 2012 at

Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

2012-07-25 Thread Marcelo Tosatti
On Fri, Jul 20, 2012 at 04:29:08PM -0500, Scott Wood wrote: On 07/20/2012 12:00 AM, Bharat Bhushan wrote: This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_WDT) ioctl. The kernel timer are used for watchdog emulation and emulates

Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

2012-07-25 Thread Scott Wood
On 07/25/2012 03:37 PM, Marcelo Tosatti wrote: On Fri, Jul 20, 2012 at 04:29:08PM -0500, Scott Wood wrote: On 07/20/2012 12:00 AM, Bharat Bhushan wrote: This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_WDT) ioctl. The kernel timer

Re: [PATCH] KVM: PPC: BookE: HV: Fix compile

2012-07-25 Thread Michael Neuling
Alexander Graf ag...@suse.de wrote: After merging the register type check patches from Ben's tree, the hv enabled booke implementation ceased to compile. This patch fixes things up so everyone's happy again. Is there a defconfig which catches this? Mikey Signed-off-by: Alexander Graf

Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

2012-07-25 Thread Marcelo Tosatti
On Wed, Jul 25, 2012 at 06:55:16PM -0500, Scott Wood wrote: On 07/25/2012 03:37 PM, Marcelo Tosatti wrote: On Fri, Jul 20, 2012 at 04:29:08PM -0500, Scott Wood wrote: On 07/20/2012 12:00 AM, Bharat Bhushan wrote: This patch adds the watchdog emulation in KVM. The watchdog emulation is

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 23:35 +0100, Stefan Hajnoczi wrote: On Wed, Jul 25, 2012 at 02:14:50PM -0700, Nicholas A. Bellinger wrote: On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: On Mon, 2012-07-23 at 18:56

[PATCH v2 0/3] KVM: remove dummy pages

2012-07-25 Thread Xiao Guangrong
Changelog: correct some typos in the title/changelog. Currently, kvm allocates some pages (e.g: bad_page/fault_page) and use them as error indicators, it wastes memory and is not good for scalability. Base on Avi's suggestion, in this patchset, we introduce some error codes instead of these

[PATCH v2 1/3] KVM: MMU: use kvm_release_pfn_clean to release pfn

2012-07-25 Thread Xiao Guangrong
The current code depends on the fact that fault_page is the normal page, however, we will use the error code instead of these dummy pages in the later patch, so we use kvm_release_pfn_clean to release pfn which will release the error code properly Signed-off-by: Xiao Guangrong

[PATCH v2 2/3] KVM: use kvm_release_page_clean to release the page

2012-07-25 Thread Xiao Guangrong
In kvm_async_pf_wakeup_all, it uses bad_page to generate broadcast wakeup, and uses put_page to release bad_page, the work depends on the fact that bad_page is the normal page. But we will use the error code instead of bad_page, so use kvm_release_page_clean to release the page which will release

[PATCH v2 3/3] KVM: remove dummy pages

2012-07-25 Thread Xiao Guangrong
Currently, kvm allocates some pages and use them as error indicators, it wastes memory and is not good for scalability Base on Avi's suggestion, we use the error codes instead of these pages to indicate the error conditions Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com ---

[PATCH v2] KVM: x86: simplify read_emulated

2012-07-25 Thread Xiao Guangrong
No need split mmio read region into 8-bits pieces since we do it in emulator_read_write_onepage Changelog: Add a WARN_ON to check read-cache overflow Acked-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/emulate.c | 31

[PATCH 1/2] KVM: PPC: booke: Allow multiple exception types

2012-07-25 Thread Bharat Bhushan
Current kvmppc_booke_handlers uses the same macro (KVM_HANDLER) and all handlers are considered to be the same size. This will not be the case if we want to use different macros for different handlers. This patch improves the kvmppc_booke_handler so that it can support different macros for

[PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support

2012-07-25 Thread Bharat Bhushan
This patch adds: 1) KVM debug handler added for e500v2. 2) Guest debug by qemu gdb stub. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Varun Sethi varun.se...@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com

Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

2012-07-25 Thread Marcelo Tosatti
On Fri, Jul 20, 2012 at 04:29:08PM -0500, Scott Wood wrote: On 07/20/2012 12:00 AM, Bharat Bhushan wrote: This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_WDT) ioctl. The kernel timer are used for watchdog emulation and emulates

Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

2012-07-25 Thread Scott Wood
On 07/25/2012 03:37 PM, Marcelo Tosatti wrote: On Fri, Jul 20, 2012 at 04:29:08PM -0500, Scott Wood wrote: On 07/20/2012 12:00 AM, Bharat Bhushan wrote: This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_WDT) ioctl. The kernel timer

Re: [PATCH] KVM: PPC: BookE: HV: Fix compile

2012-07-25 Thread Michael Neuling
Alexander Graf ag...@suse.de wrote: After merging the register type check patches from Ben's tree, the hv enabled booke implementation ceased to compile. This patch fixes things up so everyone's happy again. Is there a defconfig which catches this? Mikey Signed-off-by: Alexander Graf

Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

2012-07-25 Thread Marcelo Tosatti
On Wed, Jul 25, 2012 at 06:55:16PM -0500, Scott Wood wrote: On 07/25/2012 03:37 PM, Marcelo Tosatti wrote: On Fri, Jul 20, 2012 at 04:29:08PM -0500, Scott Wood wrote: On 07/20/2012 12:00 AM, Bharat Bhushan wrote: This patch adds the watchdog emulation in KVM. The watchdog emulation is

[PATCH 1/2] Header update for guest debug suuport

2012-07-25 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- linux-headers/asm-powerpc/kvm.h | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kvm.h index 1bea4d8..da71c84 100644

[PATCH 2/2] Add guest debug support

2012-07-25 Thread Bharat Bhushan
This patch add support for guest debugging with qemu gdbstub. Now hardware breakpoint and watchpoint can be set/unset. This patch also support for software beakpoint. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- hw/ppc/e500.c|3 + target-ppc/kvm.c | 242

[PATCH 1/2] KVM: PPC: booke: Allow multiple exception types

2012-07-25 Thread Bharat Bhushan
Current kvmppc_booke_handlers uses the same macro (KVM_HANDLER) and all handlers are considered to be the same size. This will not be the case if we want to use different macros for different handlers. This patch improves the kvmppc_booke_handler so that it can support different macros for

[PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support

2012-07-25 Thread Bharat Bhushan
This patch adds: 1) KVM debug handler added for e500v2. 2) Guest debug by qemu gdb stub. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Varun Sethi varun.se...@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com