[PATCH V5 1/4] block: Introduce __blk_segment_map_sg() helper

2012-08-02 Thread Asias He
Split the mapping code in blk_rq_map_sg() to a helper __blk_segment_map_sg(), so that other mapping function, e.g. blk_bio_map_sg(), can share the code. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Jens Axboe ax...@kernel.dk Cc: Christoph Hellwig h...@lst.de Cc: Tejun Heo t...@kernel.org Cc:

[PATCH V5 2/4] block: Add blk_bio_map_sg() helper

2012-08-02 Thread Asias He
Add a helper to map a bio to a scatterlist, modelled after blk_rq_map_sg. This helper is useful for any driver that wants to create a scatterlist from its -make_request_fn method. Changes in v2: - Use __blk_segment_map_sg to avoid duplicated code - Add cocbook style function comment Cc: Rusty

[PATCH V5 3/4] virtio-blk: Add bio-based IO path for virtio-blk

2012-08-02 Thread Asias He
This patch introduces bio-based IO path for virtio-blk. Compared to request-based IO path, bio-based IO path uses driver provided -make_request_fn() method to bypasses the IO scheduler. It handles the bio to device directly without allocating a request in block layer. This reduces the IO path in

[PATCH V5 4/4] virtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path

2012-08-02 Thread Asias He
We need to support both REQ_FLUSH and REQ_FUA for bio based path since it does not get the sequencing of REQ_FUA into REQ_FLUSH that request based drivers can request. REQ_FLUSH is emulated by: 1. Send VIRTIO_BLK_T_FLUSH to device 2. Wait until the flush is finished REQ_FUA is emulated by: 1.

[PATCH V5 0/4] Improve virtio-blk performance

2012-08-02 Thread Asias He
Hi folks, This version added REQ_FLUSH and REQ_FUA support as suggested by Christoph and rebased against latest linus's tree. Jens, could you please consider picking up the dependencies 1/4 and 2/4 in your tree. Thanks! This patchset implements bio-based IO path for virito-blk to improve

Re: [PATCH V3 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-08-02 Thread Asias He
On 07/30/2012 09:44 PM, Christoph Hellwig wrote: On Mon, Jul 30, 2012 at 09:31:06AM +0200, Paolo Bonzini wrote: You only need to add REQ_FLUSH support. The virtio-blk protocol does not support REQ_FUA, because there's no easy way to do it in userspace. A bio-based driver needs to handle both

Re: [PATCH V5 4/4] virtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path

2012-08-02 Thread Christoph Hellwig
On Thu, Aug 02, 2012 at 02:25:56PM +0800, Asias He wrote: We need to support both REQ_FLUSH and REQ_FUA for bio based path since it does not get the sequencing of REQ_FUA into REQ_FLUSH that request based drivers can request. REQ_FLUSH is emulated by: 1. Send VIRTIO_BLK_T_FLUSH to device

Re: [PATCH V5 4/4] virtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path

2012-08-02 Thread Asias He
On 08/02/2012 02:27 PM, Christoph Hellwig wrote: On Thu, Aug 02, 2012 at 02:25:56PM +0800, Asias He wrote: We need to support both REQ_FLUSH and REQ_FUA for bio based path since it does not get the sequencing of REQ_FUA into REQ_FLUSH that request based drivers can request. REQ_FLUSH is

Re: [PATCH] Documentation/kvm : Add documentation on Hypercalls

2012-08-02 Thread Raghavendra K T
On 08/01/2012 11:55 PM, Marcelo Tosatti wrote: On Wed, Aug 01, 2012 at 04:19:01PM +0530, Raghavendra K T wrote: On 08/01/2012 08:37 AM, Marcelo Tosatti wrote: On Tue, Jul 24, 2012 at 02:23:59PM +0530, Raghavendra K T wrote: From: Raghavendra K Traghavendra...@linux.vnet.ibm.com Thanks Alex

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-02 Thread Michael S. Tsirkin
On Mon, Jul 30, 2012 at 07:12:15PM -0600, Alex Williamson wrote: kvm_eoifd.fd specifies the eventfd used for +notification. KVM_EOIFD_FLAG_DEASSIGN is used to de-assign an eoifd +once assigned. KVM_EOIFD also requires additional bits set in +kvm_eoifd.flags

Re: [PATCH 1/3] vfio: Import vfio kernel header

2012-08-02 Thread Jan Kiszka
On 2012-08-01 20:09, Alex Williamson wrote: On Wed, 2012-08-01 at 09:13 +0200, Jan Kiszka wrote: On 2012-08-01 07:18, Alex Williamson wrote: +#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14) + +#endif /* VFIO_H */ Please patch update-linux-headers.sh and let it do its work

Re: [PATCH 3/3] vfio: Enable vfio-pci and mark supported

2012-08-02 Thread Jan Kiszka
On 2012-08-01 21:40, Alex Williamson wrote: On Wed, 2012-08-01 at 12:14 -0600, Alex Williamson wrote: On Wed, 2012-08-01 at 09:15 +0200, Jan Kiszka wrote: On 2012-08-01 07:18, Alex Williamson wrote: Signed-off-by: Alex Williamson alex.william...@redhat.com --- MAINTAINERS |5

[ANNOUNCE] kvm-kmod-3.5

2012-08-02 Thread Jan Kiszka
Here comes the kvm-kmod that corresponds to kernel 3.5. The package is available from http://sourceforge.net/projects/kvm/files/kvm-kmod/3.5/kvm-kmod-3.5.tar.bz2/download See [1] for further details on kvm-kmod. Major KVM changes since kvm-kmod-3.4: - additional instruction emulation -

Re: [PATCH] Documentation/kvm : Add documentation on Hypercalls

2012-08-02 Thread Alexander Graf
On 02.08.2012, at 09:08, Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: On 08/01/2012 11:55 PM, Marcelo Tosatti wrote: On Wed, Aug 01, 2012 at 04:19:01PM +0530, Raghavendra K T wrote: On 08/01/2012 08:37 AM, Marcelo Tosatti wrote: On Tue, Jul 24, 2012 at 02:23:59PM +0530,

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Alexander Graf
Avi, Marcelo, Jan? Any thoughts on this? Alex On 01.08.2012, at 05:17, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to make sure we are on the right track first

Re: [regression] virtio net locks up

2012-08-02 Thread Stefan Hajnoczi
On Wed, Aug 1, 2012 at 6:05 PM, Bernd Schubert bernd.schub...@itwm.fraunhofer.de wrote: On 07/31/2012 12:23 PM, Stefan Hajnoczi wrote: On Mon, Jul 30, 2012 at 7:08 PM, Bernd Schubert I took a quick glance where skb_recv_done is registered at all and traced it back to vp_find_vqs().

Re: [PATCH 0/3] KVM: Integrate rmap and rmap_pde

2012-08-02 Thread Avi Kivity
On 08/01/2012 11:59 AM, Takuya Yoshikawa wrote: This has been already discussed on other threads and the concept itself is not so controversial. Looks good. But since I know that the last patch of this series conflicts with Paul's recent work, I want to find a way to synchronize with his

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Benjamin Herrenschmidt
On Thu, 2012-08-02 at 12:46 +0200, Alexander Graf wrote: Avi, Marcelo, Jan? Any thoughts on this? Had a chat with Anthony and it looks like we can do it using the MP state stuff which we don't currently use on powerpc, at least it seems that's how x86 breaks IO emulation on reset. Cheers, Ben.

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Avi Kivity
On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to make sure we are on the right track first before proposing an actual patch as we would like

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Alexander Graf
On 02.08.2012, at 14:35, Avi Kivity wrote: On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to make sure we are on the right track first before

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Avi Kivity
On 08/02/2012 03:59 PM, Alexander Graf wrote: On 02.08.2012, at 14:35, Avi Kivity wrote: On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to

Re: [PATCH 8/9] KVM: do not release the error pfn

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:18:58PM +0800, Xiao Guangrong wrote: After commit a2766325cf9f9, the error pfn is replaced by the error code, it need not be released anymore [ The patch is compiling tested for powerpc ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com ---

Re: [PATCH 4/9] KVM: define kvm_bad_pfn statically

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:14:25PM +0800, Xiao Guangrong wrote: Then, remove get_bad_pfn Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h |1 + virt/kvm/kvm_main.c |7 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff

Re: [PATCH 2/9] KVM: define kvm_fault_pfn statically

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:12:58PM +0800, Xiao Guangrong wrote: After that, the exported and un-inline function, get_fault_pfn, can be removed Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |2 +- include/linux/kvm_host.h |3 ++-

Re: [PATCH 3/9] KVM: define kvm_hwpoison_pfn statically

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:13:41PM +0800, Xiao Guangrong wrote: Then, get_hwpoison_pfn and is_hwpoison_pfn can be removed Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |2 +- include/linux/kvm_host.h |4 ++-- virt/kvm/kvm_main.c |

Re: [PATCH 7/9] KVM: define kvm_bad_page statically

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:16:28PM +0800, Xiao Guangrong wrote: It is used to eliminate the overload of function call and cleanup the code Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h |9 +++-- virt/kvm/async_pf.c |2 +-

[PATCH 1/2] kvm tools: prevent guest softlockup errors when pausing

2012-08-02 Thread Sasha Levin
Use the new KVM_KVMCLOCK_CTRL ioctl to prevent guests from wrongfully detecting lockups when in fact they were paused. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/kvm/builtin-run.c

[PATCH 2/2] kvm tools: inject MSI directly without going through a GSI

2012-08-02 Thread Sasha Levin
Use the new KVM_SIGNAL_MSI ioctl to inject interrupts directly. We still create GSIs and keep them for two reasons: - They're required by virtio-* devices. - There's not much overhead since we just create them when starting the guest, they don't use anything when the guest is running.

KVM-INTEL: Add new module vmcsinfo-intel to fill VMCSINFO

2012-08-02 Thread Krishna J
I applied the v5_1/3, v5_2/3 and v5_3/3 KVM-INTEL: Add new module vmcsinfo-intel to fill VMCSINFO patch to the 3.2.14-rt24+ kernel. I am getting some missing deceleration error. Do i need to apply any other patch before using the VMCSINFO patch. 

Re: Nested kvm_intel broken on pre 3.3 hosts

2012-08-02 Thread Stefan Bader
I started to pick #7 (#6 is in to have things in-sync between SVM and VMX). Most other patches then were needed as dependencies. The only difference here is #2 which I found being applied together with #1 (which is a dependency). Since #2 is rather change to add support than to fix a bug it was

[PATCH 1/7] KVM: Move cpuid code to new file

2012-08-02 Thread Stefan Bader
From: Avi Kivity a...@redhat.com commit 00b27a3efb116062ca5a276ad5cb01ea1b80b5f6 upstream The cpuid code has grown; put it into a separate file. Signed-off-by: Avi Kivity a...@redhat.com BugLink: http://bugs.launchpad.net/bugs/960466 (cherry picked from commit

[PATCH 2/7] KVM: expose latest Intel cpu new features (BMI1/BMI2/FMA/AVX2) to guest

2012-08-02 Thread Stefan Bader
From: Liu, Jinsong jinsong@intel.com commit fb215366b3c7320ac25dca766a0152df16534932 upstream Intel latest cpu add 6 new features, refer http://software.intel.com/file/36945 The new feature cpuid listed as below: 1. FMA CPUID.EAX=01H:ECX.FMA[bit 12] 2. MOVBE

[PATCH 6/7] KVM: SVM: Intercept RDPMC

2012-08-02 Thread Stefan Bader
From: Avi Kivity a...@redhat.com commit 332b56e4841ef62db4dbf1b4b92195575e1c7338 upstream Intercept RDPMC and forward it to the PMU emulation code. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com BugLink:

[PATCH 5/7] KVM: Add generic RDPMC support

2012-08-02 Thread Stefan Bader
From: Avi Kivity a...@redhat.com commit 022cd0e84020eec8b589bc119699c935c7b29584 upstream Add a helper function that emulates the RDPMC instruction operation. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com

[PATCH 7/7] KVM: VMX: Intercept RDPMC

2012-08-02 Thread Stefan Bader
From: Avi Kivity a...@redhat.com commit fee84b079d5ddee2247b5c1f53162c330c622902 upstream Intercept RDPMC and forward it to the PMU emulation code. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com BugLink:

[PATCH 4/7] KVM: Expose a version 2 architectural PMU to a guests

2012-08-02 Thread Stefan Bader
From: Gleb Natapov g...@redhat.com commit f5132b01386b5a67f1ff673bb2b96a507a3f7e41 upstream Use perf_events to emulate an architectural PMU, version 2. Based on PMU version 1 emulation by Avi Kivity. [avi: adjust for cpuid.c] [jan: fix anonymous field initialization for older gcc]

[PATCH 3/7] KVM: Expose kvm_lapic_local_deliver()

2012-08-02 Thread Stefan Bader
From: Avi Kivity a...@redhat.com commit 893420822192f717af6fde927c9e78c9b82f8327 upstream Needed to deliver performance monitoring interrupts. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com BugLink:

Re: Nested kvm_intel broken on pre 3.3 hosts

2012-08-02 Thread Avi Kivity
On 08/02/2012 06:19 PM, Stefan Bader wrote: I started to pick #7 (#6 is in to have things in-sync between SVM and VMX). Most other patches then were needed as dependencies. The only difference here is #2 which I found being applied together with #1 (which is a dependency). Since #2 is rather

KVM: x86: fix pvclock guest stopped flag reporting

2012-08-02 Thread Marcelo Tosatti
kvm_guest_time_update unconditionally clears hv_clock.flags field, so the notification never reaches the guest. Fix it by allowing PVCLOCK_GUEST_STOPPED to passthrough. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

Re: KVM: x86: fix pvclock guest stopped flag reporting

2012-08-02 Thread Avi Kivity
On 08/02/2012 06:33 PM, Marcelo Tosatti wrote: kvm_guest_time_update unconditionally clears hv_clock.flags field, so the notification never reaches the guest. Fix it by allowing PVCLOCK_GUEST_STOPPED to passthrough. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

Re: KVM: x86: fix pvclock guest stopped flag reporting

2012-08-02 Thread Marcelo Tosatti
On Thu, Aug 02, 2012 at 06:42:25PM +0300, Avi Kivity wrote: On 08/02/2012 06:33 PM, Marcelo Tosatti wrote: kvm_guest_time_update unconditionally clears hv_clock.flags field, so the notification never reaches the guest. Fix it by allowing PVCLOCK_GUEST_STOPPED to passthrough.

Re: KVM: x86: fix pvclock guest stopped flag reporting

2012-08-02 Thread Avi Kivity
On 08/02/2012 06:43 PM, Marcelo Tosatti wrote: On Thu, Aug 02, 2012 at 06:42:25PM +0300, Avi Kivity wrote: On 08/02/2012 06:33 PM, Marcelo Tosatti wrote: kvm_guest_time_update unconditionally clears hv_clock.flags field, so the notification never reaches the guest. Fix it by

RE: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, August 01, 2012 11:31 PM To: Bhushan Bharat-R65777 Cc: Alexander Graf; qemu-...@nongnu.org List; kvm-...@vger.kernel.org; qemu- devel qemu-devel; KVM list Subject: Re: [PATCH 4/4] Enable kvm emulated watchdog On

Re: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Alexander Graf
On 01.08.2012, at 19:27, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, August 01, 2012 7:57 AM To: Bhushan Bharat-R65777 Cc: qemu-...@nongnu.org List; kvm-...@vger.kernel.org; Bhushan Bharat-R65777; qemu-devel

Re: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Alexander Graf
On 01.08.2012, at 19:36, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, August 01, 2012 7:57 AM To: Bhushan Bharat-R65777 Cc: qemu-...@nongnu.org List; kvm-...@vger.kernel.org; Bhushan Bharat-R65777; qemu-devel

Re: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Alexander Graf
On 01.08.2012, at 20:00, Scott Wood wrote: On 08/01/2012 12:27 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, August 01, 2012 7:57 AM To: Bhushan Bharat-R65777 Cc: qemu-...@nongnu.org List;

Re: KVM: x86: fix pvclock guest stopped flag reporting

2012-08-02 Thread Marcelo Tosatti
On Thu, Aug 02, 2012 at 12:43:58PM -0300, Marcelo Tosatti wrote: On Thu, Aug 02, 2012 at 06:42:25PM +0300, Avi Kivity wrote: On 08/02/2012 06:33 PM, Marcelo Tosatti wrote: kvm_guest_time_update unconditionally clears hv_clock.flags field, so the notification never reaches the guest.

Re: [PATCH 1/3] vfio: Import vfio kernel header

2012-08-02 Thread Alex Williamson
On Thu, 2012-08-02 at 11:02 +0200, Jan Kiszka wrote: On 2012-08-01 20:09, Alex Williamson wrote: On Wed, 2012-08-01 at 09:13 +0200, Jan Kiszka wrote: On 2012-08-01 07:18, Alex Williamson wrote: +#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14) + +#endif /* VFIO_H */

Re: [PATCH 1/3] vfio: Import vfio kernel header

2012-08-02 Thread Jan Kiszka
On 2012-08-02 18:37, Alex Williamson wrote: On Thu, 2012-08-02 at 11:02 +0200, Jan Kiszka wrote: On 2012-08-01 20:09, Alex Williamson wrote: On Wed, 2012-08-01 at 09:13 +0200, Jan Kiszka wrote: On 2012-08-01 07:18, Alex Williamson wrote: +#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE

[PATCH v2 0/4] VFIO-based PCI device assignment for QEMU 1.2

2012-08-02 Thread Alex Williamson
v2: - Update kernel header update script - Pull in all changes as a result of that - Note that vfio.h is non yet and installed header, but I'll fix that on my next kernel vfio pull request. - New tag for v2 as noted below. Thanks, Alex VFIO kernel support was just merged into Linux, so

[PATCH v2 1/4] Update kernel header script to include vfio

2012-08-02 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- scripts/update-linux-headers.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 9d2a4bc..270d32b 100755 ---

[PATCH v2 4/4] vfio: Enable vfio-pci and mark supported

2012-08-02 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- MAINTAINERS |5 + configure | 12 hw/i386/Makefile.objs |1 + 3 files changed, 18 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2d219d2..9680d69 100644 --- a/MAINTAINERS

[PATCH v2 2/4] Update Linux kernel headers

2012-08-02 Thread Alex Williamson
Based on Linux as of 1a9b4993. Note that vfio.h isn't yet an installed header at this commit, but will be fixed soon. Signed-off-by: Alex Williamson alex.william...@redhat.com --- linux-headers/asm-s390/kvm.h |2 linux-headers/asm-s390/kvm_para.h |2 linux-headers/asm-x86/kvm.h

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Benjamin Herrenschmidt
On Thu, 2012-08-02 at 15:35 +0300, Avi Kivity wrote: This is actually documented in api.txt, though not in relation to reset: NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO and KVM_EXIT_OSI, the corresponding operations are complete (and guest state is consistent) only after userspace has

Re: [GIT PULL] tcm_vhost: Initial merge of vhost level target fabric driver

2012-08-02 Thread Nicholas A. Bellinger
Hi Linus, Ping on the initial tcm_vhost merge for-3.6..? I know it's been a busier than usual merge window, but hopefully this one is still in your PULL queue.. Otherwise if there is something else that you'd like to see different from this PULL request, please let us know. Thank you! --nab

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Benjamin Herrenschmidt
On Thu, 2012-08-02 at 16:05 +0300, Avi Kivity wrote: Yeah, we stumbled over this chunk as well. So you're saying we should delay the reset by invoking a self-signal if we're in such an operation? Yes. Qemu of course already supports this for migration, so it should be easy to add. Adding

Re: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Scott Wood
On 08/02/2012 10:56 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Wednesday, August 01, 2012 11:31 PM To: Bhushan Bharat-R65777 Cc: Alexander Graf; qemu-...@nongnu.org List; kvm-...@vger.kernel.org; qemu- devel qemu-devel; KVM list Subject:

Re: [PATCHv5 1/4] Provide userspace IO exit completion callback.

2012-08-02 Thread Marcelo Tosatti
On Mon, Jul 30, 2012 at 05:38:18PM +0300, Gleb Natapov wrote: int r; @@ -5554,9 +5568,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) } } - r = complete_mmio(vcpu); - if (r = 0) - goto out; + if

Re: [PATCH v3 6/8] KVM-HV: Add flush_on_enter before guest enter

2012-08-02 Thread Marcelo Tosatti
On Thu, Aug 02, 2012 at 05:14:02PM -0300, Marcelo Tosatti wrote: On Tue, Jul 31, 2012 at 04:19:02PM +0530, Nikunj A. Dadhania wrote: From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com PV-Flush guest would indicate to flush on enter, flush the TLB before entering and exiting the guest.

Re: [PATCH v3 4/8] KVM-HV: Add VCPU running/pre-empted state for guest

2012-08-02 Thread Marcelo Tosatti
On Tue, Jul 31, 2012 at 04:18:41PM +0530, Nikunj A. Dadhania wrote: From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com Hypervisor code to indicate guest running/pre-empteded status through msr. The page is now pinned during MSR write time and use kmap_atomic/kunmap_atomic to access the

Attaching audio CD to VM instance

2012-08-02 Thread Erik Lotspeich
Hi, I haven't seen this question asked before. Is it possible to mount an audio CD is a raw mode to that a VM instance can access the audio tracks as if it were a physical CD-ROM drive? It seems that the current implementation presents a CD-ROM to the VM, not CD-DA. Thanks! Regards Erik -- To

Re: [PATCH 02/10] nEPT: Add EPT tables support to paging_tmpl.h

2012-08-02 Thread Nadav Har'El
On Thu, Aug 02, 2012, Xiao Guangrong wrote about Re: [PATCH 02/10] nEPT: Add EPT tables support to paging_tmpl.h: + #ifdef CONFIG_X86_64 + #define PT_MAX_FULL_LEVELS 4 + #define CMPXCHG cmpxchg + #else + #define CMPXCHG cmpxchg64 + #define PT_MAX_FULL_LEVELS 2 + #endif

Re: [PATCH V5 0/4] Improve virtio-blk performance

2012-08-02 Thread Jens Axboe
On 08/02/2012 08:25 AM, Asias He wrote: Hi folks, This version added REQ_FLUSH and REQ_FUA support as suggested by Christoph and rebased against latest linus's tree. Jens, could you please consider picking up the dependencies 1/4 and 2/4 in your tree. Thanks! Pickedup, thanks for

Re: [PATCH V5 3/4] virtio-blk: Add bio-based IO path for virtio-blk

2012-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2012 at 02:25:55PM +0800, Asias He wrote: diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index c0bbeb4..95cfeed 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -14,6 +14,9 @@ #define PART_BITS 4 +static bool use_bio;

Re: [RFC PATCH 3/3] KVM: Push rmap into kvm_arch_memory_slot

2012-08-02 Thread Paul Mackerras
On Wed, Aug 01, 2012 at 06:03:28PM +0900, Takuya Yoshikawa wrote: Two reasons: - x86 can integrate rmap and rmap_pde and remove heuristics in __gfn_to_rmap(). - Some architectures do not need rmap. Since rmap is one of the most memory consuming stuff in KVM, ppc'd better restrict the

Re: [PATCH 4/9] KVM: define kvm_bad_pfn statically

2012-08-02 Thread Paul Mackerras
On Thu, Aug 02, 2012 at 10:15:27AM -0300, Marcelo Tosatti wrote: Remind me what is the guarantee that -Exxx does not clash with a valid pfn number? A pfn number is an address PAGE_SHIFT, so it will have the top 12 (at least) bits clear, whereas -Exxx will have the top bit set. Paul. -- To

RE: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Friday, August 03, 2012 2:02 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; Alexander Graf; qemu-...@nongnu.org List; kvm- p...@vger.kernel.org; qemu-devel qemu-devel; KVM list Subject: Re: [PATCH 4/4] Enable kvm emulated

Re: KVM-INTEL: Add new module vmcsinfo-intel to fill VMCSINFO

2012-08-02 Thread Zhang Yanfei
于 2012年08月02日 22:30, Krishna J 写道: I applied the v5_1/3, v5_2/3 and v5_3/3 KVM-INTEL: Add new module vmcsinfo-intel to fill VMCSINFO patch to the 3.2.14-rt24+ kernel. I am getting some missing deceleration error. Do i need to apply any other patch before using the VMCSINFO patch.

Re: [PATCH v3 4/8] KVM-HV: Add VCPU running/pre-empted state for guest

2012-08-02 Thread Nikunj A Dadhania
On Thu, 2 Aug 2012 16:56:28 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 31, 2012 at 04:18:41PM +0530, Nikunj A. Dadhania wrote: From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com Hypervisor code to indicate guest running/pre-empteded status through msr. The page is now

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

2012-08-02 Thread Bharat Bhushan
This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_BOOKE_WATCHDOG) ioctl. The kernel timer are used for watchdog emulation and emulates h/w watchdog state machine. On watchdog timer expiry, it exit to QEMU if TCR.WRC is non ZERO. QEMU can

[PATCH 2/2] Unified the kvm requests in one function

2012-08-02 Thread Bharat Bhushan
I am sending this as a separate patch for easiness on review. Once reviewed I will merge this with watchdog patch. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 63 +++--- 1 files changed, 37 insertions(+), 26

Re: [PATCH v3 6/8] KVM-HV: Add flush_on_enter before guest enter

2012-08-02 Thread Nikunj A Dadhania
On Thu, 2 Aug 2012 17:16:41 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Thu, Aug 02, 2012 at 05:14:02PM -0300, Marcelo Tosatti wrote: On Tue, Jul 31, 2012 at 04:19:02PM +0530, Nikunj A. Dadhania wrote: From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com static void

Re: [PATCH v3 4/8] KVM-HV: Add VCPU running/pre-empted state for guest

2012-08-02 Thread Nikunj A Dadhania
On Thu, 2 Aug 2012 16:56:28 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: + case MSR_KVM_VCPU_STATE: + vcpu-arch.v_state.vs_page = gfn_to_page(vcpu-kvm, data PAGE_SHIFT); + vcpu-arch.v_state.vs_offset = data ~(PAGE_MASK | KVM_MSR_ENABLED); Assign

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Alexander Graf
Avi, Marcelo, Jan? Any thoughts on this? Alex On 01.08.2012, at 05:17, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to make sure we are on the right track first

Re: [PATCH 0/3] KVM: Integrate rmap and rmap_pde

2012-08-02 Thread Avi Kivity
On 08/01/2012 11:59 AM, Takuya Yoshikawa wrote: This has been already discussed on other threads and the concept itself is not so controversial. Looks good. But since I know that the last patch of this series conflicts with Paul's recent work, I want to find a way to synchronize with his

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Benjamin Herrenschmidt
On Thu, 2012-08-02 at 12:46 +0200, Alexander Graf wrote: Avi, Marcelo, Jan? Any thoughts on this? Had a chat with Anthony and it looks like we can do it using the MP state stuff which we don't currently use on powerpc, at least it seems that's how x86 breaks IO emulation on reset. Cheers, Ben.

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Avi Kivity
On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to make sure we are on the right track first before proposing an actual patch as we would like

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Alexander Graf
On 02.08.2012, at 14:35, Avi Kivity wrote: On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to make sure we are on the right track first before

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Avi Kivity
On 08/02/2012 03:59 PM, Alexander Graf wrote: On 02.08.2012, at 14:35, Avi Kivity wrote: On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to

RE: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, August 01, 2012 11:31 PM To: Bhushan Bharat-R65777 Cc: Alexander Graf; qemu-...@nongnu.org List; kvm-ppc@vger.kernel.org; qemu- devel qemu-devel; KVM list Subject: Re: [PATCH 4/4] Enable kvm emulated watchdog On

Re: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Alexander Graf
On 01.08.2012, at 19:27, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, August 01, 2012 7:57 AM To: Bhushan Bharat-R65777 Cc: qemu-...@nongnu.org List; kvm-ppc@vger.kernel.org; Bhushan Bharat-R65777; qemu-devel

Re: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Alexander Graf
On 01.08.2012, at 19:36, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, August 01, 2012 7:57 AM To: Bhushan Bharat-R65777 Cc: qemu-...@nongnu.org List; kvm-ppc@vger.kernel.org; Bhushan Bharat-R65777; qemu-devel

Re: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Alexander Graf
On 01.08.2012, at 20:00, Scott Wood wrote: On 08/01/2012 12:27 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, August 01, 2012 7:57 AM To: Bhushan Bharat-R65777 Cc: qemu-...@nongnu.org List;

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Benjamin Herrenschmidt
On Thu, 2012-08-02 at 15:35 +0300, Avi Kivity wrote: This is actually documented in api.txt, though not in relation to reset: NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO and KVM_EXIT_OSI, the corresponding operations are complete (and guest state is consistent) only after userspace has

Re: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Scott Wood
On 08/02/2012 10:56 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Wednesday, August 01, 2012 11:31 PM To: Bhushan Bharat-R65777 Cc: Alexander Graf; qemu-...@nongnu.org List; kvm-ppc@vger.kernel.org; qemu- devel qemu-devel; KVM list Subject:

Re: [RFC PATCH 3/3] KVM: Push rmap into kvm_arch_memory_slot

2012-08-02 Thread Paul Mackerras
On Wed, Aug 01, 2012 at 06:03:28PM +0900, Takuya Yoshikawa wrote: Two reasons: - x86 can integrate rmap and rmap_pde and remove heuristics in __gfn_to_rmap(). - Some architectures do not need rmap. Since rmap is one of the most memory consuming stuff in KVM, ppc'd better restrict the

RE: [PATCH 4/4] Enable kvm emulated watchdog

2012-08-02 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Friday, August 03, 2012 2:02 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; Alexander Graf; qemu-...@nongnu.org List; kvm- p...@vger.kernel.org; qemu-devel qemu-devel; KVM list Subject: Re: [PATCH 4/4] Enable kvm emulated

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

2012-08-02 Thread Bharat Bhushan
This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_BOOKE_WATCHDOG) ioctl. The kernel timer are used for watchdog emulation and emulates h/w watchdog state machine. On watchdog timer expiry, it exit to QEMU if TCR.WRC is non ZERO. QEMU can

[PATCH 2/2] Unified the kvm requests in one function

2012-08-02 Thread Bharat Bhushan
I am sending this as a separate patch for easiness on review. Once reviewed I will merge this with watchdog patch. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 63 +++--- 1 files changed, 37 insertions(+), 26