Re: [Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW

2015-09-28 Thread Markus Armbruster
Stefan Weil writes: > On Windows, getpid() always returns an int value, but pid_t (which is > expected by the format string) is either a 32 bit or a 64 bit value. > > Without a type cast (or a modified format string), the compiler prints > a warning when building for 64 bit Windows and the result

Re: [Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter

2015-09-28 Thread Markus Armbruster
Jason Wang writes: > On 09/25/2015 11:07 PM, Markus Armbruster wrote: >> Yang Hongyang writes: >> >>> On 09/24/2015 05:12 PM, Markus Armbruster wrote: Yang Hongyang writes: > This filter is to buffer/release packets, this feature can be used > when using MicroCheckpointing, or

Re: [Qemu-devel] feature idea: allow user to run custom scripts

2015-09-28 Thread Markus Armbruster
Programmingkid writes: > On Sep 27, 2015, at 10:30 PM, Michael Roth wrote: > >> Quoting Programmingkid (2015-09-27 20:49:24) >>> >>> On Sep 27, 2015, at 2:53 PM, Peter Crosthwaite wrote: >>> On Sun, Sep 27, 2015 at 3:13 AM, Peter Maydell wrote: > On 27 September 2015 at 04:39, Pr

Re: [Qemu-devel] [RFC v5 1/6] exec.c: Add new exclusive bitmap to ram_list

2015-09-28 Thread alvise rigo
On Sat, Sep 26, 2015 at 7:15 PM, Richard Henderson wrote: > On 09/24/2015 01:32 AM, Alvise Rigo wrote: > > +if (cpu == smp_cpus) { > > +if (smp_cpus >= EXCL_BITMAP_CELL_SZ) { > > +return bitmap[EXCL_BITMAP_GET_BYTE_OFFSET(addr)]; > > +} else { > > +retu

Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices

2015-09-28 Thread Markus Armbruster
Thomas Huth writes: > On 25/09/15 16:17, Markus Armbruster wrote: >> Thomas Huth writes: >> >>> On 24/09/15 20:57, Markus Armbruster wrote: Several devices don't survive object_unref(object_new(T)): they crash or hang during cleanup, or they leave dangling pointers behind. T

Re: [Qemu-devel] [RFC 2/6] monitor: Simplify event throttling

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > On 09/25/2015 08:00 AM, Markus Armbruster wrote: >> The event throttling state machine is hard to understand. I'm not >> sure it's entirely correct. Rewrite it in a more straightforward >> manner: >> >> State 1: No event sent recently (less than evconf->rate ns ago) >> >>

Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices

2015-09-28 Thread Andreas Färber
Am 28.09.2015 um 10:11 schrieb Markus Armbruster: > Hmm, does creating and destroying a macio object leave the memory region > behind? > > Paolo, is calling memory_region_init() in an instance_init() method > okay? > > If yes, where should they be destroyed, and how? The counterpart to .instance

Re: [Qemu-devel] [RFC 3/6] monitor: Split MonitorQAPIEventConf off MonitorQAPIEventState

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > On 09/25/2015 08:00 AM, Markus Armbruster wrote: >> In preparation of turning monitor_qapi_event_state[] into a hash table >> for finer grained throttling. >> >> Signed-off-by: Markus Armbruster >> --- >> monitor.c | 79 >> ++---

Re: [Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW

2015-09-28 Thread Stefan Weil
Am 28.09.2015 um 09:00 schrieb Markus Armbruster: > Stefan Weil writes: > >> On Windows, getpid() always returns an int value, but pid_t (which is >> expected by the format string) is either a 32 bit or a 64 bit value. >> >> Without a type cast (or a modified format string), the compiler prints >>

Re: [Qemu-devel] [RFC 4/6] monitor: Turn monitor_qapi_event_state[] into a hash table

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > On 09/25/2015 08:00 AM, Markus Armbruster wrote: >> In preparation of finer grained throttling. >> >> Signed-off-by: Markus Armbruster >> --- >> monitor.c | 55 ++- >> 1 file changed, 38 insertions(+), 17 deletions(-) >>

Re: [Qemu-devel] [RFC 5/6] monitor: Throttle event VSERPORT_CHANGE separately by "id"

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > On 09/25/2015 08:00 AM, Markus Armbruster wrote: >> VSERPORT_CHANGE is emitted when the guest opens or closes a >> virtio-serial port. The event's member "id" identifies the port. >> >> When several events arrive quickly, throttling drops all but the last >> of them. Becau

[Qemu-devel] [PATCH v12 00/10] Add a netfilter object and netbuffer filter

2015-09-28 Thread Yang Hongyang
This patch add an netfilter abstract object, captures all network packets on associated netdev. Also implement a concrete filter buffer based on this abstract object. the "buffer" netfilter could be used by VM FT solutions like MicroCheckpointing, to buffer/release packets. Or to simulate packet de

Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices

2015-09-28 Thread Paolo Bonzini
On 28/09/2015 10:11, Markus Armbruster wrote: > > For most of the devices my patch marks, we have a pretty good idea on > what's wrong with them. spapr-rng is among the exceptions. You believe > it's actually "the macio object". Which one? "macio" is abstract... > > You report introspecting

[Qemu-devel] [PATCH v12 03/10] netfilter: hook packets before net queue send

2015-09-28 Thread Yang Hongyang
Capture packets that will be sent. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/filter.h | 8 +++ net/filter.c | 17 ++ net/net.c| 66 3 files changed, 9

[Qemu-devel] [PATCH v12 01/10] vl.c: init delayed object after net_init_clients

2015-09-28 Thread Yang Hongyang
Init delayed object after net_init_clients, because netfilters need to be initialized after net clients initialized. Signed-off-by: Yang Hongyang --- vl.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index e211f6a..6f27b64 100644 --- a/vl.c +++ b/

[Qemu-devel] [PATCH v12 05/10] net/queue: introduce NetQueueDeliverFunc

2015-09-28 Thread Yang Hongyang
net/queue.c has logic to send/queue/flush packets but a qemu_deliver_packet_iov() call is hardcoded. Abstract this func so that we can use our own deliver function in netfilter. Signed-off-by: Yang Hongyang Cc: Stefan Hajnoczi Signed-off-by: Jason Wang --- include/net/queue.h | 13

[Qemu-devel] [PATCH v12 02/10] init/cleanup of netfilter object

2015-09-28 Thread Yang Hongyang
Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we delete the netdev, we also delete the netfilter object attached to it, because if the netdev is removed, the filter which attached to it is useless. QTAILQ_

[Qemu-devel] [PATCH v12 06/10] netfilter: add an API to pass the packet to next filter

2015-09-28 Thread Yang Hongyang
add an API qemu_netfilter_pass_to_next() to pass the packet to next filter. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/filter.h | 7 +++ net/filter.c | 58 2 files changed, 65

[Qemu-devel] [PATCH v12 08/10] net/queue: export qemu_net_queue_append_iov

2015-09-28 Thread Yang Hongyang
This will be used by buffer filter implementation later to queue packets. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/queue.h | 7 +++ net/queue.c | 12 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a

[Qemu-devel] [PATCH v12 04/10] net: merge qemu_deliver_packet and qemu_deliver_packet_iov

2015-09-28 Thread Yang Hongyang
qemu_deliver_packet_iov already have the compat delivery, we can drop qemu_deliver_packet. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/net.h | 5 - net/net.c | 51 --- net/queue.c | 6 +- 3 files

[Qemu-devel] [PATCH v12 09/10] netfilter: add a netbuffer filter

2015-09-28 Thread Yang Hongyang
This filter is to buffer/release packets, this feature can be used when using MicroCheckpointing, or other Remus like VM FT solutions, you can also use it to simulate the network delay. Usage: -netdev tap,id=bn0 -object filter-buffer,id=f0,netdev=bn0,queue=rx,interval=1000 NOTE: Interval is in

[Qemu-devel] [PATCH v12 10/10] tests: add test cases for netfilter object

2015-09-28 Thread Yang Hongyang
Using qtest qmp interface to implement following cases: 1) add/remove netfilter 2) add a netfilter then delete the netdev 3) add/remove more than one netfilters 4) add more than one netfilters and then delete the netdev Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- tests/.gitignore

[Qemu-devel] [PATCH v12 07/10] netfilter: print filter info associate with the netdev

2015-09-28 Thread Yang Hongyang
From: Yang Hongyang When execute "info network", print filter info also. add a info_str member to NetFilterState, store specific filters info. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/filter.h | 1 + net/filter.c | 20 net/net.c

Re: [Qemu-devel] [RFC 6/6] docs: Document QMP event rate limiting

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > On 09/25/2015 08:00 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> docs/qmp/qmp-events.txt | 12 >> docs/qmp/qmp-spec.txt | 5 + >> 2 files changed, 17 insertions(+) > > Obvious rebase implied if your other patch to s,docs/qmp

Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices

2015-09-28 Thread Paolo Bonzini
On 28/09/2015 10:15, Andreas Färber wrote: > Am 28.09.2015 um 10:11 schrieb Markus Armbruster: >> Hmm, does creating and destroying a macio object leave the memory region >> behind? >> >> Paolo, is calling memory_region_init() in an instance_init() method >> okay? >> >> If yes, where should they

Re: [Qemu-devel] [PATCH] Makefile: fix build when VPATH is outside GIT tree

2015-09-28 Thread Paolo Bonzini
On 25/09/2015 23:24, Steve Ellcey wrote: > On Fri, 2015-09-18 at 13:40 +0200, Paolo Bonzini wrote: > > > > The problem is due to the fact that some sub directory deps > > > were listed against SOFTMMU_SUBDIR_RULES instead of SUBDIR_RULES, > > > so were only processed for system emulators, not us

Re: [Qemu-devel] [RFC 0/6] Throttle event VSERPORT_CHANGE separately by "id"

2015-09-28 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Fri, Sep 25, 2015 at 4:00 PM, Markus Armbruster wrote: >> VSERPORT_CHANGE is emitted when the guest opens or closes a >> virtio-serial port. The event's member "id" identifies the port. >> >> When several events arrive quickly, throttling drops all but the

Re: [Qemu-devel] [PATCH] e1000: use alias for default model

2015-09-28 Thread Markus Armbruster
Jason Wang writes: > Instead of using a new type for default model (82540em), using an > alias for this to avoid bit duplication. Suggest to rephrase as Instead of duplicating the "e1000-82540em" device model as "e1000", make the latter an alias for the former. > Cc: Markus Armbruster

Re: [Qemu-devel] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications

2015-09-28 Thread Paolo Bonzini
On 26/09/2015 08:54, David Gibson wrote: > On Fri, Sep 25, 2015 at 02:04:14PM +0200, Paolo Bonzini wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 >> >> >> >> On 25/09/2015 13:33, David Gibson wrote: >>> 1) Is there a case where using the no-replay functions makes >>> sense? >>> >>

Re: [Qemu-devel] [PATCH] block: disable I/O limits at the beginning of bdrv_close()

2015-09-28 Thread Alberto Garcia
On Mon 28 Sep 2015 02:18:33 AM CEST, Fam Zheng wrote: >> > Can this be abused? If I have a guest running in a cloud where the >> > cloud provider has put severe throttling limits on me, but lets me >> > hotplug to my heart's content, couldn't I just repeatedly >> > plug/unplug the disk to get aro

Re: [Qemu-devel] ARM CPU affinities

2015-09-28 Thread Peter Maydell
On 27 September 2015 at 22:28, Peter Crosthwaite wrote: > Hi Peter, > > I am looking at this: > > static void arm_cpu_initfn(Object *obj) > { > ... > Aff1 = cs->cpu_index / ARM_CPUS_PER_CLUSTER; > Aff0 = cs->cpu_index % ARM_CPUS_PER_CLUSTER; > cpu->mp_affinity = (Aff1 << ARM_AFF1_S

Re: [Qemu-devel] [PATCH 2/2] pc: memhp: force gaps between DIMM's GPA

2015-09-28 Thread Igor Mammedov
On Mon, 28 Sep 2015 10:09:26 +0530 Bharata B Rao wrote: > On Sun, Sep 27, 2015 at 04:04:06PM +0200, Igor Mammedov wrote: > > On Sun, 27 Sep 2015 16:11:02 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Sun, Sep 27, 2015 at 03:06:24PM +0200, Igor Mammedov wrote: > > > > On Sun, 27 Sep 2015 13

Re: [Qemu-devel] [PATCH v5 07/46] qapi: Don't pass pre-existing error to later call

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > On 09/24/2015 10:14 AM, Eric Blake wrote: > visit_start_implicit_struct(m, (void **)obj, sizeof(FOO), &err); if (!err) { visit_type_FOO_fields(m, obj, &err); visit_end_implicit_struct(m, err ? NULL : &err);

Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices

2015-09-28 Thread Thomas Huth
On 28/09/15 10:11, Markus Armbruster wrote: > Thomas Huth writes: > >> On 25/09/15 16:17, Markus Armbruster wrote: >>> Thomas Huth writes: >>> On 24/09/15 20:57, Markus Armbruster wrote: > Several devices don't survive object_unref(object_new(T)): they crash > or hang during cleanup

Re: [Qemu-devel] [PATCH 2/2] pc: memhp: force gaps between DIMM's GPA

2015-09-28 Thread Igor Mammedov
On Sun, 27 Sep 2015 17:18:48 +0300 "Michael S. Tsirkin" wrote: > On Sun, Sep 27, 2015 at 04:04:06PM +0200, Igor Mammedov wrote: > > On Sun, 27 Sep 2015 16:11:02 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Sun, Sep 27, 2015 at 03:06:24PM +0200, Igor Mammedov wrote: > > > > On Sun, 27 Sep

[Qemu-devel] Agenda items for today's MTTCG call

2015-09-28 Thread Alex Bennée
User-agent: mu4e 0.9.12; emacs 24.5.50.4 Hi, It's been a while since we last synced up via phone call so could I add the following items for discussion: 1. Status of Alvise and Fred's trees 2. Any cross-pollination ideas between Alvise's LL/SC work and Emilio's series Emilio's series has a numbe

Re: [Qemu-devel] [PATCH v5 07/46] qapi: Don't pass pre-existing error to later call

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > On 09/24/2015 08:58 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Due to the existing semantics of the error_set() family, >>> generated sequences in the qapi visitors such as: >>> >>> visit_start_implicit_struct(m, (void **)obj, sizeof(FOO), &err); >>>

Re: [Qemu-devel] [PATCH v5 05/46] qapi: Test use of 'number' within alternates

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > On 09/24/2015 10:29 AM, Markus Armbruster wrote: > > + > +/* FIXME: Order of alternate should not affect semantics */ Inhowfar does it affect semantics? Or asked differently: what exactly is wrong with this test now? > +v = visitor_inp

Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices

2015-09-28 Thread Peter Maydell
On 28 September 2015 at 10:17, Thomas Huth wrote: > By the way, there are some more spots like this in the code, e.g. in > pxa2xx_fir_instance_init() in hw/arm/pxa2xx.c ... That's an oversight from when it was converted to qdev, I think, and could be fixed. -- PMM

Re: [Qemu-devel] [PATCH v2 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-09-28 Thread Stefan Hajnoczi
On Fri, Sep 11, 2015 at 02:22:14PM +0200, Kevin Wolf wrote: > Am 11.09.2015 um 13:46 hat Fam Zheng geschrieben: > > On Fri, 09/11 12:39, Kevin Wolf wrote: > > > Am 29.07.2015 um 06:42 hat Fam Zheng geschrieben: > > > > v2: Switch to disable/enable model. [Paolo] > > > > > > > > Most existing neste

Re: [Qemu-devel] [PATCH v5 45/46] net: Complete qapi-fication of netdev_add

2015-09-28 Thread Markus Armbruster
Paolo Bonzini writes: > On 23/09/2015 18:37, Eric Blake wrote: Is this still type-unsafe like the old netdev_add (e.g. accepts a string for an integer)? >> I did not address that yet; it still needs further patches to >> accept an integer as a port number. I can investigate what >

Re: [Qemu-devel] [PATCH 01/18] iothread: release iothread around aio_poll

2015-09-28 Thread Stefan Hajnoczi
On Thu, Aug 06, 2015 at 03:35:59PM +0200, Paolo Bonzini wrote: > This is the first step towards having fine-grained critical sections in > dataplane threads, which resolves lock ordering problems between > address_space_* functions (which need the BQL when doing MMIO, even > after we complete RCU-b

[Qemu-devel] [PATCH v2 1/2] memhp: extend address auto assignment to support gaps

2015-09-28 Thread Igor Mammedov
setting gap to non 0 value will make sparse DIMM address auto allocation, leaving gaps between a new DIMM address and preceeding existing DIMM. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 2 +- hw/mem/pc-dimm.c | 13 +++-- hw/ppc/spapr.c | 2 +- includ

[Qemu-devel] [PATCH v2 0/2] pc: memhp: enforce gaps between DIMMs

2015-09-28 Thread Igor Mammedov
v2: make inter_dimm_gap a boolean and inster gap in 1 byte instead of 2Mb, due to alignment that gap would be extended up to natural backend alignment value. it's a simplier way suggested by Michael S. Tsirkin to workaround virtio bug reported earlier: http://lists.nongnu.org/archive/html

[Qemu-devel] [PATCH v2 2/2] pc: memhp: force gaps between DIMM's GPA

2015-09-28 Thread Igor Mammedov
mapping DIMMs non contiguously allows to workaround virtio bug reported earlier: http://lists.nongnu.org/archive/html/qemu-devel/2015-08/msg00522.html in this case guest kernel doesn't allocate buffers that can cross DIMM boundary keeping each buffer local to a DIMM. Suggested-by: Michael S. Tsirk

Re: [Qemu-devel] [Xen-devel] [PULL 0/19] xen-2015-09-08-tag

2015-09-28 Thread Stefano Stabellini
No, unfortunately it is not possible at this stage of the release cycle. But users can still use QEMU 2.5 (as soon as it is released, which should be in a couple of months) with Xen 4.6 as there is not a strong tie between QEMU releases and Xen releases. On Mon, 28 Sep 2015, Chen, Tiejun wrote: >

[Qemu-devel] [PATCH v2 1/2] target-arm: Fix GDB breakpoint handling

2015-09-28 Thread Sergey Fedorov
GDB breakpoints have higher priority so they have to be checked first. Should GDB breakpoint match, just return from the debug exception handler. Signed-off-by: Sergey Fedorov --- target-arm/op_helper.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target-arm/op_helper.c b/target-

[Qemu-devel] [PATCH v2 0/2] target-arm: Fix breakpoint handling

2015-09-28 Thread Sergey Fedorov
This series is intended to fix ARM breakpoint emulation misbehavior. QEMU hangs when QEMU breakpoint fires but it does not pass additional architectural checks in ARM CPU debug exception handler. For details, please see individual patches. The most relevant parts of the original discussion about AR

[Qemu-devel] [PATCH] spapr: add a default rng device

2015-09-28 Thread Greg Kurz
A recent patch by Thomas Huth brought a new spapr-rng pseudo-device to provide high-quality random numbers to guests. The device may either be backed by a "RngBackend" or the in-kernel implementation of the H_RANDOM hypercall. Since modern POWER8 based servers always provide a hardware rng, it mak

Re: [Qemu-devel] [PATCH 03/18] qemu-thread: introduce QemuLockCnt

2015-09-28 Thread Stefan Hajnoczi
On Thu, Aug 06, 2015 at 03:36:01PM +0200, Paolo Bonzini wrote: > +int qemu_lockcnt_count(QemuLockCnt *lockcnt); Why use int here when the counter field is unsigned?

Re: [Qemu-devel] [PATCH 02/18] aio: rename bh_lock to list_lock

2015-09-28 Thread Stefan Hajnoczi
On Thu, Aug 06, 2015 at 03:36:00PM +0200, Paolo Bonzini wrote: > This will be used for AioHandlers too. There is going to be little > or no contention, so it is better to reuse the same lock. > > Signed-off-by: Paolo Bonzini > --- > async.c | 16 > include/block/aio

[Qemu-devel] [PATCH v2 2/2] target-arm: Fix CPU breakpoint handling

2015-09-28 Thread Sergey Fedorov
A QEMU breakpoint match is not definitely an architectural breakpoint match. If an exception is generated unconditionally during translation, it is hardly possible to ignore it in the debug exception handler. Generate a call to a helper to check CPU breakpoints and raise an exception only if any b

Re: [Qemu-devel] [PATCH 01/18] iothread: release iothread around aio_poll

2015-09-28 Thread Paolo Bonzini
On 28/09/2015 11:50, Stefan Hajnoczi wrote: > On Thu, Aug 06, 2015 at 03:35:59PM +0200, Paolo Bonzini wrote: >> This is the first step towards having fine-grained critical sections in >> dataplane threads, which resolves lock ordering problems between >> address_space_* functions (which need the

Re: [Qemu-devel] [PATCH 03/18] qemu-thread: introduce QemuLockCnt

2015-09-28 Thread Paolo Bonzini
On 28/09/2015 12:15, Stefan Hajnoczi wrote: > On Thu, Aug 06, 2015 at 03:36:01PM +0200, Paolo Bonzini wrote: >> > +int qemu_lockcnt_count(QemuLockCnt *lockcnt); > Why use int here when the counter field is unsigned? Nice catch, will fix. Paolo

[Qemu-devel] [PATCH] target-arm: Add MDCR_EL2

2015-09-28 Thread Sergey Fedorov
Signed-off-by: Sergey Fedorov --- This patch is a prerequisite for a debug exception routing patch: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg03542.html target-arm/cpu-qom.h | 1 + target-arm/cpu.c | 1 + target-arm/cpu.h | 1 + target-arm/cpu64.c | 1 + target-arm/

[Qemu-devel] [PATCH 0/3] target-i386: save/restore vcpu's TSC rate during migration

2015-09-28 Thread Haozhong Zhang
This patchset enables QEMU to save/restore vcpu's TSC rate during the migration. When cooperating with KVM which supports TSC scaling, guest programs can observe a consistent guest TSC rate even though they are migrated among machines with different host TSC rates. Haozhong Zhang (3): target-i38

[Qemu-devel] [PATCH 1/3] target-i386: add a subsection of vcpu's TSC rate in vmstate_x86_cpu

2015-09-28 Thread Haozhong Zhang
The newly added subsection 'vmstate_tsc_khz' in this patch results in vcpu's TSC rate being saved on the source machine and loaded on the target machine during the migration. Signed-off-by: Haozhong Zhang --- target-i386/machine.c | 20 1 file changed, 20 insertions(+) diff

[Qemu-devel] [PATCH 2/3] target-i386: initialize vcpu's TSC rate to the value from KVM

2015-09-28 Thread Haozhong Zhang
When creating a vcpu, we initialize its TSC rate to the value from KVM (through ioctl KVM_GET_TSC_KHZ). Signed-off-by: Haozhong Zhang --- target-i386/kvm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 7b0ba17..c2b161a 100644 --- a/target-

[Qemu-devel] [PATCH 3/3] kvm-all: notice KVM of vcpu's TSC rate after migration

2015-09-28 Thread Haozhong Zhang
When a vcpu is created in KVM, its TSC rate is initially identical to the host TSC rate. If its state is migrated to a vcpu on another machine (target machine) which may uses a different host TSC rate, QEMU on the target machine should notice KVM of the migrated vcpu's TSC rate. In case that KVM on

Re: [Qemu-devel] [PATCH 01/10][TRIVIAL] adb: add to input category

2015-09-28 Thread Thomas Huth
On 26/09/15 18:22, Laurent Vivier wrote: > The Apple Desktop Bus is used to connect a keyboard and a mouse, > so add it to the input category. > > Signed-off-by: Laurent Vivier > --- > hw/input/adb.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/input/adb.c b/hw/input/adb.c > in

Re: [Qemu-devel] [PATCH 02/10][TRIVIAL] cmd646: add to storage category

2015-09-28 Thread Thomas Huth
On 26/09/15 18:22, Laurent Vivier wrote: > cmd646 is an IDE controller, so add it to the > storage category. > > Signed-off-by: Laurent Vivier > --- > hw/ide/cmd646.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c > index 66fb9d9..27f3da2 100644 > ---

Re: [Qemu-devel] [PATCH 03/10][TRIVIAL] escc: add to input category

2015-09-28 Thread Thomas Huth
On 26/09/15 18:22, Laurent Vivier wrote: > ESCC is a serial port controller, so add it > to the input category. > > Signed-off-by: Laurent Vivier > --- > hw/char/escc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/char/escc.c b/hw/char/escc.c > index ba653ef..9816154 100644 > ---

Re: [Qemu-devel] [PATCH 06/10][TRIVIAL] macio-ide: add to storage category

2015-09-28 Thread Thomas Huth
On 26/09/15 18:22, Laurent Vivier wrote: > macio-ide is an IDE controller, so add it > to the storage category. > > Signed-off-by: Laurent Vivier > --- > hw/ide/macio.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/ide/macio.c b/hw/ide/macio.c > index 66ac2ba..893c9b9 100644 > ---

Re: [Qemu-devel] [PATCH 3/3] Target-ppc: Remove unnecessary variable

2015-09-28 Thread Paolo Bonzini
On 26/09/2015 18:15, Eric Blake wrote: > On 09/25/2015 02:37 AM, Shraddha Barke wrote: >> Compress lines and remove the variable. >> > >> +++ b/target-ppc/kvm.c >> @@ -1782,8 +1782,7 @@ uint32_t kvmppc_get_tbfreq(void) >> >> ns++; >> >> -retval = atoi(ns); >> -return retval; >>

Re: [Qemu-devel] [PATCH repost 2/4] oslib: allocate PROT_NONE pages on top of RAM

2015-09-28 Thread Paolo Bonzini
On 27/09/2015 12:14, Michael S. Tsirkin wrote: > -if (total > size) { > -munmap(ptr + size, total - size); > +if (total > size + getpagesize()) { > +munmap(ptr + size + getpagesize(), total - size - getpagesize()); > } > Please add a comment here, also noting that

Re: [Qemu-devel] [PATCH repost 0/4] add mitigation against buffer overflows

2015-09-28 Thread Paolo Bonzini
On 27/09/2015 12:14, Michael S. Tsirkin wrote: > Multiple places in QEMU map guest memory, then access it > directly. Unfortunately since we are using C, there's always > a chance that we'll miss a bounds check when we do this. > This has a potential to corrupt QEMU memory. > > As a mitigation s

Re: [Qemu-devel] [PATCH 04/10][TRIVIAL] grackle: add to bridge category

2015-09-28 Thread Thomas Huth
On 26/09/15 18:22, Laurent Vivier wrote: > Grackle is the PCI host controller of oldworld powermac, > so add it to the bridge category. > > Signed-off-by: Laurent Vivier > --- > hw/pci-host/grackle.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/pci-host/grackle.c b/hw/pci-host/

Re: [Qemu-devel] [PATCH 07/10][TRIVIAL] uninorth: add to bridge category

2015-09-28 Thread Thomas Huth
On 26/09/15 18:22, Laurent Vivier wrote: > Uninorth is the mac99 PCI host controller, so add > it to the bridge category. > > Signed-off-by: Laurent Vivier > --- > hw/pci-host/uninorth.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninor

Re: [Qemu-devel] [PATCH 08/10][TRIVIAL] macio: add to bridge category

2015-09-28 Thread Thomas Huth
On 26/09/15 18:22, Laurent Vivier wrote: > macio is a bridge between the PCI bus and the Mac nvram, > IDE controller and PIC, so add it to the bridge category. > > Signed-off-by: Laurent Vivier > --- > hw/misc/macio/macio.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/misc/macio/

Re: [Qemu-devel] [PATCH 09/10][TRIVIAL] macio-nvram: add to misc category

2015-09-28 Thread Thomas Huth
On 26/09/15 18:22, Laurent Vivier wrote: > The macio nvram is a non volatile RAM, so add it > the misc category. > > Signed-off-by: Laurent Vivier > --- > hw/nvram/mac_nvram.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/nvram/mac_nvram.c b/hw/nvram/mac_nvram.c > index d35f8a3..9

Re: [Qemu-devel] [PATCH 10/10][TRIVIAL] openpic: add to misc category

2015-09-28 Thread Thomas Huth
On 26/09/15 18:22, Laurent Vivier wrote: > openpic is a programmable interrupt controller, so > add it to the misc category. > > Signed-off-by: Laurent Vivier > --- > hw/intc/openpic.c | 1 + > hw/intc/openpic_kvm.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/hw/intc/openpic.

Re: [Qemu-devel] [PATCH v5 45/46] net: Complete qapi-fication of netdev_add

2015-09-28 Thread Paolo Bonzini
On 28/09/2015 11:31, Markus Armbruster wrote: >> However, while changing the command to >> > >> > { 'command': 'netdev_add', 'data': 'Netdev', 'box': true, 'gen': false } >> > >> > for better introspection, you should keep 'gen':'false' and the manual >> > implementation based on qemu_opts_from_q

[Qemu-devel] [PATCH 1/1] migration: fix deadlock

2015-09-28 Thread Denis V. Lunev
Release qemu global mutex before call synchronize_rcu(). synchronize_rcu() waiting for all readers to finish their critical sections. There is at least one critical section in which we try to get QGM (critical section is in address_space_rw() and prepare_mmio_access() is trying to aquire QGM). Bot

Re: [Qemu-devel] [RFC PATCH v3] os-android: Add support to android platform

2015-09-28 Thread Paolo Bonzini
On 24/09/2015 15:21, Houcheng Lin wrote: > +if [ "$android" = "yes" ] ; then > + LIBS="-lglib-2.0 -lgthread-2.0 -lz -lpixman-1 -lintl -liconv -lc $LIBS" > + libs_qga="-lglib-2.0 -lgthread-2.0 -lz -lpixman-1 -lintl -liconv -lc" > +fi This change should not be necessary. > +#define getdtablesiz

Re: [Qemu-devel] [PATCH 1/1] migration: fix deadlock

2015-09-28 Thread Paolo Bonzini
On 28/09/2015 13:41, Denis V. Lunev wrote: > Release qemu global mutex before call synchronize_rcu(). > synchronize_rcu() waiting for all readers to finish their critical > sections. There is at least one critical section in which we try > to get QGM (critical section is in address_space_rw() and

Re: [Qemu-devel] ARM CPU affinities

2015-09-28 Thread Pavel Fedin
Hello! > NB that as the comment says KVM currently imposes its own numbering > anyway -- if you care about that you need to get the kernel to > support having userspace tell it about affinity numbering. Yes. You cannot set MPIDR values for the KVM, because upon reset they are reverted to somet

[Qemu-devel] [PATCH] target-i386: add ABM to Haswell* and Broadwell* CPU models

2015-09-28 Thread Paolo Bonzini
ABM is only implemented as a single instruction set by AMD; all AMD processors support both instructions or neither. Intel considers POPCNT as part of SSE4.2, and LZCNT as part of BMI1, but Intel also uses AMD's ABM flag to indicate support for both POPCNT and LZCNT. It has to be added to Haswell

Re: [Qemu-devel] Agenda items for today's MTTCG call

2015-09-28 Thread Claudio Fontana
On 28.09.2015 11:19, Alex Bennée wrote: > User-agent: mu4e 0.9.12; emacs 24.5.50.4 > Hi, > > It's been a while since we last synced up via phone call so could I add > the following items for discussion: > > 1. Status of Alvise and Fred's trees > 2. Any cross-pollination ideas between Alvise's LL/

Re: [Qemu-devel] [PATCH 08/16] block: Manage backing file references in bdrv_set_backing_hd()

2015-09-28 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:12 PM CEST, Kevin Wolf wrote: > --- a/block/stream.c > +++ b/block/stream.c > @@ -55,28 +55,7 @@ static int coroutine_fn stream_populate(BlockDriverState > *bs, > static void close_unused_images(BlockDriverState *top, BlockDriverState > *base, >

Re: [Qemu-devel] [PATCH 10/16] block/io: Make bdrv_requests_pending() public

2015-09-28 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:14 PM CEST, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/io.c| 2 +- > include/block/block_int.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Alberto Garcia Berto

[Qemu-devel] [PATCH v5 1/1] block/gluster: add support for multiple gluster backup volfile servers

2015-09-28 Thread Prasanna Kumar Kalever
This patch adds a way to specify multiple volfile servers to the gluster block backend of QEMU with tcp|rdma transport types and their port numbers. Problem: Currenly VM Image on gluster volume is specified like this: file=gluster[+tcp]://server1[:port]/testvol/a.img Assuming we have have three

Re: [Qemu-devel] [PATCH 4/5] disk_deadlines: add control of requests time expiration

2015-09-28 Thread Stefan Hajnoczi
On Fri, Sep 25, 2015 at 01:34:22PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@gmail.com) wrote: > > On Tue, Sep 08, 2015 at 04:48:24PM +0200, Kevin Wolf wrote: > > > Am 08.09.2015 um 16:23 hat Denis V. Lunev geschrieben: > > > > On 09/08/2015 04:05 PM, Kevin Wolf wrote: > >

Re: [Qemu-devel] [PATCH v5 11/46] qapi: Don't use info as witness of implicit object type

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > A future patch will enable error reporting from the various > check() methods. But to report an error on an implicit type, > we'll need to associate a location with the type (the same > location as the top-level entity that is causing the creation > of the implicit type), an

Re: [Qemu-devel] [PATCH v5 12/46] qapi: Track location that created an implicit type

2015-09-28 Thread Markus Armbruster
Eric Blake writes: > A future patch will enable error detection in the various > QapiSchema check() methods. But since all errors have to > have an associated 'info' location, we need a location to > be associated with all implicit types. Easiest is to reuse > the location of the enclosing enti

Re: [Qemu-devel] [PATCH v5 00/46] post-introspection cleanups, and qapi-ify netdev_add

2015-09-28 Thread Markus Armbruster
I think the first ten patches are a about as large a bite as we can chew and commit quickly. If you split them off, I can try to get them in quickly, and in parallel continue reviewing the rest of your series.

Re: [Qemu-devel] [PATCH 12/16] block: Introduce parents list

2015-09-28 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:16 PM CEST, Kevin Wolf wrote: > @@ -1090,6 +1090,7 @@ static BdrvChild *bdrv_attach_child(BlockDriverState > *parent_bs, > }; > > QLIST_INSERT_HEAD(&parent_bs->children, child, next); > +QLIST_INSERT_HEAD(&child_bs->parents, child, next_parent); > >

Re: [Qemu-devel] [PATCH 0/4] linux-user: CLI cleanup

2015-09-28 Thread Riku Voipio
On Mon, Jul 06, 2015 at 11:03:37AM -0700, mead...@codesourcery.com wrote: > From: Meador Inge > > This patch series fixes a few nits in the Linux > usermode driver to make the general behavior less > surprising (proper error codes, --foo options, and > -help) and to make it easier to discover bad

Re: [Qemu-devel] [PATCH 1/4] linux-user: Exit 0 when -h is used

2015-09-28 Thread Riku Voipio
On Mon, Jul 13, 2015 at 01:08:02PM -0700, Meador Inge wrote: > On Mon, Jul 06, 2015 at 09:43:20PM +0200, Laurent Vivier wrote: > > > Global comment: you should use EXIT_SUCCESS and EXIT_FAILURE from stdlib.h > On second thought, I was following an existing pattern in 'main.c'. Really > fixing th

Re: [Qemu-devel] [PATCH 16/16] block: Remove bdrv_swap()

2015-09-28 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:20 PM CEST, Kevin Wolf wrote: > bdrv_swap() is unused now. Remove it and all functions that have > no other users than bdrv_swap(). In particular, this removes the > .bdrv_rebind callbacks from block drivers. > > Signed-off-by: Kevin Wolf Reviewed-by: Alberto Garcia Ber

Re: [Qemu-devel] [PATCH 2/2] linux-user: remove MAX_ARG_PAGES limit

2015-09-28 Thread Riku Voipio
On Mon, Sep 14, 2015 at 09:37:10PM +0200, Stefan Bruens wrote: > On Thursday 03 September 2015 18:27:20 Peter Maydell wrote: > > On 2 September 2015 at 02:38, Stefan Brüns > wrote: > > > Instead of creating a temporary copy for the whole environment and > > > the arguments, directly copy everythi

Re: [Qemu-devel] [PATCH] fw_cfg: insert string blobs via qemu cmdline

2015-09-28 Thread Laszlo Ersek
On 09/27/15 00:55, Gabriel L. Somlo wrote: > Allow users to provide custom fw_cfg blobs with ascii string > payloads specified directly on the qemu command line. > > Suggested-by: Jordan Justen > Suggested-by: Laszlo Ersek > Signed-off-by: Gabriel Somlo > --- > docs/specs/fw_cfg.txt | 5 +

Re: [Qemu-devel] [PATCH] linux-user: fix cmsg conversion in case of multiple headers

2015-09-28 Thread Riku Voipio
Hi, On Thu, Sep 03, 2015 at 07:27:26AM +0200, Jonathan Neuschäfer wrote: > Currently, __target_cmsg_nxthdr compares a pointer derived from > target_cmsg against the msg_control field of target_msgh (through > subtraction). This failed for me when emulating i386 code under x86_64, > because pointe

[Qemu-devel] [RFC PATCH 1/6] kvm: Make KVM_CAP_SIGNAL_MSI globally available

2015-09-28 Thread Pavel Fedin
This capability is useful to determine whether we can use KVM ITS emulation on ARM Signed-off-by: Pavel Fedin --- include/sysemu/kvm.h | 9 + kvm-all.c| 10 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h

[Qemu-devel] [RFC PATCH 3/6] Add vGICv3 ITS definitions

2015-09-28 Thread Pavel Fedin
This temporary patch adds kernel API definitions. Use proper header update procedure after these features are released. Signed-off-by: Pavel Fedin --- linux-headers/asm-arm64/kvm.h | 1 + linux-headers/linux/kvm.h | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/

[Qemu-devel] [RFC PATCH 0/6] vITS support

2015-09-28 Thread Pavel Fedin
This series introduces support for in-kernel GICv3 ITS emulation. It is based on kernel API which is not released yet, therefore i post it as an RFC. However, if respective maintainers think this is appropriate, infrastructure-related parts of this set (patch N1 and parts of patch N4) can be applie

[Qemu-devel] [RFC PATCH 4/6] kvm: Implement passing device ID to MSI routing functions

2015-09-28 Thread Pavel Fedin
Routing add/update functions now take additional PCIDevice pointer. Also, in order to provide backwards compatibility with older kernels, a new kvm_msi_flags global variable is provided, and machines, wishing to use new MSI features, must set appropriates flags in it. Signed-off-by: Pavel Fedin -

[Qemu-devel] [RFC PATCH 5/6] kvm_arm: Implement support for ITS emulation by KVM

2015-09-28 Thread Pavel Fedin
This patch relies on new kernel API which is not released yet. Signed-off-by: Pavel Fedin --- hw/intc/Makefile.objs | 1 + hw/intc/arm_gicv3_its_kvm.c | 88 + 2 files changed, 89 insertions(+) create mode 100644 hw/intc/arm_gicv3_its_kvm.c dif

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

2015-09-28 Thread 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 --- hw/arm/virt.c | 47 +-- 1 file changed, 41 inserti

[Qemu-devel] [RFC PATCH 2/6] hw/intc: Implement ITS base class

2015-09-28 Thread Pavel Fedin
This is the basic skeleton for both KVM and software-emulated ITS. Currently it is mostly a placeholder, however in future it is going to contain device state necessary for live migration Signed-off-by: Pavel Fedin --- hw/intc/Makefile.objs | 1 + hw/intc/arm_gicv3_its_common.c

Re: [Qemu-devel] [PATCH v2] linux-user: add name_to_handle_at/open_by_handle_at

2015-09-28 Thread Riku Voipio
On Tue, Sep 01, 2015 at 10:27:33PM +0200, Laurent Vivier wrote: > This patch allows to run example given by open_by_handle_at(2): > > The following shell session demonstrates the use of these two programs: > >$ echo 'Can you please think about it?' > cecilia.txt >$ .

  1   2   3   >