Re: [Qemu-devel] [PATCH RFC v1 1/3] target-ppc: add TLB_NEED_LOCAL_FLUSH flag

2016-09-09 Thread Benjamin Herrenschmidt
On Fri, 2016-09-09 at 15:07 +0100, Alex Bennée wrote: > Nikunj A Dadhania writes: > > I think we need a little more detail here. In fact when you post the > next version of the series could you please include a cover letter to > cover what the series is trying to

Re: [Qemu-devel] [PATCH v2 3/3] target-ppc: tlbie should have global effect

2016-09-09 Thread Benjamin Herrenschmidt
On Fri, 2016-09-09 at 18:44 +0530, Nikunj A Dadhania wrote: > +static inline void tlb_clear_flag(CPUState *cs) > +{ > +    PowerPCCPU *cpu = POWERPC_CPU(cs); > +    CPUPPCState *env = >env; > + > +    env->tlb_need_flush = 0; > +} What is the point of making this a separate function ? Also I'm

[Qemu-devel] [PULL v2 08/14] virtio: add virtqueue_rewind()

2016-09-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi virtqueue_discard() requires a VirtQueueElement but virtio-balloon does not migrate its in-use element. Introduce a new function that is similar to virtqueue_discard() but doesn't require a VirtQueueElement. This will allow virtio-balloon to access

[Qemu-devel] [PULL v2 12/14] virtio-pci: minor refactoring

2016-09-09 Thread Michael S. Tsirkin
!legacy && !modern is shorter than !(legacy || modern). I also perfer this (less ()s) as a matter of taste. Cc: Greg Kurz Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL v2 09/14] virtio-balloon: fix stats vq migration

2016-09-09 Thread Michael S. Tsirkin
From: Ladi Prosek The statistics virtqueue is not migrated properly because virtio-balloon does not include s->stats_vq_elem in the migration stream. After migration the statistics virtqueue hangs because the host never completes the last element (s->stats_vq_elem is NULL on

[Qemu-devel] [PULL v2 11/14] vhost: don't set vring call if no vector

2016-09-09 Thread Michael S. Tsirkin
From: Jason Wang We used to set vring call fd unconditionally even if guest driver does not use MSIX for this vritqueue at all. This will cause lots of unnecessary userspace access and other checks for drivers does not use interrupt at all (e.g virtio-net pmd). So check and

[Qemu-devel] [PULL v2 14/14] vhost-vsock: add virtio sockets device

2016-09-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Implement the new virtio sockets device for host<->guest communication using the Sockets API. Most of the work is done in a vhost kernel driver so that virtio-vsock can hook into the AF_VSOCK address family. The QEMU vhost-vsock device handles

[Qemu-devel] [PULL v2 10/14] virtio-pci: error out when both legacy and modern modes are disabled

2016-09-09 Thread Michael S. Tsirkin
From: Greg Kurz Without presuming if we got there because of a user mistake or some more subtle bug in the tooling, it really does not make sense to implement a non-functional device. Signed-off-by: Greg Kurz Reviewed-by: Marcel Apfelbaum

[Qemu-devel] [PULL v2 07/14] virtio-balloon: discard virtqueue element on reset

2016-09-09 Thread Michael S. Tsirkin
From: Ladi Prosek The one pending element is being freed but not discarded on device reset, which causes svq->inuse to creep up, eventually hitting the "Virtqueue size exceeded" error. Properly discarding the element on device reset makes sure that its buffers are unmapped

[Qemu-devel] [PULL v2 13/14] tests/acpi: speedup acpi tests

2016-09-09 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Use kvm acceleration if available. Disable kernel-irqchip and use qemu64 cpu for both kvm and tcg cases. Using kvm acceleration saves about a second and disabling kernel-irqchip has no visible performance impact. Acked-by: Michael S. Tsirkin

[Qemu-devel] [PULL v2 06/14] virtio: zero vq->inuse in virtio_reset()

2016-09-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi vq->inuse must be zeroed upon device reset like most other virtqueue fields. In theory, virtio_reset() just needs assert(vq->inuse == 0) since devices must clean up in-flight requests during reset (requests cannot not be leaked!). In practice, it is

[Qemu-devel] [PULL v2 05/14] virtio-pci: reduce modern_mem_bar size

2016-09-09 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Currently each VQ Notification Virtio Capability is allocated on a different page. The idea is to enable split drivers within guests, however there are no known plans to do that. The allocation will result in a 8MB BAR, more than various guest firmwares

[Qemu-devel] [PULL v2 04/14] target-i386: present virtual L3 cache info for vcpus

2016-09-09 Thread Michael S. Tsirkin
From: "Longpeng(Mike)" Some software algorithms are based on the hardware's cache info, for example, for x86 linux kernel, when cpu1 want to wakeup a task on cpu2, cpu1 will trigger a resched IPI and told cpu2 to do the wakeup if they don't share low level cache.

[Qemu-devel] [PULL v2 03/14] pc: Add 2.8 machine

2016-09-09 Thread Michael S. Tsirkin
From: "Longpeng(Mike)" This will used by the next patch. Signed-off-by: Longpeng(Mike) Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 3 +++ hw/i386/pc_piix.c| 16

[Qemu-devel] [PULL v2 02/14] virtio-pci: use size from correct structure

2016-09-09 Thread Michael S. Tsirkin
PIO MR registration should use size from the correct notify struct. Doesn't affect any visible behaviour because the field values are the same (both are 4). Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PULL v2 00/14] virtio,vhost,pc: fixes and updates

2016-09-09 Thread Michael S. Tsirkin
The following changes since commit c2a57aae9a1c3dd7de77daf5478df10379aeeebf: Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging (2016-09-09 12:49:41 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

[Qemu-devel] [PULL v2 01/14] virtio: Tell the user what went wrong when event_notifier_init failed

2016-09-09 Thread Michael S. Tsirkin
From: Thomas Huth event_notifier_init() can fail in real life, for example when there are not enough open file handles available (EMFILE) when using a lot of devices. So instead of leaving the average user with a cryptic error number only, print out a proper error message with

Re: [Qemu-devel] kvm test warnings

2016-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2016 at 09:24:45PM +0200, Thomas Huth wrote: > On 09.09.2016 21:03, Michael S. Tsirkin wrote: > > I am running make test on a box without kvm, and I am seeing these warnings: > > > > GTESTER check-qtest-ppc64 > > "kvm" accelerator not found. > > "kvm" accelerator not found. > >

[Qemu-devel] [PATCH] MAINTAINERS: Add include/hw/sh4/ to SH4 section

2016-09-09 Thread Thomas Huth
get_maintainer.pl now properly recognizes that the files in include/hw/sh4/ belong to SH4. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index dad82e7..ad70868 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[Qemu-devel] [PATCH] MAINTAINERS: Add include/hw/unicore32/ to UniCore32 section

2016-09-09 Thread Thomas Huth
get_maintainer.pl now properly recognizes that the file in include/hw/unicore32/ belongs to UniCore32. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9d17cb3..7196dba 100644 --- a/MAINTAINERS +++

[Qemu-devel] [PATCH] MAINTAINERS: Add include/hw/tricore/ to TriCore section

2016-09-09 Thread Thomas Huth
get_maintainer.pl now properly recognizes that the file in include/hw/tricore/ belongs to TriCore. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7196dba..dad82e7 100644 --- a/MAINTAINERS +++

[Qemu-devel] [PATCH] MAINTAINERS: Add include/sysemu/cpus.h

2016-09-09 Thread Thomas Huth
This header seems to belong to the guest CPU section since it contains prototypes for cpus.c. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index cc69977..9d17cb3 100644 --- a/MAINTAINERS +++

[Qemu-devel] [PATCH v4] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Ashijeet Acharya
This patch fixes the out-of-bounds check of migration parameters in qmp_migrate_set_parameters() for cpu-throttle-initial and cpu-throttle-increment by adding a return statement for both as they were broken since their introduction in 2.5 via commit 1626fee. Due to the missing return statements,

Re: [Qemu-devel] [PULL 00/14] virtio,vhost,pc: fixes and updates

2016-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2016 at 11:34:13PM +0300, Michael S. Tsirkin wrote: > The following changes since commit c2a57aae9a1c3dd7de77daf5478df10379aeeebf: > > Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into > staging (2016-09-09 12:49:41 +0100) > > are available in the git

Re: [Qemu-devel] [PATCH for-2.8 2/2] vhost-vsock: add virtio sockets device

2016-09-09 Thread Michael S. Tsirkin
On Tue, Aug 16, 2016 at 01:27:22PM +0100, Stefan Hajnoczi wrote: > Implement the new virtio sockets device for host<->guest communication > using the Sockets API. Most of the work is done in a vhost kernel > driver so that virtio-vsock can hook into the AF_VSOCK address family. > The QEMU

Re: [Qemu-devel] [PATCH v3] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Eric Blake
On 09/09/2016 03:37 PM, Ashijeet Acharya wrote: > This patch fixes the out-of-bounds check of migration parameters in > qmp_migrate_set_parameters() for cpu-throttle-initial and > cpu-throttle-increment by adding a return statement for both as they > were broken since their introduction in 2.5 via

[Qemu-devel] [PULL 12/14] virtio-pci: minor refactoring

2016-09-09 Thread Michael S. Tsirkin
!legacy && !modern is shorter than !(legacy || modern). I also perfer this (less ()s) as a matter of taste. Cc: Greg Kurz Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL 13/14] vhost-vsock: add virtio sockets device

2016-09-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Implement the new virtio sockets device for host<->guest communication using the Sockets API. Most of the work is done in a vhost kernel driver so that virtio-vsock can hook into the AF_VSOCK address family. The QEMU vhost-vsock device handles

[Qemu-devel] [PULL 10/14] virtio-pci: error out when both legacy and modern modes are disabled

2016-09-09 Thread Michael S. Tsirkin
From: Greg Kurz Without presuming if we got there because of a user mistake or some more subtle bug in the tooling, it really does not make sense to implement a non-functional device. Signed-off-by: Greg Kurz Reviewed-by: Marcel Apfelbaum

[Qemu-devel] [PULL 09/14] virtio-balloon: fix stats vq migration

2016-09-09 Thread Michael S. Tsirkin
From: Ladi Prosek The statistics virtqueue is not migrated properly because virtio-balloon does not include s->stats_vq_elem in the migration stream. After migration the statistics virtqueue hangs because the host never completes the last element (s->stats_vq_elem is NULL on

[Qemu-devel] [PATCH v2] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Ashijeet Acharya
This patch fixes the out-of-bounds check of migration parameters in qmp_migrate_set_parameters() for cpu-throttle-initial and cpu-throttle-increment by adding a return statement for both as they were broken since their introduction in 2.5 via commit 1626fee. Due to the missing return statements,

[Qemu-devel] [PULL 08/14] virtio: add virtqueue_rewind()

2016-09-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi virtqueue_discard() requires a VirtQueueElement but virtio-balloon does not migrate its in-use element. Introduce a new function that is similar to virtqueue_discard() but doesn't require a VirtQueueElement. This will allow virtio-balloon to access

Re: [Qemu-devel] [PATCH v2] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Ashijeet Acharya
On Sat, Sep 10, 2016 at 2:03 AM, Ashijeet Acharya wrote: > This patch fixes the out-of-bounds check of migration parameters in > qmp_migrate_set_parameters() for cpu-throttle-initial and > cpu-throttle-increment by adding a return statement for both as they > were

[Qemu-devel] [PULL 07/14] virtio-balloon: discard virtqueue element on reset

2016-09-09 Thread Michael S. Tsirkin
From: Ladi Prosek The one pending element is being freed but not discarded on device reset, which causes svq->inuse to creep up, eventually hitting the "Virtqueue size exceeded" error. Properly discarding the element on device reset makes sure that its buffers are unmapped

[Qemu-devel] [PULL 11/14] vhost: don't set vring call if no vector

2016-09-09 Thread Michael S. Tsirkin
From: Jason Wang We used to set vring call fd unconditionally even if guest driver does not use MSIX for this vritqueue at all. This will cause lots of unnecessary userspace access and other checks for drivers does not use interrupt at all (e.g virtio-net pmd). So check and

[Qemu-devel] [PULL 06/14] virtio: zero vq->inuse in virtio_reset()

2016-09-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi vq->inuse must be zeroed upon device reset like most other virtqueue fields. In theory, virtio_reset() just needs assert(vq->inuse == 0) since devices must clean up in-flight requests during reset (requests cannot not be leaked!). In practice, it is

[Qemu-devel] [PULL 05/14] virtio-pci: reduce modern_mem_bar size

2016-09-09 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Currently each VQ Notification Virtio Capability is allocated on a different page. The idea is to enable split drivers within guests, however there are no known plans to do that. The allocation will result in a 8MB BAR, more than various guest firmwares

[Qemu-devel] [PULL 04/14] target-i386: present virtual L3 cache info for vcpus

2016-09-09 Thread Michael S. Tsirkin
From: "Longpeng(Mike)" Some software algorithms are based on the hardware's cache info, for example, for x86 linux kernel, when cpu1 want to wakeup a task on cpu2, cpu1 will trigger a resched IPI and told cpu2 to do the wakeup if they don't share low level cache.

[Qemu-devel] [PATCH v3] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Ashijeet Acharya
This patch fixes the out-of-bounds check of migration parameters in qmp_migrate_set_parameters() for cpu-throttle-initial and cpu-throttle-increment by adding a return statement for both as they were broken since their introduction in 2.5 via commit 1626fee. Due to the missing return statements,

[Qemu-devel] [PULL 02/14] virtio-pci: use size from correct structure

2016-09-09 Thread Michael S. Tsirkin
PIO MR registration should use size from the correct notify struct. Doesn't affect any visible behaviour because the field values are the same (both are 4). Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PULL 00/14] virtio,vhost,pc: fixes and updates

2016-09-09 Thread Michael S. Tsirkin
The following changes since commit c2a57aae9a1c3dd7de77daf5478df10379aeeebf: Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging (2016-09-09 12:49:41 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

[Qemu-devel] [PULL 03/14] pc: Add 2.8 machine

2016-09-09 Thread Michael S. Tsirkin
From: "Longpeng(Mike)" This will used by the next patch. Signed-off-by: Longpeng(Mike) Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 3 +++ hw/i386/pc_piix.c| 16

[Qemu-devel] [PULL 14/14] tests/acpi: speedup acpi tests

2016-09-09 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Use kvm acceleration if available. Disable kernel-irqchip and use qemu64 cpu for both kvm and tcg cases. Using kvm acceleration saves about a second and disabling kernel-irqchip has no visible performance impact. Acked-by: Michael S. Tsirkin

[Qemu-devel] [PULL 01/14] virtio: Tell the user what went wrong when event_notifier_init failed

2016-09-09 Thread Michael S. Tsirkin
From: Thomas Huth event_notifier_init() can fail in real life, for example when there are not enough open file handles available (EMFILE) when using a lot of devices. So instead of leaving the average user with a cryptic error number only, print out a proper error message with

Re: [Qemu-devel] [PATCH v3 05/34] int128: Add int128_make128

2016-09-09 Thread Richard Henderson
On 09/09/2016 06:01 AM, Leon Alrae wrote: This causes build failures for me on CentOS6.5: /user/lea/dev/qemu/include/qemu/int128.h:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Int128’ /user/lea/dev/qemu/include/qemu/int128.h:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or

Re: [Qemu-devel] [PATCH] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Eric Blake
On 09/09/2016 02:14 PM, Ashijeet Acharya wrote: > This patch fixes the out-of-bounds check migration parameters in > qmp_migrate_set_parameters() for cpu-throttle-initial and > cpu-throttle-increment by adding a return statement for both. > Due to the missing return statements, parmaters were

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Richard Henderson
On 09/09/2016 12:29 PM, Alex Bennée wrote: config-temp/qemu-conf.c:12:8: error: unused variable 'is_host64' [-Werror=unused-variable] cc1: all warnings being treated as errors Try this. r~ diff --git a/configure b/configure index 519de5d..bd59cdd 100755 --- a/configure +++ b/configure @@

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Richard Henderson
On 09/09/2016 12:29 PM, Alex Bennée wrote: config-temp/qemu-conf.c: In function 'main': config-temp/qemu-conf.c:12:8: error: unused variable 'is_host64' [-Werror=unused-variable] cc1: all warnings being treated as errors Ah hah. All I needed was a compiler without __atomic support. I thought

Re: [Qemu-devel] [PATCH] linux-user: Fix incorrect offset of tuc_stack in ARM do_sigframe_return_v2

2016-09-09 Thread Peter Maydell
On 9 September 2016 at 19:35, Timothy E Baldwin wrote: > struct target_ucontext_v2 is not at the begining of the signal frame, > therefore do_sigaltstack was being passed bogus arguments. > > As the offset depends on the type of signal frame fixed by passing in

Re: [Qemu-devel] [PATCH v7 1/4] vfio: Mediated device Core driver

2016-09-09 Thread Kirti Wankhede
On 9/10/2016 12:12 AM, Alex Williamson wrote: > On Fri, 9 Sep 2016 23:18:45 +0530 > Kirti Wankhede wrote: > >> On 9/8/2016 1:39 PM, Jike Song wrote: >>> On 08/25/2016 11:53 AM, Kirti Wankhede wrote: >> +---+ | | |

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Alex Bennée
Richard Henderson writes: > On 09/09/2016 11:33 AM, Alex Bennée wrote: >> >> Richard Henderson writes: >> >>> Changes since v2: >>> * Fix build for 32-bit host without 64-bit atomics. >>> Tested with --extra-cflags='-march=-i486'. >>> This is patch

Re: [Qemu-devel] kvm test warnings

2016-09-09 Thread Thomas Huth
On 09.09.2016 21:03, Michael S. Tsirkin wrote: > I am running make test on a box without kvm, and I am seeing these warnings: > > GTESTER check-qtest-ppc64 > "kvm" accelerator not found. > "kvm" accelerator not found. > GTESTER check-qtest-x86_64 > Could not access KVM kernel module: No such file

Re: [Qemu-devel] [PATCH v7] docs: add cpu-hotplug.txt

2016-09-09 Thread Eduardo Habkost
On Wed, Sep 07, 2016 at 09:52:59AM +0800, Dou Liyang wrote: [...] > > > > The option: > > -smp MODEL,+FOO,+BAR > > I guess you may mean "-cpu", not "-smp" Oops, yes. Thanks. :) > > > is internally translated to: > > -global MODEL.FOO=on > > -global MODEL.BAR=on > > in addition to

[Qemu-devel] [PATCH] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Ashijeet Acharya
This patch fixes the out-of-bounds check migration parameters in qmp_migrate_set_parameters() for cpu-throttle-initial and cpu-throttle-increment by adding a return statement for both. Due to the missing return statements, parmaters were getting set to out-of-bounds values despite the error.

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Richard Henderson
On 09/09/2016 11:33 AM, Alex Bennée wrote: Richard Henderson writes: Changes since v2: * Fix build for 32-bit host without 64-bit atomics. Tested with --extra-cflags='-march=-i486'. This is patch 15, which might ought to get folded back into patch 13 for

[Qemu-devel] [PATCH v5] migrate: Move max-bandwidth and downtime-limit to migrate_set_parameter

2016-09-09 Thread Ashijeet Acharya
Mark old-commands for speed and downtime as deprecated. Move max-bandwidth and downtime-limit into migrate-set-parameters for setting maximum migration speed and expected downtime limit parameters respectively. Change downtime units to milliseconds (only for new-command) and update the query part

[Qemu-devel] kvm test warnings

2016-09-09 Thread Michael S. Tsirkin
I am running make test on a box without kvm, and I am seeing these warnings: GTESTER check-qtest-ppc64 "kvm" accelerator not found. "kvm" accelerator not found. GTESTER check-qtest-x86_64 Could not access KVM kernel module: No such file or directory failed to initialize KVM: No such file or

Re: [Qemu-devel] [PATCH] tests/acpi: speedup acpi tests

2016-09-09 Thread Michael S. Tsirkin
On Tue, Sep 06, 2016 at 10:22:26PM +0200, Paolo Bonzini wrote: > > > On 06/09/2016 21:21, Michael S. Tsirkin wrote: > > On Tue, Sep 06, 2016 at 09:11:16PM +0200, Paolo Bonzini wrote: > >> > >> > >> On 06/09/2016 17:51, Michael S. Tsirkin wrote: > Just use "-machine accel=kvm:tcg" and let

Re: [Qemu-devel] [RFC] virtio-bus: Plug devices after features are negotiated

2016-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2016 at 06:16:27PM +0200, Maxime Coquelin wrote: > > > On 09/09/2016 05:39 PM, Michael S. Tsirkin wrote: > > On Fri, Sep 09, 2016 at 04:14:59PM +0200, Maxime Coquelin wrote: > > > > Currently, devices are plugged before features are negotiated. > > > > If the backend doesn't

Re: [Qemu-devel] [PATCH v7 1/4] vfio: Mediated device Core driver

2016-09-09 Thread Alex Williamson
On Fri, 9 Sep 2016 23:18:45 +0530 Kirti Wankhede wrote: > On 9/8/2016 1:39 PM, Jike Song wrote: > > On 08/25/2016 11:53 AM, Kirti Wankhede wrote: > > >> +---+ > >> | | > >> | +---+ | mdev_register_driver() +--+ > >> | |

[Qemu-devel] [PATCH] linux-user: Fix incorrect offset of tuc_stack in ARM do_sigframe_return_v2

2016-09-09 Thread Timothy E Baldwin
struct target_ucontext_v2 is not at the begining of the signal frame, therefore do_sigaltstack was being passed bogus arguments. As the offset depends on the type of signal frame fixed by passing in the beginning of the context from do_sigreturn_v2 and do_rt_sigreturn_v2. Suggested-by: Peter

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Alex Bennée
Richard Henderson writes: > Changes since v2: > * Fix build for 32-bit host without 64-bit atomics. > Tested with --extra-cflags='-march=-i486'. > This is patch 15, which might ought to get folded back into > patch 13 for bisection, but is ugly for review. Hmm I

Re: [Qemu-devel] [v3 0/6] AMD IOMMU

2016-09-09 Thread Michael S. Tsirkin
On Wed, Aug 31, 2016 at 07:25:11PM +0300, David Kiarie wrote: > Hello all, > > Changes since V2 > -formating fixes. > -fixed an issue where the right IOAPIC id was not being correctly set when > using kernel_irqchip=off > > The following patchset implements AMD-Vi interrupt remapping logic

Re: [Qemu-devel] [V17 0/4] AMD IOMMU

2016-09-09 Thread Michael S. Tsirkin
On Wed, Aug 31, 2016 at 07:17:39PM +0300, David Kiarie wrote: > Hi all, > > This patchset adds basic AMD IOMMU emulation support to Qemu. Jan, Igor, any comments on this one? I suspect it's time we merged this and followed-up upstream. > Changes since v16 - this is mainly supposed to come as

Re: [Qemu-devel] [PATCH] virtio-gpu-pci: tag as not hotpluggable

2016-09-09 Thread Michael S. Tsirkin
On Thu, Sep 08, 2016 at 09:17:17AM +0200, Gerd Hoffmann wrote: > We can't hotplug display adapters in qemu, tag virtio-gpu-pci > accordingly (virtio-vga already has this). > > Signed-off-by: Gerd Hoffmann Acked-by: Michael S. Tsirkin I assume you merged

[Qemu-devel] [PATCH] virtio-pci: minor refactoring

2016-09-09 Thread Michael S. Tsirkin
!legacy && !modern is shorter than !(legacy || modern). I also perfer this (less ()s) as a matter of taste. Cc: Greg Kurz Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH v2 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1

2016-09-09 Thread Maxime Coquelin
On 09/09/2016 07:48 PM, Michael S. Tsirkin wrote: On Fri, Sep 09, 2016 at 03:10:07PM +0200, Maxime Coquelin wrote: This patch makes pci devices plugging more robust, by not confusing guest with modern interface when the backend doesn't support VIRTIO_F_VERSION_1. Cc: Cornelia Huck

Re: [Qemu-devel] [PATCH v2 1/2] virtio: Add function to check whether backend supports VIRTIO_1

2016-09-09 Thread Maxime Coquelin
On 09/09/2016 07:47 PM, Michael S. Tsirkin wrote: On Fri, Sep 09, 2016 at 08:00:31PM +0300, Marcel Apfelbaum wrote: On 09/09/2016 04:10 PM, Maxime Coquelin wrote: This patch adds virtio_test_backend_virtio_1() function to check whether backend supports VIRTIO_F_VERSION_1 before the

Re: [Qemu-devel] [PATCH v7 1/4] vfio: Mediated device Core driver

2016-09-09 Thread Kirti Wankhede
On 9/8/2016 1:39 PM, Jike Song wrote: > On 08/25/2016 11:53 AM, Kirti Wankhede wrote: >> +---+ >> | | >> | +---+ | mdev_register_driver() +--+ >> | | | +<+ __init() | >> | | mdev | |

[Qemu-devel] [PATCH v2 5/6] block: convert to use the qemu_szutostr functions

2016-09-09 Thread Daniel P. Berrange
Remove the get_human_readable_size() method in favour of using the new common qemu_szutostr() method. There are two slight differences in output format - the new code will also deal with petabyte and exabyte suffixes, where as old code stopped at the terrabyte level. - if the value has a

Re: [Qemu-devel] [PATCH v2 1/2] virtio: Add function to check whether backend supports VIRTIO_1

2016-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2016 at 08:00:31PM +0300, Marcel Apfelbaum wrote: > On 09/09/2016 04:10 PM, Maxime Coquelin wrote: > > This patch adds virtio_test_backend_virtio_1() function to > > check whether backend supports VIRTIO_F_VERSION_1 before the > > negociation takes place. > > > > Cc: Cornelia Huck

Re: [Qemu-devel] [PATCH v2 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1

2016-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2016 at 03:10:07PM +0200, Maxime Coquelin wrote: > This patch makes pci devices plugging more robust, by not confusing > guest with modern interface when the backend doesn't support > VIRTIO_F_VERSION_1. > > Cc: Cornelia Huck > Cc: Marcel Apfelbaum

[Qemu-devel] [PATCH v2 2/6] qapi: convert StringOutputVisitor to use qemu_szutostr

2016-09-09 Thread Daniel P. Berrange
Instead inlining code for formatting sized integers, call out to the new qemu_szutostr function. Signed-off-by: Daniel P. Berrange --- qapi/string-output-visitor.c | 20 +--- tests/test-string-output-visitor.c | 22 ++ 2 files

[Qemu-devel] [PATCH v2 6/6] block: convert to use qapi_stringify_ImageInfoSpecific

2016-09-09 Thread Daniel P. Berrange
When 'qemu-img info' prints out format specific information, it first converts the QAPI object into a JSON based QObject data structure. Unfortunately structs have to be turned into dicts, which looses all information about field ordering, so the data printed appears in a semi-random order.

[Qemu-devel] [PATCH v2 3/6] qapi: assert that visitor impls have required callbacks

2016-09-09 Thread Daniel P. Berrange
Not all visitor implementations supply the full set of visitor callback functions. For example, the string output visitor does not provide 'start_struct' and friends. If you don't know this and feed it an object that uses structs, you'll get a crash: Segmentation fault (core dumped) Crashing

[Qemu-devel] [PATCH v2 4/6] qapi: add a text output visitor for pretty printing types

2016-09-09 Thread Daniel P. Berrange
The current approach for pretty-printing QAPI types is to convert them to JSON using the QMP output visitor and then pretty-print the JSON document. This has an unfixable problem that structs get their keys printed out in random order, since JSON dicts do not contain any key ordering information.

Re: [Qemu-devel] [PATCH v3 04/34] int128: Use __int128 if available

2016-09-09 Thread Richard Henderson
On 09/09/2016 10:19 AM, Alex Bennée wrote: Richard Henderson writes: Signed-off-by: Richard Henderson --- include/qemu/int128.h | 135 +- tests/test-int128.c | 22 2 files changed, 145

[Qemu-devel] [PATCH v2 0/6] Stable output of blockdev format specific info

2016-09-09 Thread Daniel P. Berrange
This is an update of the bits of this previous series which were not merged https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg01723.html The problem addressed in this series is that the 'qemu-img info' command does not have a stable output format for the image specific info objects.

[Qemu-devel] [PATCH v2 1/6] cutils: add helpers for formatting sized values

2016-09-09 Thread Daniel P. Berrange
Introduce qemu_sztostr which takes an int and turns it into a sized string. Variants are added for both signed and unsigned integers. Signed-off-by: Daniel P. Berrange --- include/qemu/cutils.h | 12 +++ tests/test-cutils.c | 96

[Qemu-devel] [PATCH v6 5/8] hw/intc/arm_gicv3_its: Implement support for in-kernel ITS emulation

2016-09-09 Thread Eric Auger
From: Pavel Fedin The ITS control frame is in-kernel emulated while accesses to the GITS_TRANSLATER are mediated through the KVM_SIGNAL_MSI ioctl (MSI direct MSI injection advertised by the CAP_SIGNAL_MSI capability) the kvm_gsi_direct_mapping is explicitly set to false to

Re: [Qemu-devel] [PATCH v2] qom: Implement qom-get HMP command

2016-09-09 Thread Daniel P. Berrange
On Fri, Sep 09, 2016 at 06:21:15PM +0200, Markus Armbruster wrote: > "Dr. David Alan Gilbert" writes: > > > * Daniel P. Berrange (berra...@redhat.com) wrote: > >> IIUC, you switched because string-output-visitor could not handle > >> complex types. > >> > >> I have

[Qemu-devel] [PATCH v6 7/8] ACPI: Add GIC Interrupt Translation Service Structure definition

2016-09-09 Thread Eric Auger
From: Shannon Zhao ACPI Spec 6.0 introduces GIC Interrupt Translation Service Structure. Here we add the definition of the Structure. Signed-off-by: Shannon Zhao --- include/hw/acpi/acpi-defs.h | 13 - 1 file changed, 12

[Qemu-devel] [PATCH v6 2/8] hw/intc/arm_gicv3_its: Implement ITS base class

2016-09-09 Thread Eric Auger
From: Pavel Fedin This is the basic skeleton for both KVM and software-emulated ITS. Since we already prepare status structure, we also introduce complete VMState description. But, because we currently have no migratable implementations, we also set unmigratable flag.

[Qemu-devel] [PATCH v6 8/8] ARM: Virt: ACPI: Add GIC ITS description in ACPI MADT table

2016-09-09 Thread Eric Auger
From: Shannon Zhao If GIC ITS is supported, add description in ACPI MADT table, then guest could use ITS when booting with ACPI. Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 12 1 file changed, 12 insertions(+) diff

[Qemu-devel] [PATCH v6 4/8] kvm-all: Pass requester ID to MSI routing functions

2016-09-09 Thread Eric Auger
From: Pavel Fedin Introduce global kvm_msi_use_devid flag and pass the device ID, if needed, while building the MSI route entry. Device IDs are required by the ARM GICv3 ITS (IRQ remapping function is based on this information). Signed-off-by: Pavel Fedin

[Qemu-devel] [PATCH v6 1/8] hw/intc/arm_gic(v3)_kvm: Initialize gsi routing

2016-09-09 Thread Eric Auger
From: Eric Auger Advertise gsi routing and set up irqchip routing entries for GIC SPIs. This is not mandated as long as MSI routing is not used (because the kernel sets a default irqchip routing table). However once MSI routing gets used (for VIRTIO-PCI vhost for

[Qemu-devel] [PATCH v6 3/8] target-arm: move gicv3_class_name from machine to kvm_arm.h

2016-09-09 Thread Eric Auger
Machine.c contains code related to migration. Let's move gicv3_class_name to kvm_arm.h instead. Signed-off-by: Eric Auger Suggested-by: Peter Maydell Reviewed-by: Peter Maydell --- v5 -> v6: - add Peter's R-b v4 ->

[Qemu-devel] [PATCH v6 0/8] vITS support

2016-09-09 Thread Eric Auger
This series introduces support for in-kernel GICv3 ITS emulation. On dt guest the functionality is complete and was tested on Cavium ThunderX with virtio-net-pci and vhost-net. On ACPI guest the series was tested with virtio-net-pci only. For vhost-net, using MSIX we currently miss the ACPI IORT

[Qemu-devel] [PATCH v6 6/8] arm/virt: Add ITS to the virt board

2016-09-09 Thread Eric Auger
From: Pavel Fedin If supported by the configuration, ITS will be added automatically. This patch also renames v2m_phandle to msi_phandle because it's now used by both MSI implementations. Signed-off-by: Pavel Fedin Signed-off-by: Eric Auger

Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}

2016-09-09 Thread Daniel P. Berrange
On Fri, Sep 09, 2016 at 07:05:04PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > v4 changes: > > - remove two standard headers since they are included in osdep.h > > already [Fam] > > - make sure it passes build on all platforms (no --target-list > > specified

Re: [Qemu-devel] [PATCH v3 04/34] int128: Use __int128 if available

2016-09-09 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson > --- > include/qemu/int128.h | 135 > +- > tests/test-int128.c | 22 > 2 files changed, 145 insertions(+), 12 deletions(-) > > diff

Re: [Qemu-devel] [PATCH v3 03/34] exec: Avoid direct references to Int128 parts

2016-09-09 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > exec.c| 4 ++-- > include/qemu/int128.h | 10 ++ > 2 files changed, 12 insertions(+), 2 deletions(-) > > diff

Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}

2016-09-09 Thread Markus Armbruster
Peter Xu writes: > v4 changes: > - remove two standard headers since they are included in osdep.h > already [Fam] > - make sure it passes build on all platforms (no --target-list > specified during configure) > > v3 changes: > - implement error_report_fatal using function

Re: [Qemu-devel] [PATCH v2 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1

2016-09-09 Thread Marcel Apfelbaum
On 09/09/2016 04:10 PM, Maxime Coquelin wrote: This patch makes pci devices plugging more robust, by not confusing guest with modern interface when the backend doesn't support VIRTIO_F_VERSION_1. Cc: Cornelia Huck Cc: Marcel Apfelbaum Cc: Michael

Re: [Qemu-devel] [PATCH v2 1/2] virtio: Add function to check whether backend supports VIRTIO_1

2016-09-09 Thread Marcel Apfelbaum
On 09/09/2016 04:10 PM, Maxime Coquelin wrote: This patch adds virtio_test_backend_virtio_1() function to check whether backend supports VIRTIO_F_VERSION_1 before the negociation takes place. Cc: Cornelia Huck Cc: Marcel Apfelbaum Cc: Michael S.

[Qemu-devel] [PATCH v5 03/14] aspeed-soc: provide a framework to add new SoCs

2016-09-09 Thread Cédric Le Goater
Let's define an object class for each Aspeed SoC we support. A AspeedSoCInfo struct gathers the SoC specifications which can later be used by an instance of the class or by a board using the SoC. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery ---

[Qemu-devel] [PATCH v5 13/14] aspeed: add a ram_size property to the memory controller

2016-09-09 Thread Cédric Le Goater
Configure the size of the RAM of the SOC using a property to propagate the value down to the memory controller from the board level. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 2 ++ hw/arm/aspeed_soc.c | 2 ++ hw/misc/aspeed_sdmc.c |

Re: [Qemu-devel] [PATCH v6 3/3] tests: add RTAS command in the protocol

2016-09-09 Thread Greg Kurz
On Thu, 8 Sep 2016 21:00:07 +0200 Laurent Vivier wrote: > Add a first test to validate the protocol: > > - rtas/get-time-of-day compares the time > from the guest with the time from the host. > > Signed-off-by: Laurent Vivier > --- > v6: > - rebase >

Re: [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers

2016-09-09 Thread Richard Henderson
On 09/09/2016 07:46 AM, Leon Alrae wrote: Wouldn't it be useful if tcg.h provided also aliases for _le/_be atomic helpers (equivalent to helper_ret_X_mmu) so that in target-* code we wouldn't need to care about the endianness (specifically I'm thinking about SC in MIPS where I need to select

Re: [Qemu-devel] [PATCH v2 5/9] hw: arm: Add SMMUv3 to virt platform, create DTS accordingly

2016-09-09 Thread Auger Eric
Hi Prem, > Default virt platform now creates SMMU device. > Default config to build SMMU device along is in previous patches. > > Signed-off-by: Prem Mallappa > --- > hw/arm/virt.c | 62 > +++ >

  1   2   3   >