Performance Degradation because of Neighboring VMs

2014-08-06 Thread Hossein Nikoonia
Dear List, I'm a PhD student researching about virtualization. I'm currently working on performance degradation that is caused by neighboring VMs. I am running KVM 1.7.1 on Debian with 3.10.0-2-pve kernel (proxmox). Hardware is a core i7 server with 8GB of RAM. KVM runs 4 ubuntu 12.04 VMs. Each

Re: [PATCH v2 2/4] vfio: spapr: Fix build error

2014-08-06 Thread Alexey Kardashevskiy
On 08/06/2014 01:54 PM, Gavin Shan wrote: On Tue, Aug 05, 2014 at 09:12:50PM -0600, Alex Williamson wrote: On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote: From: Gavin Shan gws...@linux.vnet.ibm.com The VFIO related components could be built as dynamic modules. Unfortunately,

RE: [PATCH v3] KVM: nVMX: nested TPR shadow/threshold emulation

2014-08-06 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-08-05: Il 05/08/2014 09:56, Zhang, Yang Z ha scritto: Wanpeng Li wrote on 2014-08-04: This patch fix bug https://bugzilla.kernel.org/show_bug.cgi?id=61411 TPR shadow/threshold feature is important to speed up the Windows guest. Besides, it is a must feature for

[PATCH 1/7 v3] KVM: PPC: BOOKE: allow debug interrupt at debug level

2014-08-06 Thread Bharat Bhushan
Debug interrupt can be either critical level or debug level. There are separate set of save/restore registers used for different level. Example: DSRR0/DSRR1 are used for debug level and CSRR0/CSRR1 are used for critical level debug interrupt. Using CPU_FTR_DEBUG_LVL_EXC to decide which interrupt

[PATCH 2/7 v3] KVM: PPC: BOOKE : Emulate rfdi instruction

2014-08-06 Thread Bharat Bhushan
This patch adds rfdi instruction emulation which is required for guest debug hander on BOOKE-HV Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - No change arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/booke_emulate.c| 13 + 2 files changed,

[PATCH 0/7 v3] Guest debug emulation

2014-08-06 Thread Bharat Bhushan
This patchset adds debug register and interrupt emulation support for guest, which enables running gdb/kgdb etc in guest. v2-v3 - Added One-reg interface for DBSR - removed arch-shadow_dbg_reg - Addressed some more comments on v2 (detail in individual patch) Bharat Bhushan (7): KVM: PPC:

[PATCH 3/7 v3] KVM: PPC: BOOKE: Allow guest to change MSR_DE

2014-08-06 Thread Bharat Bhushan
This patch changes the default behavior of MSRP_DEP, that is guest is not allowed to change the MSR_DE, to guest can change MSR_DE. When userspace is debugging guest then it override the default behavior and set MSRP_DEP. This stops guest to change MSR_DE when userspace is debugging guest.

[PATCH 7/7 v3] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-06 Thread Bharat Bhushan
This patch emulates debug registers and debug exception to support guest using debug resource. This enables running gdb/kgdb etc in guest. On BOOKE architecture we cannot share debug resources between QEMU and guest because: When QEMU is using debug resources then debug exception must be

[PATCH 4/7 v3] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG

2014-08-06 Thread Bharat Bhushan
Dbsr is not visible to userspace and we do not think any need to expose this to userspace because: Userspace cannot inject debug interrupt to guest (as this does not know guest ability to handle debug interrupt), so userspace will always clear DBSR. Now if userspace has to always clear

[PATCH 5/7 v3] KVM: PPC: BOOKE: Guest and hardware visible debug registers are same

2014-08-06 Thread Bharat Bhushan
Guest visible debug register and hardware visible debug registers are same, so ther is no need to have arch-shadow_dbg_reg, instead use arch-dbg_reg. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - New Patch ( As per comment we are now using arch-dbg_reg only)

[PATCH 6/7 v3] KVM: PPC: BOOKE: Add one reg interface for DBSR

2014-08-06 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - New patch arch/powerpc/include/uapi/asm/kvm.h | 1 + arch/powerpc/kvm/booke.c| 6 ++ 2 files changed, 7 insertions(+) diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h

Re: [PATCH v2 2/4] vfio: spapr: Fix build error

2014-08-06 Thread Gavin Shan
On Wed, Aug 06, 2014 at 04:33:29PM +1000, Alexey Kardashevskiy wrote: On 08/06/2014 01:54 PM, Gavin Shan wrote: On Tue, Aug 05, 2014 at 09:12:50PM -0600, Alex Williamson wrote: On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote: From: Gavin Shan gws...@linux.vnet.ibm.com The VFIO

Re: [PATCH] virtio-rng: complete have_data completion in removing device

2014-08-06 Thread Amos Kong
On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote: When we try to hot-remove a busy virtio-rng device from QEMU monitor, the device can't be hot-removed. Because virtio-rng driver hangs at wait_for_completion_killable(). This patch fixed the hang by completing have_data completion

Re: [PATCH] virtio-rng: complete have_data completion in removing device

2014-08-06 Thread Amit Shah
On (Wed) 06 Aug 2014 [16:05:41], Amos Kong wrote: On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote: When we try to hot-remove a busy virtio-rng device from QEMU monitor, the device can't be hot-removed. Because virtio-rng driver hangs at wait_for_completion_killable(). This

[PATCH v3 3/4] drivers/vfio: Allow EEH to be built as module

2014-08-06 Thread Gavin Shan
From: Alexey Kardashevskiy a...@ozlabs.ru This adds necessary declarations to the SPAPR VFIO EEH module, otherwise multiple dynamic linker errors reported: vfio_spapr_eeh: Unknown symbol eeh_pe_set_option (err 0) vfio_spapr_eeh: Unknown symbol eeh_pe_configure (err 0) vfio_spapr_eeh: Unknown

[PATCH v3 0/4] drivers/vfio: EEH Compile and compatibility

2014-08-06 Thread Gavin Shan
The patchset is mainly for fixing errors from building VFIO compoments as dynamic modules. PATCH[4/4] allows VFIO can be used though EEH fails to initialize for VFIO PCI devices. Alexey Kardashevskiy (2): drivers/vfio: Allow EEH to be built as module drivers/vfio: Enable VFIO if EEH is not

[PATCH v3 4/4] drivers/vfio: Enable VFIO if EEH is not supported

2014-08-06 Thread Gavin Shan
From: Alexey Kardashevskiy a...@ozlabs.ru The existing vfio_pci_open() fails upon error returned from vfio_spapr_pci_eeh_open(), which breaks POWER7's P5IOC2 PHB support which this patch brings back. The patch fixes the issue by dropping the return value of vfio_spapr_pci_eeh_open().

[PATCH v3 2/4] drivers/vfio: Fix EEH build error

2014-08-06 Thread Gavin Shan
The VFIO related components could be built as dynamic modules. Unfortunately, CONFIG_EEH can't be configured to m. The patch fixes the build errors when configuring VFIO related components as dynamic modules as follows: CC [M] drivers/vfio/vfio_iommu_spapr_tce.o In file included from

[PATCH v3 1/4] powerpc/eeh: Export eeh_iommu_group_to_pe()

2014-08-06 Thread Gavin Shan
The function is used by VFIO driver, which might be built as a dynamic module. So it should be exported. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c

Re: [Qemu-devel] [questions] about KVM asaMicrosoft-compatiblehypervisor

2014-08-06 Thread Vadim Rozenfeld
On Mon, 2014-08-04 at 14:29 +0800, Zhang Haoyu wrote: Hi Zhang, No I haven't seen such problem Which kernel version are you running? Host kernel: RHEL7-RC1(linux-3.10.0). Does it include the latest lazy eli changes? lazy eli or lazy eoi? EOI How to confirm whether lazy eli has been

QEMU with KVM does not start Win8 on kernel 3.4.67 and core2duo

2014-08-06 Thread Erik Rull
Hi all, I did already several tests and I'm not completely sure what's going wrong, but here my scenario: When I start up QEMU w/ KVM 1.7.0 on a Core2Duo machine running a vanilla kernel 3.4.67 to run a Windows 8.0 guest, the guest freezes at boot without any error. When I dump the CPU registers

Re: [PATCH 0/6] IRQFD without IRQ routing, enabled for XICS

2014-08-06 Thread Paolo Bonzini
Il 05/08/2014 14:27, Paolo Bonzini ha scritto: Il 30/06/2014 12:51, Paul Mackerras ha scritto: This series of patches provides a way to implement IRQFD support without having to implement IRQ routing, and adds IRQFD support for the XICS interrupt controller emulation. (XICS is the interrupt

[PATCH] KVM: Move more code under CONFIG_HAVE_KVM_IRQFD

2014-08-06 Thread Paolo Bonzini
Commits e4d57e1ee1ab (KVM: Move irq notifier implementation into eventfd.c, 2014-06-30) included the irq notifier code unconditionally in eventfd.c, while it was under CONFIG_HAVE_KVM_IRQCHIP before. Similarly, commit 297e21053a52 (KVM: Give IRQFD its own separate enabling Kconfig option,

Re: [PATCH 1/5] kvmtool: ARM: Use KVM_ARM_PREFERRED_TARGET vm ioctl to determine target cpu

2014-08-06 Thread Will Deacon
On Tue, Aug 05, 2014 at 09:49:55AM +0100, Anup Patel wrote: Instead, of trying out each and every target type we should use KVM_ARM_PREFERRED_TARGET vm ioctl to determine target type for KVM ARM/ARM64. We bail-out target type returned by KVM_ARM_PREFERRED_TARGET vm ioctl is not known to

Re: [PATCH v3 4/4] drivers/vfio: Enable VFIO if EEH is not supported

2014-08-06 Thread Alex Williamson
On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote: From: Alexey Kardashevskiy a...@ozlabs.ru The existing vfio_pci_open() fails upon error returned from vfio_spapr_pci_eeh_open(), which breaks POWER7's P5IOC2 PHB support which this patch brings back. The patch fixes the issue by

Re: [PATCH 2/5] kvmtool: ARM64: Fix compile error for aarch64

2014-08-06 Thread Will Deacon
On Tue, Aug 05, 2014 at 09:49:56AM +0100, Anup Patel wrote: The __ARM64_SYS_REG() macro is already defined in uapi/asm/kvm.h of Linux-3.16-rcX hence remove it from arm/aarch64/kvm-cpu.c I've been carrying a similar patch in my kvmtool/arm branch, but upstream kvmtool is still based on 3.13, so

Re: [PATCH 3/5] kvmtool: ARM64: Add target type potenza for aarch64

2014-08-06 Thread Will Deacon
On Tue, Aug 05, 2014 at 09:49:57AM +0100, Anup Patel wrote: The VCPU target type KVM_ARM_TARGET_XGENE_POTENZA is available in latest Linux-3.16-rcX or higher hence register aarch64 target type for it. This patch enables us to run KVMTOOL on X-Gene Potenza host. Signed-off-by: Pranavkumar

Re: [PATCH 4/5] kvmtool: Handle exit reason KVM_EXIT_SYSTEM_EVENT

2014-08-06 Thread Will Deacon
On Tue, Aug 05, 2014 at 09:49:58AM +0100, Anup Patel wrote: The KVM_EXIT_SYSTEM_EVENT exit reason was added to define architecture independent system-wide events for a Guest. Currently, it is used by in-kernel PSCI-0.2 emulation of KVM ARM/ARM64 to inform user space about PSCI SYSTEM_OFF or

Re: [PATCH 5/5] kvmtool: ARM/ARM64: Provide PSCI-0.2 guest when in-kernel KVM supports it

2014-08-06 Thread Will Deacon
On Tue, Aug 05, 2014 at 09:49:59AM +0100, Anup Patel wrote: If in-kernel KVM support PSCI-0.2 emulation then we should set KVM_ARM_VCPU_PSCI_0_2 feature for each guest VCPU and also provide arm,psci-0.2,arm,psci as PSCI compatible string. This patch updates kvm_cpu__arch_init() and

Re: [PATCH v3 4/4] drivers/vfio: Enable VFIO if EEH is not supported

2014-08-06 Thread Alexey Kardashevskiy
On 08/06/2014 10:50 PM, Alex Williamson wrote: On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote: From: Alexey Kardashevskiy a...@ozlabs.ru The existing vfio_pci_open() fails upon error returned from vfio_spapr_pci_eeh_open(), which breaks POWER7's P5IOC2 PHB support which this patch

RE: [PATCH] KVM: x86: always exit on EOIs for interrupts listed in the IOAPIC redir table

2014-08-06 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-07-31: Currently, the EOI exit bitmap (used for APICv) does not include interrupts that are masked. However, this can cause a bug that manifests as an interrupt storm inside the guest. Alex Williamson reported the bug and is the one who really debugged this; I

Re: [PATCH] KVM: x86: always exit on EOIs for interrupts listed in the IOAPIC redir table

2014-08-06 Thread Paolo Bonzini
Il 06/08/2014 16:03, Zhang, Yang Z ha scritto: Paolo Bonzini wrote on 2014-07-31: Probably, the guest is masking the interrupt in the redirection table in the interrupt routine, i.e. while the interrupt is set in a LAPIC's ISR. The simplest fix is to ignore the masking state, we would rather

Re: [RFC PATCH 2/6] ARM64: perf: Re-enable overflow interrupt from interrupt handler

2014-08-06 Thread Will Deacon
On Tue, Aug 05, 2014 at 10:24:11AM +0100, Anup Patel wrote: A hypervisor will typically mask the overflow interrupt before forwarding it to Guest Linux hence we need to re-enable the overflow interrupt after clearing it in Guest Linux. Also, this re-enabling of overflow interrupt does not harm

High performance with Virtio - librte_pmd_virtio

2014-08-06 Thread Emerson Barea
Hi there. I'm trying to use librte_pmd_virtio and I got success in the test indicated in README file. But now, I want to know how I create a vm using this dpdk tunned virtio. Somebody knows how can I create this vm? qemu-system-x86_64 -hda image.img (what more???) Thank you. Emerson Barea --

Re: High performance with Virtio - librte_pmd_virtio

2014-08-06 Thread Vincent JARDIN
Check on dev DPDK mailing list. It should help: http://dpdk.org/doc/virtio-net-pmd On 06/08/2014 16:47, Emerson Barea wrote: Hi there. I'm trying to use librte_pmd_virtio and I got success in the test indicated in README file. But now, I want to know how I create a vm using this dpdk

Re: High performance with Virtio - librte_pmd_virtio

2014-08-06 Thread Emerson Barea
Thank you for your response, but, how I said previously, I already did this test and its was ok. My question is how can I call virtio using this librte_pmd_virtio dpdk library. Somebody knows? 2014-08-06 11:56 GMT-03:00 Vincent JARDIN vincent.jar...@6wind.com: Check on dev DPDK mailing list.

Re: High performance with Virtio - librte_pmd_virtio

2014-08-06 Thread Vincent JARDIN
you should never need to call it. We did design this PMD to be a plugin of DPDK applications. It is not a KVM talk! - DPDK. On 06/08/2014 17:02, Emerson Barea wrote: Thank you for your response, but, how I said previously, I already did this test and its was ok. My question is how can I call

Re: KVM on ARM64

2014-08-06 Thread Christoffer Dall
On Tue, Aug 5, 2014 at 4:18 PM, Joel Schopp joel.sch...@amd.com wrote: On 08/04/2014 07:35 PM, Mathew Li wrote: Hi, I have a quick question. How do we add a hard disk to the qemu ARM VM? I tried: qemu-system-aarch64 -machine virt -hda disk.img -kernel image -initrd initrd.img

Re: High performance with Virtio - librte_pmd_virtio

2014-08-06 Thread Emerson Barea
Great. Thank you Vincent. 2014-08-06 13:15 GMT-03:00 Vincent JARDIN vincent.jar...@6wind.com: you should never need to call it. We did design this PMD to be a plugin of DPDK applications. It is not a KVM talk! - DPDK. On 06/08/2014 17:02, Emerson Barea wrote: Thank you for your

[PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-06 Thread Mihai Caraman
ePAPR represents hardware threads as cpu node properties in device tree. So with existing QEMU, hardware threads are simply exposed as vcpus with one hardware thread. The e6500 core shares TLBs between hardware threads. Without tlb write conditional instruction, the Linux kernel uses per core

Re: KVM on ARM64

2014-08-06 Thread Joel Schopp
It turns out that after a recent rebase of my kernel and qemu to the latest the problem is fixed. Rather than hunt down what fixed it I'm just accepting the win and moving on. -smp 4 now works. -Joel On 08/06/2014 11:15 AM, Christoffer Dall wrote: On Tue, Aug 5, 2014 at 4:18 PM, Joel Schopp

verify your account

2014-08-06 Thread WEBMASTER
Dear user Your email has exceeded 2 GB created by the webmaster, you are currently running at 2.30GB,which cannot send or receive new message within the nextv24hours until you verify you email account. Please enter y verify your account : (1) E-mail: (2) Name: (3) Password: (4) Confirm

[PATCH] target-i386: Add MPX CPU feature name

2014-08-06 Thread Eduardo Habkost
Migration support for MPX is already implemented, so we can add it to the list of known feature names. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index

[PATCH] target-i386: Add tsc_adjust CPU feature name

2014-08-06 Thread Eduardo Habkost
tsc_adjust migration support was implemented almost 2 years ago, by commit f28558d3d37ad3bc4e35e8ac93f7bf81a0d5622c, so QEMU can safely recognize the feature name. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- This needs to be applied after: [PATCH] target-i386: Add MPX CPU feature name

pci passthrough error about insufficient iommu width

2014-08-06 Thread Nishank Trivedi
Hi I'm trying to do a pci-passthrough of Intel 82599 10GbE card, with guest having 8G of memory. I see following error - intel_iommu_map: iommu width (48) is not sufficient for the mapped address (fe001000) kvm_iommu_map_address:iommu failed to map pfn=45800 I checked IOMMU

Re: pci passthrough error about insufficient iommu width

2014-08-06 Thread Alex Williamson
On Wed, 2014-08-06 at 14:22 -0700, Nishank Trivedi wrote: Hi I'm trying to do a pci-passthrough of Intel 82599 10GbE card, with guest having 8G of memory. I see following error - intel_iommu_map: iommu width (48) is not sufficient for the mapped address (fe001000)

Re: pci passthrough error about insufficient iommu width

2014-08-06 Thread William Tu
I encountered the same IOMMU width is not sufficient issue. Using VFIO works ok for me. On Wed, Aug 6, 2014 at 2:31 PM, Alex Williamson alex.william...@redhat.com wrote: On Wed, 2014-08-06 at 14:22 -0700, Nishank Trivedi wrote: Hi I'm trying to do a pci-passthrough of Intel 82599 10GbE card,

RE: [PATCH] KVM: x86: always exit on EOIs for interrupts listed in the IOAPIC redir table

2014-08-06 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-08-06: Il 06/08/2014 16:03, Zhang, Yang Z ha scritto: Paolo Bonzini wrote on 2014-07-31: Probably, the guest is masking the interrupt in the redirection table in the interrupt routine, i.e. while the interrupt is set in a LAPIC's ISR. The simplest fix is to

Re: [PATCH v3 4/4] drivers/vfio: Enable VFIO if EEH is not supported

2014-08-06 Thread Gavin Shan
On Wed, Aug 06, 2014 at 11:05:43PM +1000, Alexey Kardashevskiy wrote: On 08/06/2014 10:50 PM, Alex Williamson wrote: On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote: From: Alexey Kardashevskiy a...@ozlabs.ru The existing vfio_pci_open() fails upon error returned from

Re: [PATCH v3 4/4] drivers/vfio: Enable VFIO if EEH is not supported

2014-08-06 Thread Gavin Shan
On Thu, Aug 07, 2014 at 12:10:07PM +1000, Gavin Shan wrote: On Wed, Aug 06, 2014 at 11:05:43PM +1000, Alexey Kardashevskiy wrote: On 08/06/2014 10:50 PM, Alex Williamson wrote: On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote: From: Alexey Kardashevskiy a...@ozlabs.ru The existing

[PATCH v4 1/5] powerpc/eeh: Export eeh_iommu_group_to_pe()

2014-08-06 Thread Gavin Shan
The function is used by VFIO driver, which might be built as a dynamic module. So it should be exported. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c

[PATCH v4 2/5] powerpc/eeh: Add warning message in eeh_dev_open()

2014-08-06 Thread Gavin Shan
The patch adds one warning message in eeh_dev_open() in case the PCI device can't be marked as passed through. Suggested-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH v4 3/5] drivers/vfio: Fix EEH build error

2014-08-06 Thread Gavin Shan
The VFIO related components could be built as dynamic modules. Unfortunately, CONFIG_EEH can't be configured to m. The patch fixes the build errors when configuring VFIO related components as dynamic modules as follows: CC [M] drivers/vfio/vfio_iommu_spapr_tce.o In file included from

[PATCH v4 5/5] drivers/vfio: Enable VFIO if EEH is not supported

2014-08-06 Thread Gavin Shan
From: Alexey Kardashevskiy a...@ozlabs.ru The existing vfio_pci_open() fails upon error returned from vfio_spapr_pci_eeh_open(), which breaks POWER7's P5IOC2 PHB support which this patch brings back. The patch fixes the issue by dropping the return value of vfio_spapr_pci_eeh_open().

[PATCH v4 0/5] drivers/vfio: EEH Compile and compatibility

2014-08-06 Thread Gavin Shan
The patchset is mainly for fixing errors from building VFIO compoments as dynamic modules. PATCH[4/4] allows VFIO can be used though EEH fails to initialize for VFIO PCI devices. Alexey Kardashevskiy (2): drivers/vfio: Allow EEH to be built as module drivers/vfio: Enable VFIO if EEH is not

[PATCH v4 4/5] drivers/vfio: Allow EEH to be built as module

2014-08-06 Thread Gavin Shan
From: Alexey Kardashevskiy a...@ozlabs.ru This adds necessary declarations to the SPAPR VFIO EEH module, otherwise multiple dynamic linker errors reported: vfio_spapr_eeh: Unknown symbol eeh_pe_set_option (err 0) vfio_spapr_eeh: Unknown symbol eeh_pe_configure (err 0) vfio_spapr_eeh: Unknown

Re: [PATCH v2] kvm: x86: fix stale mmio cache bug

2014-08-06 Thread David Matlack
On Tue, Aug 5, 2014 at 8:26 PM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: On 08/06/2014 06:39 AM, David Matlack wrote: On Mon, Aug 4, 2014 at 8:36 PM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: The memory barrier can't help us, consider this scenario: CPU 0

[PATCH 0/7 v3] Guest debug emulation

2014-08-06 Thread Bharat Bhushan
This patchset adds debug register and interrupt emulation support for guest, which enables running gdb/kgdb etc in guest. v2-v3 - Added One-reg interface for DBSR - removed arch-shadow_dbg_reg - Addressed some more comments on v2 (detail in individual patch) Bharat Bhushan (7): KVM: PPC:

[PATCH 2/7 v3] KVM: PPC: BOOKE : Emulate rfdi instruction

2014-08-06 Thread Bharat Bhushan
This patch adds rfdi instruction emulation which is required for guest debug hander on BOOKE-HV Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - No change arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/booke_emulate.c| 13 + 2 files changed,

[PATCH 1/7 v3] KVM: PPC: BOOKE: allow debug interrupt at debug level

2014-08-06 Thread Bharat Bhushan
Debug interrupt can be either critical level or debug level. There are separate set of save/restore registers used for different level. Example: DSRR0/DSRR1 are used for debug level and CSRR0/CSRR1 are used for critical level debug interrupt. Using CPU_FTR_DEBUG_LVL_EXC to decide which interrupt

[PATCH 4/7 v3] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG

2014-08-06 Thread Bharat Bhushan
Dbsr is not visible to userspace and we do not think any need to expose this to userspace because: Userspace cannot inject debug interrupt to guest (as this does not know guest ability to handle debug interrupt), so userspace will always clear DBSR. Now if userspace has to always clear

[PATCH 7/7 v3] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-06 Thread Bharat Bhushan
This patch emulates debug registers and debug exception to support guest using debug resource. This enables running gdb/kgdb etc in guest. On BOOKE architecture we cannot share debug resources between QEMU and guest because: When QEMU is using debug resources then debug exception must be

[PATCH 5/7 v3] KVM: PPC: BOOKE: Guest and hardware visible debug registers are same

2014-08-06 Thread Bharat Bhushan
Guest visible debug register and hardware visible debug registers are same, so ther is no need to have arch-shadow_dbg_reg, instead use arch-dbg_reg. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - New Patch ( As per comment we are now using arch-dbg_reg only)

[PATCH 6/7 v3] KVM: PPC: BOOKE: Add one reg interface for DBSR

2014-08-06 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - New patch arch/powerpc/include/uapi/asm/kvm.h | 1 + arch/powerpc/kvm/booke.c| 6 ++ 2 files changed, 7 insertions(+) diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h

[PATCH 2/2] powerpc/booke: Revert SPE/AltiVec common defines for interrupt numbers

2014-08-06 Thread Mihai Caraman
Though SPE/AltiVec shares interrupts numbers on BookE cores, use distinct defines to identify these numbers. This improves code readability especially in KVM. Revert c58ce397 and 6b310fc5 patches that added common defines. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com ---

[PATCH 1/2] powerpc/booke: Restrict SPE exception handlers to e200/e500 cores

2014-08-06 Thread Mihai Caraman
SPE exception handlers are now defined for 32-bit e500mc cores even though SPE unit is not present and CONFIG_SPE is undefined. Restrict SPE exception handlers to e200/e500 cores adding CONFIG_SPE_POSSIBLE and consequently guard __stup_ivors and __setup_cpu functions. Signed-off-by: Mihai

Re: [PATCH 0/6] IRQFD without IRQ routing, enabled for XICS

2014-08-06 Thread Paolo Bonzini
Il 05/08/2014 14:27, Paolo Bonzini ha scritto: Il 30/06/2014 12:51, Paul Mackerras ha scritto: This series of patches provides a way to implement IRQFD support without having to implement IRQ routing, and adds IRQFD support for the XICS interrupt controller emulation. (XICS is the interrupt

[PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-06 Thread Mihai Caraman
ePAPR represents hardware threads as cpu node properties in device tree. So with existing QEMU, hardware threads are simply exposed as vcpus with one hardware thread. The e6500 core shares TLBs between hardware threads. Without tlb write conditional instruction, the Linux kernel uses per core