[PATCH 4/5] powerpc: bitops: Introduce {clear,set}_bit_le()

2012-08-07 Thread Takuya Yoshikawa
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Needed to replace test_and_set_bit_le() in virt/kvm/kvm_main.c which is being used for this missing function. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Acked-by: Benjamin Herrenschmidt b...@kernel.crashing.org ---

[PATCH 5/5] KVM: Replace test_and_set_bit_le() in mark_page_dirty_in_slot() with set_bit_le()

2012-08-07 Thread Takuya Yoshikawa
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Now that we have defined generic set_bit_le() we do not need to use test_and_set_bit_le() for atomically setting a bit. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti

Re: [PATCHv5 4/4] KVM: emulator: optimize rep ins handling.

2012-08-07 Thread Gleb Natapov
On Mon, Aug 06, 2012 at 03:08:28PM +0300, Avi Kivity wrote: On 08/06/2012 02:49 PM, Gleb Natapov wrote: On Mon, Aug 06, 2012 at 02:39:52PM +0300, Avi Kivity wrote: On 08/06/2012 02:05 PM, Gleb Natapov wrote: On Mon, Aug 06, 2012 at 12:28:05PM +0300, Avi Kivity wrote: On 08/06/2012 11:58

Re: KVM: x86: fix pvclock guest stopped flag reporting (v2)

2012-08-07 Thread Amit Shah
On (Fri) 03 Aug 2012 [15:57:49], 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

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

2012-08-07 Thread David Gibson
On Tue, Aug 07, 2012 at 11:46:35AM +0300, Avi Kivity wrote: On 08/07/2012 04:32 AM, David Gibson wrote: On Tue, Aug 07, 2012 at 06:57:57AM +1000, Benjamin Herrenschmidt wrote: On Mon, 2012-08-06 at 13:13 +1000, David Gibson wrote: So, I'm still trying to nut out the implications for

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

2012-08-07 Thread Avi Kivity
On 08/07/2012 03:14 PM, David Gibson wrote: On Tue, Aug 07, 2012 at 11:46:35AM +0300, Avi Kivity wrote: On 08/07/2012 04:32 AM, David Gibson wrote: On Tue, Aug 07, 2012 at 06:57:57AM +1000, Benjamin Herrenschmidt wrote: On Mon, 2012-08-06 at 13:13 +1000, David Gibson wrote: So, I'm still

Re: KVM call agenda for Tuesday, August 7

2012-08-07 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please send in any agenda items you are interested in covering. As there are no agenda, today call got cancelled. Happy hacking, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: Testing tracer wakeup_rt: .. no entries found ..FAILED!

2012-08-07 Thread Steven Rostedt
On Wed, 2012-08-01 at 07:57 +0800, Fengguang Wu wrote: What was the next lines? I bet you it was PASSED. Which means it did not fail. This is the second bug you found that has to do with RCU being called in 'idle'. The one that Paul posted a patch for. Yeah, PASSED! I have this patch

Re: [PATCH 6/8] KVM: PPC: E500: Implement MMU notifiers

2012-08-07 Thread Avi Kivity
On 08/07/2012 01:57 PM, Alexander Graf wrote: The e500 target has lived without mmu notifiers ever since it got introduced, but fails for the user space check on them with hugetlbfs. So in order to get that one working, implement mmu notifiers in a reasonably dumb fashion and be happy. On

Re: Testing tracer wakeup_rt: .. no entries found ..FAILED!

2012-08-07 Thread Fengguang Wu
On Tue, Aug 07, 2012 at 09:29:33AM -0400, Steven Rostedt wrote: On Wed, 2012-08-01 at 07:57 +0800, Fengguang Wu wrote: What was the next lines? I bet you it was PASSED. Which means it did not fail. This is the second bug you found that has to do with RCU being called in 'idle'. The

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 01:57 PM, Alexander Graf wrote: Some archs need to ensure that their icache is flushed when mapping a new page. Add a callback to the generic code for an arch to implement any cache flush logic it may need. Signed-off-by: Alexander Graf ag...@suse.de --- virt/kvm/kvm_main.c

Re: KVM: x86: fix pvclock guest stopped flag reporting (v2)

2012-08-07 Thread Eric B Munson
On 2012-08-03 14:57, 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 Reviewed-by: Eric B Munson

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Alexander Graf
On 07.08.2012, at 15:32, Avi Kivity a...@redhat.com wrote: On 08/07/2012 01:57 PM, Alexander Graf wrote: Some archs need to ensure that their icache is flushed when mapping a new page. Add a callback to the generic code for an arch to implement any cache flush logic it may need.

Re: [PATCH 6/8] KVM: PPC: E500: Implement MMU notifiers

2012-08-07 Thread Alexander Graf
On 07.08.2012, at 15:30, Avi Kivity a...@redhat.com wrote: On 08/07/2012 01:57 PM, Alexander Graf wrote: The e500 target has lived without mmu notifiers ever since it got introduced, but fails for the user space check on them with hugetlbfs. So in order to get that one working, implement

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 04:44 PM, Alexander Graf wrote: Is this the correct place? Who says the caller of hva_to_pfn() is going to map it? I don't think anyone is. However, we need the struct page, and all the generic kvm mm code tries hard to hide it from its users. The alternative would be

Re: [Android-virt] [PATCH v9 11/16] ARM: KVM: Inject IRQs and FIQs from userspace

2012-08-07 Thread Avi Kivity
On 08/06/2012 08:20 PM, Peter Maydell wrote: On 3 July 2012 10:01, Christoffer Dall c.d...@virtualopensystems.com wrote: From: Christoffer Dall cd...@cs.columbia.edu Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. This ioctl is used since the sematics are in fact two

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Alexander Graf
On 07.08.2012, at 15:58, Avi Kivity a...@redhat.com wrote: On 08/07/2012 04:44 PM, Alexander Graf wrote: Is this the correct place? Who says the caller of hva_to_pfn() is going to map it? I don't think anyone is. However, we need the struct page, and all the generic kvm mm code

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 05:08 PM, Alexander Graf wrote: On 07.08.2012, at 15:58, Avi Kivity a...@redhat.com wrote: On 08/07/2012 04:44 PM, Alexander Graf wrote: Is this the correct place? Who says the caller of hva_to_pfn() is going to map it? I don't think anyone is. However, we need the

Re: [Android-virt] [PATCH v9 11/16] ARM: KVM: Inject IRQs and FIQs from userspace

2012-08-07 Thread Peter Maydell
On 7 August 2012 14:59, Avi Kivity a...@redhat.com wrote: On 08/06/2012 08:20 PM, Peter Maydell wrote: On 3 July 2012 10:01, Christoffer Dall c.d...@virtualopensystems.com wrote: From: Christoffer Dall cd...@cs.columbia.edu Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl.

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Alexander Graf
On 07.08.2012, at 16:10, Avi Kivity a...@redhat.com wrote: On 08/07/2012 05:08 PM, Alexander Graf wrote: On 07.08.2012, at 15:58, Avi Kivity a...@redhat.com wrote: On 08/07/2012 04:44 PM, Alexander Graf wrote: Is this the correct place? Who says the caller of hva_to_pfn() is

Re: [PATCH 6/8] KVM: PPC: E500: Implement MMU notifiers

2012-08-07 Thread Avi Kivity
On 08/07/2012 04:52 PM, Alexander Graf wrote: +/* MMU Notifiers */ + +int kvm_unmap_hva(struct kvm *kvm, unsigned long hva) +{ +/* Is this a guest page? */ +if (!hva_to_memslot(kvm, hva)) +return 0; + +/* + * Flush all shadow tlb entries

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 05:14 PM, Alexander Graf wrote: On 07.08.2012, at 16:10, Avi Kivity a...@redhat.com wrote: On 08/07/2012 05:08 PM, Alexander Graf wrote: On 07.08.2012, at 15:58, Avi Kivity a...@redhat.com wrote: On 08/07/2012 04:44 PM, Alexander Graf wrote: Is this the correct

Re: [PATCH 6/8] KVM: PPC: E500: Implement MMU notifiers

2012-08-07 Thread Alexander Graf
On 07.08.2012, at 16:14, Avi Kivity a...@redhat.com wrote: On 08/07/2012 04:52 PM, Alexander Graf wrote: +/* MMU Notifiers */ + +int kvm_unmap_hva(struct kvm *kvm, unsigned long hva) +{ +/* Is this a guest page? */ +if (!hva_to_memslot(kvm, hva)) +

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Alexander Graf
On 07.08.2012, at 16:20, Avi Kivity a...@redhat.com wrote: On 08/07/2012 05:14 PM, Alexander Graf wrote: On 07.08.2012, at 16:10, Avi Kivity a...@redhat.com wrote: On 08/07/2012 05:08 PM, Alexander Graf wrote: On 07.08.2012, at 15:58, Avi Kivity a...@redhat.com wrote: On

Re: [Android-virt] [PATCH v9 11/16] ARM: KVM: Inject IRQs and FIQs from userspace

2012-08-07 Thread Avi Kivity
On 08/07/2012 05:12 PM, Peter Maydell wrote: On 7 August 2012 14:59, Avi Kivity a...@redhat.com wrote: On 08/06/2012 08:20 PM, Peter Maydell wrote: On 3 July 2012 10:01, Christoffer Dall c.d...@virtualopensystems.com wrote: From: Christoffer Dall cd...@cs.columbia.edu Userspace can inject

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 05:24 PM, Alexander Graf wrote: Pre-map? How? In arch code before you install the page in a pte/tlbe. So how do I get to the struct page in there? pfn_to_page() -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the

Re: [Android-virt] [PATCH v9 11/16] ARM: KVM: Inject IRQs and FIQs from userspace

2012-08-07 Thread Peter Maydell
On 7 August 2012 15:28, Avi Kivity a...@redhat.com wrote: On 08/07/2012 05:12 PM, Peter Maydell wrote: On 7 August 2012 14:59, Avi Kivity a...@redhat.com wrote: What do you mean by per-vcpu version of KVM_IRQ_LINE? The ARM VGIC implementation implements I need to raise per-CPU interrupt X by

[RFC] s390: virtual channel subsystem and new virtio transport.

2012-08-07 Thread Cornelia Huck
Hi, I've been working on a new virtio transport for s390 replacing the existing s390-virtio transport. Patches to Linux, qemu and the virtio spec will follow. Why? s390-virtio is quite limited in the number of supported devices (all related structures need to fit into a single specially mapped

[RFC PATCH 0/7] s390: virtual css host support.

2012-08-07 Thread Cornelia Huck
Hi, the following patches implement support for a virtual channel subsystem in the host (virtio-ccw on the host is handled by user space). Patches 1 and 2 add support for injecting I/O interrupts and (some) machine checks via the already existing mechanisms. The most important parts are those

[PATCH 1/7] s390/kvm: Support for I/O interrupts.

2012-08-07 Thread Cornelia Huck
Add support for handling I/O interrupts (standard, subchannel-related ones and rudimentary adapter interrupts). The subchannel-identifying parameters are encoded into the interrupt type. I/O interrupts are floating, so they can't be injected on a specific vcpu. Signed-off-by: Cornelia Huck

[PATCH 2/7] s390/kvm: Add support for machine checks.

2012-08-07 Thread Cornelia Huck
Add support for injecting machine checks (only repressible conditions for now). This is a bit more involved than I/O interrupts, for these reasons: - Machine checks come in both floating and cpu varieties. - We don't have a bit for machine checks enabling, but have to use a roundabout approach

[PATCH 5/7] s390: Make some css-related structures usable by non-cio code.

2012-08-07 Thread Cornelia Huck
kvm will need to use some css-related structures (pmcw, schib, orb), so let's move the definitions from drivers/s390/cio/ to include/asm/. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- arch/s390/include/asm/orb.h | 69 +++

[PATCH 2/4] s390: Add a mechanism to get the subchannel id.

2012-08-07 Thread Cornelia Huck
This will be needed by the new virtio-ccw transport. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- arch/s390/include/asm/ccwdev.h | 5 + drivers/s390/cio/device_ops.c | 10 ++ 2 files changed, 15 insertions(+) diff --git a/arch/s390/include/asm/ccwdev.h

[PATCH 1/4] s390/kvm: Handle hosts not supporting s390-virtio.

2012-08-07 Thread Cornelia Huck
Running under a kvm host does not necessarily imply the presence of a page mapped above the main memory with the virtio information; however, the code includes a hard coded access to that page. Instead, check for the presence of the page and exit gracefully before we hit an addressing exception

[PATCH 6/7] s390/kvm: Base infrastructure for enabling capabilities.

2012-08-07 Thread Cornelia Huck
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- Documentation/virtual/kvm/api.txt | 2 +- arch/s390/kvm/kvm-s390.c | 26 ++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Documentation/virtual/kvm/api.txt

[PATCH 4/7] s390: Move css limits from drivers/s390/cio/ to include/asm/.

2012-08-07 Thread Cornelia Huck
There's no need to keep __MAX_SUBCHANNEL and __MAX_SSID private to the common I/O layer when __MAX_CSSID is usable by everybody. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- arch/s390/include/asm/cio.h | 2 ++ drivers/s390/cio/css.h | 3 --- 2 files changed, 2 insertions(+), 3

[PATCH 2/5] s390: Virtual channel subsystem support.

2012-08-07 Thread Cornelia Huck
Provide a mechanism for qemu to provide fully virtual subchannels to the guest. In the KVM case, this relies on the kernel's css support. The !KVM case is not yet supported. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390x/Makefile.objs | 1 + hw/s390x/css.c |

[PATCH 3/5] s390: Add new channel I/O based virtio transport.

2012-08-07 Thread Cornelia Huck
Add a new virtio transport that uses channel commands to perform virtio operations. Add a new machine type s390-ccw that uses this virtio-ccw transport and make it the default machine for s390. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/qdev-monitor.c | 5 +

[RFC PATCH 0/5] qemu: s390: virtual css and virtio-ccw

2012-08-07 Thread Cornelia Huck
Hi, following are the qemu parts for supporting virtual channel I/O and the new virtio-ccw transport. Patch 1 pulls in the new interface definitions. Patch 2 contains the ground work for supporting virtual subchannels (kvm only). Patch 3 implements the new virtio-ccw transport. Patch 4 makes

[PATCH 4/4] s390/kvm: Split out early console code.

2012-08-07 Thread Cornelia Huck
This code is transport agnostic and can be used by both the legacy virtio code and virtio_ccw. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/s390/kvm/Makefile | 2 +- drivers/s390/kvm/early_printk.c | 42 +

[PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver.

2012-08-07 Thread Cornelia Huck
Add a driver for kvm guests that matches virtual ccw devices provided by the host as virtio bridge devices. These virtio-ccw devices use a special set of channel commands in order to perform virtio functions. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- arch/s390/include/asm/irq.h

[PATCH 5/5] [HACK] Handle multiple virtio aliases.

2012-08-07 Thread Cornelia Huck
This patch enables using both virtio-xxx-s390 and virtio-xxx-ccw by making the alias lookup code verify that a driver is actually registered. (Only included in order to allow testing of virtio-ccw; should be replaced by cleaning up the virtio bus model.) Not-signed-off-by: Cornelia Huck

[PATCH] virtio-spec: Add virtio-ccw spec.

2012-08-07 Thread Cornelia Huck
Add specifications for the new s390 specific virtio-ccw transport. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- virtio-spec.lyx | 433 +++ 1 files changed, 433 insertions(+), 0 deletions(-) diff --git a/virtio-spec.lyx

[RFC PATCH] Update virtio spec for virtio-ccw.

2012-08-07 Thread Cornelia Huck
Hi, here's an update to the virtio spec describing the basics of the virtio-ccw mechanism. Cornelia Huck (1): virtio-spec: Add virtio-ccw spec. virtio-spec.lyx | 433 +++ 1 files changed, 433 insertions(+), 0 deletions(-) -- 1.7.5.4 --

[PATCH 1/5] Update headers for upcoming s390 changes.

2012-08-07 Thread Cornelia Huck
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- linux-headers/asm-s390/kvm.h | 2 +- linux-headers/asm-s390/kvm_para.h | 2 +- linux-headers/linux/kvm.h | 63 +++ 3 files changed, 65 insertions(+), 2 deletions(-) diff --git

[PATCH 3/7] s390/kvm: In-kernel handling of I/O instructions.

2012-08-07 Thread Cornelia Huck
Explicitely catch all channel I/O related instructions intercepts in the kernel and set condition code 3 for them. This paws the way for properly handling these instructions later on. Note: This is not architecture compliant (the previous code wasn't either) since setting cc 3 is not the correct

[RFC PATCH 0/4] s390: virtio-ccw guest kernel support.

2012-08-07 Thread Cornelia Huck
Hi, the following patches are for Linux running as a guest under a host with virtio-ccw support. Patch 1 makes the kvm_virtio driver exit gracefully if the page containing s390-virtio information it expects is not present; it could probably go in seperately from the other patches. Patch 2

Re: [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel()

2012-08-07 Thread Peter Maydell
On 2 August 2012 10:14, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-26 16:35, Peter Maydell wrote: This patch series removes all uses of kvm_irqchip_in_kernel() from architecture-independent code, by creating a set of more specific functions instead to test for the particular aspects of

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

2012-08-07 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, August 07, 2012 3:38 PM To: Bhushan Bharat-R65777 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH 1/2] KVM: PPC: booke: Add watchdog emulation On

RE: [PATCH 3/3] KVM: PPC: booke: Added debug handler

2012-08-07 Thread Bhushan Bharat-R65777
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Tuesday, August 07, 2012 4:18 PM To: Bhushan Bharat-R65777 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH

[GIT PULL] VFIO update for 3.6-rc1

2012-08-07 Thread Alex Williamson
Hi Linus, The following changes since commit 42a579a0f960081cd16fc945036e4780c3ad3202: Merge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2012-08-05 22:28:49 +0300) are available in the git repository at:

Re: [PATCH 3/3] KVM: PPC: booke: Added debug handler

2012-08-07 Thread Scott Wood
On 08/07/2012 05:47 AM, Alexander Graf wrote: diff --git a/arch/powerpc/kvm/booke_interrupts.S b/arch/powerpc/kvm/booke_interrupts.S index 3539805..890673c 100644 --- a/arch/powerpc/kvm/booke_interrupts.S +++ b/arch/powerpc/kvm/booke_interrupts.S @@ -73,6 +73,51 @@

Re: [Qemu-devel] [PATCH 3/5] s390: Add new channel I/O based virtio transport.

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 2:52 PM, Cornelia Huck cornelia.h...@de.ibm.com wrote: Add a new virtio transport that uses channel commands to perform virtio operations. Add a new machine type s390-ccw that uses this virtio-ccw transport and make it the default machine for s390. Signed-off-by:

Re: [Qemu-devel] [PATCH 2/5] s390: Virtual channel subsystem support.

2012-08-07 Thread Blue Swirl
On Tue, Aug 7, 2012 at 2:52 PM, Cornelia Huck cornelia.h...@de.ibm.com wrote: Provide a mechanism for qemu to provide fully virtual subchannels to the guest. In the KVM case, this relies on the kernel's css support. The !KVM case is not yet supported. Signed-off-by: Cornelia Huck

Re: [PATCH 8/8] KVM: PPC: Add cache flush on page map

2012-08-07 Thread Scott Wood
On 08/07/2012 05:57 AM, Alexander Graf wrote: When we map a page that wasn't icache cleared before, do so when first mapping it in KVM using the same information bits as the Linux mapping logic. That way we are 100% sure that any page we map does not have stale entries in the icache. What

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

2012-08-07 Thread Benjamin Herrenschmidt
On Tue, 2012-08-07 at 16:13 +0300, Avi Kivity wrote: Peter has started to fix up this naming mess in qemu. I guess we should do the same for the kernel (except for ABIs) and document it, because it keeps generating confusion. Ok so our current situation is that the XICS and MPIC are

Re: [PATCH] KVM: x86 emulator: access GPRs on demand

2012-08-07 Thread Marcelo Tosatti
On Thu, Jul 19, 2012 at 03:14:38PM +0300, Avi Kivity wrote: Instead of populating the the entire register file, read in registers as they are accessed, and write back only the modified ones. This saves a VMREAD and VMWRITE on Intel (for rsp, since it is not usually used during emulation), and

Re: [PATCH] KVM: x86 emulator: access GPRs on demand

2012-08-07 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 06:23:01PM -0300, Marcelo Tosatti wrote: On Thu, Jul 19, 2012 at 03:14:38PM +0300, Avi Kivity wrote: Instead of populating the the entire register file, read in registers as they are accessed, and write back only the modified ones. This saves a VMREAD and VMWRITE on

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

2012-08-07 Thread David Gibson
On Tue, Aug 07, 2012 at 04:13:49PM +0300, Avi Kivity wrote: On 08/07/2012 03:14 PM, David Gibson wrote: On Tue, Aug 07, 2012 at 11:46:35AM +0300, Avi Kivity wrote: On 08/07/2012 04:32 AM, David Gibson wrote: On Tue, Aug 07, 2012 at 06:57:57AM +1000, Benjamin Herrenschmidt wrote: On Mon,

RE: [PATCH 3/3] KVM: PPC: booke: Added debug handler

2012-08-07 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, August 08, 2012 2:15 AM To: Alexander Graf Cc: Bhushan Bharat-R65777; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH 3/3] KVM: PPC: booke: Added debug handler On 08/07/2012

[PATCH v8] kvm: notify host when the guest is panicked

2012-08-07 Thread Wen Congyang
We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is panicked. If management app does not do auto dump, the guest's user can do dump by hand

[PATCH v8 1/6] start vm after reseting it

2012-08-07 Thread Wen Congyang
The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when reseting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED to

[PATCH v8 2/6] kvm: Update kernel headers

2012-08-07 Thread Wen Congyang
Corresponding kvm.git hash: 439793d4 with my patch for kvm --- linux-headers/asm-s390/kvm.h |2 +- linux-headers/asm-s390/kvm_para.h |2 +- linux-headers/asm-x86/kvm.h |1 + linux-headers/asm-x86/kvm_para.h |9 + linux-headers/linux/kvm.h |3 +++

[PATCH v8 3/6] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-08-07 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json

[PATCH v8 4/6] add a new qevent: QEVENT_GUEST_PANICKED

2012-08-07 Thread Wen Congyang
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- monitor.c |1 + monitor.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 49dccfe..c892b7e 100644 --- a/monitor.c +++ b/monitor.c @@

[PATCH v8 5/6] introduce a new qom device to deal with panicked event

2012-08-07 Thread Wen Congyang
If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_EVENT_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to listen this I/O port, and deal with panicked event according to panicked_action's value. The possible actions are: 1. emit

[PATCH v8 6/6] allower the user to disable pv event support

2012-08-07 Thread Wen Congyang
Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 4af8403..9b877a7 100644 --- a/hw/pc_piix.c +++

Re: [kvmarm] [PATCH 5/8] KVM: Add hva_to_memslot

2012-08-07 Thread Christoffer Dall
On Tue, Aug 7, 2012 at 6:57 AM, Alexander Graf ag...@suse.de wrote: Architecture code might want to figure out if an hva that it gets for example via the mmu notifier callbacks actually is in guest mapped memory, and if so, in which memory slot. This patch introduces a helper function to

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-07 Thread Stefan Priebe
Any news? Was this applied upstream? Am 06.08.2012 14:37, schrieb Avi Kivity: On 08/06/2012 03:12 PM, Avi Kivity wrote: On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote: But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as

Fwd: Re: [PATCH master/3.5.y] KVM: VMX: Fix ds/es corruption on i386 with preemption

2012-08-07 Thread Chris Clayton
HI, I've just been looking through the patches Greg KH has stored for 3.5-stable and this doesn't seem to be amongst them. I can't see any way in which it contravenes the stable rules and, given there's a distinct possibility of a mix of i386, kvm-1.1.x and a 3.5 kernel resulting in a

[PATCH 0/3] Documentation : hypercalls

2012-08-07 Thread Raghavendra K T
This is the hypercall documentation patch series First patch covers KVM specific hypercall information. second patch is has typo fix for vmcall instruction comment in kvm_para.h Third patch includes a veryful documentation on PowerPC hypercalls originally written by Alex Changes since initial

[PATCH 1/3] Documentation/kvm : Add documentation on hypercalls

2012-08-07 Thread Raghavendra K T
From: Raghavendra K T raghavendra...@linux.vnet.ibm.com Thanks Alex for KVM_HC_FEATURES inputs and Jan for VAPIC_POLL_IRQ, and Peter (HPA) for suggesting hypercall ABI addition. Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com --- TODO: We need to add history details of each

[PATCH 2/3] Documentation/ppc: Add ppc hypercall documentation

2012-08-07 Thread Raghavendra K T
From: Alexander Graf ag...@suse.de Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com --- Documentation/virtual/kvm/ppc-pv.txt | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git

[PATCH 2/3] Documentation/header : Correct vmrun to vmcall typo

2012-08-07 Thread Raghavendra K T
From: Raghavendra K T raghavendra...@linux.vnet.ibm.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_para.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm/kvm_para.h

Re: [PATCH 3/3] Documentation/ppc: Add ppc hypercall documentation

2012-08-07 Thread Raghavendra K T
On 08/07/2012 01:10 PM, Raghavendra K T wrote: From: Alexander Grafag...@suse.de Signed-off-by: Alexander Grafag...@suse.de Signed-off-by: Raghavendra K Traghavendra...@linux.vnet.ibm.com --- Sorry it meant to be 3/3. -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: [PATCH 0/3] Documentation : hypercalls

2012-08-07 Thread Raghavendra K T
On 08/07/2012 01:09 PM, Raghavendra K T wrote: This is the hypercall documentation patch series First patch covers KVM specific hypercall information. second patch has typo fix for vmcall instruction comment in kvm_para.h Third patch includes a very useful documentation on PowerPC hypercalls

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

2012-08-07 Thread Avi Kivity
On 08/06/2012 11:25 PM, Scott Wood wrote: On 08/05/2012 04:00 AM, Avi Kivity wrote: On 08/04/2012 01:32 AM, Benjamin Herrenschmidt wrote: On Fri, 2012-08-03 at 15:05 -0300, Marcelo Tosatti wrote: See kvm_arch_process_async_events() call to qemu_system_reset_request() in target-i386/kvm.c.

[PATCH V6 1/2] virtio-blk: Add bio-based IO path for virtio-blk

2012-08-07 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 V6 2/2] virtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path

2012-08-07 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: A) If the bio has no data to write: 1. Send VIRTIO_BLK_T_FLUSH to device, 2. In the flush I/O

[PATCH V6 0/2] Improve virtio-blk performance

2012-08-07 Thread Asias He
Hi, all This version reworked on REQ_FLUSH and REQ_FUA support as suggested by Christoph and dropped the block core bits since Jens has picked them up. Fio test shows bio-based IO path gives the following performance improvement: 1) Ramdisk device With bio-based IO path, sequential

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

2012-08-07 Thread Avi Kivity
On 08/07/2012 04:32 AM, David Gibson wrote: On Tue, Aug 07, 2012 at 06:57:57AM +1000, Benjamin Herrenschmidt wrote: On Mon, 2012-08-06 at 13:13 +1000, David Gibson wrote: So, I'm still trying to nut out the implications for H_CEDE, and think if there are any other hypercalls that might want

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

2012-08-07 Thread Asias He
On 08/06/2012 11:17 PM, Christoph Hellwig wrote: On Thu, Aug 02, 2012 at 02:43:04PM +0800, Asias He wrote: Even if it has a payload waiting is highly suboptimal and it should use a non-blocking sequencing like it is done in the request layer. So, for REQ_FLUSH, what we need is that send out

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

2012-08-07 Thread Christoph Hellwig
At least after review is done I really think this patch sopuld be folded into the previous one. Some more comments below: @@ -58,6 +58,12 @@ struct virtblk_req struct bio *bio; struct virtio_blk_outhdr out_hdr; struct virtio_scsi_inhdr in_hdr; + struct work_struct

Re: [PATCH V6 0/2] Improve virtio-blk performance

2012-08-07 Thread Christoph Hellwig
On Tue, Aug 07, 2012 at 04:47:13PM +0800, Asias He wrote: 1) Ramdisk device With bio-based IO path, sequential read/write, random read/write IOPS boost : 28%, 24%, 21%, 16% Latency improvement: 32%, 17%, 21%, 16% 2) Fusion IO device With bio-based IO path,

[PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-07 Thread Xiao Guangrong
Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error hva indicators The test case can be found at: http://lkml.indiana.edu/hypermail/linux/kernel/1207.2/00819/migrate-perf.tar.bz2 In current code, if we map a readonly memory space from

[PATCH v5 01/12] KVM: fix missing check for memslot flags

2012-08-07 Thread Xiao Guangrong
Check flags when memslot is registered from userspace as Avi's suggestion Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- virt/kvm/kvm_main.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index

[PATCH v5 02/12] KVM: hide KVM_MEMSLOT_INVALID from userspace

2012-08-07 Thread Xiao Guangrong
Quote Avi's comment: | KVM_MEMSLOT_INVALID is actually an internal symbol, not used by | userspace. Please move it to kvm_host.h. Also, move KVM_MEMSLOT_INVALID to the highest bit Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm.h |1 -

[PATCH v5 03/12] KVM: introduce gfn_to_pfn_memslot_atomic

2012-08-07 Thread Xiao Guangrong
It can instead of hva_to_pfn_atomic Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |5 + include/linux/kvm_host.h |3 ++- virt/kvm/kvm_main.c | 14 -- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git

[PATCH v5 04/12] KVM: introduce gfn_to_hva_read/kvm_read_hva/kvm_read_hva_atomic

2012-08-07 Thread Xiao Guangrong
This set of functions is only used to read data from host space, in the later patch, we will only get a readonly hva in gfn_to_hva_read, and the function name is a good hint to let gfn_to_hva_read to pair with kvm_read_hva()/kvm_read_hva_atomic() Signed-off-by: Xiao Guangrong

[PATCH v5 05/12] KVM: reorganize hva_to_pfn

2012-08-07 Thread Xiao Guangrong
We do too many things in hva_to_pfn, this patch reorganize the code, let it be better readable Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- virt/kvm/kvm_main.c | 159 +++ 1 files changed, 97 insertions(+), 62 deletions(-)

[PATCH v5 06/12] KVM: use 'writable' as a hint to map writable pfn

2012-08-07 Thread Xiao Guangrong
In current code, we always map writable pfn for the read-fault, in order to support readonly memslot, we map writable pfn only if 'writable' is not NULL Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- virt/kvm/kvm_main.c | 24 +++- 1 files changed, 23

[PATCH v5 07/12] KVM: introduce KVM_PFN_ERR_RO_FAULT

2012-08-07 Thread Xiao Guangrong
In the later patch, it indicates failure when we try to get a writable pfn from the readonly memslot Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH v5 08/12] KVM: introduce KVM_HVA_ERR_BAD

2012-08-07 Thread Xiao Guangrong
Then, remove bad_hva and inline kvm_is_error_hva Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h |8 +++- virt/kvm/kvm_main.c | 13 + 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH v5 09/12] KVM: introduce KVM_HVA_ERR_RO_BAD

2012-08-07 Thread Xiao Guangrong
In the later patch, it indicates failure when we try to get a writable hva from the readonly slot Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH v5 10/12] KVM: introduce readonly memslot

2012-08-07 Thread Xiao Guangrong
In current code, if we map a readonly memory space from host to guest and the page is not currently mapped in the host, we will get a fault-pfn and async is not allowed, then the vm will crash We introduce readonly memory region to map ROM/ROMD to the guest, read access is happy for readonly

[PATCH v5 11/12] KVM: x86: introduce set_mmio_exit_info

2012-08-07 Thread Xiao Guangrong
Introduce set_mmio_exit_info to cleanup the common code Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 33 + 1 files changed, 17 insertions(+), 16 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

[PATCH v5 12/12] KVM: indicate readonly access fault

2012-08-07 Thread Xiao Guangrong
Introduce write_readonly_mem in mmio-exit-info to indicate this exit is caused by write access on readonly memslot Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 12 include/linux/kvm.h |3 +++ include/linux/kvm_host.h |1

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

2012-08-07 Thread Alexander Graf
On 03.08.2012, at 07:30, Bharat Bhushan wrote: 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

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

2012-08-07 Thread Alexander Graf
On 03.08.2012, at 07:30, Bharat Bhushan wrote: I am sending this as a separate patch for easiness on review. Once reviewed I will merge this with watchdog patch. Please don't merge, but rather make 2 different patches out of it: 1) Introduce kvmppc_handle_requests() 2) Implement

Re: [PATCH 1/3] booke: Added ONE_REG interface for IAC/DAC debug registers

2012-08-07 Thread Alexander Graf
On 03.08.2012, at 09:08, Bharat Bhushan wrote: From: Bharat Bhushan bharat.bhus...@freescale.com IAC/DAC are defined as 32 bit while they are 64 bit wide. So ONE_REG interface is added to set/get them. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com ---

  1   2   >