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 crash,

[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 po

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

2012-08-07 Thread Raghavendra K T
From: Raghavendra K T 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 --- TODO: We need to add history details of each hypercall as suggested by HPA, which I could not trace easily. Hope it

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

2012-08-07 Thread Raghavendra K T
From: Alexander Graf Signed-off-by: Alexander Graf Signed-off-by: Raghavendra K T --- Documentation/virtual/kvm/ppc-pv.txt | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/Documentation/virtual/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.tx

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

2012-08-07 Thread Raghavendra K T
From: Raghavendra K T Signed-off-by: Raghavendra K T --- 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 b/arch/x86/include/asm/kvm_para.h index 2f7712e..20f5697 100644 --- a/arch/x86/include/asm/kvm_para

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 Graf Signed-off-by: Alexander Graf Signed-off-by: Raghavendra K T --- Sorry it meant to be 3/3. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo

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 or

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 targe

[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 completion

[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 read/wri

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 mig

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 th

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, se

[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 h

[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 --- 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 a2e85af..7b94d70 100644 --- a/virt/

[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 --- include/linux/kvm.h |1 - include/linux/kvm_host.h |2 ++ 2 files c

[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 --- 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 a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu

[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 --- virt/kvm/kvm_ma

[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 --- virt/kvm/kvm_main.c | 159 +++ 1 files changed, 97 insertions(+), 62 deletions(-) diff --git a/virt/kvm/kvm_main.c b/

[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 --- virt/kvm/kvm_main.c | 24 +++- 1 files changed, 23 insertions(+), 1 deletions(-) diff

[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 --- include/linux/kvm_host.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 187c9

[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 --- 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 b/include/linux/kvm_host.h index 83

[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 --- include/linux/kvm_host.h |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 7737

[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 memsl

[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 --- 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 4c86239..8cde327 100644 --- a/arch

[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 --- arch/x86/kvm/x86.c | 12 include/linux/kvm.h |3 +++ include/linux/kvm_host.h |1 + virt/kvm/kvm_main.c |

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 watchdo

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 > > 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 > --- > arch/powerpc/include/asm/kvm.h | 12 ++ > arch/powerpc/inclu

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

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

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

2012-08-07 Thread Alexander Graf
On 03.08.2012, at 09:08, Bharat Bhushan wrote: > Installed debug handler will be used for guest debug support and > debug facility emulation features (patches for these features > will follow this patch). > > Signed-off-by: Liu Yu > [bharat.bhus...@freescale.com: Substantial changes] > Signed-o

[PATCH 0/8] KVM: PPC: E500: Implement MMU Notifiers

2012-08-07 Thread Alexander Graf
This patch set adds a very simple implementation of MMU notifiers for the e500 target. Along the way, I stumbled over a few other things that I've put into the same patch set, namely: * e500 prerequisites * icache flushing on page map (probably also hits ARM!) * exit trace point for e500 Al

[PATCH 2/8] KVM: PPC: E500: Fix clear_tlb_refs

2012-08-07 Thread Alexander Graf
Our mapping code assumes that TLB0 entries are always mapped. However, after calling clear_tlb_refs() this is no longer the case. Map them dynamically if we find an entry unmapped in TLB0. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500_tlb.c |8 ++-- 1 files changed, 6 insertio

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

2012-08-07 Thread Alexander Graf
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 embedded hardware, we almost never end up with mmu not

[PATCH 1/8] KVM: PPC: BookE: Expose remote TLB flushes in debugfs

2012-08-07 Thread Alexander Graf
We're already counting remote TLB flushes in a variable, but don't export it to user space yet. Do so, so we know what's going on. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/booke.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/p

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

2012-08-07 Thread Alexander Graf
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 --- virt/kvm/kvm_main.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) di

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

2012-08-07 Thread Alexander Graf
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 we really would need is a method to flush the icache o

[PATCH 5/8] KVM: Add hva_to_memslot

2012-08-07 Thread Alexander Graf
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 enable it to do so. It is a prerequisite for the e500 mmu notifier implementa

[PATCH 4/8] KVM: PPC: Expose SYNC cap based on mmu notifiers

2012-08-07 Thread Alexander Graf
Semantically, the "SYNC" cap means that we have mmu notifiers available. Express this in our #ifdef'ery around the feature, so that we can be sure we don't miss out on ppc targets when they get their implementation. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/powerpc.c |8 +++- 1

[PATCH 3/8] KVM: PPC: PR: Use generic tracepoint for guest exit

2012-08-07 Thread Alexander Graf
We want to have tracing information on guest exits for booke as well as book3s. Since most information is identical, use a common trace point. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/book3s_pr.c |2 +- arch/powerpc/kvm/booke.c |3 ++ arch/powerpc/kvm/trace.h | 79 +++

[PATCH 0/5 - RESEND] Introduce generic set_bit_le()

2012-08-07 Thread Takuya Yoshikawa
This is against today's linux-next. KVM is using test_and_set_bit_le() for this missing function; this patch series corrects this usage. As some drivers have their own definitions of set_bit_le(), a bit of preparation is also needed. Although these are differently implemented, especially for b

[PATCH 1/5] sfc: Use standard __{clear,set}_bit_le() functions

2012-08-07 Thread Takuya Yoshikawa
From: Ben Hutchings There are now standard functions for dealing with little-endian bit arrays, so use them instead of our own implementations. Signed-off-by: Ben Hutchings Signed-off-by: Takuya Yoshikawa --- drivers/net/ethernet/sfc/efx.c|4 ++-- drivers/net/ethernet/sfc/net_driv

[PATCH 2/5] drivers/net/ethernet/dec/tulip: Use standard __set_bit_le() function

2012-08-07 Thread Takuya Yoshikawa
From: Takuya Yoshikawa To introduce generic set_bit_le() later, we remove our own definition and use a proper non-atomic bitops function: __set_bit_le(). Signed-off-by: Takuya Yoshikawa Acked-by: Grant Grundler --- drivers/net/ethernet/dec/tulip/de2104x.c|7 ++- drivers/net/ethern

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

2012-08-07 Thread Takuya Yoshikawa
From: Takuya Yoshikawa 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 Acked-by: Arnd Bergmann --- include/asm-generic/bitops/le.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-)

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

2012-08-07 Thread Takuya Yoshikawa
From: Takuya Yoshikawa 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 Acked-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/bitops.h | 10 ++ 1 files changed, 10 insertions(+), 0 d

[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 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 Cc: Avi Kivity Cc: Marcelo Tosatti --- virt/kvm/kvm_main.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(

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

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 Reviewed-by: Amit Shah

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 f

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: >> >> >

Re: KVM call agenda for Tuesday, August 7

2012-08-07 Thread Juan Quintela
Juan Quintela 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 majord...@vger.kernel.org More majord

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

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. O

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

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 > --- > virt/kvm/kvm_main.c |6

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 Reviewed-by: Eric B Munson -- To unsubscribe f

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 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. >> >> Signed-off-by

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 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 mmu not

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 >

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 wrote: >> From: Christoffer Dall >> >> Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. >> This ioctl is used since the sematics are in fact two lines that can be >> either raised or lowered

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 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 t

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 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, w

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 wrote: > On 08/06/2012 08:20 PM, Peter Maydell wrote: >> On 3 July 2012 10:01, Christoffer Dall wrote: >>> From: Christoffer Dall >>> >>> Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. >>> This ioctl is used since the sematics are in fact

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 wrote: > On 08/07/2012 05:08 PM, Alexander Graf wrote: >> >> >> On 07.08.2012, at 15:58, Avi Kivity 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 >>>

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; >>> + >>> +/* >>> +

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 wrote: > >> On 08/07/2012 05:08 PM, Alexander Graf wrote: >>> >>> >>> On 07.08.2012, at 15:58, Avi Kivity wrote: >>> On 08/07/2012 04:44 PM, Alexander Graf wrote: > >> >> Is this the c

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 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,

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 wrote: > On 08/07/2012 05:14 PM, Alexander Graf wrote: >> >> >> On 07.08.2012, at 16:10, Avi Kivity wrote: >> >>> On 08/07/2012 05:08 PM, Alexander Graf wrote: On 07.08.2012, at 15:58, Avi Kivity wrote: > On 08/07/2012 04:44 PM

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 wrote: >> On 08/06/2012 08:20 PM, Peter Maydell wrote: >>> On 3 July 2012 10:01, Christoffer Dall >>> wrote: From: Christoffer Dall Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioc

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:

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 wrote: > On 08/07/2012 05:12 PM, Peter Maydell wrote: >> On 7 August 2012 14:59, Avi Kivity 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 providing a vc

[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 han

[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 --- arch/s390/include/asm/orb.h | 69 +++ arch/s390/include/asm/schib.h | 52 +

[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 --- 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 b/arch/s390/include/asm/ccwdev.h index 1

[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 if

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

2012-08-07 Thread Cornelia Huck
Signed-off-by: Cornelia Huck --- 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 b/Documentation/virtual/kvm/api.txt index bf33aaa..140e7

[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 --- arch/s390/include/asm/cio.h | 2 ++ drivers/s390/cio/css.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git

[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 --- hw/s390x/Makefile.objs | 1 + hw/s390x/css.c | 440

[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 --- hw/qdev-monitor.c | 5 + hw/s390-virtio.c | 268 +++

[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 v

[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 --- drivers/s390/kvm/Makefile | 2 +- drivers/s390/kvm/early_printk.c | 42 + drivers/s390/kvm/kvm_virtio.c | 29 ++

[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 --- arch/s390/include/asm/irq.h | 1 + arch/s390/kern

[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 --- blo

[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 --- virtio-spec.lyx | 433 +++ 1 files changed, 433 insertions(+), 0 deletions(-) diff --git a/virtio-spec.lyx b/virtio-spec.lyx index 7a073f4..52

[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 -- T

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

2012-08-07 Thread Cornelia Huck
Signed-off-by: Cornelia Huck --- 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 a/linux-headers/asm-s390/kvm.h b/lin

[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 export

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 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 behaviour t

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 0

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: [PA

[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: git://g

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 @@ _GLOBAL(kvmppc

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 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: Cornelia Huck > --- >

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 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 > --- > hw/s390x/Makefile.objs

  1   2   >