Re: [PATCH 3/9] virtio-blk: use virtqueue_start_buf on bio path

2013-02-16 Thread Asias He
On 02/12/2013 08:23 PM, Paolo Bonzini wrote: > Move the creation of the request header and response footer to > __virtblk_add_req. vbr->sg only contains the data scatterlist, > the header/footer are added separately using the new piecewise > API for building virtqueue buffers. > > With this chang

Re: [PATCH 2/9] virtio-blk: reorganize virtblk_add_req

2013-02-16 Thread Asias He
On 02/12/2013 08:23 PM, Paolo Bonzini wrote: > Right now, both virtblk_add_req and virtblk_add_req_wait call > virtqueue_add_buf. To prepare for the next patches, abstract the call > to virtqueue_add_buf into a new function __virtblk_add_req, and include > the waiting logic directly in virtblk_add

Re: [PATCH 4/9] virtio-blk: use virtqueue_start_buf on req path

2013-02-16 Thread Asias He
On 02/12/2013 08:23 PM, Paolo Bonzini wrote: > This is similar to the previous patch, but a bit more radical > because the bio and req paths now share the buffer construction > code. Because the req path doesn't use vbr->sg, however, we > need to add a couple of arguments to __virtblk_add_req. >

kvm running on core1 wants guest os on core2 to execute a pre-defined program

2013-02-16 Thread zhangzhi
I have been studying some stuff about KVM and sincerely hope that someone is willing to reply to this mail. As we know, If physical NIC interrupt is received on physical CPU 0 which is in root mode and the hypervisor determines that this is a network packet targeted to the emulated NIC for a VM at

[PATCH] KVM: nVMX: Fix direct injection of interrupts from L0 to L2

2013-02-16 Thread Jan Kiszka
From: Jan Kiszka If L1 does not set PIN_BASED_EXT_INTR_MASK, we incorrectly skipped vmx_complete_interrupts on L2 exits. This is required because, with direct interrupt injection from L0 to L2, L0 has to update its pending events. Also, we need to allow vmx_cancel_injection when entering L2 in w

Re: [PATCH v2 07/18] KVM/MIPS32: MMU/TLB operations for the Guest.

2013-02-16 Thread Gleb Natapov
On Sat, Feb 16, 2013 at 10:57:22AM -0500, Sanjay Lal wrote: > > On Feb 15, 2013, at 1:41 PM, Gleb Natapov wrote: > > > On Fri, Feb 15, 2013 at 01:19:29PM -0500, Sanjay Lal wrote: > >> > >> On Feb 6, 2013, at 7:08 AM, Gleb Natapov wrote: > >> > > +static void kvm_mips_map_page(struct

Re: [PATCH v2 07/18] KVM/MIPS32: MMU/TLB operations for the Guest.

2013-02-16 Thread Sanjay Lal
On Feb 15, 2013, at 1:41 PM, Gleb Natapov wrote: > On Fri, Feb 15, 2013 at 01:19:29PM -0500, Sanjay Lal wrote: >> >> On Feb 6, 2013, at 7:08 AM, Gleb Natapov wrote: >> +static void kvm_mips_map_page(struct kvm *kvm, gfn_t gfn) +{ + pfn_t pfn; + + if (kvm->arch.g

[PATCH 37/47] cpu: Move exit_request field to CPUState

2013-02-16 Thread Andreas Färber
Since it was located before breakpoints field, it needs to be reset. Signed-off-by: Andreas Färber --- cpu-exec.c |8 exec.c |4 +++- hw/spapr_hcall.c|5 +++-- include/exec/cpu-defs.h |2 -- include/qom/cpu.h |2 ++ kvm-all

Re: [PATCH] KVM: nVMX: Fix injection of PENDING_INTERRUPT and NMI_WINDOW exits to L1

2013-02-16 Thread Jan Kiszka
On 2013-02-16 15:46, Nadav Har'El wrote: > On Sat, Feb 16, 2013, Jan Kiszka wrote about "Re: [PATCH] KVM: nVMX: Fix > injection of PENDING_INTERRUPT and NMI_WINDOW exits to L1": >> No, this is wrong. I first wrote a patch that ignored enable_irq_window >> when the guest is not interested in extern

Re: [PATCH] KVM: nVMX: Fix injection of PENDING_INTERRUPT and NMI_WINDOW exits to L1

2013-02-16 Thread Nadav Har'El
On Sat, Feb 16, 2013, Jan Kiszka wrote about "Re: [PATCH] KVM: nVMX: Fix injection of PENDING_INTERRUPT and NMI_WINDOW exits to L1": > No, this is wrong. I first wrote a patch that ignored enable_irq_window > when the guest is not interested in external IRQs. But then I thought > that wasn't corre

Re: [PATCH] KVM: nVMX: Fix injection of PENDING_INTERRUPT and NMI_WINDOW exits to L1

2013-02-16 Thread Jan Kiszka
On 2013-02-16 12:51, Jan Kiszka wrote: > From: Jan Kiszka > > The comment was wrong: enable_irq_window might be called after > prepare_vmcs02 when we left L2 to prepare IRQ injecting for L1. Same for > NMIs. > > Signed-off-by: Jan Kiszka > --- > arch/x86/kvm/vmx.c | 10 +++--- > 1 files

[PATCH] KVM: nVMX: Fix injection of PENDING_INTERRUPT and NMI_WINDOW exits to L1

2013-02-16 Thread Jan Kiszka
From: Jan Kiszka The comment was wrong: enable_irq_window might be called after prepare_vmcs02 when we left L2 to prepare IRQ injecting for L1. Same for NMIs. Signed-off-by: Jan Kiszka --- arch/x86/kvm/vmx.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch