Re: [PATCH v2 14/18] nvdimm: support NFIT_CMD_IMPLEMENTED function

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:52:07PM +0800, Xiao Guangrong wrote: @@ -306,6 +354,18 @@ struct dsm_buffer { static ram_addr_t dsm_addr; static size_t dsm_size; +struct cmd_out_implemented { QEMU coding style uses typedef struct {} CamelCase. Please follow this convention in all

Re: KVM slow LAMP guest

2015-08-25 Thread Hansa
On 24-8-2015 1:26, Wanpeng Li wrote: On 8/24/15 3:18 AM, Hansa wrote: On 16-7-2015 13:27, Paolo Bonzini wrote: On 15/07/2015 22:02, C. Bröcker wrote: What OS is this? Is it RHEL/CentOS? If so, halt_poll_ns will be in 6.7 which will be out in a few days/weeks. Paolo OK. As said CentOS 6.6.

Re: [Qemu-devel] [PATCH v2 00/18] implement vNVDIMM

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:51:53PM +0800, Xiao Guangrong wrote: Changlog: - Use litten endian for DSM method, thanks for Stefan's suggestion - introduce a new parameter, @configdata, if it's false, Qemu will build a static and readonly namespace in memory and use it serveing for DSM

Re: [PATCH v3 3/4] irqchip: GIC: Convert to EOImode == 1

2015-08-25 Thread Marc Zyngier
Hi Thomas, On 25/08/15 16:46, Thomas Gleixner wrote: On Tue, 25 Aug 2015, Marc Zyngier wrote: +static struct static_key supports_deactivate = STATIC_KEY_INIT_TRUE; + #ifndef MAX_GIC_NR #define MAX_GIC_NR 1 #endif @@ -137,6 +140,14 @@ static inline unsigned int gic_irq(struct irq_data

Re: [PATCH v2 2/3] KVM: dynamic halt_poll_ns adjustment

2015-08-25 Thread David Matlack
Thanks for writing v2, Wanpeng. On Mon, Aug 24, 2015 at 11:35 PM, Wanpeng Li wanpeng...@hotmail.com wrote: There is a downside of halt_poll_ns since poll is still happen for idle VCPU which can waste cpu usage. This patch adds the ability to adjust halt_poll_ns dynamically. What testing have

Re: [PATCH v2 10/18] nvdimm: init the address region used by DSM method

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:52:03PM +0800, Xiao Guangrong wrote: @@ -257,14 +258,91 @@ static void build_nfit_table(GSList *device_list, char *buf) } } +struct dsm_buffer { +/* RAM page. */ +uint32_t handle; +uint8_t arg0[16]; +uint32_t arg1; +uint32_t arg2;

Re: [Qemu-devel] [PATCH v2 13/18] nvdimm: build namespace config data

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:52:06PM +0800, Xiao Guangrong wrote: +#ifdef NVDIMM_DEBUG +#define nvdebug(fmt, ...) fprintf(stderr, nvdimm: fmt, ## __VA_ARGS__) +#else +#define nvdebug(...) +#endif The following allows the compiler to check format strings and syntax check the argument

Re: [PATCH v2 15/18] nvdimm: support NFIT_CMD_GET_CONFIG_SIZE function

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:52:08PM +0800, Xiao Guangrong wrote: Function 4 is used to get Namespace lable size s/lable/label/ -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v2 12/15] KVM: arm64: sync LPI configuration and pending tables

2015-08-25 Thread Andre Przywara
Hi Eric, On 14/08/15 12:58, Eric Auger wrote: On 07/10/2015 04:21 PM, Andre Przywara wrote: The LPI configuration and pending tables of the GICv3 LPIs are held in tables in (guest) memory. To achieve reasonable performance, we cache this data in our own data structures, so we need to sync

Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:51:59PM +0800, Xiao Guangrong wrote: +static void set_file(Object *obj, const char *str, Error **errp) +{ +PCNVDIMMDevice *nvdimm = PC_NVDIMM(obj); + +if (nvdimm-file) { +g_free(nvdimm-file); +} g_free(NULL) is a nop so it's safe to replace

Re: [PATCH v2 11/15] KVM: arm64: handle pending bit for LPIs in ITS emulation

2015-08-25 Thread Andre Przywara
Hi Eric, On 14/08/15 12:58, Eric Auger wrote: On 07/10/2015 04:21 PM, Andre Przywara wrote: As the actual LPI number in a guest can be quite high, but is mostly assigned using a very sparse allocation scheme, bitmaps and arrays for storing the virtual interrupt status are a waste of memory.

Re: [PATCH V2 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Joe Perches
On Tue, 2015-08-25 at 15:47 +0800, Jason Wang wrote: All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Is there any compiler added alignment padding in either structure? If so, those padding areas would now be uninitialized and may leak

Re: [PATCH v2 07/18] nvdimm: reserve address range for NVDIMM

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:52:00PM +0800, Xiao Guangrong wrote: diff --git a/hw/mem/nvdimm/pc-nvdimm.c b/hw/mem/nvdimm/pc-nvdimm.c index a53d235..7a270a8 100644 --- a/hw/mem/nvdimm/pc-nvdimm.c +++ b/hw/mem/nvdimm/pc-nvdimm.c @@ -24,6 +24,19 @@ #include hw/mem/pc-nvdimm.h +#define

Re: [PATCH v2 08/18] nvdimm: init backend memory mapping and config data area

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:52:01PM +0800, Xiao Guangrong wrote: The parameter @file is used as backed memory for NVDIMM which is divided into two parts if @dataconfig is true: s/dataconfig/configdata/ @@ -76,13 +109,87 @@ static void pc_nvdimm_init(Object *obj)

Re: [PATCH v2 07/18] nvdimm: reserve address range for NVDIMM

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:52:00PM +0800, Xiao Guangrong wrote: NVDIMM reserves all the free range above 4G to do: - Persistent Memory (PMEM) mapping - implement NVDIMM ACPI device _DSM method Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/i386/pc.c | 12

Re: [PATCH v3 3/4] irqchip: GIC: Convert to EOImode == 1

2015-08-25 Thread Thomas Gleixner
On Tue, 25 Aug 2015, Marc Zyngier wrote: +static struct static_key supports_deactivate = STATIC_KEY_INIT_TRUE; + #ifndef MAX_GIC_NR #define MAX_GIC_NR 1 #endif @@ -137,6 +140,14 @@ static inline unsigned int gic_irq(struct irq_data *d) return d-hwirq; } +static inline bool

Re: [PATCH v2 12/15] KVM: arm64: sync LPI configuration and pending tables

2015-08-25 Thread Andre Przywara
Hi Eric, On 14/08/15 13:35, Eric Auger wrote: On 08/14/2015 01:58 PM, Eric Auger wrote: On 07/10/2015 04:21 PM, Andre Przywara wrote: The LPI configuration and pending tables of the GICv3 LPIs are held in tables in (guest) memory. To achieve reasonable performance, we cache this data in our

Re: [PATCH V2 3/3] kvm: add tracepoint for fast mmio

2015-08-25 Thread Jason Wang
On 08/25/2015 07:34 PM, Michael S. Tsirkin wrote: On Tue, Aug 25, 2015 at 03:47:15PM +0800, Jason Wang wrote: Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com ---

Re: [PATCH V2 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
On 08/25/2015 07:33 PM, Michael S. Tsirkin wrote: On Tue, Aug 25, 2015 at 03:47:14PM +0800, Jason Wang wrote: We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about the

Re: [PATCH V2 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Joe Perches
On Wed, 2015-08-26 at 13:39 +0800, Jason Wang wrote: On 08/25/2015 11:29 PM, Joe Perches wrote: On Tue, 2015-08-25 at 15:47 +0800, Jason Wang wrote: All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Is there any compiler added

Re: [PATCH V2 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Jason Wang
On 08/26/2015 01:45 PM, Joe Perches wrote: On Wed, 2015-08-26 at 13:39 +0800, Jason Wang wrote: On 08/25/2015 11:29 PM, Joe Perches wrote: On Tue, 2015-08-25 at 15:47 +0800, Jason Wang wrote: All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
On 08/25/2015 07:51 PM, Michael S. Tsirkin wrote: On Tue, Aug 25, 2015 at 05:05:47PM +0800, Jason Wang wrote: We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about the

Re: [PATCH V2 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Jason Wang
On 08/25/2015 11:29 PM, Joe Perches wrote: On Tue, 2015-08-25 at 15:47 +0800, Jason Wang wrote: All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Is there any compiler added alignment padding in either structure? If so, those padding

Re: [PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
On 08/25/2015 11:04 AM, Jason Wang wrote: [...] @@ -900,10 +899,11 @@ kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) if (!p-wildcard p-datamatch != args-datamatch) continue; -kvm_io_bus_unregister_dev(kvm, bus_idx,

Re: [PATCH V2 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Cornelia Huck
On Tue, 25 Aug 2015 15:47:14 +0800 Jason Wang jasow...@redhat.com wrote: diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 9ff4193..95f2901 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -762,13 +762,15 @@ ioeventfd_check_collision(struct kvm *kvm, struct _ioeventfd

[PATCH V2 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Jason Wang
All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- virt/kvm/kvm_main.c | 4 ++-- 1

[PATCH V2 3/3] kvm: add tracepoint for fast mmio

2015-08-25 Thread Jason Wang
Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm/trace.h | 17 + arch/x86/kvm/vmx.c | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 19 insertions(+)

[PATCH V2 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about the devices on two buses points to a single dev. Which will lead double free [1] during exit. - wildcard eventfd ignores data

[PATCH v7 16/17] KVM: Warn if 'SN' is set during posting interrupts by software

2015-08-25 Thread Feng Wu
Currently, we don't support urgent interrupt, all interrupts are recognized as non-urgent interrupt, so we cannot post interrupts when 'SN' is set. If the vcpu is in guest mode, it cannot have been scheduled out, and that's the only case when SN is set currently, warning if SN is set.

[PATCH v2 1/3] KVM: make halt_poll_ns per-VCPU

2015-08-25 Thread Wanpeng Li
Change halt_poll_ns into per-VCPU variable, seeded from module parameter, to allow greater flexibility. Signed-off-by: Wanpeng Li wanpeng...@hotmail.com --- include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v7 02/17] KVM: Add some helper functions for Posted-Interrupts

2015-08-25 Thread Feng Wu
This patch adds some helper functions to manipulate the Posted-Interrupts Descriptor. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/kvm/vmx.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 271dd70..316f9bf

[PATCH v7 05/17] KVM: Add interfaces to control PI outside vmx

2015-08-25 Thread Feng Wu
This patch adds pi_clear_sn and pi_set_sn to struct kvm_x86_ops, so we can set/clear SN outside vmx. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/include/asm/kvm_host.h | 3 +++ arch/x86/kvm/vmx.c | 13 + 2 files changed, 16 insertions(+) diff --git

[PATCH v7 00/17] Add VT-d Posted-Interrupts support

2015-08-25 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. You can find the VT-d Posted-Interrtups Spec. in

[PATCH v7 06/17] KVM: Make struct kvm_irq_routing_table accessible

2015-08-25 Thread Feng Wu
Move struct kvm_irq_routing_table from irqchip.c to kvm_host.h, so we can use it outside of irqchip.c. Signed-off-by: Feng Wu feng...@intel.com --- include/linux/kvm_host.h | 14 ++ virt/kvm/irqchip.c | 10 -- 2 files changed, 14 insertions(+), 10 deletions(-) diff

[PATCH v7 03/17] KVM: Define a new interface kvm_intr_is_single_vcpu()

2015-08-25 Thread Feng Wu
This patch defines a new interface kvm_intr_is_single_vcpu(), which can returns whether the interrupt is for single-CPU or not. It is used by VT-d PI, since now we only support single-CPU interrupts, For lowest-priority interrupts, if user configures it via /proc/irq or uses irqbalance to make it

Re: [PATCH V2 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
On 08/25/2015 04:20 PM, Cornelia Huck wrote: On Tue, 25 Aug 2015 15:47:14 +0800 Jason Wang jasow...@redhat.com wrote: diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 9ff4193..95f2901 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -762,13 +762,15 @@

[PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about the devices on two buses points to a single dev. Which will lead double free [1] during exit. - wildcard eventfd ignores data

[PATCH V3 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Jason Wang
All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- virt/kvm/kvm_main.c | 4 ++-- 1

[PATCH v7 09/17] vfio: Register/unregister irq_bypass_producer

2015-08-25 Thread Feng Wu
This patch adds the registration/unregistration of an irq_bypass_producer for MSI/MSIx on vfio pci devices. v6: - Make the add_consumer and del_consumer callbacks static - Remove pointless INIT_LIST_HEAD to 'vdev-ctx[vector].producer.node)' - Use dev_info instead of WARN_ON() when

Re: [PATCH v2 08/15] KVM: arm64: introduce ITS emulation file with stub functions

2015-08-25 Thread Andre Przywara
Salut Eric, diff --git a/virt/kvm/arm/vgic-v3-emul.c b/virt/kvm/arm/vgic-v3-emul.c index 5269ad1..f5865e7 100644 --- a/virt/kvm/arm/vgic-v3-emul.c +++ b/virt/kvm/arm/vgic-v3-emul.c @@ -48,6 +48,7 @@ #include asm/kvm_mmu.h #include vgic.h +#include its-emul.h static bool

[PATCH V3 3/3] kvm: add tracepoint for fast mmio

2015-08-25 Thread Jason Wang
Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm/trace.h | 17 + arch/x86/kvm/vmx.c | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 19 insertions(+)

[PATCH v7 13/17] KVM: Add an arch specific hooks in 'struct kvm_kernel_irqfd'

2015-08-25 Thread Feng Wu
This patch adds an arch specific hooks 'arch_update' in 'struct kvm_kernel_irqfd'. On Intel side, it is used to update the IRTE when VT-d posted-interrupts is used. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/x86.c | 5 +

[PATCH v7 11/17] KVM: Define two weak arch callbacks for irq bypass manager

2015-08-25 Thread Feng Wu
Define two weak arch callbacks so that archs that don't need them don't need define them. Signed-off-by: Feng Wu feng...@intel.com --- virt/kvm/eventfd.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index d7a230f..f3050b9 100644 ---

[PATCH v7 10/17] KVM: x86: Update IRTE for posted-interrupts

2015-08-25 Thread Feng Wu
This patch adds the routine to update IRTE for posted-interrupts when guest changes the interrupt configuration. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/kvm/x86.c | 73 ++ 1 file changed, 73 insertions(+) diff --git

[PATCH v7 08/17] vfio: Select IRQ_BYPASS_MANAGER for vfio PCI devices

2015-08-25 Thread Feng Wu
Enable irq bypass manager for vfio PCI devices. Signed-off-by: Feng Wu feng...@intel.com --- drivers/vfio/pci/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig index 579d83b..02912f1 100644 --- a/drivers/vfio/pci/Kconfig +++

[PATCH v7 12/17] KVM: Implement IRQ bypass consumer callbacks for x86

2015-08-25 Thread Feng Wu
Implement the following callbacks for x86: - kvm_arch_irq_bypass_add_producer - kvm_arch_irq_bypass_del_producer - kvm_arch_irq_bypass_stop: dummy callback - kvm_arch_irq_bypass_resume: dummy callback and set CONFIG_HAVE_KVM_IRQ_BYPASS for x86. Signed-off-by: Feng Wu feng...@intel.com ---

[PATCH v7 14/17] KVM: Update Posted-Interrupts Descriptor when vCPU is preempted

2015-08-25 Thread Feng Wu
This patch updates the Posted-Interrupts Descriptor when vCPU is preempted. sched out: - Set 'SN' to suppress furture non-urgent interrupts posted for the vCPU. sched in: - Clear 'SN' - Change NDST if vCPU is scheduled to a different CPU - Set 'NV' to POSTED_INTR_VECTOR Signed-off-by: Feng Wu

[PATCH v7 01/17] KVM: Extend struct pi_desc for VT-d Posted-Interrupts

2015-08-25 Thread Feng Wu
Extend struct pi_desc for VT-d Posted-Interrupts. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/kvm/vmx.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 83b7b5c..271dd70 100644 ---

[PATCH v7 17/17] iommu/vt-d: Add a command line parameter for VT-d posted-interrupts

2015-08-25 Thread Feng Wu
Enable VT-d Posted-Interrtups and add a command line parameter for it. Signed-off-by: Feng Wu feng...@intel.com --- Documentation/kernel-parameters.txt | 1 + drivers/iommu/irq_remapping.c | 12 2 files changed, 9 insertions(+), 4 deletions(-) diff --git

[PATCH v7 15/17] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2015-08-25 Thread Feng Wu
This patch updates the Posted-Interrupts Descriptor when vCPU is blocked. pre-block: - Add the vCPU to the blocked per-CPU list - Set 'NV' to POSTED_INTR_WAKEUP_VECTOR post-block: - Remove the vCPU from the per-CPU list Signed-off-by: Feng Wu feng...@intel.com ---

[PATCH v7 04/17] KVM: Get Posted-Interrupts descriptor address from 'struct kvm_vcpu'

2015-08-25 Thread Feng Wu
Define an interface to get PI descriptor address from the vCPU structure. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/vmx.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/arch/x86/include/asm/kvm_host.h

[PATCH v7 07/17] KVM: make kvm_set_msi_irq() public

2015-08-25 Thread Feng Wu
Make kvm_set_msi_irq() public, we can use this function outside. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/include/asm/kvm_host.h | 4 arch/x86/kvm/irq_comm.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h

Re: [PATCH v2 09/15] KVM: arm64: implement basic ITS register handlers

2015-08-25 Thread Andre Przywara
Hi Eric, diff --git a/virt/kvm/arm/its-emul.c b/virt/kvm/arm/its-emul.c index 659dd39..b498f06 100644 --- a/virt/kvm/arm/its-emul.c +++ b/virt/kvm/arm/its-emul.c @@ -32,10 +32,62 @@ #include vgic.h #include its-emul.h +#define BASER_BASE_ADDRESS(x) ((x) 0xf000ULL) +

Re: KVM slow LAMP guest

2015-08-25 Thread Wanpeng Li
On 8/25/15 11:42 PM, Hansa wrote: On 24-8-2015 1:26, Wanpeng Li wrote: On 8/24/15 3:18 AM, Hansa wrote: On 16-7-2015 13:27, Paolo Bonzini wrote: On 15/07/2015 22:02, C. Bröcker wrote: What OS is this? Is it RHEL/CentOS? If so, halt_poll_ns will be in 6.7 which will be out in a few

Re: KVM slow LAMP guest

2015-08-25 Thread Hansa
On 26-8-2015 0:33, Wanpeng Li wrote: On the VM server I issued the command below every eleven minutes: date curltest-file; _ top -b -n 1 | sed -n '7,12p' curltest-file; _ curl -o /dev/null -s -wtime_total: %{time_total}\\n https://my.domain.com | perl -pe 'BEGIN {use POSIX;} print

Re: [PATCH v7 10/17] KVM: x86: Update IRTE for posted-interrupts

2015-08-25 Thread Alex Williamson
On Tue, 2015-08-25 at 16:50 +0800, Feng Wu wrote: This patch adds the routine to update IRTE for posted-interrupts when guest changes the interrupt configuration. Signed-off-by: Feng Wu feng...@intel.com --- arch/x86/kvm/x86.c | 73 ++

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Cornelia Huck
On Tue, 25 Aug 2015 17:05:47 +0800 Jason Wang jasow...@redhat.com wrote: We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about the devices on two buses points to a single dev.

Re: [PATCH V3 3/3] kvm: add tracepoint for fast mmio

2015-08-25 Thread Michael S. Tsirkin
On Tue, Aug 25, 2015 at 05:05:48PM +0800, Jason Wang wrote: Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm/trace.h | 17 + arch/x86/kvm/vmx.c | 1

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Michael S. Tsirkin
On Tue, Aug 25, 2015 at 05:05:47PM +0800, Jason Wang wrote: We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about the devices on two buses points to a single dev. Which will

[PATCH v3 1/4] irqchip: GICv3: Convert to EOImode == 1

2015-08-25 Thread Marc Zyngier
So far, GICv3 has been used in with EOImode == 0. The effect of this mode is to perform the priority drop and the deactivation of the interrupt at the same time. While this works perfectly for Linux (we only have a single priority), it causes issues when an interrupt is forwarded to a guest, and

[PATCH v3 3/4] irqchip: GIC: Convert to EOImode == 1

2015-08-25 Thread Marc Zyngier
So far, GICv2 has been used with EOImode == 0. The effect of this mode is to perform the priority drop and the deactivation of the interrupt at the same time. While this works perfectly for Linux (we only have a single priority), it causes issues when an interrupt is forwarded to a guest, and

Re: [PATCH v2 10/15] KVM: arm64: add data structures to model ITS interrupt translation

2015-08-25 Thread Andre Przywara
Hi Eric, On 13/08/15 16:46, Eric Auger wrote: On 07/10/2015 04:21 PM, Andre Przywara wrote: The GICv3 Interrupt Translation Service (ITS) uses tables in memory to allow a sophisticated interrupt routing. It features device tables, an interrupt table per device and a table connecting

Re: [PATCH V2 3/3] kvm: add tracepoint for fast mmio

2015-08-25 Thread Michael S. Tsirkin
On Tue, Aug 25, 2015 at 03:47:15PM +0800, Jason Wang wrote: Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm/trace.h | 17 + arch/x86/kvm/vmx.c | 1

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Michael S. Tsirkin
On Tue, Aug 25, 2015 at 05:05:47PM +0800, Jason Wang wrote: We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about the devices on two buses points to a single dev. Which will

[PATCH v3 0/4] irqchip: GICv2/v3: Add support for irq_vcpu_affinity

2015-08-25 Thread Marc Zyngier
The GICv2 and GICv3 architectures allow an active physical interrupt to be forwarded to a guest, and the guest to indirectly perform the deactivation of the interrupt by performing an EOI on the virtual interrupt (see for example the GICv2 spec, 3.2.1). This allows some substantial performance

[PATCH v3 4/4] irqchip: GIC: Don't deactivate interrupts forwarded to a guest

2015-08-25 Thread Marc Zyngier
Commit 0a4377de3056 (genirq: Introduce irq_set_vcpu_affinity() to target an interrupt to a VCPU) added just what we needed at the lowest level to allow an interrupt to be deactivated by a guest. When such a request reaches the GIC, it knows it doesn't need to perform the deactivation anymore, and

Re: [PATCH V2 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Michael S. Tsirkin
On Tue, Aug 25, 2015 at 03:47:14PM +0800, Jason Wang wrote: We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about the devices on two buses points to a single dev. Which will

[PATCH v3 2/4] irqchip: GICv3: Don't deactivate interrupts forwarded to a guest

2015-08-25 Thread Marc Zyngier
Commit 0a4377de3056 (genirq: Introduce irq_set_vcpu_affinity() to target an interrupt to a VCPU) added just what we needed at the lowest level to allow an interrupt to be deactivated by a guest. When such a request reaches the GIC, it knows it doesn't need to perform the deactivation anymore, and

RE: [PATCH v7 10/17] KVM: x86: Update IRTE for posted-interrupts

2015-08-25 Thread Wu, Feng
-Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Wednesday, August 26, 2015 3:58 AM To: Wu, Feng Cc: pbonz...@redhat.com; j...@8bytes.org; mtosa...@redhat.com; eric.au...@linaro.org; kvm@vger.kernel.org; io...@lists.linux-foundation.org;

答复: I'm now looking into kvm-unit-tests and encounted with some problems.

2015-08-25 Thread Huangpeng (Peter)
You should add kvm maillinglist too. -邮件原件- 发件人: Jinjian (Ken) 发送时间: 2015年8月25日 21:42 收件人: drjo...@redhat.com; pbonz...@redhat.com 抄送: Huangpeng (Peter); Gonglei (Arei); Zhanghailiang 主题: I'm now looking into kvm-unit-tests and encounted with some problems. Hi all: I'm now looking

[PATCH v2 0/3] KVM: Dynamic halt_poll_ns

2015-08-25 Thread Wanpeng Li
v1 - v2: * change kvm_vcpu_block to read halt_poll_ns from the vcpu instead of the module parameter * use the shrink/grow matrix which is suggested by David * set halt_poll_ns_max to 2ms There is a downside of halt_poll_ns since poll is still happen for idle VCPU which can waste cpu

[PATCH v2 3/3] KVM: trace kvm_halt_poll_ns grow/shrink

2015-08-25 Thread Wanpeng Li
Tracepoint for dynamic halt_pool_ns, fired on every potential change. Signed-off-by: Wanpeng Li wanpeng...@hotmail.com --- include/trace/events/kvm.h | 30 ++ virt/kvm/kvm_main.c| 8 2 files changed, 38 insertions(+) diff --git

[PATCH v2 2/3] KVM: dynamic halt_poll_ns adjustment

2015-08-25 Thread Wanpeng Li
There is a downside of halt_poll_ns since poll is still happen for idle VCPU which can waste cpu usage. This patch adds the ability to adjust halt_poll_ns dynamically. There are two new kernel parameters for changing the halt_poll_ns: halt_poll_ns_grow and halt_poll_ns_shrink. A third new

Re: KVM slow LAMP guest

2015-08-25 Thread Wanpeng Li
On 8/26/15 6:41 AM, Hansa wrote: On 26-8-2015 0:33, Wanpeng Li wrote: On the VM server I issued the command below every eleven minutes: date curltest-file; _ top -b -n 1 | sed -n '7,12p' curltest-file; _ curl -o /dev/null -s -wtime_total: %{time_total}\\n https://my.domain.com | perl -pe

Fwd: [ERROR] INIT: PANIC: segmentation violation! sleeping for 30 seconds.

2015-08-25 Thread Jon Panozzo
KVM Team, We have a user that is experiencing an odd issue when trying to create VMs on his system which causes the entire host to crash, printing the following message to the console: [ERROR] INIT: PANIC: segmentation violation! sleeping for 30 seconds. We have never seen this issue before,

Re: [PATCH] kvm/powerpc: fix a build error in e500_tlb.c

2015-08-25 Thread mani
Kevin Hao haokexin at gmail.com writes: We use the wrong number arguments when invoking trace_kvm_stlb_inval, and cause the following build error. arch/powerpc/kvm/e500_tlb.c: In function 'kvmppc_e500_stlbe_invalidate': arch/powerpc/kvm/e500_tlb.c:230: error: too many arguments to function

Re: I'm now looking into kvm-unit-tests and encounted with some problems.

2015-08-25 Thread Jinjian (Ken)
To Peter, Thank you very much! I'm sorry this is my first kvm mail, and have no experience. On 2015/8/26 8:40, Huangpeng (Peter) wrote: You should add kvm maillinglist too. -邮件原件- 发件人: Jinjian (Ken) 发送时间: 2015年8月25日 21:42 收件人: drjo...@redhat.com; pbonz...@redhat.com 抄送: Huangpeng