RE: [PATCH v3 5/8] KVM: Recalculate destination vcpu map

2013-03-20 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-19: On Mon, Mar 18, 2013 at 08:47:19PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Update destination vcpu map when ioapic entry or apic(id, ldr, dfr) is changed Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- virt/kvm/ioapic.c |

[PATCH V6 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-20 Thread Wanlong Gao
Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com Reviewed-by: Asias He as...@redhat.com --- drivers/scsi/virtio_scsi.c | 29

[PATCH V6 4/5] virtio-scsi: introduce multiqueue support

2013-03-20 Thread Wanlong Gao
From: Paolo Bonzini pbonz...@redhat.com This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept. However, if a target was idle, we can choose a queue arbitrarily. In this case the queue

[PATCH V6 3/5] virtio-scsi: push vq lock/unlock into virtscsi_vq_done

2013-03-20 Thread Wanlong Gao
From: Paolo Bonzini pbonz...@redhat.com Avoid duplicated code in all of the callers. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com Reviewed-by: Asias He as...@redhat.com --- drivers/scsi/virtio_scsi.c | 22

[PATCH V6 0/5] virtio-scsi multiqueue

2013-03-20 Thread Wanlong Gao
This series implements virtio-scsi queue steering, which gives performance improvements of up to 50% (measured both with QEMU and tcm_vhost backends). This version rebased on Rusty's virtio ring rework patches, which has already gone into virtio-next today. We hope this can go into virtio-next

[PATCH V6 1/5] virtio-scsi: redo allocation of target data

2013-03-20 Thread Wanlong Gao
virtio_scsi_target_state is now empty. We will find new uses for it in the next few patches, so this patch does not drop it completely. And as James suggested, we use entries target_alloc and target_destroy in the host template to allocate and destroy the virtio_scsi_target_state of each target,

[PATCH V6 2/5] virtio-scsi: pass struct virtio_scsi to virtqueue completion function

2013-03-20 Thread Wanlong Gao
From: Paolo Bonzini pbonz...@redhat.com This will be needed soon in order to retrieve the per-target struct. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com Reviewed-by: Asias He as...@redhat.com ---

Re: [PATCH V5 4/5] virtio-scsi: introduce multiqueue support

2013-03-20 Thread Wanlong Gao
On 03/20/2013 09:46 AM, Venkatesh Srinivas wrote: This looks pretty good! I rather like the (lack of) locking in I/O completion (around the req count vs. target/queue binding). It is unfortunate that you need to hold the per-target lock in virtscsi_pick_vq() though; have any idea how much

Re: [PATCH V6 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-20 Thread Asias He
On Wed, Mar 20, 2013 at 03:01:24PM +0800, Wanlong Gao wrote: Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com

Re: [PATCH V6 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-20 Thread Wanlong Gao
On 03/20/2013 03:24 PM, Asias He wrote: On Wed, Mar 20, 2013 at 03:01:24PM +0800, Wanlong Gao wrote: Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Wanlong

Re: [PATCH V6 1/5] virtio-scsi: redo allocation of target data

2013-03-20 Thread Asias He
On Wed, Mar 20, 2013 at 03:01:20PM +0800, Wanlong Gao wrote: virtio_scsi_target_state is now empty. We will find new uses for it in the next few patches, so this patch does not drop it completely. And as James suggested, we use entries target_alloc and target_destroy in the host template to

Re: [PATCH] virtio-blk: Set default serial id

2013-03-20 Thread Stefan Hajnoczi
On Wed, Mar 20, 2013 at 01:56:08PM +0800, Asias He wrote: If user does not specify a serial id, e.g. -device virtio-blk-pci,serial=serial_id or -drive serial=serial_id no serial id will be assigned. Add a default serial id in this case to help identifying the disk in guest.

Re: [PATCH V6 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-20 Thread Wanlong Gao
On 03/20/2013 03:24 PM, Asias He wrote: On Wed, Mar 20, 2013 at 03:01:24PM +0800, Wanlong Gao wrote: Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Wanlong

[PATCH v2 0/7] KVM: MMU: fast zap all shadow pages

2013-03-20 Thread Xiao Guangrong
Changlog: V2: - do not reset n_requested_mmu_pages and n_max_mmu_pages - batch free root shadow pages to reduce vcpu notification and mmu-lock contention - remove the first patch that introduce kvm-arch.mmu_cache since we only 'memset zero' on hashtable rather than all mmu cache

[PATCH v2 7/7] KVM: MMU: drop unnecessary kvm_reload_remote_mmus after kvm_mmu_zap_all

2013-03-20 Thread Xiao Guangrong
It is the responsibility of kvm_mmu_zap_all that keeps the consistent of mmu and tlbs Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

[PATCH v2 4/7] KVM: MMU: delete shadow page from hash list in kvm_mmu_prepare_zap_page

2013-03-20 Thread Xiao Guangrong
Move deletion shadow page from the hash list from kvm_mmu_commit_zap_page to kvm_mmu_prepare_zap_page, we that we can free the shadow page out of mmu-lock. Also, delete the invalid shadow page from the hash list since this page can not be reused anymore. This makes reset mmu-cache more easier -

[PATCH v2 5/7] KVM: MMU: split kvm_mmu_prepare_zap_page

2013-03-20 Thread Xiao Guangrong
Then the new function __kvm_mmu_prepare_zap_page only zaps the shadow page without KVM_REQ_MMU_RELOAD. Later, we will use it to batch free root shadow pages Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 20 +++- 1 files changed, 15

[PATCH v2 3/7] KVM: x86: introduce kvm_clear_all_gfn_page_info

2013-03-20 Thread Xiao Guangrong
This function is used to reset the rmaps and page info of all guest page which will be used in later patch Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 31 +++ include/linux/kvm_host.h |1 + 2 files changed, 32

[PATCH v2 2/7] KVM: x86: introduce memslot_set_lpage_disallowed

2013-03-20 Thread Xiao Guangrong
It is used to set disallowed lage page on the specified level, can be used in later patch Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 53 ++- 1 files changed, 35 insertions(+), 18 deletions(-) diff

[PATCH v2 1/7] KVM: MMU: introduce mmu_cache-pte_list_descs

2013-03-20 Thread Xiao Guangrong
This list is used to link all the pte_list_desc used by mmu cache, so we can easily free the memory used by gfn's rmap and parent spte list Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_host.h |7 --- arch/x86/kvm/mmu.c | 14

[PATCH v2 6/7] KVM: MMU: fast zap all shadow pages

2013-03-20 Thread Xiao Guangrong
The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to walk and zap all shadow pages one by one, also it need to zap all guest page's rmap and all shadow page's parent spte list. Particularly, things become worse if guest uses more memory or vcpus. It is not good for scalability.

Re: [PATCH] virtio-blk: Set default serial id

2013-03-20 Thread Asias He
On Wed, Mar 20, 2013 at 08:52:57AM +0100, Stefan Hajnoczi wrote: On Wed, Mar 20, 2013 at 01:56:08PM +0800, Asias He wrote: If user does not specify a serial id, e.g. -device virtio-blk-pci,serial=serial_id or -drive serial=serial_id no serial id will be assigned. Add a

Re: [PATCH V3 WIP 3/3] disable vhost_verify_ring_mappings check

2013-03-20 Thread Michael S. Tsirkin
On Tue, Mar 19, 2013 at 06:57:08PM -0700, Nicholas A. Bellinger wrote: On Tue, 2013-03-19 at 09:40 +0100, Stefan Hajnoczi wrote: On Tue, Mar 19, 2013 at 08:34:45AM +0800, Asias He wrote: --- hw/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vhost.c b/hw/vhost.c

Re: [PATCH V5 4/5] virtio-scsi: introduce multiqueue support

2013-03-20 Thread Paolo Bonzini
Il 20/03/2013 02:46, Venkatesh Srinivas ha scritto: This looks pretty good! I rather like the (lack of) locking in I/O completion (around the req count vs. target/queue binding). It is unfortunate that you need to hold the per-target lock in virtscsi_pick_vq() though; have any idea how much

Re: [PATCH] x86: let userspace inject interrupts into the local APIC

2013-03-20 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 09:22:33PM +0100, Paolo Bonzini wrote: Il 19/03/2013 19:50, Gleb Natapov ha scritto: On Tue, Mar 19, 2013 at 07:39:24PM +0100, Paolo Bonzini wrote: Il 19/03/2013 19:13, Gleb Natapov ha scritto: There is no way for userspace to inject interrupts into a VCPU's local

[PATCH] [RFC] bookehv: Handle debug exception on guest exit

2013-03-20 Thread Bharat Bhushan
EPCR.DUVD controls whether the debug events can come in hypervisor mode or not. When KVM guest is using the debug resource then we do not want debug events to be captured in guest entry/exit path. So we set EPCR.DUVD when entering and clears EPCR.DUVD when exiting from guest. Debug instruction

[PATCH v4 0/7] Use eoi to track RTC interrupt delivery status

2013-03-20 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the need_eoi set to number of vcpu that received the

[PATCH v4 1/7] KVM: Call kvm_apic_match_dest() to check destination vcpu

2013-03-20 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com For a given vcpu, kvm_apic_match_dest() will tell you whether the vcpu in the destination list quickly. Drop kvm_calculate_eoi_exitmap() and use kvm_apic_match_dest() instead. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/lapic.c |

[PATCH v4 2/7] KVM: Call common update function when ioapic entry changed.

2013-03-20 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Both RTC irq status and EOI exit bitmap need to be updated when ioapic changed or vcpu's id/ldr/dfr changed. So use common function instead eoi exit bitmap specific function. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/ia64/kvm/lapic.h|

[PATCH v4 7/7] KVM: Use eoi to track RTC interrupt delivery status

2013-03-20 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the need_eoi set to number of vcpu that received the

[PATCH v4 6/7] KVM: Add reset/restore rtc_status support

2013-03-20 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com reset/restore rtc_status when ioapic reset/restore. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/lapic.c |8 arch/x86/kvm/lapic.h |2 ++ virt/kvm/ioapic.c| 34 ++ 3 files changed,

[PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-20 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Update RTC interrrupt's destination vcpu map when ioapic entry of RTC or apic register (id, ldr, dfr) is changed. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- virt/kvm/ioapic.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-)

[PATCH v4 4/7] KVM: Introduce struct rtc_status

2013-03-20 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- virt/kvm/ioapic.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h index 1f16088..b727657 100644 --- a/virt/kvm/ioapic.h +++

[PATCH v4 3/7] KVM: Add vcpu info to ioapic_update_eoi()

2013-03-20 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Add vcpu info to ioapic_update_eoi, so we can know which vcpu issued this EOI. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/lapic.c |2 +- virt/kvm/ioapic.c| 12 ++-- virt/kvm/ioapic.h|3 ++- 3 files changed,

RE: [PATCH v2 6/8] KVM: Add reset/restore rtc_status support

2013-03-20 Thread Zhang, Yang Z
I have send out the latest patch(v4). Please give comments for the latest one, because some issues you point out may not exist on latest patch. If it still exits. please point out it again. Zhang, Yang Z wrote on 2013-03-20: Marcelo Tosatti wrote on 2013-03-20: On Mon, Mar 18, 2013 at

RE: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-20 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-20: On Tue, Mar 19, 2013 at 12:27:38PM -0300, Marcelo Tosatti wrote: On Tue, Mar 19, 2013 at 12:19:55PM -0300, Marcelo Tosatti wrote: See the previous argument: should never enter guest mode with PIR ON bit set. With logic above: context1

Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-20 Thread Gleb Natapov
On Wed, Mar 20, 2013 at 11:47:49AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-20: On Tue, Mar 19, 2013 at 12:27:38PM -0300, Marcelo Tosatti wrote: On Tue, Mar 19, 2013 at 12:19:55PM -0300, Marcelo Tosatti wrote: See the previous argument: should never enter guest mode with

RE: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

2013-03-20 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-20: On Wed, Mar 20, 2013 at 11:47:49AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-20: On Tue, Mar 19, 2013 at 12:27:38PM -0300, Marcelo Tosatti wrote: On Tue, Mar 19, 2013 at 12:19:55PM -0300, Marcelo Tosatti wrote: See the previous argument:

Re: [PATCH v4 1/7] KVM: Call kvm_apic_match_dest() to check destination vcpu

2013-03-20 Thread Gleb Natapov
On Wed, Mar 20, 2013 at 07:36:13PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com For a given vcpu, kvm_apic_match_dest() will tell you whether the vcpu in the destination list quickly. Drop kvm_calculate_eoi_exitmap() and use kvm_apic_match_dest() instead.

Re: [PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-20 Thread Gleb Natapov
On Wed, Mar 20, 2013 at 07:36:17PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Update RTC interrrupt's destination vcpu map when ioapic entry of RTC or apic register (id, ldr, dfr) is changed. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- virt/kvm/ioapic.c |

[PATCH] bookehv: Handle debug exception on guest exit

2013-03-20 Thread Bharat Bhushan
EPCR.DUVD controls whether the debug events can come in hypervisor mode or not. When KVM guest is using the debug resource then we do not want debug events to be captured in guest entry/exit path. So we set EPCR.DUVD when entering and clears EPCR.DUVD when exiting from guest. Debug instruction

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-20 Thread Marcelo Tosatti
On Mon, Mar 18, 2013 at 08:42:09PM +0800, Xiao Guangrong wrote: On 03/18/2013 07:19 PM, Paolo Bonzini wrote: Il 15/03/2013 16:29, Xiao Guangrong ha scritto: +/* + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of + * generation, the bits of bits 52 ~ bit 61 are used as + * high 12

Re: [PATCH kvm-unit-tests 2/5] x86/README: Drop it

2013-03-20 Thread Marcelo Tosatti
On Fri, Mar 15, 2013 at 08:09:06PM -0400, Cole Robinson wrote: Was out of date, and not particularly useful to begin with. --- x86/README | 16 1 file changed, 16 deletions(-) delete mode 100644 x86/README diff --git a/x86/README b/x86/README deleted file mode 100644

Re: [PATCH kvm-unit-tests 5/5] x86-run: Pull extra arguments from unittests.cfg

2013-03-20 Thread Marcelo Tosatti
On Sun, Mar 17, 2013 at 07:58:56PM -0400, Cole Robinson wrote: On 03/17/2013 11:25 AM, Gleb Natapov wrote: On Fri, Mar 15, 2013 at 08:09:09PM -0400, Cole Robinson wrote: Some tests want extra arguments as enumerated in unittests.cfg, use them. unittests.cfg also has a few sections about

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-20 Thread Benjamin Herrenschmidt
On Wed, 2013-03-20 at 12:48 -0600, Alex Williamson wrote: Perhaps my problem is that I don't have a clear picture of where you're going with this like I do for AER. For AER we're starting with notification of an error, from that we build into how to retrieve the error information, and

Re: [PATCH] vmxcap: Update according to SDM of January 2013

2013-03-20 Thread Marcelo Tosatti
On Sun, Mar 17, 2013 at 11:45:50AM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com This adds reporting of VMCS shadowing, #VE, IA32_SMBASE, unrestricted VMWRITE and fixes the range of the MSEG revision ID. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Applied, thanks.

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-20 Thread Marcelo Tosatti
On Sun, Mar 17, 2013 at 12:47:17PM +0200, Gleb Natapov wrote: On Sun, Mar 17, 2013 at 11:45:34AM +0100, Jan Kiszka wrote: On 2013-03-17 09:47, Gleb Natapov wrote: On Sat, Mar 16, 2013 at 09:49:07PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com If the guest didn't

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-20 Thread Alex Williamson
On Wed, 2013-03-20 at 20:31 +0100, Benjamin Herrenschmidt wrote: On Wed, 2013-03-20 at 12:48 -0600, Alex Williamson wrote: Perhaps my problem is that I don't have a clear picture of where you're going with this like I do for AER. For AER we're starting with notification of an error, from

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-20 Thread Marcelo Tosatti
On Wed, Mar 20, 2013 at 04:30:33PM -0300, Marcelo Tosatti wrote: On Sun, Mar 17, 2013 at 12:47:17PM +0200, Gleb Natapov wrote: On Sun, Mar 17, 2013 at 11:45:34AM +0100, Jan Kiszka wrote: On 2013-03-17 09:47, Gleb Natapov wrote: On Sat, Mar 16, 2013 at 09:49:07PM +0100, Jan Kiszka wrote:

Re: [PATCH 16/29] arm64: KVM: HYP mode world switch implementation

2013-03-20 Thread Christopher Covington
Hi Marc, On 03/13/2013 03:59 PM, Christopher Covington wrote: [...] Alternatively, you could consider storing the host registers in a slimmed-down vcpu structure for hosts, rather than on the stack. One potential argument for storing the host in the same sort of vcpu structure as the guest

Re: [kvmarm] [PATCH 14/29] arm64: KVM: guest one-reg interface

2013-03-20 Thread Christopher Covington
Hi Marc, Peter, On 03/14/2013 04:57 AM, Peter Maydell wrote: On 13 March 2013 20:34, Christopher Covington c...@codeaurora.org wrote: My guess at the goal of the code cited above in this email is that it's trying to sanity check that virtualization will work. Rather than taking a default

KVM: MMU: improve n_max_mmu_pages calculation with TDP

2013-03-20 Thread Marcelo Tosatti
kvm_mmu_calculate_mmu_pages numbers, maximum number of shadow pages = 2% of mapped guest pages Does not make sense for TDP guests where mapping all of guest memory with 4k pages cannot exceed mapped guest pages / 512 (not counting root pages). Allow that maximum for TDP, forcing the guest to

Re: [PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-20 Thread Alex Williamson
On Tue, 2013-03-19 at 18:08 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent part includes IOMMU initialization and

Re: [PATCH V6 4/5] virtio-scsi: introduce multiqueue support

2013-03-20 Thread Venkatesh Srinivas
On Wed, Mar 20, 2013 at 03:01:23PM +0800, Wanlong Gao wrote: From: Paolo Bonzini pbonz...@redhat.com This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept. However, if a target was

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-20 Thread Gleb Natapov
On Wed, Mar 20, 2013 at 05:03:19PM -0300, Marcelo Tosatti wrote: On Wed, Mar 20, 2013 at 04:30:33PM -0300, Marcelo Tosatti wrote: On Sun, Mar 17, 2013 at 12:47:17PM +0200, Gleb Natapov wrote: On Sun, Mar 17, 2013 at 11:45:34AM +0100, Jan Kiszka wrote: On 2013-03-17 09:47, Gleb Natapov

Virtualbox svga card in KVM

2013-03-20 Thread Sriram Murthy
Hi, I am planning on bringing in the virtualbox svga card into kvm as a new svga card type (vbox probably?) so that we can load the VirtualBox SVGA card drivers in the guest. Is this even feasible?. Any ideas on where I should start looking? Regards,Sriram -- To unsubscribe from

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-20 Thread Marcelo Tosatti
On Wed, Mar 20, 2013 at 11:32:38PM +0200, Gleb Natapov wrote: On Wed, Mar 20, 2013 at 05:03:19PM -0300, Marcelo Tosatti wrote: On Wed, Mar 20, 2013 at 04:30:33PM -0300, Marcelo Tosatti wrote: On Sun, Mar 17, 2013 at 12:47:17PM +0200, Gleb Natapov wrote: On Sun, Mar 17, 2013 at 11:45:34AM

Re: [PATCH] x86: correctly initialize the CS base on reset

2013-03-20 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 04:30:26PM +0100, Paolo Bonzini wrote: The CS base was initialized to 0 on VMX (wrong, but usually overridden by userspace before starting) or 0xf on SVM. The correct value is 0x, and VMX is able to emulate it now, so use it. Signed-off-by: Paolo Bonzini

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-20 Thread Scott Wood
On 03/14/2013 07:13:46 PM, Kevin Hilman wrote: The new context tracking subsystem unconditionally includes kvm_host.h headers for the guest enter/exit macros. This causes a compile failure when KVM is not enabled. Fix by adding an IS_ENABLED(CONFIG_KVM) check to kvm_host so it can be

Re: [PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-20 Thread Alexey Kardashevskiy
On 21/03/13 07:45, Alex Williamson wrote: On Tue, 2013-03-19 at 18:08 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent

Re: [PATCH 3/3] VFIO: Direct access config reg without capability

2013-03-20 Thread Alex Williamson
On Fri, 2013-03-15 at 15:26 +0800, Gavin Shan wrote: The config registers in [0, 0x40] is being supported by VFIO. Apart from that, the other config registers should be coverred by PCI or PCIe capability. However, there might have some PCI devices (be2net) who has config registers (0x7c) out

Re: [PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-20 Thread Alex Williamson
On Thu, 2013-03-21 at 11:57 +1100, Alexey Kardashevskiy wrote: On 21/03/13 07:45, Alex Williamson wrote: On Tue, 2013-03-19 at 18:08 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or

Re: Host kernel crash at pci_find_upstream_pcie_bridge on VM exit

2013-03-20 Thread Alex Williamson
On Tue, 2013-03-19 at 17:09 -0700, Ganesh Narayanaswamy wrote: Hi Alex, Thanks for your reply. The pci devices in question are proprietary FPGAs. Here is the lspci -tv output: -bash-4.1# lspci -tv -[:00]-+-00.0 Intel Corporation Sandy Bridge DRAM Controller

Re: [PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-20 Thread David Gibson
On Wed, Mar 20, 2013 at 02:45:24PM -0600, Alex Williamson wrote: On Tue, 2013-03-19 at 18:08 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ

Re: [PATCH] vfio powerpc: implement IOMMU driver for VFIO

2013-03-20 Thread Alex Williamson
On Thu, 2013-03-21 at 12:55 +1100, David Gibson wrote: On Wed, Mar 20, 2013 at 02:45:24PM -0600, Alex Williamson wrote: On Tue, 2013-03-19 at 18:08 +1100, Alexey Kardashevskiy wrote: VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file

RE: [PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-20 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-20: On Wed, Mar 20, 2013 at 07:36:17PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Update RTC interrrupt's destination vcpu map when ioapic entry of RTC or apic register (id, ldr, dfr) is changed. Signed-off-by: Yang Zhang

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-03-20 Thread Gleb Natapov
On Wed, Mar 20, 2013 at 08:19:13PM -0300, Marcelo Tosatti wrote: On Wed, Mar 20, 2013 at 11:32:38PM +0200, Gleb Natapov wrote: On Wed, Mar 20, 2013 at 05:03:19PM -0300, Marcelo Tosatti wrote: On Wed, Mar 20, 2013 at 04:30:33PM -0300, Marcelo Tosatti wrote: On Sun, Mar 17, 2013 at

Re: [PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-20 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 03:42:46AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-20: On Wed, Mar 20, 2013 at 07:36:17PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Update RTC interrrupt's destination vcpu map when ioapic entry of RTC or apic register

RE: [PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-20 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-21: On Thu, Mar 21, 2013 at 03:42:46AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-20: On Wed, Mar 20, 2013 at 07:36:17PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Update RTC interrrupt's destination vcpu map when ioapic

Re: [PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-20 Thread Gleb Natapov
On Thu, Mar 21, 2013 at 05:30:32AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-21: On Thu, Mar 21, 2013 at 03:42:46AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-20: On Wed, Mar 20, 2013 at 07:36:17PM +0800, Yang Zhang wrote: From: Yang Zhang

RE: [PATCH v4 5/7] KVM: Recalculate destination vcpu map

2013-03-20 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-21: On Thu, Mar 21, 2013 at 05:30:32AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-21: On Thu, Mar 21, 2013 at 03:42:46AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-03-20: On Wed, Mar 20, 2013 at 07:36:17PM +0800, Yang Zhang wrote:

Re: KVM: MMU: improve n_max_mmu_pages calculation with TDP

2013-03-20 Thread Xiao Guangrong
On 03/21/2013 04:14 AM, Marcelo Tosatti wrote: kvm_mmu_calculate_mmu_pages numbers, maximum number of shadow pages = 2% of mapped guest pages Does not make sense for TDP guests where mapping all of guest memory with 4k pages cannot exceed mapped guest pages / 512 (not counting root

[PATCH] [RFC] bookehv: Handle debug exception on guest exit

2013-03-20 Thread Bharat Bhushan
EPCR.DUVD controls whether the debug events can come in hypervisor mode or not. When KVM guest is using the debug resource then we do not want debug events to be captured in guest entry/exit path. So we set EPCR.DUVD when entering and clears EPCR.DUVD when exiting from guest. Debug instruction

[PATCH] bookehv: Handle debug exception on guest exit

2013-03-20 Thread Bharat Bhushan
EPCR.DUVD controls whether the debug events can come in hypervisor mode or not. When KVM guest is using the debug resource then we do not want debug events to be captured in guest entry/exit path. So we set EPCR.DUVD when entering and clears EPCR.DUVD when exiting from guest. Debug instruction