Re: [PATCH] vfio: Enable VFIO device for powerpc

2015-08-26 Thread Paul Mackerras
On Wed, Aug 26, 2015 at 11:34:26AM +0200, Alexander Graf wrote: On 13.08.15 03:15, David Gibson wrote: ec53500f kvm: Add VFIO device added a special KVM pseudo-device which is used to handle any necessary interactions between KVM and VFIO. Currently that device is built on x86 and

Re: [PATCH] vfio: Enable VFIO device for powerpc

2015-08-26 Thread Paul Mackerras
On Wed, Aug 26, 2015 at 11:34:26AM +0200, Alexander Graf wrote: On 13.08.15 03:15, David Gibson wrote: ec53500f kvm: Add VFIO device added a special KVM pseudo-device which is used to handle any necessary interactions between KVM and VFIO. Currently that device is built on x86 and

[PATCH] KVM: arm/arm64: BUG: Fix losing level-sensitive interrupts

2015-08-26 Thread Pavel Fedin
Commit 71760950bf3dc796e5e53ea3300dec724a09f593 (arm/arm64: KVM: add a common vgic_queue_irq_to_lr fn) introduced vgic_queue_irq_to_lr() function which checks vgic_dist_irq_is_pending() before setting LR_STATE_PENDING bit. However, in some cases, the following race condition is possible: 1.

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

2015-08-26 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

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

2015-08-26 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 v4 0/4] irqchip: GICv2/v3: Add support for irq_vcpu_affinity

2015-08-26 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 v4 3/4] irqchip: GIC: Convert to EOImode == 1

2015-08-26 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

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

2015-08-26 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: Build regressions/improvements in v4.2-rc8

2015-08-26 Thread Alexander Graf
On 24.08.15 10:36, Geert Uytterhoeven wrote: On Mon, Aug 24, 2015 at 10:34 AM, Geert Uytterhoeven ge...@linux-m68k.org wrote: JFYI, when comparing v4.2-rc8[1] to v4.2-rc7[3], the summaries are: - build errors: +4/-7 4 regressions: + /home/kisskb/slave/src/include/linux/kvm_host.h:

Re: [PATCH] vfio: Enable VFIO device for powerpc

2015-08-26 Thread Alexander Graf
On 13.08.15 03:15, David Gibson wrote: ec53500f kvm: Add VFIO device added a special KVM pseudo-device which is used to handle any necessary interactions between KVM and VFIO. Currently that device is built on x86 and ARM, but not powerpc, although powerpc does support both KVM and VFIO.

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

2015-08-26 Thread Marc Zyngier
On 26/08/15 09:54, Eric Auger wrote: Hi Marc, On 08/25/2015 01:53 PM, Marc Zyngier wrote: 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

Re: virtio-serial: Add multiple times opening support to virtserialport(port)

2015-08-26 Thread Gerd Hoffmann
Hi, AndroidPipe is a communication channel between the guest system and the emulator itself. Guest side device node can be opened by multi processes at the same time with different service name. It has a de-multiplexer on the QEMU side to figure out which service the guest actually wanted,

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

2015-08-26 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, 36 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 00/13] arm64: Virtualization Host Extension support

2015-08-26 Thread Marc Zyngier
On 26/08/15 10:21, Jan Kiszka wrote: On 2015-08-26 11:12, Antonios Motakis wrote: Hello Marc, On 08-Jul-15 18:19, Marc Zyngier wrote: ARMv8.1 comes with the Virtualization Host Extension (VHE for short), which enables simpler support of Type-2 hypervisors. This extension allows the

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

2015-08-26 Thread Wanpeng Li
On 8/26/15 1:19 AM, David Matlack wrote: 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

Re: [PATCH 00/13] arm64: Virtualization Host Extension support

2015-08-26 Thread Jan Kiszka
On 2015-08-26 11:12, Antonios Motakis wrote: Hello Marc, On 08-Jul-15 18:19, Marc Zyngier wrote: ARMv8.1 comes with the Virtualization Host Extension (VHE for short), which enables simpler support of Type-2 hypervisors. This extension allows the kernel to directly run at EL2, and

Re: [PATCH 00/13] arm64: Virtualization Host Extension support

2015-08-26 Thread Jan Kiszka
On 2015-08-26 11:28, Antonios Motakis wrote: On 26-Aug-15 11:21, Jan Kiszka wrote: On 2015-08-26 11:12, Antonios Motakis wrote: Hello Marc, On 08-Jul-15 18:19, Marc Zyngier wrote: ARMv8.1 comes with the Virtualization Host Extension (VHE for short), which enables simpler support of

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

2015-08-26 Thread Xiao Guangrong
On 08/25/2015 10:57 PM, Stefan Hajnoczi wrote: 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); +}

Re: [PATCH] KVM: arm/arm64: BUG: Fix losing level-sensitive interrupts

2015-08-26 Thread Marc Zyngier
On Wed, 26 Aug 2015 09:46:03 +0300 Pavel Fedin p.fe...@samsung.com wrote: Hi Pavel, Commit 71760950bf3dc796e5e53ea3300dec724a09f593 (arm/arm64: KVM: add a common vgic_queue_irq_to_lr fn) introduced vgic_queue_irq_to_lr() function which checks vgic_dist_irq_is_pending() before setting

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

2015-08-26 Thread Levente Kurusa
Hello. Hi all: I'm now looking into kvm-unit-tests and encounted with some problems. 1. when I run run_test.sh, it reported exec: {config_fd}: not found. how and where to define it? Interesting, I don't know where this is coming from, maybe your shell? 2. all tests run with -smp

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

2015-08-26 Thread Xiao Guangrong
On 08/25/2015 11:12 PM, Stefan Hajnoczi wrote: 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 @@

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

2015-08-26 Thread Eric Auger
Hi Marc, On 08/25/2015 01:53 PM, Marc Zyngier wrote: 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

[PATCH v3 0/3] KVM: Dynamic halt_poll_ns

2015-08-26 Thread Wanpeng Li
v2 - v3: * grow/shrink vcpu-halt_poll_ns by *halt_poll_ns_grow or /halt_poll_ns_shrink * drop the macros and hard coding the numbers in the param definitions * update the comments 5-7 us * remove halt_poll_ns_max and use halt_poll_ns as the max halt_poll_ns time, vcpu-halt_poll_ns start at

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

2015-08-26 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. The shrink/grow

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

2015-08-26 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

Re: [PATCH] vfio: Enable VFIO device for powerpc

2015-08-26 Thread Alexander Graf
On 13.08.15 03:15, David Gibson wrote: ec53500f kvm: Add VFIO device added a special KVM pseudo-device which is used to handle any necessary interactions between KVM and VFIO. Currently that device is built on x86 and ARM, but not powerpc, although powerpc does support both KVM and VFIO.

Re: [PATCH] target-i386: enable cflushopt/clwb/pcommit instructions

2015-08-26 Thread Xiao Guangrong
On 08/22/2015 12:05 AM, Eduardo Habkost wrote: On Fri, Aug 21, 2015 at 01:05:12PM +0800, Xiao Guangrong wrote: These instructions are used by NVDIMM drivers and the specification locates at: https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf Let them be enabled on

RE: [PATCH] KVM: arm/arm64: BUG: Fix losing level-sensitive interrupts

2015-08-26 Thread Pavel Fedin
Hello! As for v4.1 not having that problem, the pl011 driver has gone though a lot if rework lately, and I wouldn't be surprised if it now exhibited a different behaviour thanks to the broken userspace behaviour. Sorry, you misunderstood me. Or i wrote badly. I meant that _KVM_ did not have

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

2015-08-26 Thread Xiao Guangrong
On 08/26/2015 12:03 AM, Stefan Hajnoczi wrote: 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/ Stupid typo, sorry. @@ -76,13 +109,87

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

2015-08-26 Thread Xiao Guangrong
On 08/26/2015 12:11 AM, Stefan Hajnoczi wrote: 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

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

2015-08-26 Thread Xiao Guangrong
On 08/26/2015 12:24 AM, Stefan Hajnoczi wrote: 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/ Stupid me, will fix the change log. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of

RE: [PATCH] KVM: arm/arm64: BUG: Fix losing level-sensitive interrupts

2015-08-26 Thread Pavel Fedin
Hello! So userspace drops the line to 0 *before* the guest had a chance to do anything? Well, this is not the expected behaviour for a level triggered interrupt I know. But, still... Imagine that we have misconfigured the HW for some reason. The device pulses an IRQ line, but we think

Re: [PATCH] KVM: arm/arm64: BUG: Fix losing level-sensitive interrupts

2015-08-26 Thread Marc Zyngier
On 26/08/15 11:58, Pavel Fedin wrote: Hello! So userspace drops the line to 0 *before* the guest had a chance to do anything? Well, this is not the expected behaviour for a level triggered interrupt I know. But, still... Imagine that we have misconfigured the HW for some reason. The

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

2015-08-26 Thread Jinjian (Ken)
Thank you for your reply. On 2015/8/26 16:55, Levente Kurusa wrote: Hello. Hi all: I'm now looking into kvm-unit-tests and encounted with some problems. 1. when I run run_test.sh, it reported exec: {config_fd}: not found. how and where to define it? Interesting, I don't know where

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

2015-08-26 Thread Xiao Guangrong
On 08/26/2015 12:16 AM, Stefan Hajnoczi wrote: 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

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

2015-08-26 Thread Xiao Guangrong
On 08/26/2015 12:23 AM, Stefan Hajnoczi wrote: 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.

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

2015-08-26 Thread Xiao Guangrong
On 08/26/2015 12:26 AM, Stefan Hajnoczi wrote: 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

Re: [PATCH 00/13] arm64: Virtualization Host Extension support

2015-08-26 Thread Antonios Motakis
On 26-Aug-15 11:59, Marc Zyngier wrote: On 26/08/15 10:21, Jan Kiszka wrote: On 2015-08-26 11:12, Antonios Motakis wrote: Hello Marc, On 08-Jul-15 18:19, Marc Zyngier wrote: ARMv8.1 comes with the Virtualization Host Extension (VHE for short), which enables simpler support of Type-2

RE: [PATCH] KVM: arm/arm64: BUG: Fix losing level-sensitive interrupts

2015-08-26 Thread Pavel Fedin
Hello! Hmm, there is definitely an inconsistency in the vgic code by getting here, but this is the wrong fix. I think you want something more along the lines of the following (completely untested, not even compile tested): Thank you very much. I also tried to propose an alternate solution

Re: [PATCH] KVM: arm/arm64: BUG: Fix losing level-sensitive interrupts

2015-08-26 Thread Christoffer Dall
On Wed, Aug 26, 2015 at 09:27:21AM +0100, Marc Zyngier wrote: On Wed, 26 Aug 2015 09:46:03 +0300 Pavel Fedin p.fe...@samsung.com wrote: Hi Pavel, Commit 71760950bf3dc796e5e53ea3300dec724a09f593 (arm/arm64: KVM: add a common vgic_queue_irq_to_lr fn) introduced vgic_queue_irq_to_lr()

Re: [PATCH 00/13] arm64: Virtualization Host Extension support

2015-08-26 Thread Antonios Motakis
Hello Marc, On 08-Jul-15 18:19, Marc Zyngier wrote: ARMv8.1 comes with the Virtualization Host Extension (VHE for short), which enables simpler support of Type-2 hypervisors. This extension allows the kernel to directly run at EL2, and significantly reduces the number of system registers

Re: [PATCH 00/13] arm64: Virtualization Host Extension support

2015-08-26 Thread Antonios Motakis
On 26-Aug-15 11:21, Jan Kiszka wrote: On 2015-08-26 11:12, Antonios Motakis wrote: Hello Marc, On 08-Jul-15 18:19, Marc Zyngier wrote: ARMv8.1 comes with the Virtualization Host Extension (VHE for short), which enables simpler support of Type-2 hypervisors. This extension allows the

[TRIVIAL PATCH kvm-unit-tests] x86: desc: fix typo

2015-08-26 Thread Levente Kurusa
It should be 'exception' instead of 'excecption'. Signed-off-by: Levente Kurusa lkur...@redhat.com --- lib/x86/desc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/x86/desc.c b/lib/x86/desc.c index 3237778..e3bf175 100644 --- a/lib/x86/desc.c +++ b/lib/x86/desc.c @@

RE: [PATCH] KVM: arm/arm64: BUG: Fix losing level-sensitive interrupts

2015-08-26 Thread Pavel Fedin
Hello! Sorry, but I don't really want to introduce another bug in the VGIC code (we have too many already). And what you're suggesting is to actually introduce a bug. Another, alternate idea... So far, we have a situation when empty LR, containing only LR_INT_EOI bit, is queued. Can we

Re: [PATCH] KVM: arm/arm64: BUG: Fix losing level-sensitive interrupts

2015-08-26 Thread Christoffer Dall
On Wed, Aug 26, 2015 at 09:46:03AM +0300, Pavel Fedin wrote: Commit 71760950bf3dc796e5e53ea3300dec724a09f593 (arm/arm64: KVM: add a common vgic_queue_irq_to_lr fn) introduced vgic_queue_irq_to_lr() function which checks vgic_dist_irq_is_pending() before setting LR_STATE_PENDING bit. However,