Re: [Qemu-devel] [PATCH v2] net: mipsnet: check transmit buffer size before sending

2016-06-13 Thread P J P
Hello Jason, +-- On Mon, 13 Jun 2016, Jason Wang wrote --+ | > case MIPSNET_TX_DATA_BUFFER: | > s->tx_buffer[s->tx_written++] = val; | | I believe we may still have a buffer overflow here, no? No, this is the overflow that the patch is meant to fix. | > -if (s->tx_w

Re: [Qemu-devel] [PATCH v2 13/22] hw/intc/arm_gicv3: Wire up distributor and redistributor MMIO regions

2016-06-13 Thread Shannon Zhao
On 2016/5/26 22:55, Peter Maydell wrote: > Wire up the MMIO functions exposed by the distributor and the > redistributor into MMIO regions exposed by the GICv3 device. > > Signed-off-by: Peter Maydell Reviewed-by: Shannon Zhao > --- > hw/intc/arm_gicv3.c | 15 ++- > 1 file change

Re: [Qemu-devel] [PATCH v2 1/3] error: Remove NULL checks on error_propagate() calls

2016-06-13 Thread Cornelia Huck
On Fri, 10 Jun 2016 17:12:16 -0300 Eduardo Habkost wrote: > error_propagate() already ignores local_err==NULL, so there's no > need to check it before calling. > > Coccinelle patch used to perform the changes added to > scripts/coccinelle/error_propagate_null.cocci. > > Signed-off-by: Eduardo H

Re: [Qemu-devel] [PATCH 09/10] ppc: Move exception generation code out of line

2016-06-13 Thread Thomas Huth
On 13.06.2016 07:24, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > There's no point inlining this, if you hit the exception case you exit > anyway, and not inlining saves about 100K of code size (and cache > footprint). > > Signed-off-by: Benjamin Herrenschmidt > --- > target-ppc/

Re: [Qemu-devel] [PATCH v2 2/3] error: Remove unnecessary local_err variables

2016-06-13 Thread Cornelia Huck
On Fri, 10 Jun 2016 17:12:17 -0300 Eduardo Habkost wrote: > This patch simplifies code that uses a local_err variable just to > immediately use it for an error_propagate() call. > > Coccinelle patch used to perform the changes added to > scripts/coccinelle/remove_local_err.cocci. > > Signed-off

Re: [Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-13 Thread Aurelien Jarno
On 2016-06-10 19:26, Sergey Sorokin wrote: > There are functions cpu_unaligned_access() and do_unaligned_access() that > are called with access type and mmu index arguments. But these arguments > are named 'is_write' and 'is_user' in their declarations. > The patch fixes the names to avoid a confus

Re: [Qemu-devel] [PATCH v2 14/22] hw/intc/arm_gicv3: Implement gicv3_set_irq()

2016-06-13 Thread Shannon Zhao
On 2016/5/26 22:55, Peter Maydell wrote: > Implement the code which updates the GIC state when an interrupt > input into the GIC is asserted. > > Signed-off-by: Peter Maydell > --- > hw/intc/arm_gicv3.c| 20 +++- > hw/intc/arm_gicv3_dist.c | 21 + >

Re: [Qemu-devel] [Xen-devel] [PULL 3/4] xen: add pvUSB backend

2016-06-13 Thread Juergen Gross
On 10/06/16 12:38, Gerd Hoffmann wrote: > On Di, 2016-06-07 at 10:35 +0200, Olaf Hering wrote: >> On Mon, May 23, Gerd Hoffmann wrote: >> >>> +++ b/hw/usb/Makefile.objs >>> +common-obj-$(CONFIG_XEN_BACKEND) += xen-usb.o >>> +++ b/hw/usb/xen-usb.c >>> +usb_bus_new(&usbif->bus, sizeof(usbif->bus)

Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support

2016-06-13 Thread Haozhong Zhang
On 06/08/16 13:32, Paolo Bonzini wrote: > > > On 03/06/2016 17:57, Radim Krčmář wrote: > >> > +cenv->msr_ia32_feature_control |= > >> > +MSR_IA32_FEATURE_CONTROL_LMCE | > >> > +MSR_IA32_FEATURE_CONTROL_LOCKED; > > Locking right from the star

Re: [Qemu-devel] [PATCH v2 16/22] hw/intc/arm_gicv3: Implement gicv3_cpuif_update()

2016-06-13 Thread Shannon Zhao
On 2016/5/26 22:55, Peter Maydell wrote: > +void gicv3_cpuif_update(GICv3CPUState *cs) > +{ > +/* Tell the CPU about its highest priority pending interrupt */ > +int irqlevel = 0; > +int fiqlevel = 0; > +ARMCPU *cpu = ARM_CPU(cs->cpu); > +CPUARMState *env = &cpu->env; > + > +

[Qemu-devel] [PATCH] scsi-disk: Use (unsigned long) typecasts when using "%lu" format string

2016-06-13 Thread Thomas Huth
Some source code analyzers like cppcheck spill out a warning if the sign of the argument does not match the format string. Ticket: https://bugs.launchpad.net/qemu/+bug/1589564 Signed-off-by: Thomas Huth --- hw/scsi/scsi-disk.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff -

Re: [Qemu-devel] [PATCH] exec: Fix qemu_ram_block_from_host for Xen

2016-06-13 Thread Paolo Bonzini
On 09/06/2016 17:56, Anthony PERARD wrote: > Since f615f39 (exec: remove ram_addr argument from > qemu_ram_block_from_host), migration under Xen is likely to fail, with a > SEGV of QEMU. But the commit only reveal a bug with the calculation of > the offset value in qemu_ram_block_from_host(). >

Re: [Qemu-devel] [PATCH 0/7] s390x: next batch of patches

2016-06-13 Thread Christian Borntraeger
On 06/08/2016 01:02 PM, Cornelia Huck wrote: > More s390x patches, this time mostly dealing with channel I/O: > Bugfixes and cleanups, and dequeue pending interrupts after > machine checks. > > Christian Borntraeger (3): > virtio-ccw: Provide traces for indicator changes > s390x: Limit s390-cc

Re: [Qemu-devel] [PULL 01/31] Add optionrom compatible with fw_cfg DMA version

2016-06-13 Thread Paolo Bonzini
On 10/06/2016 23:45, Richard W.M. Jones wrote: > Hi Paolo, > > Did this patch get dropped again? It hasn't appeared upstream. Yes, some versions of clang don't support -m16. It needs to be tested. I still want to get it in 2.7, but I have to set aside some time. Paolo

Re: [Qemu-devel] [PATCH v4 17/28] qapi: Factor out JSON number formatting

2016-06-13 Thread Markus Armbruster
Eric Blake writes: > On 06/03/2016 03:02 AM, Markus Armbruster wrote: > Suggest: * Return 0 if the number is finite, as required by RFC 7159, else -1. The return value makes some sense only for symmetry with qstring_append_json_string(). Without that, I'd ask you t

Re: [Qemu-devel] [PATCH v4 00/28] Add qapi-to-JSON and clone visitors

2016-06-13 Thread Markus Armbruster
Eric Blake writes: > On 06/03/2016 06:09 AM, Markus Armbruster wrote: >> Most patches are ready as is or with minor touch-ups. >> >> I'd probably drop PATCH 01. The file name collision no longer exists, >> and moving files just to improve their names a bit doesn't seem worth >> the bother. > >

Re: [Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-13 Thread Paolo Bonzini
On 10/06/2016 19:26, Sergey Sorokin wrote: > cpu-common.h is not included in qom/cpu.h what do you think? Should > it be included? Or may be MMUAccessType should be just moved into > another header. For example into exec/memattrs.h You can move it to qom/cpu.h. Paolo

Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 09:55, Haozhong Zhang wrote: > Currently, only VMX bits (bit 1 & 2), LMCE bit (bit 20) as well as > lock bit (bit 0) in MSR_IA32_FEATURE_CONTROL are used for guest. The > availability of features indicated by those bits (except the lock bit) > can be discovered from cpuid and other

Re: [Qemu-devel] [PATCH] net: mipsnet: check transmit buffer size before sending

2016-06-13 Thread Aurelien Jarno
On 2016-06-02 10:28, Peter Maydell wrote: > On 2 June 2016 at 07:44, P J P wrote: > > From: Prasad J Pandit > > > > When processing MIPSnet I/O port write operation, it uses a > > transmit buffer tx_buffer[MAX_ETH_FRAME_SIZE=1514]. Two indices > > 's->tx_written' and 's->tx_count' are used to con

Re: [Qemu-devel] [PATCH 09/10] ppc: Move exception generation code out of line

2016-06-13 Thread Cédric Le Goater
On 06/13/2016 09:44 AM, Thomas Huth wrote: > On 13.06.2016 07:24, Cédric Le Goater wrote: >> From: Benjamin Herrenschmidt >> >> There's no point inlining this, if you hit the exception case you exit >> anyway, and not inlining saves about 100K of code size (and cache >> footprint). >> >> Signed-of

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-13 Thread Paolo Bonzini
On 10/06/2016 19:52, Lluís Vilanova wrote: > Fair point. But now I feel tempted to change both trace_events_dstate and > trace_events_enabled_count into unsigned int... it burns me when I see signed > types used only on their positives by design. > > But don't worry, I'll change trace_events_dst

Re: [Qemu-devel] [PATCH 3/3] KVM: use KVM_CAP_MAX_VCPU_ID

2016-06-13 Thread Greg Kurz
On Fri, 27 May 2016 13:16:49 +0200 Greg Kurz wrote: > On Fri, 27 May 2016 13:58:28 +1000 > David Gibson wrote: > > > On Thu, May 26, 2016 at 10:02:23AM +0200, Greg Kurz wrote: > > > As stated in linux/Documentation/virtual/kvm/api.txt: > > > > > > The maximum possible value for max_vcpu_id c

Re: [Qemu-devel] [PATCH v8 16/17] vmxnet3: remove unnecessary internal msi state flag

2016-06-13 Thread Markus Armbruster
Cao jin writes: > Internal flag msi_used is unnecessary, it has the same effect as > msi_enabled(). > msi_uninit() could be called directly without risk. > > cc: Dmitry Fleytman > cc: Jason Wang > cc: Markus Armbruster > cc: Marcel Apfelbaum > cc: Michael S. Tsirkin > > Signed-off-by: Cao j

Re: [Qemu-devel] [PATCH v8 00/17] Add param Error ** for msi_init()

2016-06-13 Thread Markus Armbruster
Cao jin writes: > v8 changelog: > 1. address all stylistic remarks (Markus) > 2. add two new patches(16&17) which I missed in last round, shoot the > unnecessary >internal msi flag. > 3. rebase on the upstream, fix trivial conflict in vmxnet3: > -#include "vmxnet_tx_pkt.h" > -#includ

[Qemu-devel] [Bug 1568589] Re: Compile for os x host failed

2016-06-13 Thread T. Huth
According to the discussion for the patch that you've mentioned, the problem should go away after a "make distclean". Can you still reproduce it after doing a fresh build? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.l

Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket

2016-06-13 Thread Michal Privoznik
On 09.06.2016 11:16, Daniel P. Berrange wrote: > On Wed, Jun 08, 2016 at 05:48:57PM -0400, Aaron Conole wrote: >> Flavio Leitner writes: >> >>> Adding Aaron who is fixing exactly that on the OVS side. >>> >>> Aaron, please see the last question in the bottom of this email. >>> >>> On Wed, Jun 08,

[Qemu-devel] [Bug 1553999] Re: OpenGL support is disabled

2016-06-13 Thread T. Huth
Since you're talking about a pre-compiled binary, I assume you wanted to open this bug against Ubuntu's QEMU package, not against the QEMU project? ** Project changed: qemu => qemu (Ubuntu) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

Re: [Qemu-devel] [PATCH] vl: Error messages need to go to stderr, fix some

2016-06-13 Thread Markus Armbruster
Paolo, will you pick this up, or do you want me to take it through my (currently empty) error-next branch? Markus Armbruster writes: > We print a few fatal error messages to stdout instead of stderr. > Reproducer: > > $ qemu-system-x86_64 -g 1024x768 > Option g not supported for this tar

Re: [Qemu-devel] [PATCH 3/6] [trivial] trace: Cosmetic changes on fast-path tracing

2016-06-13 Thread Paolo Bonzini
On 25/02/2016 16:03, Lluís Vilanova wrote: > static inline bool trace_event_get_state_dynamic(TraceEvent *ev) > { > -int id = trace_event_get_id(ev); > +TraceEventID id; > +assert(ev != NULL); Please don't add "!= NULL" asserts. The reason of a crash would be pretty obvious from t

[Qemu-devel] [Bug 1591611] Re: chroot using qemu-x86_64-static fails on ppc64el

2016-06-13 Thread Peter Maydell
I don't know of any plans to do so. They would not be difficult to implement (500 lines of code or so at most I guess), but on the other hand they've been unimplemented for some years. They fall into the category of "nobody who wants them has cared enough to write the code yet", I'm afraid. -- Yo

Re: [Qemu-devel] [PATCH v2 11/22] hw/intc/arm_gicv3: Implement GICv3 distributor registers

2016-06-13 Thread Peter Maydell
On 13 June 2016 at 07:27, Shannon Zhao wrote: > > > On 2016/5/26 22:55, Peter Maydell wrote: >> +static uint8_t gicd_read_ipriorityr(GICv3State *s, MemTxAttrs attrs, int >> irq) >> +{ >> +/* Read the value of GICD_IPRIORITYR for the specified interrupt, >> + * honouring security state (th

Re: [Qemu-devel] [PATCH v2 14/22] hw/intc/arm_gicv3: Implement gicv3_set_irq()

2016-06-13 Thread Peter Maydell
On 13 June 2016 at 08:49, Shannon Zhao wrote: > > > On 2016/5/26 22:55, Peter Maydell wrote: >> Implement the code which updates the GIC state when an interrupt >> input into the GIC is asserted. >> >> Signed-off-by: Peter Maydell >> --- >> hw/intc/arm_gicv3.c| 20 +++- >>

[Qemu-devel] [RFC PATCH v1 2/4] exec.c: Remove static allocation of sub_section of sub_page

2016-06-13 Thread vijayak
From: Vijaya Kumar K Allocate sub_section dynamically. Remove dependency on TARGET_PAGE_SIZE to make run-time page size detection for arm platforms. Signed-off-by: Vijaya Kumar K --- exec.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index a9d465

Re: [Qemu-devel] [PATCH v2 16/22] hw/intc/arm_gicv3: Implement gicv3_cpuif_update()

2016-06-13 Thread Peter Maydell
On 13 June 2016 at 08:56, Shannon Zhao wrote: > > > On 2016/5/26 22:55, Peter Maydell wrote: >> +void gicv3_cpuif_update(GICv3CPUState *cs) >> +{ >> +/* Tell the CPU about its highest priority pending interrupt */ >> +int irqlevel = 0; >> +int fiqlevel = 0; >> +ARMCPU *cpu = ARM_CP

Re: [Qemu-devel] [PATCH v8 00/17] Add param Error ** for msi_init()

2016-06-13 Thread Cao jin
On 06/13/2016 04:48 PM, Markus Armbruster wrote: Cao jin writes: v8 changelog: 1. address all stylistic remarks (Markus) 2. add two new patches(16&17) which I missed in last round, shoot the unnecessary internal msi flag. 3. rebase on the upstream, fix trivial conflict in vmxnet3:

[Qemu-devel] [PATCH] xen: move xen_sysdev to xen_backend.c

2016-06-13 Thread Juergen Gross
Commit 9432e53a5bc88681b2d3aec4dac9db07c5476d1b added xen_sysdev as a system device to serve as an anchor for removable virtual buses. This introduced a build failure for non-x86 builds with CONFIG_XEN_BACKEND set, as xen_sysdev was defined in a x86 specific file while being consumed in an architec

Re: [Qemu-devel] [PATCH] vl: Error messages need to go to stderr, fix some

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 11:03, Markus Armbruster wrote: > Paolo, will you pick this up, or do you want me to take it through my > (currently empty) error-next branch? I can pick it up. Paolo > Markus Armbruster writes: > >> We print a few fatal error messages to stdout instead of stderr. >> Reproducer

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-13 Thread Paolo Bonzini
First of all, a generic problem I see with your patches is that the newly-introduced APIs are not providing a good abstraction. If something is only used internally, as is the case for trace_event_get_cpu_id, you don't need accessors. On the other hand, when you have a repeated expression such as

Re: [Qemu-devel] [Xen-devel] [PATCH] xen: move xen_sysdev to xen_backend.c

2016-06-13 Thread Juergen Gross
On 13/06/16 11:12, Juergen Gross wrote: > Commit 9432e53a5bc88681b2d3aec4dac9db07c5476d1b added xen_sysdev as a > system device to serve as an anchor for removable virtual buses. This > introduced a build failure for non-x86 builds with CONFIG_XEN_BACKEND > set, as xen_sysdev was defined in a x86 s

Re: [Qemu-devel] [PATCH v2 0/3] Support building qemu-user powered docker test images

2016-06-13 Thread Alex Bennée
Fam Zheng writes: > On Wed, 06/08 17:35, Alex Bennée wrote: >> Hi, >> >> This is a re-spin of the previous series built on top of >> fam/docker.next. I've made the changes suggested in the last review >> and split the first patch apart to separate (and fix) the build >> directory changes first.

Re: [Qemu-devel] [PATCH v2 3/3] add debian-bootstrap.docker target (and pre script)

2016-06-13 Thread Alex Bennée
Fam Zheng writes: > On Wed, 06/08 17:35, Alex Bennée wrote: >> Together with the debian-bootstrap.pre script can now build an arbitrary >> architecture of Debian using debootstrap. The docker script will now >> search for an associated $dockerfile.pre script which gets run in the >> same build c

Re: [Qemu-devel] [PATCH v2 2/3] tests/docker/docker.py: support --include-executable

2016-06-13 Thread Alex Bennée
Fam Zheng writes: > On Wed, 06/08 17:35, Alex Bennée wrote: >> When passed the path to a binary we copy it and any linked libraries >> into the docker build context. These can then be included by a >> dockerfile with the line: >> >> # Copy all of context into container >> ADD . / >> >> This

[Qemu-devel] [PATCH v8 16/17] vmxnet3: remove unnecessary internal msi state flag

2016-06-13 Thread Cao jin
Internal flag msi_used is unnecessary, it has the same effect as msi_enabled(). msi_uninit() could be called directly without risk. cc: Dmitry Fleytman cc: Jason Wang cc: Markus Armbruster cc: Marcel Apfelbaum cc: Michael S. Tsirkin Reviewed-by: Markus Armbruster Signed-off-by: Cao jin ---

Re: [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu()

2016-06-13 Thread Alex Bennée
alvise rigo writes: > I think that async_safe_run_on_cpu() does a different thing: it > queries a job to the target vCPU and wants all the other to "observe" > the submitted task. However, we will have the certainty that only the > target vCPU observed the task, the other might still be running

[Qemu-devel] linux-user: drop support for "unknown" host CPUs (ie hppa and m68k) ?

2016-06-13 Thread Peter Maydell
Currently our configure script allows linux-user targets to be built for "unknown" host CPU architectures (which must be using the TCI interpreter). However, code like user-exec.c has host-architecture #ifdef ladders which in practice mean you can't build linux-user for an arbitrary host architectu

Re: [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 11:08, vija...@caviumnetworks.com wrote: > + */ > +#define TARGET_AARCH64_PAGE_BITS 12 > /* The ARM MMU allows 1k pages. */ > /* ??? Linux doesn't actually use these, and they're deprecated in recent > architecture revisions. Maybe a configure option to disable them. */ > -

Re: [Qemu-devel] [PATCH] Makefile: Fix tag file generation targets

2016-06-13 Thread Paolo Bonzini
On 09/06/2016 19:58, Sergey Fedorov wrote: > From: Sergey Fedorov > > "ctags" produces a file named "tags", not "ctags". It doesn't look > reasonable to use phony target name as a file name to remove. Just use > exact file names to remove in "ctags" and "TAGS" target receipts. > > Signed-off-b

Re: [Qemu-devel] [PATCH v3 0/2] AVX2 configure fixes

2016-06-13 Thread Paolo Bonzini
On 10/06/2016 13:16, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Hi, > This pair of patches fixes a couple of issues that we found during test. > The first is that the configure test is pessimistic when compiled with -O2, > the second is that the explicit 4.9 gcc

Re: [Qemu-devel] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page table properties at runtime

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 11:08, vija...@caviumnetworks.com wrote: > From: Vijaya Kumar K > > Remove L1 page mapping table properties computing > statically using macros which is dependent on > TARGET_PAGE_BITS. Drop macros V_L1_SIZE, V_L1_SHIFT, > V_L1_BITS macros and replace with variables which are > co

Re: [Qemu-devel] [RFC PATCH v1 2/4] exec.c: Remove static allocation of sub_section of sub_page

2016-06-13 Thread Peter Maydell
On 13 June 2016 at 10:08, wrote: > From: Vijaya Kumar K > > Allocate sub_section dynamically. Remove dependency > on TARGET_PAGE_SIZE to make run-time page size detection > for arm platforms. > > Signed-off-by: Vijaya Kumar K > --- > exec.c |5 +++-- > 1 file changed, 3 insertions(+), 2 de

Re: [Qemu-devel] [PATCH v8 10/17] pci bridge dev: change msi property type

2016-06-13 Thread Marcel Apfelbaum
On 06/10/2016 12:54 PM, Cao jin wrote: From bit to enum OnOffAuto. cc: Michael S. Tsirkin cc: Markus Armbruster cc: Marcel Apfelbaum Reviewed-by: Markus Armbruster Signed-off-by: Cao jin --- hw/pci-bridge/pci_bridge_dev.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions

Re: [Qemu-devel] [PATCH] configure: Remove unused CONFIG_SIGEV_THREAD_ID switch

2016-06-13 Thread Paolo Bonzini
On 10/06/2016 17:04, Thomas Huth wrote: > The CONFIG_SIGEV_THREAD_ID switch is unused since the related code > has been removed by commit 6d327171551a12b937c5718073b9848d0274c74d > ("aio / timers: Remove alarm timers"), so it can safely be removed > nowadays. Queued, thanks. Paolo > Signed-off

Re: [Qemu-devel] [PATCH] nbd: Don't use *_to_cpup() functions

2016-06-13 Thread Paolo Bonzini
On 10/06/2016 17:00, Peter Maydell wrote: > The *_to_cpup() functions are not very useful, as they simply do > a pointer dereference and then a *_to_cpu(). Instead use either: > * ld*_*_p(), if the data is at an address that might not be >correctly aligned for the load > * a local dereferen

Re: [Qemu-devel] [PATCH v8 11/17] msi_init: change return value to 0 on success

2016-06-13 Thread Marcel Apfelbaum
On 06/10/2016 12:54 PM, Cao jin wrote: No caller use its return value as msi capability offset, also in order to make its return behaviour consistent with msix_init(). cc: Michael S. Tsirkin cc: Paolo Bonzini cc: Hannes Reinecke cc: Markus Armbruster cc: Marcel Apfelbaum Acked-by: Hannes R

Re: [Qemu-devel] [PATCH v2 11/22] hw/intc/arm_gicv3: Implement GICv3 distributor registers

2016-06-13 Thread Shannon Zhao
On 2016/6/13 17:04, Peter Maydell wrote: > On 13 June 2016 at 07:27, Shannon Zhao wrote: >> > >> > >> > On 2016/5/26 22:55, Peter Maydell wrote: >>> >> +static uint8_t gicd_read_ipriorityr(GICv3State *s, MemTxAttrs attrs, >>> >> int irq) >>> >> +{ >>> >> +/* Read the value of GICD_IPRIORITY

Re: [Qemu-devel] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page table properties at runtime

2016-06-13 Thread Peter Maydell
On 13 June 2016 at 10:25, Paolo Bonzini wrote: > > > On 13/06/2016 11:08, vija...@caviumnetworks.com wrote: >> From: Vijaya Kumar K >> >> Remove L1 page mapping table properties computing >> statically using macros which is dependent on >> TARGET_PAGE_BITS. Drop macros V_L1_SIZE, V_L1_SHIFT, >> V

[Qemu-devel] [PATCH] nbd: simplify the nbd_request and nbd_reply structs

2016-06-13 Thread Paolo Bonzini
These structs are never used to represent the bytes that go over the network. The big-endian network data is built into a uint8_t array in nbd_{receive,send}_{request,reply}. Remove the unused magic field, reorder the struct to avoid holes, and remove the packed attribute. Signed-off-by: Paolo B

Re: [Qemu-devel] [Qemu-block] [PATCH] macio: Use blk_drain instead of blk_drain_all

2016-06-13 Thread Kevin Wolf
Am 12.06.2016 um 08:56 hat Fam Zheng geschrieben: > We only care about the associated backend, so blk_drain is more > appropriate here. > > Signed-off-by: Fam Zheng [ Cc: John ] > --- > hw/ide/macio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/ide/macio.c b/hw

Re: [Qemu-devel] [PATCH V3] block/iscsi: allow caching of the allocation map

2016-06-13 Thread Paolo Bonzini
On 24/05/2016 10:40, Peter Lieven wrote: > until now the allocation map was used only as a hint if a cluster > is allocated or not. If a block was not allocated (or Qemu had > no info about the allocation status) a get_block_status call was > issued to check the allocation status and possibly avo

Re: [Qemu-devel] [PATCH v5 0/2] trace: Add event for vCPU memory accesses

2016-06-13 Thread Stefan Hajnoczi
On Thu, Jun 09, 2016 at 07:31:36PM +0200, Lluís Vilanova wrote: > This series adds an event to track information related to memory accesses > performed by the guest CPUs ("guest_mem_before"). > > A future series might extend this to contain the physical address and memory > value (e.g., "guest_mem

Re: [Qemu-devel] linux-user: drop support for "unknown" host CPUs (ie hppa and m68k) ?

2016-06-13 Thread Laurent Vivier
Le 13/06/2016 à 11:26, Peter Maydell a écrit : > Currently our configure script allows linux-user targets to be built > for "unknown" host CPU architectures (which must be using the TCI > interpreter). However, code like user-exec.c has host-architecture > #ifdef ladders which in practice mean yo

Re: [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type

2016-06-13 Thread Peter Maydell
On 13 June 2016 at 10:08, wrote: > From: Vijaya Kumar K > > Replace TARGET_PAGE_BITS with arm_target_page_size function > in order to fetch page size at run-time. > > Introduced MachineClass callback to compute target page > size at the early boot before memory initialization. > This callback is

Re: [Qemu-devel] [RFC PATCH v1 2/4] exec.c: Remove static allocation of sub_section of sub_page

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 11:08, vija...@caviumnetworks.com wrote: > From: Vijaya Kumar K > > Allocate sub_section dynamically. Remove dependency > on TARGET_PAGE_SIZE to make run-time page size detection > for arm platforms. > > Signed-off-by: Vijaya Kumar K > --- > exec.c |5 +++-- > 1 file change

[Qemu-devel] [PATCH trivial 1/2] hw/bt/hci: spelling fix: endianness

2016-06-13 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/bt/hci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/bt/hci.c b/hw/bt/hci.c index 7d52205..963f683 100644 --- a/hw/bt/hci.c +++ b/hw/bt/hci.c @@ -421,7 +421,7 @@ static void bt_submit_raw_acl(struct bt_piconet_s *net, int length, u

Re: [Qemu-devel] [PATCH V3] block/iscsi: allow caching of the allocation map

2016-06-13 Thread Paolo Bonzini
On 30/05/2016 08:33, Peter Lieven wrote: > > The idea of the allocmap in cache.direct = on mode is that we can > still speed up block jobs by skipping large unallocated areas. In this case > the allocmap has only a hint character. If we don't know the status > we issue a get_block_status request

[Qemu-devel] [PATCH] arm: spelling fix: mismatch

2016-06-13 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- target-arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 862e780..5571ad6 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -7354,7 +7354,7 @@ static bool get_phys_addr_lp

[Qemu-devel] [PATCH trivial 2/2] hw/dma/omap: spelling fix: endianness

2016-06-13 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/dma/omap_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c index 700cd6b..f6f86f9 100644 --- a/hw/dma/omap_dma.c +++ b/hw/dma/omap_dma.c @@ -1975,7 +1975,7 @@ static void omap_dma4_write(void *opaq

Re: [Qemu-devel] [PATCH v2] mirror: follow AioContext change gracefully

2016-06-13 Thread Paolo Bonzini
On 12/06/2016 08:51, Fam Zheng wrote: > From: Stefan Hajnoczi > > When dataplane is enabled or disabled the drive switches to a new > AioContext. The mirror block job must also move to the new AioContext > so that drive accesses are always made within its AioContext. > > This patch partially

Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support

2016-06-13 Thread Haozhong Zhang
On 06/13/16 10:33, Paolo Bonzini wrote: > > > On 13/06/2016 09:55, Haozhong Zhang wrote: > > Currently, only VMX bits (bit 1 & 2), LMCE bit (bit 20) as well as > > lock bit (bit 0) in MSR_IA32_FEATURE_CONTROL are used for guest. The > > availability of features indicated by those bits (except the

Re: [Qemu-devel] [PATCH] target-i386: kvm: cache KVM_GET_SUPPORTED_CPUID data

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 04:21, Chao Peng wrote: > KVM_GET_SUPPORTED_CPUID ioctl is called frequently when initializing > CPU. Depends on CPU features and CPU count, the number of calls can be > extremely high which slows down QEMU booting significantly. In our > testing, we saw 5922 calls with switches: >

Re: [Qemu-devel] [PATCH] scsi-disk: Use (unsigned long) typecasts when using "%lu" format string

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 10:10, Thomas Huth wrote: > Some source code analyzers like cppcheck spill out a warning if > the sign of the argument does not match the format string. > > Ticket: https://bugs.launchpad.net/qemu/+bug/1589564 > Signed-off-by: Thomas Huth > --- > hw/scsi/scsi-disk.c | 8

Re: [Qemu-devel] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page table properties at runtime

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 11:36, Peter Maydell wrote: >>> /* The bottom level has pointers to PageDesc */ >>> >> -static void *l1_map[V_L1_SIZE]; >>> >> +static void *l1_map; >> > >> > You can make this array have a static V_L2_SIZE * 16 size too. Peter, >> > what do you think? > I don't know this code wel

Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support

2016-06-13 Thread Paolo Bonzini
On 13/06/2016 12:01, Haozhong Zhang wrote: > > I would prefer to avoid having to change the firmware (SeaBIOS and OVMF) > > every time a new bit is added. Using fw_cfg makes it possible to > > develop the feature in the firmware once and for all. > > Thanks for the explanation! Is it proper to

Re: [Qemu-devel] [PATCH v6 1/1] Introduce "xen-load-devices-state"

2016-06-13 Thread Stefano Stabellini
On Fri, 3 Jun 2016, Anthony PERARD wrote: > On Fri, Jun 03, 2016 at 05:58:34PM +0800, Changlong Xie wrote: > > From: Wen Congyang > > > > Introduce a "xen-load-devices-state" QAPI command that can be used to > > load the state of all devices, but not the RAM or the block devices of > > the VM. >

Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support

2016-06-13 Thread Haozhong Zhang
On 06/13/16 12:07, Paolo Bonzini wrote: > > > On 13/06/2016 12:01, Haozhong Zhang wrote: > > > I would prefer to avoid having to change the firmware (SeaBIOS and OVMF) > > > every time a new bit is added. Using fw_cfg makes it possible to > > > develop the feature in the firmware once and for al

Re: [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type

2016-06-13 Thread Peter Maydell
On 13 June 2016 at 10:43, Peter Maydell wrote: > On 13 June 2016 at 10:08, wrote: >> +/* >> + * Holds TARGET_AARCH_64_PAGE_BITS or TARGET_ARM_PAGE_BITS >> + * based on the the cpu type emulated at runtime. >> + */ >> +static uint32_t target_page_bits; > > The CPU page size is not specific to the

Re: [Qemu-devel] [PULL v2 00/15] tb hash improvements

2016-06-13 Thread Peter Maydell
On 12 June 2016 at 01:20, Richard Henderson wrote: > Pull v2, with the fixed ppc cpu_relax, and the two %lu fixes. > Not re-sending the rest of the patch set. > > > r~ > > > The following changes since commit a93c1bdf0bd4689287094ddb2aae3dc907da3535: > > Merge remote-tracking branch 'remotes/kra

Re: [Qemu-devel] [PATCH v8 12/17] pci: Convert msi_init() to Error and fix callers to check it

2016-06-13 Thread Marcel Apfelbaum
On 06/10/2016 12:54 PM, Cao jin wrote: msi_init() reports errors with error_report(), which is wrong when it's used in realize(). Fix by converting it to Error. Fix its callers to handle failure instead of ignoring it. For those callers who don't handle the failure, it might happen: when user

Re: [Qemu-devel] [PATCH v2 2/3] hw/iommu: enable iommu with -device

2016-06-13 Thread Marcel Apfelbaum
On 06/12/2016 07:27 AM, Peter Xu wrote: On Thu, Jun 02, 2016 at 11:15:54PM +0300, Marcel Apfelbaum wrote: [...] static void vtd_realize(DeviceState *dev, Error **errp) { +PCIBus *bus = PC_MACHINE(qdev_get_machine())->bus; IntelIOMMUState *s = INTEL_IOMMU_DEVICE(dev); VTD_D

[Qemu-devel] [QEMU 1/7] balloon: speed up inflating & deflating process

2016-06-13 Thread Liang Li
The implementation of the current virtio-balloon is not very efficient, Bellow is test result of time spends on inflating the balloon to 3GB of a 4GB idle guest: a. allocating pages (6.5%, 103ms) b. sending PFNs to host (68.3%, 787ms) c. address translation (6.1%, 96ms) d. madvise (19%, 300ms) It

[Qemu-devel] [QEMU 0/7] Fast balloon and fast live migration

2016-06-13 Thread Liang Li
This patch set is intended to speed up the inflating/deflating process of virtio-balloon and speed up live migration by skipping process guest's free pages. The virtio-balloon is extended to support some new features, so as to make things faster. Liang Li (7): balloon: speed up inflating & defl

[Qemu-devel] [QEMU 2/7] virtio-balloon: add drop cache support

2016-06-13 Thread Liang Li
virtio-balloon can make use of the amount of free memory to determine the amount of memory to be filled in the balloon, but the amount of free memory will be effected by the page cache, which can be reclaimed. Drop the cache before getting the amount of free memory will be very helpful to relect th

[Qemu-devel] [QEMU 3/7] Add the hmp and qmp interface for dropping cache

2016-06-13 Thread Liang Li
Add the hmp and qmp interface to drop vm's page cache, users can control the type of cache they want vm to drop. Signed-off-by: Liang Li --- balloon.c| 19 +++ hmp-commands.hx | 15 +++ hmp.c| 22 ++ hmp.h| 3 +++

[Qemu-devel] [QEMU 6/7] kvm: Add two new arch specific functions

2016-06-13 Thread Liang Li
Add a new function to get the vm's max pfn and a new function to filter out the holes to get a tight free page bitmap. They are implemented on X86, and all the arches should implement them for live migration optimization. Signed-off-by: Liang Li --- include/sysemu/kvm.h | 2 ++ target-arm/kvm.c

[Qemu-devel] [QEMU 4/7] balloon: get free page info from guest

2016-06-13 Thread Liang Li
Add a new feature to get the free page information from guest, the free page information is saved in a bitmap. Please note that 'free page' only means these pages are free before the request, some of the pages will become no free during the process of sending the free page bitmap to QEMU. Signed-o

[Qemu-devel] [QEMU 5/7] bitmap: Add a new bitmap_move function

2016-06-13 Thread Liang Li
Sometimes, it is need to move a portion of bitmap to another place in a large bitmap, if overlap happens, the bitmap_copy can't not work correctly, we need a new function to do this work. Signed-off-by: Liang Li --- include/qemu/bitmap.h | 13 + 1 file changed, 13 insertions(+) diff

[Qemu-devel] [QEMU 7/7] migration: skip free pages during live migration

2016-06-13 Thread Liang Li
After sending out the request for free pages, live migration process will start without waiting for the free page bitmap is ready. If the free page bitmap is not ready when doing the 1st migration_bitmap_sync() after ram_save_setup(), the free page bitmap will be ignored, this means the free pages

[Qemu-devel] [PATCH 04/12] hw/i2c: QOM'ify versatile_i2c.c

2016-06-13 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/i2c/versatile_i2c.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/versatile_i2c.c index 0bce524..da9f298 100644 --- a/hw/i2c/ver

[Qemu-devel] [PATCH 03/12] hw/i2c: QOM'ify omap_i2c.c

2016-06-13 Thread xiaoqiang zhao
* Split the omap_i2c_init into an instance_init and realize function * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/i2c/omap_i2c.c | 44 ++-- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 06/12] hw/gpio: QOM'ify pl061.c

2016-06-13 Thread xiaoqiang zhao
* Merge the pl061_initfn into pl061_init * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/gpio/pl061.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c index 44faeb2..4ae2

[Qemu-devel] [PATCH 01/12] hw/i2c: QOM'ify bitbang_i2c.c

2016-06-13 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/i2c/bitbang_i2c.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/i2c/bitbang_i2c.c b/hw/i2c/bitbang_i2c.c index 6ed2060..d3a2989 100644 --- a/hw/i2c/bitbang_i2c.c +

[Qemu-devel] [PATCH 08/12] hw/misc: QOM'ify arm_l2x0.c

2016-06-13 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/misc/arm_l2x0.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c index 4442227..66a0787 100644 --- a/hw/misc/arm_l2x0.c +++ b/hw/mis

[Qemu-devel] [PATCH 09/12] hw/misc: QOM'ify exynos4210_pmu.c

2016-06-13 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/misc/exynos4210_pmu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/misc/exynos4210_pmu.c b/hw/misc/exynos4210_pmu.c index 889abad..e30dbc7 100644 --- a/hw/misc/exyno

[Qemu-devel] [PATCH 05/12] hw/gpio: QOM'ify omap_gpio.c

2016-06-13 Thread xiaoqiang zhao
* Split the old SysBus init into an instance_init and DeviceClass::realize function * Drop the SysBus init function Signed-off-by: xiaoqiang zhao --- hw/gpio/omap_gpio.c | 61 +++-- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/

[Qemu-devel] [PATCH 10/12] hw/misc: QOM'ify mst_fpga.c

2016-06-13 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/misc/mst_fpga.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/misc/mst_fpga.c b/hw/misc/mst_fpga.c index 48d7dfb..a10f049 100644 --- a/hw/misc/mst_fpga.c +++ b/hw/m

Re: [Qemu-devel] [PATCH v2 2/9] migration: Fix a potential issue

2016-06-13 Thread Amit Shah
On (Mon) 13 Jun 2016 [05:07:39], Li, Liang Z wrote: > > > > > +static void wait_for_decompress_done(void) { > > > > > +int idx, thread_count; > > > > > + > > > > > +if (!migrate_use_compression()) { > > > > > +return; > > > > > +} > > > > > + > > > > > +thread_count = migrat

Re: [Qemu-devel] [PATCH v6 1/1] Introduce "xen-load-devices-state"

2016-06-13 Thread Dr. David Alan Gilbert
* Stefano Stabellini (sstabell...@kernel.org) wrote: > On Fri, 3 Jun 2016, Anthony PERARD wrote: > > On Fri, Jun 03, 2016 at 05:58:34PM +0800, Changlong Xie wrote: > > > From: Wen Congyang > > > > > > Introduce a "xen-load-devices-state" QAPI command that can be used to > > > load the state of al

[Qemu-devel] [PATCH 07/12] hw/gpio: QOM'ify zaurus.c

2016-06-13 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/gpio/zaurus.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/gpio/zaurus.c b/hw/gpio/zaurus.c index 555da28..15865e1 100644 --- a/hw/gpio/zaurus.c +++ b/hw/gpio/zau

[Qemu-devel] [PATCH 00/12] some ARM platform QOM'ify work (update)

2016-06-13 Thread xiaoqiang zhao
This patch series QOM'ify ARM platform related devices. Where we drop the sysbus init function if possible and use instance_init and DeviceClass::realize function. xiaoqiang zhao (12): hw/i2c: QOM'ify bitbang_i2c.c hw/i2c: QOM'ify exynos4210_i2c.c hw/i2c: QOM'ify omap_i2c.c hw/i2c: QOM'if

[Qemu-devel] [RFC PATCH v1 1/4] migration: Remove static allocation of xzblre cache buffer

2016-06-13 Thread vijayak
From: Vijaya Kumar K Allocate xzblre zero page cache buffer dynamically. Remove dependency on TARGET_PAGE_SIZE to make run-time page size detection for arm platforms. Signed-off-by: Vijaya Kumar K --- migration/ram.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mig

  1   2   3   4   5   6   >