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

2015-09-28 Thread Eric Blake
On 09/28/2015 06:56 AM, Markus Armbruster wrote: > 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.

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

2015-09-28 Thread Eric Blake
On 09/28/2015 06:43 AM, Markus Armbruster wrote: > 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

[Qemu-devel] [PATCH v6 14/16] qapi: Consistent generated code: minimize push_indent() usage

2015-09-28 Thread Eric Blake
We had some pointless differences in the generated code for visit, command marshalling, and events; unifying them makes it easier for future patches to consolidate to common helper functions. This patch makes no difference to the generated code, but rather focuses on reducing the number of push_in

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

2015-09-28 Thread Haozhong Zhang
On Mon, Sep 28, 2015 at 01:37:34PM -0300, Eduardo Habkost wrote: > On Mon, Sep 28, 2015 at 01:38:31PM +0800, Haozhong Zhang wrote: > > 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 machi

[Qemu-devel] [PATCH v6 13/16] qapi: Consistent generated code: prefer common indentation

2015-09-28 Thread Eric Blake
We had some pointless differences in the generated code for visit, command marshalling, and events; unifying them makes it easier for future patches to consolidate to common helper functions. This is patch 4/4, focusing on adjusting gen_visit_union() to use the same indentation as other functions,

[Qemu-devel] [PATCH v6 15/16] qapi: Share gen_err_check()

2015-09-28 Thread Eric Blake
qapi-commands had a nice helper gen_err_check(), but did not use it everywhere. In fact, using it in more places makes it easier to reduce the lines of code used in appending an error check in generated code (previously required a multi-line mcgen(), which didn't add any use of parameterization), w

[Qemu-devel] [PATCH v6 16/16] qapi: Share gen_visit_fields()

2015-09-28 Thread Eric Blake
Consolidate the code between visit, command marshalling, and event generation that iterates over the members of a struct. It reduces code duplication in the generator, so that a future patch can reduce the size of generated code while touching only one instead of three locations. There are no chan

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

2015-09-28 Thread David Gibson
On Mon, Sep 28, 2015 at 10:59:03AM +0200, Paolo Bonzini wrote: > > > 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: > >

[Qemu-devel] [PATCH v6 11/16] qapi: Consistent generated code: prefer visitor 'v'

2015-09-28 Thread Eric Blake
We had some pointless differences in the generated code for visit, command marshalling, and events; unifying them makes it easier for future patches to consolidate to common helper functions. This is patch 2/4, focusing on naming the local visitor variable 'v' rather than 'm'. Related objects, su

[Qemu-devel] [PATCH v6 12/16] qapi: Consistent generated code: prefer common labels

2015-09-28 Thread Eric Blake
We had some pointless differences in the generated code for visit, command marshalling, and events; unifying them makes it easier for future patches to consolidate to common helper functions. This is patch 3/4, focusing on naming the goto labels 'out' (not 'clean') and 'out_obj' (not 'out_end').

[Qemu-devel] [PATCH v6 05/16] qapi: Test for various name collisions

2015-09-28 Thread Eric Blake
Expose some weaknesses in the generator: we don't always forbid the generation of structs that contain multiple members that map to the same C name. This has already been marked FIXME in qapi.py in commit d90675f, but having more tests will make sure future patches produce desired behavior. This

[Qemu-devel] [PATCH v6 10/16] qapi: Consistent generated code: prefer error 'err'

2015-09-28 Thread Eric Blake
We had some pointless differences in the generated code for visit, command marshalling, and events; unifying them makes it easier for future patches to consolidate to common helper functions. This is patch 1/4, focusing on naming the local error variable 'err' rather than 'local_err'. No change i

[Qemu-devel] [PATCH v6 04/16] qapi: Clean up qapi.py per pep8

2015-09-28 Thread Eric Blake
Silence pep8, and make pylint a bit happier. Just style cleanups, plus killing a useless comment in camel_to_upper(); no semantic changes. Signed-off-by: Eric Blake --- v6: split off non-style changes, add in ordereddict.py, and rework the camel_to_upper conditional --- scripts/ordereddict.py

[Qemu-devel] [PATCH v6 07/16] qapi: Add tests for empty unions

2015-09-28 Thread Eric Blake
The documentation claims that alternates are useful for allowing two types, although nothing enforces this. Meanwhile, it is silent on whether empty unions are allowed. In practice, the generated code will compile, in part because we have a 'void *data' branch; but attempting to visit such a type

[Qemu-devel] [PATCH v6 01/16] qapi: Sort qapi-schema tests

2015-09-28 Thread Eric Blake
Recent changes to qapi have provided quite a bit of churn in the makefile, because we are inconsistent on what order test names appear in, and on whether to re-wrap the list of tests or just add arbitrary line lengths. Writing the list in a sorted fashion, one test per line, will make future patch

[Qemu-devel] [PATCH v6 09/16] qapi: Reuse code for flat union base validation

2015-09-28 Thread Eric Blake
Rather than open-code the check for a valid base type, we should reuse the common functionality. This allows for consistent error messages, and also makes it easier for a later patch to turn on support for inline anonymous base structures. Test flat-union-inline is updated to test only one feature

[Qemu-devel] [PATCH v6 00/16] post-introspection cleanups, subset A

2015-09-28 Thread Eric Blake
Finally no pending prerequisites; this is based on current qemu.git. Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv6a and I plan forcefully update my branch with the rest of the v5 series tomorrow, at: http://repo.or.cz/qemu/ericb.git/shortlog/ref

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

2015-09-28 Thread Eric Blake
On 09/28/2015 07:07 AM, Markus Armbruster wrote: > 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. Done. Well, the first 10 patches

[Qemu-devel] [PATCH v6 08/16] qapi: Test use of 'number' within alternates

2015-09-28 Thread Eric Blake
Add some testsuite exposure for use of a 'number' as part of an alternate. The current state of the tree has a few bugs exposed by this: our input parser depends on the ordering of how the qapi schema declared the alternate, and the parser does not accept integers for a 'number' in an alternate ev

[Qemu-devel] [PATCH v6 02/16] qapi: Improve 'include' error message

2015-09-28 Thread Eric Blake
Use of '"...%s" % include' to print non-strings can lead to ugly messages, such as this (if the .json change is applied without the qapi.py change): Expected a file name (string), got: OrderedDict() Better is to just omit the actual non-string value in the message. Signed-off-by: Eric Blake --

[Qemu-devel] [PATCH v6 03/16] qapi: Invoke exception superclass initializer

2015-09-28 Thread Eric Blake
pylint recommends that every exception class should explicitly invoke the superclass __init__, even though things seem to work fine without it. Signed-off-by: Eric Blake --- v6: split off of 2/26 --- scripts/qapi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qapi.py b/scripts

Re: [Qemu-devel] Problems on vlan-based vnics!

2015-09-28 Thread Jason Wang
On 09/28/2015 07:52 PM, cauchy-love wrote: > hi stefan. >I have setup a VM on a server with two NICs (eth0 and eth1). eth0 is > connected with vlan22 and eth1 is connected with vlan33. I then added eth0.22 > to br2 and eth1.33 to br3. after that tap2 and tap3 were added to br2 and > br3

[Qemu-devel] [PATCH v6 06/16] qapi: Avoid assertion failure on union 'type' collision

2015-09-28 Thread Eric Blake
The previous commit added two tests that triggered an assertion failure. It's fairly straightforward to avoid the failure by just outright forbidding the collision between a union's tag values and its discriminator name (including the implicit name 'kind' supplied for simple unions [*]). Ultimatel

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

2015-09-28 Thread Jason Wang
On 09/28/2015 04:57 PM, Markus Armbruster wrote: > 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

Re: [Qemu-devel] [PATCH v2] Add argument filters to the seccomp sandbox

2015-09-28 Thread Namsun Ch'o
> My understanding of the config file you proposed is that it would allow the > configuration of a whitelist, so changes to the config very could result in > *less* strict of a filter, not always more. No. Any time an administrator wants a syscall that is not enabled in the sandbox, they either do

Re: [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-28 Thread Eric Blake
On 09/28/2015 03:32 PM, Jeff Cody wrote: > I guess that makes sense. What about the case when the target is a raw > device without zero init? There is no backing file... Of course, perhaps > in the raw case the user should be using sync==full anyways. > >> >> 2) even with mode == "existing" yo

[Qemu-devel] [Bug 1500175] Re: unable to init msix vectors

2015-09-28 Thread Peter Maydell
None of QEMU's ARM boards automatically boot a bios image shipped with QEMU. You must provide one explicitly, or else use the 'built in bootloader" with -kernel. (I'm not aware of any rom image that would work on QEMU versatilepb and load a kernel off a disk image, so in practice -kernel is what yo

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

2015-09-28 Thread Haozhong Zhang
On Tue, Sep 29, 2015 at 09:23:39AM +0800, Haozhong Zhang wrote: > On Mon, Sep 28, 2015 at 01:17:44PM -0300, Eduardo Habkost wrote: > > On Mon, Sep 28, 2015 at 01:38:30PM +0800, Haozhong Zhang wrote: > > > When creating a vcpu, we initialize its TSC rate to the value from > > > KVM (through ioctl KV

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

2015-09-28 Thread Haozhong Zhang
On Mon, Sep 28, 2015 at 01:17:44PM -0300, Eduardo Habkost wrote: > On Mon, Sep 28, 2015 at 01:38:30PM +0800, Haozhong Zhang wrote: > > 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 > > --- > > tar

Re: [Qemu-devel] [PATCH v2] Add argument filters to the seccomp sandbox

2015-09-28 Thread Paul Moore
On Monday, September 28, 2015 05:34:53 PM Namsun Ch'o wrote: > > To be clear, I'm not suggesting "--enable-syscalls=foo,bar,...", what I'm > > suggesting is a decomposition of the current filter list into blocks of > > syscalls that are needed to enable specific functionality. For example, > > if

Re: [Qemu-devel] [PATCH] No FreeWriterMetadata() after GatherWriterMetadata() in requester.cpp

2015-09-28 Thread Guangmu Zhu
I sent the patch some days ago and received no response. I have no idea if this means the patch is not Ok or just no one had interest in it... Sincerely. Guangmu Zhu -- FreeWriterMetadata() should be called if GatherWriterMetadata() succeeded. Signed-off

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

2015-09-28 Thread Gabriel L. Somlo
On Tue, Sep 29, 2015 at 12:08:14AM +0200, Laszlo Ersek wrote: > On 09/28/15 23:45, Gabriel L. Somlo wrote: > > On Mon, Sep 28, 2015 at 11:05:32PM +0200, Laszlo Ersek wrote: > >> On 09/28/15 22:56, Laszlo Ersek wrote: > >>> On 09/28/15 22:00, Eric Blake wrote: > On 09/28/2015 01:51 PM, Gabriel

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

2015-09-28 Thread Gabriel L. Somlo
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 Reviewd-by: Laszlo Ersek --- Changes from v2: documentation now clearly states that QEMU trans

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

2015-09-28 Thread Jonathan Neuschäfer
On Mon, Sep 28, 2015 at 04:38:03PM +0300, Riku Voipio wrote: > Applied to linux-user tree, thanks. Thanks. > For next time, use three dashes "---" to separate version-to-version > change descriptions from commit messages. This way git will > automatically leave them out when doing git am. Ok, I'

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

2015-09-28 Thread Laszlo Ersek
On 09/28/15 23:45, Gabriel L. Somlo wrote: > On Mon, Sep 28, 2015 at 11:05:32PM +0200, Laszlo Ersek wrote: >> On 09/28/15 22:56, Laszlo Ersek wrote: >>> On 09/28/15 22:00, Eric Blake wrote: On 09/28/2015 01:51 PM, Gabriel L. Somlo wrote: > On Mon, Sep 28, 2015 at 01:46:33PM -0600, Eric Bla

Re: [Qemu-devel] [PATCH] target-arm: Use common CPU cycle infrastructure

2015-09-28 Thread Alistair Francis
On Thu, Sep 24, 2015 at 12:43 PM, Christopher Covington wrote: > cpu_get_ticks() provides a common interface across targets for > calculating CPU cycles. Using this fixes PMCCNTR reads when -icount > is specified (previously a non-increasing value was returned). > > Signed-off-by: Christopher Covi

Re: [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-28 Thread Jeff Cody
On Sep 28, 2015 5:34 PM, "Kevin Wolf" wrote: > > Am 28.09.2015 um 05:29 hat Jeff Cody geschrieben: > > During mirror, if the target device does not have support zero > > initialization, a mirror may result in a corrupt image. > > > > For instance, on mirror to a host device with format = raw, what

Re: [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-28 Thread Jeff Cody
On Sep 28, 2015 5:31 PM, "Kevin Wolf" wrote: > (Responding from mobile phone again) > Am 28.09.2015 um 05:29 hat Jeff Cody geschrieben: > > During mirror, if the target device does not have support zero > > initialization, a mirror may result in a corrupt image. > > I think you want to check thi

[Qemu-devel] [PATCH] target-tilegx: Support iret instruction and related special registers

2015-09-28 Thread gang . chen . 5i5j
From: Chen Gang Acording to the __longjmp tilegx libc implementation, and reference from tilegx ISA document, we can left iret instruction empty. The related code is below: ENTRY (__longjmp) FEEDBACK_ENTER(__longjmp) #define RESTORE(r) { LD r, r0 ; ADDI_PTR r0, r0, REGSIZE }

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

2015-09-28 Thread Gabriel L. Somlo
On Mon, Sep 28, 2015 at 11:05:32PM +0200, Laszlo Ersek wrote: > On 09/28/15 22:56, Laszlo Ersek wrote: > > On 09/28/15 22:00, Eric Blake wrote: > >> On 09/28/2015 01:51 PM, Gabriel L. Somlo wrote: > >>> On Mon, Sep 28, 2015 at 01:46:33PM -0600, Eric Blake wrote: > On 09/28/2015 07:30 AM, Laszl

Re: [Qemu-devel] [PATCH v2 0/2] migration: fix deadlock

2015-09-28 Thread Igor Redko
On Пн., 2015-09-28 at 13:55 +0300, Igor Redko wrote: > On Пт., 2015-09-25 at 17:46 +0800, Wen Congyang wrote: > > On 09/25/2015 05:09 PM, Denis V. Lunev wrote: > > > Release qemu global mutex before call synchronize_rcu(). > > > synchronize_rcu() waiting for all readers to finish their critical > >

Re: [Qemu-devel] Test

2015-09-28 Thread Eric Blake
On 09/28/2015 09:04 AM, Pavel Fedin wrote: > Hello! I have some strange problems, my emails don't make it to the list. > Please ignore this, i am > self-testing. Not just your email. I've had quite a few messages arriving to my inbox more than 6 hours after the original sender; it may be a case

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

2015-09-28 Thread Laszlo Ersek
On 09/28/15 22:56, Laszlo Ersek wrote: > On 09/28/15 22:00, Eric Blake wrote: >> On 09/28/2015 01:51 PM, Gabriel L. Somlo wrote: >>> On Mon, Sep 28, 2015 at 01:46:33PM -0600, Eric Blake wrote: On 09/28/2015 07:30 AM, Laszlo Ersek wrote: >> >> +Small enough items may be provided

Re: [Qemu-devel] [PATCH v2] Add argument filters to the seccomp sandbox

2015-09-28 Thread Namsun Ch'o
> To be clear, I'm not suggesting "--enable-syscalls=foo,bar,...", what I'm > suggesting is a decomposition of the current filter list into blocks of > syscalls that are needed to enable specific functionality. For example, if > you enable audio support at runtime a set of syscalls will be adde

Re: [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-28 Thread Eric Blake
On 09/28/2015 08:13 AM, Paolo Bonzini wrote: > > > On 28/09/2015 05:29, Jeff Cody wrote: >> This only occurs under two conditions: >> >> 1. 'mode' != "existing" >> 2. bdrv_has_zero_init(target) == NULL >> > > I'm not sure if mode != "existing" actually matters. I think what > actually m

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

2015-09-28 Thread Eduardo Habkost
On Mon, Sep 28, 2015 at 10:08:26PM +0200, 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. > > This breaks at least device-list-properties, because > qmp_device_list_properties() needs

Re: [Qemu-devel] [PATCH v3] ui/cocoa.m: Add Mount image file menu item

2015-09-28 Thread Markus Armbruster
Programmingkid writes: > On Sep 25, 2015, at 11:42 AM, Markus Armbruster wrote: > >> Programmingkid writes: >> >>> On Sep 24, 2015, at 2:57 AM, Markus Armbruster wrote: >>> Programmingkid writes: > On Sep 23, 2015, at 4:35 PM, Peter Maydell wrote: > >> On 17 September

[Qemu-devel] Problems on vlan-based vnics!

2015-09-28 Thread cauchy-love
hi stefan. I have setup a VM on a server with two NICs (eth0 and eth1). eth0 is connected with vlan22 and eth1 is connected with vlan33. I then added eth0.22 to br2 and eth1.33 to br3. after that tap2 and tap3 were added to br2 and br3 respectively. When i start up the vm, the network conn

[Qemu-devel] [PATCH v4 3/7] libqtest: New hmp() & friends

2015-09-28 Thread Markus Armbruster
New convenience function hmp() to facilitate use of human-monitor-command in tests. Use it to simplify its existing uses. To blend into existing libqtest code, also add qtest_hmpv() and qtest_hmp(). That, and the egregiously verbose GTK-Doc comment format make this patch look bigger than it is.

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

2015-09-28 Thread Markus Armbruster
Several devices don't survive object_unref(object_new(T)): they crash or hang during cleanup, or they leave dangling pointers behind. This breaks at least device-list-properties, because qmp_device_list_properties() needs to create a device to find its properties. Broken in commit f4eb32b "qmp: s

[Qemu-devel] [PATCH v4 2/7] libqtest: Clean up unused QTestState member sigact_old

2015-09-28 Thread Markus Armbruster
Unused since commit d766825. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/libqtest.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index e5188e0..8dede56 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -46,7 +46,6 @@ struct

[Qemu-devel] [PATCH v4 0/7] Fix device introspection regressions

2015-09-28 Thread Markus Armbruster
QMP command device-list-properties regressed in 2.1: it can crash or leave dangling pointers behind. -device FOO,help regressed in 2.2: it no longer works for non-pluggable devices. I tried to fix that some time ago[*], but my fix failed review. This is my second, more comprehensive try. PATCH

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

2015-09-28 Thread Eric Blake
On 09/28/2015 01:51 PM, Gabriel L. Somlo wrote: > On Mon, Sep 28, 2015 at 01:46:33PM -0600, Eric Blake wrote: >> On 09/28/2015 07:30 AM, Laszlo Ersek wrote: >> +Small enough items may be provided directly as strings on the command +line, using the syntax: + +-fw_cfg [

[Qemu-devel] [PATCH 2/2] xen-platform: Ensure xen is enabled when initializing

2015-09-28 Thread Eduardo Habkost
The xen-platform code crashes on reset if the xen backend is not initialized, because it calls xc_hvm_set_mem_type(). Ensure xen-platform won't be created without initializing the xen backend. The assert can't be triggered by the user because the device is not hotpluggable, and the only code creat

Re: [Qemu-devel] [PATCH v2 0/2] migration: fix deadlock

2015-09-28 Thread Igor Redko
On Пт., 2015-09-25 at 17:46 +0800, Wen Congyang wrote: > On 09/25/2015 05:09 PM, 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

[Qemu-devel] [PATCH 1/2] pc: Require xen when initializing xenfv machine

2015-09-28 Thread Eduardo Habkost
Without this check, the xen-platform device will crash on reset if using the accel option with anything other than xen (e.g. "-machine xenfv,accel=kvm"). Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_p

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

2015-09-28 Thread Peter Maydell
On 28 September 2015 at 20:43, Programmingkid wrote: > > On Sep 28, 2015, at 3:29 AM, Markus Armbruster wrote: > >> Programmingkid writes: >>> A menu item >>> that displays a file open dialog is very easy to use. The user just selects >>> a

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 17:50 schrieb Eric Blake: > On 09/28/2015 09:19 AM, Stefan Weil wrote: >> Am 28.09.2015 um 17:06 schrieb Eric Blake: >>> On 09/28/2015 02:26 AM, Stefan Weil wrote: >>> > Can you explain why osdep.h's > > #define FMT_pid "%" PRId64 > > is appropriate for Wind

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 20:36, Markus Armbruster wrote: > 1. I made device-introspection-test run "info qom-tree", which has a >lovely propensity to crash when a crappy device left dangling pointer >behind. This led me to "cgthree", "cuda", "integrator_debug", >"macio-oldworld", "maci

Re: [Qemu-devel] [PATCH v3] ui/cocoa.m: Add Mount image file menu item

2015-09-28 Thread Programmingkid
On Sep 28, 2015, at 4:09 PM, Markus Armbruster wrote: > Programmingkid writes: > >> On Sep 25, 2015, at 11:42 AM, Markus Armbruster wrote: >> >>> Programmingkid writes: >>> On Sep 24, 2015, at 2:57 AM, Markus Armbruster wrote: > Programmingkid writes: > >> On Sep 23,

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

2015-09-28 Thread Gabriel L. Somlo
On Mon, Sep 28, 2015 at 01:46:33PM -0600, Eric Blake wrote: > On 09/28/2015 07:30 AM, Laszlo Ersek wrote: > > >> > >> +Small enough items may be provided directly as strings on the command > >> +line, using the syntax: > >> + > >> +-fw_cfg [name=],content= > >> + > > > > Please consider spe

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

2015-09-28 Thread Programmingkid
On Sep 28, 2015, at 3:44 PM, Peter Maydell wrote: > On 28 September 2015 at 20:43, Programmingkid > wrote: >> >> On Sep 28, 2015, at 3:29 AM, Markus Armbruster wrote: >> >>> Programmingkid writes: A menu item that displays a fi

[Qemu-devel] [PATCH v3] linux-user: add signalfd/signalfd4 syscalls

2015-09-28 Thread Laurent Vivier
This patch introduces a system very similar to the one used in the kernel to attach specific functions to a given file descriptor. In this case, we attach a specific "host_to_target()" translator to the fd returned by signalfd() to be able to byte-swap the signalfd_siginfo structure provided by re

[Qemu-devel] [PATCH v4 5/7] qmp: Fix device-list-properties not to crash for abstract device

2015-09-28 Thread Markus Armbruster
Broken in commit f4eb32b "qmp: show QOM properties in device-list-properties", v2.1. Cc: qemu-sta...@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qmp.c | 6 ++ tests/device-introspect-test.c | 15 --- 2 files changed, 10 inser

Re: [Qemu-devel] [PATCH 0/8] target-i386: Implement debug extensions

2015-09-28 Thread Eduardo Habkost
On Mon, Sep 21, 2015 at 02:05:52PM +0200, Paolo Bonzini wrote: > On 15/09/2015 20:45, Richard Henderson wrote: > > Best guess, since I can't find any code that actually uses them. > > Linux actively turns them off at boot... > > I've sent a kvm-unit-tests patch to test debug extensions. It shows

Re: [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-28 Thread Jeff Cody
On Sep 28, 2015 4:12 PM, "Paolo Bonzini" wrote: > > Replying from mobile; please excuse any formatting issues. > > On 28/09/2015 05:29, Jeff Cody wrote: > > This only occurs under two conditions: > > > > 1. 'mode' != "existing" > > 2. bdrv_has_zero_init(target) == NULL > > > > I'm not su

[Qemu-devel] [PATCH 0/2] xen: Fix crash of "-machine xenfv, accel=kvm"

2015-09-28 Thread Eduardo Habkost
This series fixes the following crash: $ ./x86_64-softmmu/qemu-system-x86_64 -machine xenfv,accel=kvm Segmentation fault (core dumped) The crash happens because xen-platform calls xc_hvm_set_mem_type() with a NULL xen_xc on reset, at platform_fixed_ioport_writeb(). Crash is replaced by the f

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

2015-09-28 Thread Markus Armbruster
Markus Armbruster writes: > Thomas Huth writes: > >> 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 surviv

[Qemu-devel] [PATCH] qtest/ide-test: ppc64be correction for ATAPI tests

2015-09-28 Thread John Snow
the 16bit ide data register is LE by definition. Signed-off-by: John Snow --- tests/ide-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ide-test.c b/tests/ide-test.c index 5594738..b6e9e1a 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -633,7 +633,7

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

2015-09-28 Thread Programmingkid
On Sep 28, 2015, at 3:29 AM, Markus Armbruster wrote: > 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

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

2015-09-28 Thread Laszlo Ersek
On 09/28/15 22:00, Eric Blake wrote: > On 09/28/2015 01:51 PM, Gabriel L. Somlo wrote: >> On Mon, Sep 28, 2015 at 01:46:33PM -0600, Eric Blake wrote: >>> On 09/28/2015 07:30 AM, Laszlo Ersek wrote: >>> > > +Small enough items may be provided directly as strings on the command > +line,

[Qemu-devel] [PULL 5/7] target-i386: Move breakpoint related functions to new file

2015-09-28 Thread Eduardo Habkost
From: Richard Henderson Reviewed-by: Eduardo Habkost Signed-off-by: Richard Henderson Signed-off-by: Eduardo Habkost --- target-i386/Makefile.objs | 2 +- target-i386/bpt_helper.c | 182 ++ target-i386/helper.c | 128

Re: [Qemu-devel] Starting A9 from M3

2015-09-28 Thread Peter Maydell
On 28 September 2015 at 18:00, Peter Crosthwaite wrote: > -d in_asm,exec on command line will help. You may want to patch the > output prints to give the cpu ID # so you can tell difference between > A9 and M3. You had a patch for that, didn't you? I can't remember why we didn't put it in... --

[Qemu-devel] [PULL 4/7] target-i386: Convert kvm_default_*features to property/value pairs

2015-09-28 Thread Eduardo Habkost
Convert the kvm_default_features and kvm_default_unset_features arrays into a simple list of property/value pairs that will be applied to X86CPU objects when using KVM. Acked-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 8 ++--- hw/i386/pc_q35.c | 4 +-- target-i3

Re: [Qemu-devel] [PATCH v2] linux-user: add signalfd/signalfd4 syscalls

2015-09-28 Thread Peter Maydell
On 28 September 2015 at 17:23, Laurent Vivier wrote: > No conclusion was reached here. > I'm ready to send a patch to fix other comments. > > Peter, if you really want this field, I can play with the padfields to > convert it. Just say. If it's not too painful I think it would be preferable to co

[Qemu-devel] [PULL 3/7] target-i386: Enable "check" mode by default

2015-09-28 Thread Eduardo Habkost
Current default behavior of QEMU is to silently disable features that are not supported by the host when a CPU model is requested in the command-line. This means that in addition to risking breaking guest ABI by default, we are silent about it. I would like to enable "enforce" by default, but this

[Qemu-devel] [PATCH v4 4/7] device-introspect-test: New, covering device introspection

2015-09-28 Thread Markus Armbruster
The test doesn't check that the output makes any sense, only that QEMU survives. Useful since we've had an astounding number of crash bugs around there. In fact, we have a bunch of them right now: several devices crash or hang, and some leave dangling pointers behind. The test skips testing the

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

2015-09-28 Thread Dr. David Alan Gilbert
* Denis V. Lunev (d...@openvz.org) wrote: > From: Igor Redko > > To get this estimation we must divide pending_size by bandwidth > according to description of expected-downtime ("qmp-commands.hx:3246"): > "expected-downtime": only present while migration is active > total amount i

[Qemu-devel] [PULL 1/7] cpu: Introduce X86CPUTopoInfo structure for argument simplification

2015-09-28 Thread Eduardo Habkost
From: Chen Fan In order to simplify arguments of function, introduce a new struct named X86CPUTopoInfo. Signed-off-by: Chen Fan Signed-off-by: Zhu Guihua Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 6 +++--- include/hw/i386/topology.h | 33 +--

[Qemu-devel] [PATCH v4 1/7] tests: Fix how qom-test is run

2015-09-28 Thread Markus Armbruster
We want to run qom-test for every architecture, without having to manually add it to every architecture's list of tests. Commit 3687d53 accomplished this by adding it to every architecture's list automatically. However, some architectures inherit their tests from others, like this: check-qte

Re: [Qemu-devel] [PATCH 0/8] target-i386: Implement debug extensions

2015-09-28 Thread Eduardo Habkost
On Mon, Sep 21, 2015 at 02:05:52PM +0200, Paolo Bonzini wrote: > > > On 15/09/2015 20:45, Richard Henderson wrote: > > Best guess, since I can't find any code that actually uses them. > > Linux actively turns them off at boot... > > I've sent a kvm-unit-tests patch to test debug extensions. It

[Qemu-devel] [PULL 0/7] X86 queue, 2015-09-28

2015-09-28 Thread Eduardo Habkost
The following changes since commit 9e071429e649346c14b2dc76902f84f8352d2333: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2015-09-25 21:52:30 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/x86-pull-request for you to

[Qemu-devel] [PATCH v4 7/7] Revert "qdev: Use qdev_get_device_class() for -device , help"

2015-09-28 Thread Markus Armbruster
This reverts commit 31bed5509dfcbdfc293154ce81086a4dbd7a80b6. The reverted commit changed qdev_device_help() to reject abstract devices and devices that have cannot_instantiate_with_device_add_yet set, to fix crash bugs like -device x86_64-cpu,help. Rejecting abstract devices makes sense: they're

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

2015-09-28 Thread Pasi Kärkkäinen
Hi, On Mon, Sep 28, 2015 at 11:01:11AM +0100, Stefano Stabellini wrote: > 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 bet

[Qemu-devel] [PULL 7/7] target-i386: get/put MSR_TSC_AUX across reset and migration

2015-09-28 Thread Eduardo Habkost
From: Amit Shah There's one report of migration breaking due to missing MSR_TSC_AUX save/restore. Fix this by adding a new subsection that saves the state of this MSR. https://bugzilla.redhat.com/show_bug.cgi?id=1261797 Reported-by: Xiaoqing Wei Signed-off-by: Amit Shah CC: Paolo Bonzini CC

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

2015-09-28 Thread Eric Blake
On 09/28/2015 07:30 AM, Laszlo Ersek wrote: >> >> +Small enough items may be provided directly as strings on the command >> +line, using the syntax: >> + >> +-fw_cfg [name=],content= >> + > > Please consider spelling out that these blobs will NOT be NUL-terminated > when viewed on the guest

Re: [Qemu-devel] [PATCH v2] Add argument filters to the seccomp sandbox

2015-09-28 Thread Paul Moore
On Saturday, September 26, 2015 01:06:57 AM Namsun Ch'o wrote: > > I've suggested this in the past but to my knowledge no has done any work > > in this direction, including myself. Despite the lack of progress, I still > > think this is a very worthwhile idea. > > Which is exactly why I think a co

Re: [Qemu-devel] ARM CPU affinities

2015-09-28 Thread Pavel Fedin
Hello! > Not worrying about KVM yet, but I think pushing this up to virt > shouldn’t interfere with that work anyway. Actually, IMHO this code is quite universal. My initial idea was to introduce a global variable instead of ARM_CPUS_PER_CLUSTER definition. By setting this variable before cre

[Qemu-devel] [PULL 6/7] target-i386: Make check_hw_breakpoints static

2015-09-28 Thread Eduardo Habkost
From: Richard Henderson The function is now only used from within a single file. Reviewed-by: Eduardo Habkost Signed-off-by: Richard Henderson Signed-off-by: Eduardo Habkost --- target-i386/bpt_helper.c | 2 +- target-i386/cpu.h| 1 - 2 files changed, 1 insertion(+), 2 deletions(-)

[Qemu-devel] [PATCH] pc: Add a comment explaining why pc_compat_2_4() doesn't exist

2015-09-28 Thread Eduardo Habkost
pc_compat_2_4() doesn't exist, and we shouldn't create one. Add a comment explaining why the function doesn't exist and why pc_compat_*() functions are deprecated. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 7 +++ hw/i386/pc_q35.c | 7 +++ 2 files changed, 14 insertions(+)

Re: [Qemu-devel] Starting A9 from M3

2015-09-28 Thread Peter Crosthwaite
On Mon, Sep 28, 2015 at 8:39 AM, Marcin Krzemiński wrote: > Hello, > > I am closer to finish, but still I found some problems this time booting > from A9 cores from M3. > Use case is that I M3 core loads firmware to SDRAM then A9 should begin to > execute this firmware. > I am starting M3 from elf

Re: [Qemu-devel] Starting A9 from M3

2015-09-28 Thread mar.krzeminski
The problem was related to my SDRAM hw specific implementation. There is only 64KiB starting from address 0xFFF0, but the address space has 1MiB. Space above 64KiB is constantly remapped to real location. In my model I used 1MiB memory chunk instead of aliasing, so the A9s reset vector has

Re: [Qemu-devel] [Qemu-block] [PATCH 2/3] block: mirror - split out part of mirror_run()

2015-09-28 Thread Max Reitz
On 28.09.2015 05:29, Jeff Cody wrote: > This is code relocation, to pull the part of mirror_run() that > calls mirror_iteration out into a separate function. > > Signed-off-by: Jeff Cody > --- > block/mirror.c | 206 > ++--- > 1 file changed,

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

2015-09-28 Thread Eduardo Habkost
On Mon, Sep 28, 2015 at 02:00:18PM +0200, Paolo Bonzini wrote: > 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 indi

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

2015-09-28 Thread Eduardo Habkost
On Mon, Sep 28, 2015 at 01:38:31PM +0800, Haozhong Zhang wrote: > 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 machin

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

2015-09-28 Thread Eduardo Habkost
On Mon, Sep 28, 2015 at 11:54:59AM +0200, Igor Mammedov wrote: [...] > static void pc_i440fx_machine_options(MachineClass *m) > { > +PCMachineClass *pcmc = PC_MACHINE_CLASS(m); > m->family = "pc_piix"; > m->desc = "Standard PC (i440FX + PIIX, 1996)"; > m->hot_add_cpu = pc_hot_a

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

2015-09-28 Thread Laszlo Ersek
On 09/28/15 17:59, 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 > --- > > new in v2: > - clarify t

Re: [Qemu-devel] [Qemu-block] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-28 Thread Max Reitz
On 28.09.2015 05:29, Jeff Cody wrote: > During mirror, if the target device does not have support zero > initialization, a mirror may result in a corrupt image. > > For instance, on mirror to a host device with format = raw, whatever > random data is on the target device will still be there for un

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

2015-09-28 Thread Eduardo Habkost
On Mon, Sep 28, 2015 at 01:38:30PM +0800, Haozhong Zhang wrote: > 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

[Qemu-devel] [PULL 2/7] vl: Add another sanity check to smp_parse() function

2015-09-28 Thread Eduardo Habkost
From: Thomas Huth The code in smp_parse already checks the topology information for sockets * cores * threads < cpus and bails out with an error in that case. However, it is still possible to supply a bad configuration the other way round, e.g. with: qemu-system-xxx -smp 4,sockets=1,cores=4,thr

  1   2   3   >