[Qemu-devel] [PATCH v2 1/3] linux-headers: Add eeh.h

2015-07-31 Thread Gavin Shan
The header file was introduced by following Linux upstream commits: commit ed3e81f ("powerpc/eeh: Move PE state constants around") commit ec33d36 ("powerpc/eeh: Introduce eeh_pe_inject_err()") Signed-off-by: Gavin Shan --- linux-headers/asm-powerpc/eeh.h | 56 +++

[Qemu-devel] [PATCH v2 0/3] sPAPR: Support EEH Error Injection

2015-07-31 Thread Gavin Shan
The patchset depends on below Linux upstream commits: commit ed3e81f ("powerpc/eeh: Move PE state constants around") commit ec33d36 ("powerpc/eeh: Introduce eeh_pe_inject_err()") According to PAPR specification 2.7, there're 3 RTAS calls relevent to error injection: "ibm,open-errinjct", "ibm,

[Qemu-devel] [PATCH v2 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-07-31 Thread Gavin Shan
The patch supports RTAS calls "ibm,{open,close}-errinjct" to manupliate the token, which is passed to RTAS call "ibm,errinjct" to indicate the valid context for error injection. Each VM is permitted to have only one token at once and we simply have one random number for that. Signed-off-by: Gavin

Re: [Qemu-devel] [PATCH v2 6/9] vhost: use variable arguments for vhost_call()

2015-07-31 Thread l
Marc-André Lureau writes: Hi André, > It is useful to pass extra arguments to the funtions, for > various backend needs. > > Signed-off-by: Marc-André Lureau > --- > hw/virtio/vhost-backend.c | 4 ++-- > hw/virtio/vhost-user.c| 4 ++-- > include/hw/virtio/vhost-backend.h |

[Qemu-devel] [PULL for-2.4 0/2] Ide patches

2015-07-31 Thread John Snow
The following changes since commit cb48f67ad8c7b33c617d4f8144a27706e69fd688: bsd-user: Fix operand to cpu_x86_exec (2015-07-30 12:38:49 +0100) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-request for you to fetch changes up to 91ced514461e1a533bfb

[Qemu-devel] [PULL for-2.4 1/2] macio: re-add TRIM support

2015-07-31 Thread John Snow
From: Aurelien Jarno Commit bd4214fc dropped TRIM support by mistake. Given it is still advertised to the host when using a drive with discard=on, this cause the IDE bus to hang when the host issues a TRIM command. This patch fixes that by re-adding the TRIM code, ported to the new new DMA imple

[Qemu-devel] [PULL for-2.4 2/2] ahci: fix ICC mask definition

2015-07-31 Thread John Snow
There are likely others that could be updated, but we'll go with a light touch for 2.4 for now. Without the Unsigned specifier, this shifts bits into the signed bit, which makes clang unhappy and could cause unwanted behavior. Reported-by: Peter Maydell Signed-off-by: John Snow Message-id: 1437

Re: [Qemu-devel] [PULL 18/19] macio: move unaligned DMA write code into separate pmac_dma_write() function

2015-07-31 Thread John Snow
On 07/28/2015 04:52 AM, Mark Cave-Ayland wrote: > On 27/07/15 23:00, Aurelien Jarno wrote: > >> On 2015-05-22 15:59, John Snow wrote: >>> From: Mark Cave-Ayland >>> >>> Similarly switch the macio IDE routines over to use the new function and >>> tidy-up the remaining code as required. >>> >>> [

Re: [Qemu-devel] [PATCH for-2.4] macio: re-add TRIM support

2015-07-31 Thread John Snow
On 07/29/2015 03:27 PM, Aurelien Jarno wrote: > Commit bd4214fc dropped TRIM support by mistake. Given it is still > advertised to the host when using a drive with discard=on, this cause > the IDE bus to hang when the host issues a TRIM command. > > This patch fixes that by re-adding the TRIM co

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 11/11] new: arm/barrier-test for memory barriers

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:54:01PM +0100, Alex Bennée wrote: > From: Alex Bennée > > This test has been written mainly to stress multi-threaded TCG behaviour > but will demonstrate failure by default on real hardware. The test takes > the following parameters: > > - "lock" use GCC's locking se

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 09/11] arm: query /dev/kvm for maximum vcpus

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:59PM +0100, Alex Bennée wrote: > From: Alex Bennée > > The previous $(getconf _NPROCESSORS_CONF) isn't correct as the default > maximum VCPU configuration is 4 on arm64 machines which typically have > more actual cores. The kernel should probably bump that up to 8,

Re: [Qemu-devel] [PATCH v2 8/9] netfilter: add a netbuffer filter

2015-07-31 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > 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. > It has an interval option, if supplied, this filter will r

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 08/11] arm/unittests.cfg: add the tlbflush tests

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:58PM +0100, Alex Bennée wrote: > --- > arm/unittests.cfg | 24 > 1 file changed, 24 insertions(+) > > diff --git a/arm/unittests.cfg b/arm/unittests.cfg > index ee655b2..19d72ad 100644 > --- a/arm/unittests.cfg > +++ b/arm/unittests.cfg > @@

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 07/11] new arm/tlbflush-test: TLB torture test

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:57PM +0100, Alex Bennée wrote: > This adds a fairly brain dead torture test for TLB flushes intended for > stressing the MTTCG QEMU build. It takes the usual -smp option for > multiple CPUs. > > By default it CPU0 will do a TLBIALL flush after each cycle. You can > pa

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 06/11] lib/arm: add flush_tlb_page mmu function

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:56PM +0100, Alex Bennée wrote: > This introduces a new flush_tlb_page function which does exactly what > you expect. It's going to be useful for the future TLB torture test. > > Signed-off-by: Alex Bennée > --- > lib/arm/asm/mmu.h | 11 +++ > lib/arm64/asm

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 05/11] lib/printf: support the %u unsigned fmt field

2015-07-31 Thread Andrew Jones
On Fri, Jul 31, 2015 at 04:53:55PM +0100, Alex Bennée wrote: > --- > lib/printf.c | 13 + > 1 file changed, 13 insertions(+) missing sign-off > > diff --git a/lib/printf.c b/lib/printf.c > index 89308fb..5d83605 100644 > --- a/lib/printf.c > +++ b/lib/printf.c > @@ -180,6 +180,19 @@

Re: [Qemu-devel] [PATCH v4 1/5] cpu: Provide vcpu throttling interface

2015-07-31 Thread Jason J. Herne
On 07/31/2015 01:42 PM, Jason J. Herne wrote: On 07/31/2015 01:16 PM, Paolo Bonzini wrote: On 31/07/2015 19:12, Jason J. Herne wrote: Throttle ratio is relative to CPU_THROTTLE_TIMESLICE. Take a look at how throttle_ratio is used in the calculation: long sleeptime_ms = (long)(throttle_ra

Re: [Qemu-devel] [RFC 0/3] qga: add guest-get-memory-info (for 2.5)

2015-07-31 Thread Marc-André Lureau
Hi - Original Message - > On Fri, Jul 31, 2015 at 07:36:46PM +0200, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > This series implement a new qemu guest agent command to get memory > > information from the guest. This is based on ovirt-guest-agent > > "memory-sta

Re: [Qemu-devel] [RFC 2/3] qga: implement get-memory-info for Linux

2015-07-31 Thread Marc-André Lureau
- Original Message - > On Fri, Jul 31, 2015 at 07:36:48PM +0200, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Signed-off-by: Marc-André Lureau > > --- > > qga/commands-posix.c | 94 > > ++-- > > qga/main.c

Re: [Qemu-devel] [PATCH for-2.4] oslib-win32: only provide localtime_r/gmtime_r if missing

2015-07-31 Thread Stefan Weil
Am 31.07.2015 um 14:49 schrieb Paolo Bonzini: On 31/07/2015 12:17, Daniel P. Berrange wrote: CCutil/osdep.o In file included from include/qemu-common.h:48:0, from util/osdep.c:48: include/sysemu/os-win32.h:77:12: error: redundant redeclaration of 'gmtime_r' [-Werror=red

Re: [Qemu-devel] [RFC 0/3] qga: add guest-get-memory-info (for 2.5)

2015-07-31 Thread Daniel P. Berrange
On Fri, Jul 31, 2015 at 07:36:46PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > This series implement a new qemu guest agent command to get memory > information from the guest. This is based on ovirt-guest-agent > "memory-stats" message. > > I couldn't find documentati

Re: [Qemu-devel] [RFC 2/3] qga: implement get-memory-info for Linux

2015-07-31 Thread Daniel P. Berrange
On Fri, Jul 31, 2015 at 07:36:48PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > qga/commands-posix.c | 94 > ++-- > qga/main.c | 28 > 2 files changed,

Re: [Qemu-devel] [PATCH v4 1/5] cpu: Provide vcpu throttling interface

2015-07-31 Thread Jason J. Herne
On 07/31/2015 01:16 PM, Paolo Bonzini wrote: On 31/07/2015 19:12, Jason J. Herne wrote: Throttle ratio is relative to CPU_THROTTLE_TIMESLICE. Take a look at how throttle_ratio is used in the calculation: long sleeptime_ms = (long)(throttle_ratio * CPU_THROTTLE_TIMESLICE); A value of 1 me

[Qemu-devel] [RFC 3/3] qga: implement get-memory-info on win32

2015-07-31 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- configure| 1 + qga/commands-win32.c | 164 ++- 2 files changed, 163 insertions(+), 2 deletions(-) diff --git a/configure b/configure index c5c4b82..82ee185 100755 --- a/c

[Qemu-devel] [RFC 1/3] qga: add guest-get-memory-info json

2015-07-31 Thread marcandre . lureau
From: Marc-André Lureau Define a new guest agent message, and document it. Signed-off-by: Marc-André Lureau --- qga/commands-posix.c | 12 qga/commands-win32.c | 6 ++ qga/qapi-schema.json | 48 3 files changed, 66 insertions(+

[Qemu-devel] [RFC 0/3] qga: add guest-get-memory-info (for 2.5)

2015-07-31 Thread marcandre . lureau
From: Marc-André Lureau This series implement a new qemu guest agent command to get memory information from the guest. This is based on ovirt-guest-agent "memory-stats" message. I couldn't find documentation for the ovirt message, but the list of fields are summarized in this test https://github

[Qemu-devel] [RFC 2/3] qga: implement get-memory-info for Linux

2015-07-31 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- qga/commands-posix.c | 94 ++-- qga/main.c | 28 2 files changed, 120 insertions(+), 2 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c i

Re: [Qemu-devel] [PATCH 10/12] timer.h: Don't include qemu-common.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:09PM +0100, Peter Maydell wrote: > Include the specific headers we need, rather than qemu-common.h. > > Signed-off-by: Peter Maydell > --- > include/qemu/timer.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/qemu/timer.h b/inclu

Re: [Qemu-devel] [PATCH 09/12] apic_internal.h: Include cpu.h directly

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:08PM +0100, Peter Maydell wrote: > apic_internal.h relies on cpu.h having been included (for the > X86CPU type); include it directly rather than relying on it > being pulled in via one of the other includes like timer.h. > > Signed-off-by: Peter Maydell > --- > incl

Re: [Qemu-devel] [PATCH 08/12] qemu-common.h: Move muldiv64() to host-utils.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:07PM +0100, Peter Maydell wrote: > Move the muldiv64() function from qemu-common.h to host-utils.h. > This puts it together with all the other arithmetic functions > where we provide a version with __int128_t and a fallback > without, and allows headers which need muld

Re: [Qemu-devel] [PATCH 07/12] osdep.h: Add header comment

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:06PM +0100, Peter Maydell wrote: > Add a header comment to osdep.h, explaining what the header is for > and some rules to avoid circular-include difficulties. > > Signed-off-by: Peter Maydell > --- > include/qemu/osdep.h | 24 > 1 file chang

Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring

2015-07-31 Thread Daniel P. Berrange
On Fri, Jul 31, 2015 at 01:57:29PM +0100, Peter Maydell wrote: > On 31 July 2015 at 13:54, Daniel P. Berrange wrote: > > I broadly like the direction of this change. I think it is > > probably worth being strict about requiring #include of > > osdep.h as the first header in every .c file. And vali

Re: [Qemu-devel] simulate SMI in Qemu

2015-07-31 Thread Laszlo Ersek
On 07/30/15 09:16, Yu-Cheng Liu wrote: > hello, > Does QEMU support SMI/SMM implementation? Yes. > I use Qemu and coreboot to > trace the procedure of the SMI/SMM ,the program return in SMM initial > function ,the reason is the value return from "pci_read_word" ,the > function always return 0, w

Re: [Qemu-devel] [PATCH v4 1/5] cpu: Provide vcpu throttling interface

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 19:12, Jason J. Herne wrote: >> >> > > Throttle ratio is relative to CPU_THROTTLE_TIMESLICE. Take a look at how > throttle_ratio is used in the calculation: > > long sleeptime_ms = (long)(throttle_ratio * CPU_THROTTLE_TIMESLICE); > > A value of 1 means we sleep the same amount of

Re: [Qemu-devel] [PATCH v4 1/5] cpu: Provide vcpu throttling interface

2015-07-31 Thread Jason J. Herne
On 07/23/2015 05:59 AM, Paolo Bonzini wrote: On 16/07/2015 16:21, Jason J. Herne wrote: 1. Using atomic operations to manage throttle_percentage. I'm not sure where atomics are applicable here. If this is still a concern hopefully someone can explain. I would use atomic_read/atomic_set in cp

Re: [Qemu-devel] [ARM SMBIOS V1 PATCH 5/6] smbios: add smbios 3.0 support

2015-07-31 Thread Laszlo Ersek
Hello Wei, there's a bug in one of the SMBIOS 3.0 entry point struct fields. It relates to the use of "smbios_table_max": On 07/28/15 08:00, Wei Huang wrote: > This patch adds support for SMBIOS 3.0 entry point. When caller invokes > smbios_set_defaults(), it can specify entry point as 2.1 or 3.0

Re: [Qemu-devel] [PATCH v7 25/42] Postcopy: Maintain sentmap and calculate discard

2015-07-31 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Tue) 16 Jun 2015 [11:26:38], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Where postcopy is preceeded by a period of precopy, the destination will > > have received pages that may have been dirtied on the source aft

Re: [Qemu-devel] [RFC] Towards an Heterogeneous QEMU

2015-07-31 Thread Christian Pinto
Hello Paolo, On 31/07/2015 15:10, Paolo Bonzini wrote: On 27/07/2015 15:54, Christian Pinto wrote: From the user point of view there is usually an operating system booting on the Master processor (e.g. Linux) at platform startup, while the other processors are used to offload the Master one f

[Qemu-devel] [PATCH V3 3/3] tests/vhost-user: check vhost-user feature negotiation

2015-07-31 Thread Marcel Apfelbaum
Check the backend receives all declared virtio features that are also supported by QEMU virtio. Signed-off-by: Marcel Apfelbaum --- tests/vhost-user-test.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c i

[Qemu-devel] [PATCH V3 0/3] vhost-user: sync backend

2015-07-31 Thread Marcel Apfelbaum
To be used on top of: [PATCH 0/4] vhost-user: protocol updates https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg03842.html v2 -> v3: - Addressed Michael S. Tsirkin's comments: - Fixed a typo in patch 2/3 message - MQ - I left it there for completeness, it will be moved once

[Qemu-devel] [PATCH V3 2/3] hw/vhost-user: sync backend features

2015-07-31 Thread Marcel Apfelbaum
Complete vhost-user negotiation by synching the features supported by the backend. Signed-off-by: Marcel Apfelbaum --- hw/virtio/vhost-user.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index c4428a1..b522437 100644 --- a

[Qemu-devel] [PATCH V3 1/3] hw/vhost-user: remove unnecessary virtio control bits

2015-07-31 Thread Marcel Apfelbaum
The backend is interested in negotiating only several virtio bits, remove the others. Signed-off-by: Marcel Apfelbaum --- hw/net/vhost_net.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index c864237..90f97d2 100644 --- a/hw/n

[Qemu-devel] [PATCH RFC 03/10] maint: remove / fix many doubled words

2015-07-31 Thread Daniel P. Berrange
Many source files have doubled words (eg "the the", "to to", and so on). Most of these can simply be removed, but a couple were actual mis-spellings (eg "to to" instead of "to do"). There was even one triple word score "to to to" :-) Signed-off-by: Daniel P. Berrange --- block/qcow2-cluster.c

[Qemu-devel] [PATCH RFC 04/10] maint: remove unused include for assert.h

2015-07-31 Thread Daniel P. Berrange
A number of files were including assert.h but not using any of the functions it provides Signed-off-by: Daniel P. Berrange --- cfg.mk| 1 - disas/ia64.c | 1 - hw/i386/xen/xen_platform.c| 2 -- linux-user/signal.c | 1 - target-microblaze/op

[Qemu-devel] [PATCH RFC 05/10] maint: remove unused include for dirent.h

2015-07-31 Thread Daniel P. Berrange
A number of files were including dirent.h but not using any of the functions it provides Signed-off-by: Daniel P. Berrange --- cfg.mk| 1 - fsdev/virtio-9p-marshal.c | 1 - hw/tpm/tpm_passthrough.c | 2 -- hw/usb/redirect.c | 1 - hw/vfio/pci.c | 1 - qem

[Qemu-devel] [PATCH RFC 06/10] maint: remove unused include for signal.h

2015-07-31 Thread Daniel P. Berrange
A number of files were including signal.h but not using any of the functions it provides Signed-off-by: Daniel P. Berrange --- bsd-user/signal.c | 1 - cfg.mk | 1 - hw/block/xen_disk.c | 1 - hw/net/xen_nic.c| 1 - hw/usb/redirect.c | 1 - os-win32.c

[Qemu-devel] [PATCH RFC 01/10] tests: import GNULIB's syntax-check infrastructure

2015-07-31 Thread Daniel P. Berrange
Imports the infrastructure for GNULIB's 'syntax-check' make target. Similar to QEMU's checkpatch.pl script this allows for checking code style rules. The important differences are that it checks across the entire codebase instead of just the submitted patch, and can have each rule individually turn

[Qemu-devel] [PATCH RFC 09/10] maint: add check for use of POSIX functions which are not reentrant safe

2015-07-31 Thread Daniel P. Berrange
Imports a rule from libvirt to make sure that for any POSIX function which is not reentrant safe, the _r variant is used in the source. While it is entirely possible that many of the QEMU uses are in fact safe, it is pretty difficult to prove that conclusively due to the increasing use of 3rd part

[Qemu-devel] [PATCH RFC 08/10] maint: avoid useless "if (foo) free(foo)" pattern

2015-07-31 Thread Daniel P. Berrange
The free() and g_free() functions both happily accept NULL on any platform QEMU builds on. As such putting a conditional 'if (foo)' check before calls to 'free(foo)' merely serves to bloat the lines of code. Signed-off-by: Daniel P. Berrange --- backends/hostmem-file.c | 4 +--- bsd-user/e

[Qemu-devel] [PATCH RFC 07/10] maint: remove unused include for strings.h

2015-07-31 Thread Daniel P. Berrange
A number of files were including strings.h but not using any of the functions it provides Signed-off-by: Daniel P. Berrange --- cfg.mk | 1 - disas/microblaze.c | 1 - hw/pci/shpc.c | 1 - page_cache.c| 1 - tests/test-xbzrle.c | 1 - 5 files changed, 5 deletions(-)

[Qemu-devel] [PATCH RFC 10/10] maint: enable checking for qemu/osdep.h header usage

2015-07-31 Thread Daniel P. Berrange
Uncomment rules which mandate that qemu/osdep.h is included in all .c file, and that it appears in the file before any other includes. NB, this change isn't intended to be applied as it obviously fails. It is just an illustration of how we'd enforce such a header usage rule. Signed-off-by: Daniel

[Qemu-devel] [PATCH RFC 00/10] Enable repository wide style checking

2015-07-31 Thread Daniel P. Berrange
Historically QEMU has relied on the checkpatch.pl script, borrowed from Linux, to check coding style compliance on patches which are submitted. For what it is designed for, it does a reasonable job, but I feel that QEMU would benefit from some more checking in this area, in particular checks that r

[Qemu-devel] [PATCH RFC 02/10] maint: remove double semicolons in many files

2015-07-31 Thread Daniel P. Berrange
A number of source files have statements accidentally terminated by a double semicolon - eg 'foo = bar;;'. This is harmless but a mistake none the less. The tcg/ia64/tcg-target.c file is whitelisted because it has valid use of ';;' in a comment containing assembly code. Signed-off-by: Daniel P. B

Re: [Qemu-devel] [RFC] Towards an Heterogeneous QEMU

2015-07-31 Thread Christian Pinto
Hello Cristopher, On 31/07/2015 14:03, Christopher Covington wrote: Hi Christian, On 07/27/2015 09:54 AM, Christian Pinto wrote: Hi all, this message is to present, and get feedback, on a QEMU enhancement which we are working on. Most of the state-of-the-art SoCs use the heterogeneous paradi

Re: [Qemu-devel] [PATCH v7 20/42] Modify save_live_pending for postcopy

2015-07-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > Modify save_live_pending to return separate postcopiable and > > non-postcopiable counts. > > > > Signed-off-by: Dr. David Alan Gilbert > > Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH for-2.5 07/10] tcg: implement real ext_i32_i64 and extu_i32_i64 ops

2015-07-31 Thread Richard Henderson
On 07/31/2015 09:01 AM, Alex Bennée wrote: Aurelien Jarno writes: Implement real ext_i32_i64 and extu_i32_i64 ops. They ensure that a 32-bit value is always converted to a 64-bit value and not propagated through the register allocator or the optimizer. Cc: Andrzej Zaborowski Cc: Alexander G

Re: [Qemu-devel] [PATCH for-2.5 10/10] tcg: update README about size changing ops

2015-07-31 Thread Alex Bennée
Aurelien Jarno writes: > Cc: Richard Henderson > Signed-off-by: Aurelien Jarno > --- > tcg/README | 18 +++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git a/tcg/README b/tcg/README > index 61b3899..a22f251 100644 > --- a/tcg/README > +++ b/tcg/README > @@ -46

[Qemu-devel] [kvm-unit-tests PATCH v5 07/11] new arm/tlbflush-test: TLB torture test

2015-07-31 Thread Alex Bennée
This adds a fairly brain dead torture test for TLB flushes intended for stressing the MTTCG QEMU build. It takes the usual -smp option for multiple CPUs. By default it CPU0 will do a TLBIALL flush after each cycle. You can pass options via -append to control additional aspects of the test: - "p

Re: [Qemu-devel] [PATCH for-2.5 07/10] tcg: implement real ext_i32_i64 and extu_i32_i64 ops

2015-07-31 Thread Alex Bennée
Aurelien Jarno writes: > Implement real ext_i32_i64 and extu_i32_i64 ops. They ensure that a > 32-bit value is always converted to a 64-bit value and not propagated > through the register allocator or the optimizer. > > Cc: Andrzej Zaborowski > Cc: Alexander Graf > Cc: Blue Swirl > Cc: Claudi

[Qemu-devel] [kvm-unit-tests PATCH v5 06/11] lib/arm: add flush_tlb_page mmu function

2015-07-31 Thread Alex Bennée
This introduces a new flush_tlb_page function which does exactly what you expect. It's going to be useful for the future TLB torture test. Signed-off-by: Alex Bennée --- lib/arm/asm/mmu.h | 11 +++ lib/arm64/asm/mmu.h | 8 2 files changed, 19 insertions(+) diff --git a/lib/a

[Qemu-devel] [kvm-unit-tests PATCH v5 03/11] configure: emit HOST=$host to config.mak

2015-07-31 Thread Alex Bennée
This is useful information for the run scripts to know, especially if they want to drop to using TCG. Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- v3 - add r-b tag --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index b2ad32a..078b70c 100

[Qemu-devel] [kvm-unit-tests PATCH v5 09/11] arm: query /dev/kvm for maximum vcpus

2015-07-31 Thread Alex Bennée
From: Alex Bennée The previous $(getconf _NPROCESSORS_CONF) isn't correct as the default maximum VCPU configuration is 4 on arm64 machines which typically have more actual cores. This introduces a simple utility program to query the KVM capabilities and use the correct maximum number of vcpus.

[Qemu-devel] [kvm-unit-tests PATCH v5 00/11] My current MTTCG tests

2015-07-31 Thread Alex Bennée
Hi, This is the current state of my MTTCG tests based on the KVM's unit testing framework. The earlier patches in the series have already been reviewed and will (with the exception of the emacs patch) be making their way upstream. There are a couple of addition to library functions: - printf %u

[Qemu-devel] [PATCH for-2.5] hw/intc/arm_gic_kvm: set up a flat irqchip routing table

2015-07-31 Thread Eric Auger
In case the kernel supports GSI routing, we set up irqchip routing entries for GIC SPIs. This is not mandated as long as MSI routing is not used (because the kernel sets a default irqchip routing table). However once MSI routing gets used (for VIRTIO-PCI vhost for example), the first call to KVM_SE

[Qemu-devel] [kvm-unit-tests PATCH v5 08/11] arm/unittests.cfg: add the tlbflush tests

2015-07-31 Thread Alex Bennée
--- arm/unittests.cfg | 24 1 file changed, 24 insertions(+) diff --git a/arm/unittests.cfg b/arm/unittests.cfg index ee655b2..19d72ad 100644 --- a/arm/unittests.cfg +++ b/arm/unittests.cfg @@ -35,3 +35,27 @@ file = selftest.flat smp = $(getconf _NPROCESSORS_CONF) extra

[Qemu-devel] [kvm-unit-tests PATCH v5 04/11] arm/run: introduce usingkvm var and use it

2015-07-31 Thread Alex Bennée
This makes the script a little cleaner by only checking for KVM support in one place. If KVM isn't available we can fall back to TCG emulation and echo the fact to the screen rather than let QEMU complain. Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- v2 - rm redundant M= statement

[Qemu-devel] [kvm-unit-tests PATCH v5 11/11] new: arm/barrier-test for memory barriers

2015-07-31 Thread Alex Bennée
From: Alex Bennée This test has been written mainly to stress multi-threaded TCG behaviour but will demonstrate failure by default on real hardware. The test takes the following parameters: - "lock" use GCC's locking semantics - "excl" use load/store exclusive semantics - "acqrel" use acqu

[Qemu-devel] [kvm-unit-tests PATCH v5 01/11] arm/run: set indentation defaults for emacs

2015-07-31 Thread Alex Bennée
Signed-off-by: Alex Bennée --- arm/run | 1 + 1 file changed, 1 insertion(+) diff --git a/arm/run b/arm/run index 662a856..6b42a2e 100755 --- a/arm/run +++ b/arm/run @@ -1,4 +1,5 @@ #!/bin/bash +# -*- sh-basic-offset:8 indent-tabs-mode: t -*- if [ ! -f config.mak ]; then echo run ./c

[Qemu-devel] [kvm-unit-tests PATCH v5 05/11] lib/printf: support the %u unsigned fmt field

2015-07-31 Thread Alex Bennée
--- lib/printf.c | 13 + 1 file changed, 13 insertions(+) diff --git a/lib/printf.c b/lib/printf.c index 89308fb..5d83605 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -180,6 +180,19 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list va) break;

[Qemu-devel] [kvm-unit-tests PATCH v5 02/11] README: add some CONTRIBUTING notes

2015-07-31 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- v2 - mention consistency v3 - add r-b tag --- README | 26 ++ 1 file changed, 26 insertions(+) diff --git a/README b/README index e9869d1..9389a26 100644 --- a/README +++ b/README @@ -25,3 +25,29 @@ Directory

Re: [Qemu-devel] [PATCH v7 36/42] Host page!=target page: Cleanup bitmaps

2015-07-31 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > Prior to the start of postcopy, ensure that everything that will > > be transferred later is a whole host-page in size. > > > > This is accomplished by discarding partia

[Qemu-devel] Modularizing QEMU RFC

2015-07-31 Thread Marc Marí
Hi everyone I propose improving the current modular driver system for QEMU so it can benefit everybody in speed and flexibility. I'm looking for other ideas, comments, critics, etc. - Background - In order to speed up QEMU, I'm looking at the high number of libraries and dependencies that it load

Re: [Qemu-devel] [PATCH v7 6/6] Add gicversion option to virt machine

2015-07-31 Thread Peter Maydell
On 24 July 2015 at 10:55, Pavel Fedin wrote: > Set kernel_irqchip_type according to value of the option and pass it > around where necessary. Instantiate devices and fdt nodes according > to the choice. > > max_cpus for virt machine increased to 64. GICv2 compatibility check > happens inside arm_g

Re: [Qemu-devel] [PATCH] tcg/mips: fix add2

2015-07-31 Thread Richard Henderson
On 07/31/2015 08:31 AM, Aurelien Jarno wrote: The add2 code in the tcg_out_addsub2 function doesn't take into account the case where rl == al == bl. In that case we can't compute the carry after the addition. As it corresponds to a multiplication by 2, the carry bit is the bit 31. While this is

Re: [Qemu-devel] Debian 7.8.0 SPARC64 on qemu - anything i can do to speedup the emulation?

2015-07-31 Thread Aurelien Jarno
On 2015-07-31 17:31, Artyom Tarasenko wrote: > On Thu, Jul 30, 2015 at 5:50 PM, Aurelien Jarno wrote: > > On 2015-07-30 10:55, Aurelien Jarno wrote: > >> On 2015-07-30 10:16, Dennis Luehring wrote: > >> > Am 30.07.2015 um 09:52 schrieb Aurelien Jarno: > >> > >On 2015-07-30 05:52, Dennis Luehring w

Re: [Qemu-devel] [PATCH v7 2/6] Implement GIC-500 base class

2015-07-31 Thread Peter Maydell
On 26 July 2015 at 14:52, Pavel Fedin wrote: > And could you be not so strict on this file? OK, so having thought about this this week, this is what I suggest. For this patch series we should retain this class hierarchy, but remove all the fields corresponding to state information which isn't u

Re: [Qemu-devel] Debian 7.8.0 SPARC64 on qemu - anything i can do to speedup the emulation?

2015-07-31 Thread Artyom Tarasenko
On Thu, Jul 30, 2015 at 5:50 PM, Aurelien Jarno wrote: > On 2015-07-30 10:55, Aurelien Jarno wrote: >> On 2015-07-30 10:16, Dennis Luehring wrote: >> > Am 30.07.2015 um 09:52 schrieb Aurelien Jarno: >> > >On 2015-07-30 05:52, Dennis Luehring wrote: >> > >> Am 29.07.2015 um 17:01 schrieb Aurelien J

[Qemu-devel] [PATCH] tcg/mips: fix add2

2015-07-31 Thread Aurelien Jarno
The add2 code in the tcg_out_addsub2 function doesn't take into account the case where rl == al == bl. In that case we can't compute the carry after the addition. As it corresponds to a multiplication by 2, the carry bit is the bit 31. While this is a corner case, this prevents x86-64 guests to bo

Re: [Qemu-devel] [PATCH 0/2] Replace trunc_shr_i32 with extr[lh]

2015-07-31 Thread Aurelien Jarno
On 2015-07-31 07:24, Richard Henderson wrote: > I'd prefer to use these two patches instead of Aurelien's > patch to rename INDEX_OP_trunc_i32. Thoughts? That sounds better to me than the current trunc_shr_i32 implementation. I'll send a new version of my patchset based on this one. Reviewed-by:

Re: [Qemu-devel] [PATCH 02/12] qga: use exit() when parsing options

2015-07-31 Thread Eric Blake
On 07/01/2015 05:47 AM, Marc-André Lureau wrote: > The option parsing is going to be moved to a seperate function, s/seperate/separate/ > use exit() consistantly. s/consistantly/consistently/ > > Signed-off-by: Marc-André Lureau > --- > qga/main.c | 24 > 1 file chang

[Qemu-devel] [PATCH 1/2] tcg: Split trunc_shr_i32 opcode into extr[lh]_i64_i32

2015-07-31 Thread Richard Henderson
Rather than allow arbitrary shift+trunc, only concern ourselves with low and high parts. This is all that was being used anyway. Signed-off-by: Richard Henderson --- target-tricore/translate.c | 12 ++-- tcg/README | 14 ++ tcg/aarch64/tcg-target.h | 3 ++-

[Qemu-devel] [PATCH 0/2] Replace trunc_shr_i32 with extr[lh]

2015-07-31 Thread Richard Henderson
I'd prefer to use these two patches instead of Aurelien's patch to rename INDEX_OP_trunc_i32. Thoughts? r~ Richard Henderson (2): tcg: Split trunc_shr_i32 opcode into extr[lh]_i64_i32 tcg: Remove tcg_gen_trunc_i64_i32 target-alpha/translate.c | 4 +-- target-arm/translate-a64.c

Re: [Qemu-devel] [PATCH 0/3] tcg: fixes for MIPS and S390 hosts

2015-07-31 Thread Richard Henderson
On 07/30/2015 03:03 PM, Aurelien Jarno wrote: These are small fixes for MIPS and S390 hosts, found by testing various guests on these hosts. Aurelien Jarno (3): tcg/mips: fix TLB loading for BE host with 32-bit guests tcg/mips: Mask TCGMemOp appropriately for indexing tcg/s390x: Mask TC

Re: [Qemu-devel] [PATCH RFC v2 22/47] qapi: QAPISchema code generation helper methods

2015-07-31 Thread Markus Armbruster
Eric Blake writes: > On 07/27/2015 03:54 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 07/01/2015 02:22 PM, Markus Armbruster wrote: New methods c_name(), c_type(), c_null(), json_type(), alternate_qtype(). Signed-off-by: Markus Armbruster --- scri

Re: [Qemu-devel] [PATCH for-2.4] oslib-win32: only provide localtime_r/gmtime_r if missing

2015-07-31 Thread Daniel P. Berrange
On Fri, Jul 31, 2015 at 02:49:49PM +0200, Paolo Bonzini wrote: > > > On 31/07/2015 12:17, Daniel P. Berrange wrote: > > > > CCutil/osdep.o > > In file included from include/qemu-common.h:48:0, > > from util/osdep.c:48: > > include/sysemu/os-win32.h:77:12: error: redundant

Re: [Qemu-devel] [PATCH RFC v2 14/47] qapi-tests: New tests for union, alternate command arguments

2015-07-31 Thread Markus Armbruster
Eric Blake writes: > On 07/21/2015 06:43 AM, Eric Blake wrote: >> On 07/01/2015 02:22 PM, Markus Armbruster wrote: >>> A command's 'data' must be a struct type, given either as a >>> dictionary, or as struct type name. >>> >>> Existing test case data-int.json covers simple type 'int'. Add test >

Re: [Qemu-devel] [RFC] Towards an Heterogeneous QEMU

2015-07-31 Thread Paolo Bonzini
On 27/07/2015 15:54, Christian Pinto wrote: > From the user point of view there is usually an operating system > booting on the Master processor (e.g. Linux) at platform startup, > while the other processors are used to offload the Master one from > some computation or to deal with real-time inte

Re: [Qemu-devel] [PATCH] configure: only add CONFIG_RDMA to config-host.h once

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 14:23, Daniel P. Berrange wrote: > For unknown reasons (probably a git rebase merge mistake) > > commit 2da776db4846eadcb808598a5d3484d149773c05 > Author: Michael R. Hines > Date: Mon Jul 22 10:01:54 2013 -0400 > > rdma: core logic > > Adds CONFIG_RDMA to config-host

Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring

2015-07-31 Thread Peter Maydell
On 31 July 2015 at 13:54, Daniel P. Berrange wrote: > I broadly like the direction of this change. I think it is > probably worth being strict about requiring #include of > osdep.h as the first header in every .c file. And validating > such a rule programmatically at make check time or equiv. Yea

Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:43:59PM +0100, Peter Maydell wrote: > This series makes a start at cleaning up some of our headers > to avoid the common problem of header files including qemu-common.h > (which then in turn can lead to awkward circular includes). > > One common cause of this is that we

Re: [Qemu-devel] [PATCH for-2.4] acpi: avoid potential uninitialized access to cpu_hp_io_base

2015-07-31 Thread Igor Mammedov
On Fri, 31 Jul 2015 11:14:35 +0100 "Daniel P. Berrange" wrote: > When building QEMU with Mingw64 toolchain I see a warning > > CCx86_64-softmmu/hw/i386/acpi-build.o > hw/i386/acpi-build.c: In function 'acpi_build': > hw/i386/acpi-build.c:1138:9: warning: 'pm.cpu_hp_io_base' may be used

Re: [Qemu-devel] [PATCH 06/12] osdep.h: Move some OS header includes and fixups from qemu-common.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:05PM +0100, Peter Maydell wrote: > qemu-common.h has some system header includes and fixups for > things that might be missing. This is really an OS dependency > and belongs in osdep.h, so move it across. > > Signed-off-by: Peter Maydell > --- > include/qemu-common.

Re: [Qemu-devel] [PATCH for-2.4] oslib-win32: only provide localtime_r/gmtime_r if missing

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 12:17, Daniel P. Berrange wrote: > > CCutil/osdep.o > In file included from include/qemu-common.h:48:0, > from util/osdep.c:48: > include/sysemu/os-win32.h:77:12: error: redundant redeclaration of 'gmtime_r' > [-Werror=redundant-decls] > struct tm *gmtime_r

Re: [Qemu-devel] [PATCH 05/12] qemu-common.h: Move Win32 fixups into os-win32.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:04PM +0100, Peter Maydell wrote: > qemu-common.h includes some fixups for things the Win32 > headers don't define or define weirdly. These really > belong in os-win32.h, so move them there. > > Signed-off-by: Peter Maydell > --- > include/qemu-common.h | 17

Re: [Qemu-devel] [PATCH 03/12] osdep.h: Move some compiler-specific things to compiler.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:02PM +0100, Peter Maydell wrote: > osdep.h has a few things which are really compiler specific; > move them to compiler.h, and include compiler.h from osdep.h. > > Signed-off-by: Peter Maydell > --- > include/qemu/compiler.h | 47

Re: [Qemu-devel] [PATCH 04/12] compiler.h: Use glue() in QEMU_BUILD_BUG_ON define

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:03PM +0100, Peter Maydell wrote: > Rather than rolling custom concatenate-strings macros for the > QEMU_BUILD_BUG_ON macro to use, use the glue() macro we already > have (since it's now available to us in this header). > > Signed-off-by: Peter Maydell > --- > includ

Re: [Qemu-devel] [PATCH 01/12] qapi/qmp-event.c: Don't manually include os-win32.h/os-posix.h

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:00PM +0100, Peter Maydell wrote: > qmp-event.c already includes qemu-common.h, so manually including > os-win32.h/os-posix.h is unnecessary (and potentially fragile, > since it's duplicating the #ifdef logic that chooses which of the > two we need). Remove the unnecess

Re: [Qemu-devel] [PATCH 02/12] osdep.h: Remove qemu_printf

2015-07-31 Thread Daniel P. Berrange
On Wed, Jul 22, 2015 at 05:44:01PM +0100, Peter Maydell wrote: > qemu_printf is an ancient remnant which has been a simple #define to > printf for over a decade, and is used in only a few places. Expand > it out in those places and remove the #define. > > Signed-off-by: Peter Maydell > --- > inc

Re: [Qemu-devel] [PATCH v2] Do not use slow [*] expansion for GPIO creation

2015-07-31 Thread Paolo Bonzini
On 31/07/2015 14:23, Pavel Fedin wrote: > Expansion of [*] suffix is very slow because index expansion is done using > trial and error strategy, starting every time from zero and retrying with > the next index until insertion succeeds. With large number of already added > properties this process

Re: [Qemu-devel] [PATCH v2] arm: change vendor ID for virtio-mmio

2015-07-31 Thread Peter Maydell
On 29 July 2015 at 20:16, Michael S. Tsirkin wrote: > ACPI spec 5.0 allows the use of PCI vendor IDs. > > Since we have one for virtio, it seems neater to use that > rather than LNRO. For the device ID, use 103F which is a legacy ID that > isn't used in virtio PCI spec - seems to make sense since

  1   2   >