[Qemu-devel] [PATCH v2 1/6] pci: Use struct instead of QDict to pass back parameters

2017-01-18 Thread Eric Blake
It's simpler to just use a C struct than it is to bundle things into a QDict in one function just to pull them back out in the caller. Plus, doing this gets rid of one more user of dynamic JSON through qobject_from_jsonf(). Signed-off-by: Eric Blake Acked-by: Michael S.

[Qemu-devel] [PATCH v2 16/25] qmp: update qmp-spec about async capability

2017-01-18 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- docs/qmp-spec.txt | 48 +--- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/docs/qmp-spec.txt b/docs/qmp-spec.txt index f8b5356015..b45c0700b6 100644 ---

Re: [Qemu-devel] [PATCH 10/16] block: explicitly acquire aiocontext in timers that need it

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 16:43, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:25PM +0100, Paolo Bonzini wrote: >> diff --git a/block/null.c b/block/null.c >> index b300390..356209a 100644 >> --- a/block/null.c >> +++ b/block/null.c >> @@ -141,7 +141,11 @@ static void null_bh_cb(void *opaque) >>

[Qemu-devel] [PATCH v2 17/25] qtest: add qtest-timeout

2017-01-18 Thread Marc-André Lureau
This command allows to test async behavior. It is only registered when qtest is enabled. See the schema documentation for more details. Signed-off-by: Marc-André Lureau --- qapi-schema.json | 22 ++ qtest.c | 48

Re: [Qemu-devel] [PATCH v2 1/6] pci: Use struct instead of QDict to pass back parameters

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 10:16:48AM -0600, Eric Blake wrote: > It's simpler to just use a C struct than it is to bundle things > into a QDict in one function just to pull them back out in the > caller. Plus, doing this gets rid of one more user of dynamic > JSON through qobject_from_jsonf(). > >

[Qemu-devel] [PATCH v2 18/25] qtest: add qtest_init_qmp_caps()

2017-01-18 Thread Marc-André Lureau
Add a function to specify the qmp capabilities content. Signed-off-by: Marc-André Lureau --- tests/libqtest.h | 9 + tests/libqtest.c | 13 +++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/libqtest.h b/tests/libqtest.h

Re: [Qemu-devel] [PATCH v3] hw/core/null-machine: Add the possibility to instantiate a CPU and RAM

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 01:44:50PM +0100, Thomas Huth wrote: > Sometimes it is useful to have just a machine with CPU and RAM, without > any further hardware in it, e.g. if you just want to do some instruction > debugging for TCG with a remote GDB attached to QEMU, or run some embedded > code with

[Qemu-devel] [PATCH 0/2] Aspeed watchdog controller model

2017-01-18 Thread Cédric Le Goater
Hello, The Aspeed SoC includes a set of watchdog timers using 32-bit decrement counters. This patchset provides a model for this controller and adds the first watchdog to the Aspeed SoC model. A second watchdog exists and is used on real HW to boot from a second flash module containing a golden

[Qemu-devel] [PATCH v2 12/25] tests: add dispatch async tests

2017-01-18 Thread Marc-André Lureau
Add a few tests to check: - async dispatch - async command without "id" failure - destroying the client with pending requests Signed-off-by: Marc-André Lureau --- tests/test-qmp-commands.c | 132

[Qemu-devel] [PATCH v2 05/25] qmp: add QmpClient

2017-01-18 Thread Marc-André Lureau
Add a new QmpClient structure holding the dispatch return callback and the list of pending QmpReturns. When a client disconnects, call qmp_client_destroy(). This will remove all pending returns from the client list, and prevent a reply from being sent later: new clients will only receive reply

[Qemu-devel] [PATCH v2 13/25] monitor: add 'async' capability

2017-01-18 Thread Marc-André Lureau
Declare that the server supports async. Check if the client supports it: the following patch will suspend the qmp monitor if an async command is ongoing but the client doesn't support async. Signed-off-by: Marc-André Lureau --- qapi-schema.json| 16

[Qemu-devel] [PATCH v2 3/6] qlist: Add convenience helpers for wrapped appends

2017-01-18 Thread Eric Blake
Similar to the qdict additions of the previous patch, although this time there are not as many clients. Signed-off-by: Eric Blake --- include/qapi/qmp/qlist.h | 8 tests/check-qdict.c | 10 +- tests/check-qlist.c | 2 +- 3 files changed, 14

[Qemu-devel] [PATCH v2 22/25] console: add graphic_hw_update_done()

2017-01-18 Thread Marc-André Lureau
Add a function to be called when an async graphic update is done. Signed-off-by: Marc-André Lureau --- include/ui/console.h| 1 + hw/display/qxl-render.c | 9 +++-- ui/console.c| 4 3 files changed, 12 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PATCH v2 06/25] qmp: add qmp_return_is_cancelled()

2017-01-18 Thread Marc-André Lureau
If the client is gone, no need to return. The async handler can use this information to avoid unnecessary work and exit earlier. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/dispatch.h | 8 qapi/qmp-dispatch.c | 10 ++ 2 files

Re: [Qemu-devel] [PATCH 2/2] vl: Print warning when a default config file is loaded

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 05:04:45PM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > In case there were options set in the default config file, print > > a warning so users can update their scripts. > > Can you explain why you don't warn on an empty qemu.conf?

Re: [Qemu-devel] [PATCH v6 wave 2 2/3] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-18 Thread Igor Mammedov
On Wed, 18 Jan 2017 16:42:27 +0100 Laszlo Ersek wrote: > On 01/18/17 13:38, Igor Mammedov wrote: > > On Wed, 18 Jan 2017 11:23:48 +0100 > > Laszlo Ersek wrote: > > > >> On 01/18/17 11:19, Laszlo Ersek wrote: > >>> On 01/18/17 11:03, Igor Mammedov

[Qemu-devel] [PATCH 1/2] wdt: Add Aspeed watchdog device model

2017-01-18 Thread Cédric Le Goater
From: Joel Stanley The Aspeed SoC includes a set of watchdog timers using 32-bit decrement counters, which can be based either on the APB clock or a 1 MHz clock. The watchdog timer is designed to prevent system deadlock and, in general, it should be restarted before timeout.

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 12:45:54PM +0100, Phil Dennis-Jordan wrote: > About 2 years ago, Reza Jelveh submitted essentially this same patch: > https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05832.html > > It adds the reset register defined in ACPI 2.0 to the x86 FADT, which fixes >

[Qemu-devel] [PATCH v2 19/25] tests: add tests for async and non-async clients

2017-01-18 Thread Marc-André Lureau
Add two tests to check async and non-async client behaviour: - an async client can see out of order replies - an non-async client has commands processed in order Signed-off-by: Marc-André Lureau --- tests/qmp-test.c | 59

Re: [Qemu-devel] [PATCH 00/16] aio_context_acquire/release pushdown, part 2

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 17:03, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:15PM +0100, Paolo Bonzini wrote: >> This series pushes down aio_context_acquire/release to the point >> where we can actually reason on using different fine-grained mutexes. >> >> The main infrastructure is introduced in

Re: [Qemu-devel] [PATCH] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Igor Mammedov
On Wed, 18 Jan 2017 13:19:45 -0200 Eduardo Habkost wrote: > On Wed, Jan 18, 2017 at 03:48:45PM +0100, Igor Mammedov wrote: > > Move vcpu's assocciated numa_node field out of generic CPUState > > into inherited classes that actually care about cpu<->numa mapping > > and make

[Qemu-devel] [PATCH v2 5/6] test-qga: Actually test 0xff sync bytes

2017-01-18 Thread Eric Blake
Commit 62c39b3 introduced test-qga, and at face value, appears to be testing the 'guest-sync' behavior that is recommended for guests in sending 0xff to QGA to force the parser to reset. But this aspect of the test has never actually done anything: the qmp_fd() call chain converts its string

[Qemu-devel] [PATCH v2 2/6] qdict: Add convenience helpers for wrapped puts

2017-01-18 Thread Eric Blake
Quite a few users of qdict_put() were manually wrapping a non-QObject. We can make such call-sites shorter, by providing common macros to do the tedious work. Also shorten nearby qdict_put_obj(,,QOBJECT()) sequences. Signed-off-by: Eric Blake Reviewed-by: Alberto Garcia

[Qemu-devel] [RFC 08/13] pc: add writeonly 'cpu' property to PCMachine

2017-01-18 Thread Igor Mammedov
it will allow generic numa code to set cpu to numa node mapping in target independent manner in the next patch. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 56 1 file changed, 56 insertions(+) diff --git

Re: [Qemu-devel] [PATCH] virtio: force VIRTIO_F_IOMMU_PLATFORM

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 10:42:48AM +0800, Jason Wang wrote: > > > On 2017年01月17日 22:44, Michael S. Tsirkin wrote: > > On Tue, Jan 17, 2017 at 12:01:00PM +0800, Jason Wang wrote: > > > We allow vhost to clear VIRITO_F_IOMMU_PLATFORM which is wrong since > > > VIRTIO_F_IOMMU_PLATFORM is mandatory

Re: [Qemu-devel] [PATCH v2 01/25] tests: start generic qemu-qmp tests

2017-01-18 Thread Marc-André Lureau
- Original Message - > These 2 tests exhibited two qmp bugs that were fixed in 2.7 > (series from commit e64c75a9752c5d0fd64eb2e684c656a5ea7d03c6 to > commit 1382d4abdf9619985e4078e37e49e487cea9935e) Sorry, it was actually in 2.8 > > Signed-off-by: Marc-André Lureau

Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 15:58, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:20PM +0100, Paolo Bonzini wrote: >> /** >> + * qio_channel_set_aio_context: >> + * @ioc: the channel object >> + * @ctx: the #AioContext to set the handlers on >> + * >> + * Request that qio_channel_yield() sets I/O

[Qemu-devel] [PATCH v2 6/6] qapi: Promote blockdev-change-medium arguments to QAPI type

2017-01-18 Thread Eric Blake
Having a named rather than anonymous C type will make it easier to improve the testsuite in a later patch. No semantic change, to any of the existing code or to the introspection output. Signed-off-by: Eric Blake --- v2: rebase to master --- qapi/block-core.json | 11

[Qemu-devel] [PATCH v2 4/6] fdc-test: Avoid deprecated 'change' command

2017-01-18 Thread Eric Blake
Use the preferred blockdev-change-medium command instead. Signed-off-by: Eric Blake Reviewed-by: John Snow --- tests/fdc-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/fdc-test.c b/tests/fdc-test.c index

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Phil Dennis-Jordan
Thanks for the comments Paulo and Eduardo, On 18 January 2017 at 16:05, Paolo Bonzini wrote: > > > +DEFINE_PROP_BOOL("vmware-tsc-apic-clocks", X86CPU, > vmware_clock_rates, false), > > Maybe just vmware-cpuid-freq instead? Whatever the choice, please make > the bool

Re: [Qemu-devel] [PATCH 06/16] nbd: do not block on partial reply header reads

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 16:24, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:21PM +0100, Paolo Bonzini wrote: >> @@ -65,54 +67,34 @@ static void nbd_teardown_connection(BlockDriverState *bs) >> client->ioc = NULL; >> } >> >> -static void nbd_reply_ready(void *opaque) >> +static void

Re: [Qemu-devel] [PATCH 2/2] vl: Print warning when a default config file is loaded

2017-01-18 Thread Markus Armbruster
Eduardo Habkost writes: > In case there were options set in the default config file, print > a warning so users can update their scripts. Can you explain why you don't warn on an empty qemu.conf? > If somebody wants to keep the config file as-is, avoid the > warning and

[Qemu-devel] [PATCH 2/2] aspeed: add a watchdog controller

2017-01-18 Thread Cédric Le Goater
This enables reboot of a guest from U-Boot and Linux. Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley --- hw/arm/aspeed_soc.c | 13 + include/hw/arm/aspeed_soc.h | 2 ++ 2 files changed, 15 insertions(+) diff --git

Re: [Qemu-devel] [Qemu-stable] Data corruption in Qemu 2.7.1

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 17:19, Fabian Grünbichler wrote: > Jan 18 17:07:51 ubuntu kernel: sd 2:0:0:0: [sda] tag#109 FAILED Result: > hostbyte=DID_OK driverbyte=DRIVER_SENSE > Jan 18 17:07:51 ubuntu kernel: sd 2:0:0:0: [sda] tag#109 Sense Key : Illegal > Request [current] > Jan 18 17:07:51 ubuntu kernel:

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 17:02, Phil Dennis-Jordan wrote: > > One issue is that the TSC frequency can change, for example on > migration. Telling the guest about the TSC frequency makes little sense > if it can change. > > That makes sense. Darwin can't handle changing TSC frequencies in any

Re: [Qemu-devel] [Qemu-block] Question: any suggestions about zero-filled image grow of raw format files ?

2017-01-18 Thread Max Reitz
On 16.01.2017 07:20, fuweiwei (C) wrote: > Dear all: > > > > I have a question. In qemu-kvm platforms, raw format virtual images have > several preallocation options, > > such as thin (sparse, no preallocation), falloc and full (zero-filled > preallocation). However, if one resize > > a

[Qemu-devel] [RFC 02/13] pc: cleanup: move smbios_set_cpuid() into pc_build_smbios()

2017-01-18 Thread Igor Mammedov
move smbios_set_cpuid() close to the rest of smbios init code where it belongs to instead of calling it from pc_cpus_init(). Signed-off-by: Igor Mammedov --- PS: it would allow to cleanup pc_new_cpu() in followup patch --- hw/i386/pc.c | 17 + 1 file

[Qemu-devel] [RFC 01/13] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Igor Mammedov
Move vcpu's assocciated numa_node field out of generic CPUState into inherited classes that actually care about cpu<->numa mapping and make monitor 'info numa' get vcpu's assocciated node id via node-id property. It allows to drop implicit node id intialization in numa_post_machine_init() and

[Qemu-devel] [RFC 07/13] pc: pass apic_id to pc_find_cpu_slot() directly so lookup could be done without CPU object

2017-01-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index ed41046..f8ea635 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1776,13 +1776,12 @@ static int

Re: [Qemu-devel] [PATCH 1/2] linux-user: fix settime old value location

2017-01-18 Thread Peter Maydell
On 18 January 2017 at 15:02, Pranith Kumar wrote: > From: Marc-André Lureau > > old_value is the 4th argument of timer_settime(), not the 2nd. > > Signed-off-by: Marc-André Lureau > Signed-off-by: Pranith Kumar

Re: [Qemu-devel] [PATCH v2] hw/arm/virt-acpi - reserve ECAM space as PNP0C02 device

2017-01-18 Thread Ard Biesheuvel
On 18 January 2017 at 15:55, Laszlo Ersek wrote: > On 01/18/17 16:18, Igor Mammedov wrote: >> On Tue, 17 Jan 2017 10:56:53 + >> Peter Maydell wrote: >> >>> On 17 January 2017 at 09:49, Andrew Jones wrote: In some cases

[Qemu-devel] [RFC 05/13] pc: move pcms->possible_cpus init out of pc_cpus_init()

2017-01-18 Thread Igor Mammedov
possible_cpus could be initialized earlier then cpu objects, i.e. when -smp is parsed so move init code to possible_cpu_arch_ids() interface func and do initialization on the first call. it should help later with making -numa cpu/-smp parsing a machine state properties. Signed-off-by: Igor

Re: [Qemu-devel] [PATCH 2/2] linux-user: fix tcg/mmap test

2017-01-18 Thread Peter Maydell
On 18 January 2017 at 15:02, Pranith Kumar wrote: > From: Marc-André Lureau > > tests/tcg/mmap test fails with values other than default target page > size. When creating a map beyond EOF, extra anonymous pages are added up > to the target page

[Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option

2017-01-18 Thread Igor Mammedov
Series introduces a new CLI option to allow mapping cpus to numa nodes using public properties [socket|core|thread]-ids instead of internal cpu-index and moving cpu<->node mapping from global bitmaps to PCMachineState struct. It focuses on PC in RFC version to see if approach is suitable in

Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts

2017-01-18 Thread Eric Blake
On 01/18/2017 10:43 AM, Paolo Bonzini wrote: > By the way, v2 will have a better comment on how to use the API: > > + * You can move a #QIOChannel from an #AioContext to another even if s/from an/from one/ > + * I/O handlers are set for a coroutine. However, #QIOChannel provides > + * no

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 05:04:27PM +0100, Phil Dennis-Jordan wrote: > Thanks for the comments Paulo and Eduardo, > > On 18 January 2017 at 16:05, Paolo Bonzini wrote: > > > > > +DEFINE_PROP_BOOL("vmware-tsc-apic-clocks", X86CPU, > > vmware_clock_rates, false), > > > >

Re: [Qemu-devel] [PATCH v2 1/6] Add cfgend parameter for ARM CPU selection.

2017-01-18 Thread Eduardo Habkost
On Tue, Jan 17, 2017 at 11:52:24AM +, Peter Maydell wrote: > On 12 January 2017 at 14:28, Julian Brown wrote: > > On Wed, 11 Jan 2017 12:35:52 + > > Julian Brown wrote: > > > >> I'm a little confused, I think -- these changes seemed to be

[Qemu-devel] [RFC 06/13] pc: calculate topology only once when possible_cpus is initialised

2017-01-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/boards.h | 1 + hw/i386/pc.c| 25 + 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index ac891a8..6364617 100644 --- a/include/hw/boards.h

[Qemu-devel] SCSI HBA auto-created for -drive if=scsi

2017-01-18 Thread Markus Armbruster
Some boards automatically cold-plug SCSI HBAs to honor -drive if=scsi. Which one depends on the machine: pc*, realview-eb*, versatile*: lsi53c895a spapr-machine: spapr-vscsi Should we use something less thoroughly obsolete than lsi53c895a for new machine types? Something that actually

Re: [Qemu-devel] [Qemu-stable] Data corruption in Qemu 2.7.1

2017-01-18 Thread Fabian Grünbichler
> Paolo Bonzini hat am 18. Januar 2017 um 17:30 > geschrieben: > > > > > On 18/01/2017 17:19, Fabian Grünbichler wrote: > > Jan 18 17:07:51 ubuntu kernel: sd 2:0:0:0: [sda] tag#109 FAILED Result: > > hostbyte=DID_OK driverbyte=DRIVER_SENSE > > Jan 18 17:07:51 ubuntu

Re: [Qemu-devel] [PATCH 0/3] cpu: numa: Fix the mapping initialization of VCPUs and NUMA nodes

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 09:26:36PM +0800, Dou Liyang wrote: > Hi, All > > > ** > > ERROR:/tmp/qemu-test/src/tests/vhost-user-test.c:668:test_migrate: > > assertion failed: (qdict_haskey(rsp, "return")) > > GTester: last random seed: R02Sf52546c4daff8087416f43fa7c146db8 > > ftruncate: Permission

Re: [Qemu-devel] [PATCH] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:08:24PM +0100, Igor Mammedov wrote: > On Wed, 18 Jan 2017 13:19:45 -0200 > Eduardo Habkost wrote: > > > On Wed, Jan 18, 2017 at 03:48:45PM +0100, Igor Mammedov wrote: > > > Move vcpu's assocciated numa_node field out of generic CPUState > > > into

Re: [Qemu-devel] [libvirt] [PATCH 0/9] i386: query-cpu-model-expansion test script

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 12:09:28PM -0500, Jason J. Herne wrote: > On 01/18/2017 12:00 PM, Eduardo Habkost wrote: > > On Tue, Jan 17, 2017 at 10:22:10AM -0500, Jason J. Herne wrote: > > > On 01/16/2017 08:01 PM, Eduardo Habkost wrote: > > > > This is a follow-up to the series that implements > > >

Re: [Qemu-devel] [RFC 09/13] numa: introduce '-numa cpu' cpu option

2017-01-18 Thread Eric Blake
On 01/18/2017 11:13 AM, Igor Mammedov wrote: > It allows to specify mapping of a CPU to NUMA node on CLI. > Option should be repeated for each present/possible CPU. > Example for PC machine: > -numa node,nodeid=0 -numa node,nodeid=1 \ > -numa cpu,socket-id=0,core-id=0,thread-id=0,node-id=0 \ >

Re: [Qemu-devel] [RFC 11/13] numa: use new machine.cpu property with -numa cpus=... CLI

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:13:27PM +0100, Igor Mammedov wrote: > add compat layer to legacy cpu_index based '-numa cpus=...' > CLI option, which will use new machine.cpu property to set > numa mapping if that propety is available. > > This way machine that supports machine.cpu property will > not

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-18 Thread Igor Mammedov
On Wed, 18 Jan 2017 18:30:59 +0200 "Michael S. Tsirkin" wrote: > On Wed, Jan 18, 2017 at 12:45:54PM +0100, Phil Dennis-Jordan wrote: [...] > > I suspect more might be involved in enabling ACPI 2.0, and it should > > probably be an option so as to avoid regressions. I don't

Re: [Qemu-devel] [PATCH 0/9] i386: query-cpu-model-expansion test script

2017-01-18 Thread Eduardo Habkost
On Tue, Jan 17, 2017 at 10:22:10AM -0500, Jason J. Herne wrote: > On 01/16/2017 08:01 PM, Eduardo Habkost wrote: > > This is a follow-up to the series that implements > > query-cpu-model-expansion. Before including the test script, the > > series has some fixes to allow the results of > >

[Qemu-devel] [RFC 12/13] pc: drop usage of legacy numa_get_node_for_cpu()

2017-01-18 Thread Igor Mammedov
Replace usage of legacy cpu_index based node_cpu bitmaps with PCMachineState.possible_cpus which have node-ids for all possible CPUs. As result: * -1 usage of global max_cpus * considering not set CPUArchId.props.node_id is 0 drop not needed (numa_get_node_for_cpu(i) < nb_numa_nodes) checks,

Re: [Qemu-devel] [virtio-dev] RE: [virtio-dev] Re: [PATCH v15 0/2] virtio-crypto: virtio crypto device specification

2017-01-18 Thread Halil Pasic
On 01/17/2017 03:49 AM, Gonglei (Arei) wrote: > Hi Halil, > >> >> On 01/16/2017 01:43 PM, Gonglei (Arei) wrote: >>> Hi Michael and others, >>> >>> I'd like to redefine struct virtio_crypto_op_data_req is as below: >>> >>> struct virtio_crypto_op_data_req { >>> struct virtio_crypto_op_header

Re: [Qemu-devel] SCSI HBA auto-created for -drive if=scsi

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 18:15, Markus Armbruster wrote: > Some boards automatically cold-plug SCSI HBAs to honor -drive if=scsi. > Which one depends on the machine: > > pc*, realview-eb*, versatile*: lsi53c895a > spapr-machine: spapr-vscsi > > Should we use something less thoroughly obsolete

[Qemu-devel] [Bug 1657538] [NEW] qemu 2.7.x 2.8 softmmu dont work on BE machine

2017-01-18 Thread luigiburdo
Public bug reported: Build on Be machine qemu 2.7.1 and 2.8 in pure softmmu (tgc) dont work on big endian hardware . tested with ppc-softmmu,i386-softmmu,arm-softmmu same result: with : ./qemu-system-i386 Gtk-Message: Failed to load module "overlay-scrollbar" qemu-system-i386: Trying to

Re: [Qemu-devel] [PATCH v3] hw/core/null-machine: Add the possibility to instantiate a CPU and RAM

2017-01-18 Thread Alistair Francis
On Wed, Jan 18, 2017 at 4:44 AM, Thomas Huth wrote: > Sometimes it is useful to have just a machine with CPU and RAM, without > any further hardware in it, e.g. if you just want to do some instruction > debugging for TCG with a remote GDB attached to QEMU, or run some embedded >

[Qemu-devel] [RFC 10/13] numa: replace cpu_index_to_socket_id() with cpu_index_to_instance_props()

2017-01-18 Thread Igor Mammedov
new cpu_index_to_instance_props() returns topo info which includes socket_id so it could be used as drop in replacement in the only user parse_numa_opts(). In follow up path cpu_index_to_instance_props() will be used in compat code to set legacy index based cpu<->node mapping using new

[Qemu-devel] [RFC 13/13] pc: cpu: make sure that cpu.node-id matches -numa mapping

2017-01-18 Thread Igor Mammedov
for PC CPU's node mapping defined statically at startup and not possible to changle at hotplug time. So check that user set cpu.node-id matches whatever values were configured with -numa options (ex|im)plicitly. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 11

Re: [Qemu-devel] [PATCH v3] aspeed/smc: handle dummy bytes when doing fast reads in command mode

2017-01-18 Thread mar.krzeminski
W dniu 18.01.2017 o 16:01, Cédric Le Goater pisze: When doing fast read, a certain amount of dummy bytes should be sent before the read. This number is configurable in the controler CE0 Control Register and needs to be modeled using fake transfers to the flash module. This only supports command

Re: [Qemu-devel] [PATCH v3] hw/core/null-machine: Add the possibility to instantiate a CPU and RAM

2017-01-18 Thread Thomas Huth
On 18.01.2017 18:57, Alistair Francis wrote: > On Wed, Jan 18, 2017 at 4:44 AM, Thomas Huth wrote: >> Sometimes it is useful to have just a machine with CPU and RAM, without >> any further hardware in it, e.g. if you just want to do some instruction >> debugging for TCG with a

Re: [Qemu-devel] [PATCH v2 00/25] qmp: add async command type

2017-01-18 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 20170118160332.13390-1-marcandre.lur...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/25] qmp: add async command

Re: [Qemu-devel] [PATCH v2] hw/arm/virt-acpi - reserve ECAM space as PNP0C02 device

2017-01-18 Thread Laszlo Ersek
On 01/18/17 18:02, Ard Biesheuvel wrote: > On 18 January 2017 at 15:55, Laszlo Ersek wrote: >> On 01/18/17 16:18, Igor Mammedov wrote: >>> On Tue, 17 Jan 2017 10:56:53 + >>> Peter Maydell wrote: >>> On 17 January 2017 at 09:49, Andrew Jones

[Qemu-devel] [RFC 03/13] pc: don't return cpu pointer from pc_new_cpu() as it's not needed anymore

2017-01-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2461d84..c0eba8a 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1092,28 +1092,24 @@ void

[Qemu-devel] [RFC 09/13] numa: introduce '-numa cpu' cpu option

2017-01-18 Thread Igor Mammedov
It allows to specify mapping of a CPU to NUMA node on CLI. Option should be repeated for each present/possible CPU. Example for PC machine: -numa node,nodeid=0 -numa node,nodeid=1 \ -numa cpu,socket-id=0,core-id=0,thread-id=0,node-id=0 \ -numa cpu,socket-id=1,core-id=0,thread-id=0,node-id=1

Re: [Qemu-devel] [PATCH 01/18] tcg: add support for 128bit vector type

2017-01-18 Thread Richard Henderson
On 01/17/2017 01:07 AM, Kirill Batuzov wrote: +static inline TCGv_v128 tcg_global_mem_new_v128(TCGv_ptr reg, intptr_t offset, +const char *name) +{ +int idx = tcg_global_mem_new_internal(TCG_TYPE_V128, reg, offset, name); +return

Re: [Qemu-devel] [PATCH v1 11/15] qcow2: convert QCow2 to use QCryptoBlock for encryption

2017-01-18 Thread Max Reitz
On 03.01.2017 19:27, Daniel P. Berrange wrote: > This converts the qcow2 driver to make use of the QCryptoBlock > APIs for encrypting image content, using the legacyy QCow2 AES > scheme. > > With this change it is now required to use the QCryptoSecret > object for providing passwords, instead of

Re: [Qemu-devel] [PATCH 10/18] tcg/i386: add support for vector opcodes

2017-01-18 Thread Richard Henderson
On 01/18/2017 05:05 AM, Kirill Batuzov wrote: Why are you not defining xmm8-15? At first I thought about supporting both x86_64 and i386 targets, but put this idea away (at least for the time being). Since defining xmm8-15 does not contradict anything (as I see it now) I'll add them too.

Re: [Qemu-devel] [RFC 08/13] pc: add writeonly 'cpu' property to PCMachine

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:13:24PM +0100, Igor Mammedov wrote: > it will allow generic numa code to set cpu to numa node mapping > in target independent manner in the next patch. > > Signed-off-by: Igor Mammedov This looks like a creative way to abuse the QOM property

Re: [Qemu-devel] [PATCH v6 wave 2 0/3] q35: add negotiable broadcast SMI

2017-01-18 Thread Michael S. Tsirkin
On Thu, Jan 12, 2017 at 07:24:43PM +0100, Laszlo Ersek wrote: > Previous version (v5): > http://lists.nongnu.org/archive/html/qemu-devel/2017-01/msg01902.html > > Changes in v6 (see the individual patches for details): > - pick up feedback tags > - rename "smi_broadcast" to "x-smi-broadcast"

Re: [Qemu-devel] [libvirt] [PATCH 0/9] i386: query-cpu-model-expansion test script

2017-01-18 Thread Jason J. Herne
On 01/18/2017 12:00 PM, Eduardo Habkost wrote: On Tue, Jan 17, 2017 at 10:22:10AM -0500, Jason J. Herne wrote: On 01/16/2017 08:01 PM, Eduardo Habkost wrote: This is a follow-up to the series that implements query-cpu-model-expansion. Before including the test script, the series has some fixes

Re: [Qemu-devel] [PATCH v6 wave 2 2/3] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-18 Thread Laszlo Ersek
On 01/18/17 17:26, Igor Mammedov wrote: > On Wed, 18 Jan 2017 16:42:27 +0100 > Laszlo Ersek wrote: > >> On 01/18/17 13:38, Igor Mammedov wrote: >>> On Wed, 18 Jan 2017 11:23:48 +0100 >>> Laszlo Ersek wrote: >>> On 01/18/17 11:19, Laszlo Ersek wrote:

[Qemu-devel] [RFC 04/13] make possible_cpu_arch_ids() return const pointer

2017-01-18 Thread Igor Mammedov
make sure that external callers won't try to modify possible_cpus and owner of possible_cpus can access it directly when it modifies it. Signed-off-by: Igor Mammedov --- include/hw/acpi/acpi_dev_interface.h | 2 +- include/hw/boards.h | 2 +-

Re: [Qemu-devel] [PATCH v6 wave 2 2/3] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-18 Thread Igor Mammedov
On Wed, 18 Jan 2017 18:23:45 +0100 Laszlo Ersek wrote: > On 01/18/17 17:26, Igor Mammedov wrote: > > On Wed, 18 Jan 2017 16:42:27 +0100 > > Laszlo Ersek wrote: > > > >> On 01/18/17 13:38, Igor Mammedov wrote: > >>> On Wed, 18 Jan 2017 11:23:48 +0100 >

[Qemu-devel] [RFC 11/13] numa: use new machine.cpu property with -numa cpus=... CLI

2017-01-18 Thread Igor Mammedov
add compat layer to legacy cpu_index based '-numa cpus=...' CLI option, which will use new machine.cpu property to set numa mapping if that propety is available. This way machine that supports machine.cpu property will not break legacy CLI but will be able to move away from using

Re: [Qemu-devel] [RFC 01/13] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:13:17PM +0100, Igor Mammedov wrote: > Move vcpu's assocciated numa_node field out of generic CPUState > into inherited classes that actually care about cpu<->numa mapping > and make monitor 'info numa' get vcpu's assocciated node id via > node-id property. > It allows to

Re: [Qemu-devel] [RFC 08/13] pc: add writeonly 'cpu' property to PCMachine

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 06:13:24PM +0100, Igor Mammedov wrote: > it will allow generic numa code to set cpu to numa node mapping > in target independent manner in the next patch. > > Signed-off-by: Igor Mammedov > --- > hw/i386/pc.c | 56

[Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
All users include the trailing ;, let's require that so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not produce unexpected results. Not a huge problem for QEMU since our style requires the use of {} but seems cleaner nevertheless. Signed-off-by: Michael S. Tsirkin ---

[Qemu-devel] [PATCH v2 4/4] ARRAY_SIZE: check that argument is an array

2017-01-18 Thread Michael S. Tsirkin
It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring changes the argument from an array to a pointer to a dynamically allocated buffer. Code keeps compiling but any ARRAY_SIZE calls now return the size of the pointer divided by element size. Let's add build time checks to

[Qemu-devel] [PATCH 0/7] target-m68k: implement 680x0 FPU

2017-01-18 Thread Laurent Vivier
This series modifies the original ColdFire FPU implementation to use floatx80 instead of float64 internally as this is the native datatype for 680x0. I didn't keep the float64 type for ColdFire, but if someone thinks it's required I can update this series in this way. The series also adds the FPU

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Peter Maydell
On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: > All users include the trailing ;, let's require that > so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not > produce unexpected results. When would it ever make sense for a build-time assert to be the only thing inside

[Qemu-devel] [PATCH 1/7] target-m68k: move FPU helpers to fpu_helper.c

2017-01-18 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/Makefile.objs | 2 +- target/m68k/fpu_helper.c | 112 ++ target/m68k/helper.c | 88 3 files changed, 113 insertions(+), 89 deletions(-)

[Qemu-devel] [PATCH 6/7] target-m68k: introduce fscc.

2017-01-18 Thread Laurent Vivier
use DisasCompare with FPU conditions in fscc and fbcc. Signed-off-by: Laurent Vivier --- target/m68k/translate.c | 228 1 file changed, 153 insertions(+), 75 deletions(-) diff --git a/target/m68k/translate.c

[Qemu-devel] [PATCH 2/7] target-m68k: define ext_opsize

2017-01-18 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/translate.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 9f60fbc..d9ba735 100644 ---

[Qemu-devel] [PATCH 3/7] softfloat: define 680x0 specific values

2017-01-18 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- fpu/softfloat-specialize.h | 30 +++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index f5aed72..8bd3fa9 100644 ---

[Qemu-devel] [PATCH 7/7] target-m68k: implements more FPU instructions

2017-01-18 Thread Laurent Vivier
Add fmovecr, fsinh, flognp1, ftanh, fatan, fasin, fatanh, fsin, ftan, fetox, ftwotox, ftentox, flogn, flog10, facos, fcos, fgetexp, fgetman, fmod, fsgldiv, fscale, fsglmul, sin, cos, frestore, fsave. Signed-off-by: Laurent Vivier --- target/m68k/cpu.h| 1 +

[Qemu-devel] [PATCH 5/7] target-m68k: add fmovem

2017-01-18 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 6 +++ target/m68k/helper.h | 1 + target/m68k/translate.c | 99 +++- 3 files changed, 80 insertions(+), 26 deletions(-) diff --git a/target/m68k/fpu_helper.c

Re: [Qemu-devel] [PATCH v2 0/4] virtio: ARRAY_SIZE fixups

2017-01-18 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1484772931-16272-1-git-send-email-...@redhat.com Subject: [Qemu-devel] [PATCH v2 0/4] virtio: ARRAY_SIZE fixups Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

[Qemu-devel] [PATCH 4/7] target-m68k: use floatx80 internally

2017-01-18 Thread Laurent Vivier
Coldfire uses float64, but 680x0 use floatx80. This patch introduces the use of floatx80 internally and enable FPU for 680x0. Signed-off-by: Laurent Vivier --- configure| 2 +- gdb-xml/m68k-fp.xml | 21 ++ target/m68k/cpu.c| 13 +-

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 09:04:03PM +, Peter Maydell wrote: > On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: > > All users include the trailing ;, let's require that > > so that uses such as if (a) QEMU_BUILD_BUG_ON(); do not > > produce unexpected results. > > When

Re: [Qemu-devel] [PATCH 0/7] target-m68k: implement 680x0 FPU

2017-01-18 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1484773521-16530-1-git-send-email-laur...@vivier.eu Subject: [Qemu-devel] [PATCH 0/7] target-m68k: implement 680x0 FPU Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH v2 2/4] compiler: drop ; after BUILD_BUG_ON

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 11:16:07PM +0200, Michael S. Tsirkin wrote: > On Wed, Jan 18, 2017 at 09:04:03PM +, Peter Maydell wrote: > > On 18 January 2017 at 20:55, Michael S. Tsirkin wrote: > > > All users include the trailing ;, let's require that > > > so that uses such as if

[Qemu-devel] [PATCH] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Igor Mammedov
Move vcpu's assocciated numa_node field out of generic CPUState into inherited classes that actually care about cpu<->numa mapping and make monitor 'info numa' get vcpu's assocciated node id via node-id property. It allows to drop implicit node id intialization in numa_post_machine_init() and

[Qemu-devel] [PATCH] configure: allow enabling seccomp on s390x

2017-01-18 Thread Christian Ehrhardt
Allow enabling seccomp support on s390x if sufficient build dependencies are provided. Signed-off-by: Christian Ehrhardt --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 86f5214..5056ba9 100755 --- a/configure +++

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 15:24, Phil Dennis-Jordan wrote: > --- > target/i386/cpu.c | 1 + > target/i386/cpu.h | 4 > target/i386/kvm.c | 40 > 3 files changed, 37 insertions(+), 8 deletions(-) > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > index

<    1   2   3   4   >