[Qemu-devel] updated virtio-gpu code

2014-03-24 Thread Dave Airlie
Hey, I've pushed a new version of the unaccelerated virtio-gpu code to my repo git://git.freedesktop.org/~airlied/qemu virtio-gpu this is Gerd vga-wip branch, with the virtgpu_hw file moved, removing the event queue and a config space added with a events_read, events_clear u32. I've also pushed

[Qemu-devel] [PATCH] QEMU: ARM: boot: Load kernel at an Image friendly address

2014-03-24 Thread Joel Fernandes
Loading kernel at offset 0x1 works only for zImage, but not for Image, because the kernel expect the start of decompressed kernel (.head.text) to be at an address that's a distance that's 16MB aligned from PAGE_OFFSET + TEXT_OFFSET (see vmlinux.lds.S). This check is enfornced in __fixup_pv_tab

Re: [Qemu-devel] [PATCH for-2.0 V3] tests/acpi-test: do not run iasl on big endian machines

2014-03-24 Thread Alexey Kardashevskiy
On 03/24/2014 10:02 PM, Andreas Färber wrote: > Am 23.03.2014 10:49, schrieb Michael S. Tsirkin: >> On Fri, Mar 21, 2014 at 12:16:53AM +0100, Paolo Bonzini wrote: >>> Il 20/03/2014 23:33, Marcel Apfelbaum ha scritto: I've seen something like that somewhere, but I didn't quite like it. I w

[Qemu-devel] [RFC]Two ideas to optimize updating irq routing table

2014-03-24 Thread Gonglei (Arei)
Hi, Based on discussions in: http://lists.gnu.org/archive/html/qemu-devel/2013-11/threads.html#03322 About KVM_SET_GSI_ROUTING ioctl, I tested changing RCU to SRCU, but unfortunately it looks like SRCU's grace period is no better than RCU. I haven't got any idea why this, but I suppose the te

Re: [Qemu-devel] Qemu ARM9 weirdness

2014-03-24 Thread Joel Fernandes
On Mon, Mar 24, 2014 at 7:25 PM, Peter Maydell wrote: > On 24 March 2014 19:49, Joel Fernandes wrote: >> Now, I start gdb with -s -S options to halt on startup, and step >> through, each time I'm dumping the register set: >> .. >> Reading symbols from /home/joel/data/repo/linux-omap1/vmlinux...do

[Qemu-devel] [PATCH 3/6] target-ppc: POWER7+ supports the MSR_VSX bit

2014-03-24 Thread Anton Blanchard
Without MSR_VSX we die early during a Linux boot. Signed-off-by: Anton Blanchard Signed-off-by: Cédric Le Goater --- target-ppc/translate_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 4fda0fd..87c00a1 1

[Qemu-devel] [PATCH 6/6] target-ppc: Add PMC7/8 to 970

2014-03-24 Thread Anton Blanchard
970 CPUs have PMC7/8. Create gen_spr_970 to avoid replicating it 3 times, and simplify the existing code. Signed-off-by: Anton Blanchard --- target-ppc/translate_init.c | 89 - 1 file changed, 39 insertions(+), 50 deletions(-) diff --git a/target-ppc/

[Qemu-devel] [PATCH 4/6] target-ppc: MSR_POW not supported on POWER7/7+/8

2014-03-24 Thread Anton Blanchard
Remove MSR_POW from the msr_mask for POWER7/7+/8. Signed-off-by: Anton Blanchard Signed-off-by: Cédric Le Goater --- target-ppc/translate_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 87c00a1..d07

[Qemu-devel] [PATCH 1/6] target-ppc: POWER8 supports the MSR_LE bit

2014-03-24 Thread Anton Blanchard
Add MSR_LE to the msr_mask for POWER8. Signed-off-by: Anton Blanchard Signed-off-by: Cédric Le Goater --- target-ppc/translate_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 7f53c33..a82c8f9 100644 --- a

[Qemu-devel] [PATCH 5/6] target-ppc: Fix Book3S PMU SPRs

2014-03-24 Thread Anton Blanchard
Most of the PMU SPRs were wrong on Book3S. Signed-off-by: Anton Blanchard --- target-ppc/cpu.h| 29 - target-ppc/translate_init.c | 139 +++- 2 files changed, 153 insertions(+), 15 deletions(-) diff --git a/target-ppc/cpu.h b/target-p

[Qemu-devel] [PATCH 2/6] target-ppc: POWER8 supports isel

2014-03-24 Thread Anton Blanchard
POWER8 supports isel, so enable it in QEMU. Signed-off-by: Anton Blanchard Signed-off-by: Cédric Le Goater --- target-ppc/translate_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index a82c8f9..4fda0fd 100644

Re: [Qemu-devel] Qemu ARM9 weirdness

2014-03-24 Thread Peter Maydell
On 24 March 2014 19:49, Joel Fernandes wrote: > Now, I start gdb with -s -S options to halt on startup, and step > through, each time I'm dumping the register set: > .. > Reading symbols from /home/joel/data/repo/linux-omap1/vmlinux...done. > (gdb) info registers > r0 0x0 0 > r1

[Qemu-devel] Qemu ARM9 weirdness

2014-03-24 Thread Joel Fernandes
Hi, I'm seeing some weirdness debugging a kernel on a ARM925 platform (cheetah, OMAP1 based). Qemu version: 2.0.0-rc0 I'm using GDB to step through a mainline Linux kernel, which crashes very early in boot (crash happens when reading the CPUID using cp15 instruction which is a different issue.)

Re: [Qemu-devel] [PATCH v4 5/7] allwinner-a10-pit: implement prescaler and source selection

2014-03-24 Thread Peter Crosthwaite
On Fri, Mar 21, 2014 at 7:25 AM, Beniamino Galvani wrote: > This implements the prescaler and source fields of the timer control > register. The source for each timer can be selected among 4 clock > inputs whose frequencies are set through model properties. > > Signed-off-by: Beniamino Galvani >

[Qemu-devel] [PATCH v3 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init.

2014-03-24 Thread Don Slutz
This is the xen part of "pc & q35: Add new object pc-memory-layout." Signed-off-by: Don Slutz --- v3: Adjust for code readability. Set max_ram_below_4g always and use it to calculate above_4g_mem_size, below_4g_mem_size. hw/i386/pc_piix.c| 4 ++-- hw/i386/pc_q35.c | 4 ++-- include/hw

[Qemu-devel] [PATCH v3 3/4] pc & q35: Add new object pc-memory-layout.

2014-03-24 Thread Don Slutz
This new object has the property max-ram-below-4g. If you add enough PCI devices then all mmio for them will not fit below 4G which may not be the layout the user wanted. This allows you to increase the below 4G address space that PCI devices can use (aka decrease ram below 4G) and therefore in mo

[Qemu-devel] [PATCH v3 1/4] xen-all: Fix xen_hvm_init() to adjust pc memory layout.

2014-03-24 Thread Don Slutz
This is just below_4g_mem_size and above_4g_mem_size which is used later in QEMU. Signed-off-by: Don Slutz Acked-by: Stefano Stabellini --- hw/i386/pc_piix.c| 31 --- hw/i386/pc_q35.c | 29 +++-- include/hw/xen/xen.h | 3 ++- xen-all

[Qemu-devel] [PATCH v3 0/4] Add max-ram-below-4g (was Add pci_hole_min_size machine option)

2014-03-24 Thread Don Slutz
Changes v2 to v3: Stefano Stabellini: Acked-by #1 "xen-all: Fix xen_hvm_init() to adjust pc memory" Adjust for code readability #4 "xen-all: Pass max_ram_below_4g to xen_hvm_init." Set max_ram_below_4g always and use it to calculate above_4g_mem_size, below_4g_mem_size. Ch

[Qemu-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unused -global

2014-03-24 Thread Don Slutz
This can help a user understand why -global was ignored. For example: with "-vga cirrus"; "-global vga.vgamem_mb=16" is just ignored when "-global cirrus-vga.vgamem_mb=16" is not. This is currently clear when the wrong property is provided: out/x86_64-softmmu/qemu-system-x86_64 -global cirrus-vg

Re: [Qemu-devel] [PATCH] target-arm: Load ELF images with the correct machine type for CPU

2014-03-24 Thread Peter Crosthwaite
On Sat, Mar 22, 2014 at 4:44 AM, Peter Maydell wrote: > When trying to load an ELF file specified via -kernel, we need to > pass load_elf() the ELF machine type corresponding to the CPU we're > booting with, not the one corresponding to the softmmu binary > we happen to be running. (The two are di

Re: [Qemu-devel] [PATCH v3] sparc : 32bits integer division overflow

2014-03-24 Thread Andreas Färber
Am 24.03.2014 22:36, schrieb Peter Maydell: > On 24 March 2014 21:07, Mark Cave-Ayland > wrote: >> This patch fixes the original bug report, and doesn't appear to have any >> ill-effects on my SPARC32/SPARC64 image collection boot tests so: >> >> Tested-by: Mark Cave-Ayland >> >> Peter - given t

[Qemu-devel] [PATCH RFC v3 2/3] vmstate: add VMSTATE_TEST

2014-03-24 Thread Michael S. Tsirkin
Can validate state using VMS_NONE and VMS_MUST_EXIST Signed-off-by: Michael S. Tsirkin --- include/migration/vmstate.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index de970ab..97629b7 100644 --- a/include/migration/vmstate

[Qemu-devel] [PATCH RFC v3 3/3] hpet: fix buffer overrun on invalid state load

2014-03-24 Thread Michael S. Tsirkin
CVE-2013-4527 hw/timer/hpet.c buffer overrun hpet is a VARRAY with a uint8 size but static array of 32 To fix, make sure num_timers is valid using VMSTATE_TEST hook. Reported-by: Anthony Liguori Signed-off-by: Michael S. Tsirkin --- hw/timer/hpet.c | 13 + 1 file changed, 13 inser

[Qemu-devel] [PATCH RFC v3 0/3] state loading security issues

2014-03-24 Thread Michael S. Tsirkin
In an attempt to provide a generic solution for this set of issues, this adds a way to add validators in the middle of the structure. On failure, we assert on output (should never happen) and fail migration on input. The last patch in the series shows how the new infrastructure is used. I'll wait

[Qemu-devel] [PATCH RFC v3 1/3] vmstate: add VMS_MUST_EXIST

2014-03-24 Thread Michael S. Tsirkin
Can be used to verify a required field exists or validate state in some other way. Signed-off-by: Michael S. Tsirkin --- include/migration/vmstate.h | 1 + vmstate.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/include/migration/vmstate.h b/include/migratio

Re: [Qemu-devel] please release qemu version 1.7.1

2014-03-24 Thread Laszlo Ersek
On 03/24/14 22:50, Andreas Färber wrote: > Laszlo, > > Am 24.03.2014 20:23, schrieb Laszlo Ersek: >> http://wiki.qemu.org/Planning/1.7 >> >> Thank you. >> Laszlo > > Since you're not addressing anyone in particular who could create the > release for you, the tag already exists on Michael's branch

Re: [Qemu-devel] [RFC v2 3/5] vmstate: add VMS_MUST_EXIST

2014-03-24 Thread Michael S. Tsirkin
On Mon, Mar 24, 2014 at 05:11:16PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > Can be used to verify a required field exists or validate > > state in some other way. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > include/migration/vmstate.h |

Re: [Qemu-devel] [RFC v2 2/5] vmstate: add VMS_NONE

2014-03-24 Thread Michael S. Tsirkin
On Mon, Mar 24, 2014 at 05:07:39PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > The element with this flags value is skipped. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > include/migration/vmstate.h | 1 + > > vmstate.c | 4 +

Re: [Qemu-devel] please release qemu version 1.7.1

2014-03-24 Thread Andreas Färber
Laszlo, Am 24.03.2014 20:23, schrieb Laszlo Ersek: > http://wiki.qemu.org/Planning/1.7 > > Thank you. > Laszlo Since you're not addressing anyone in particular who could create the release for you, the tag already exists on Michael's branch: https://github.com/mdroth/qemu/commits/v1.7.1 And you

Re: [Qemu-devel] [PATCH v3] sparc : 32bits integer division overflow

2014-03-24 Thread Peter Maydell
On 24 March 2014 21:07, Mark Cave-Ayland wrote: > This patch fixes the original bug report, and doesn't appear to have any > ill-effects on my SPARC32/SPARC64 image collection boot tests so: > > Tested-by: Mark Cave-Ayland > > Peter - given that this prevents a guest from crashing the QEMU host,

Re: [Qemu-devel] [PATCH v3] sparc : 32bits integer division overflow

2014-03-24 Thread Mark Cave-Ayland
On 21/03/14 01:25, Olivier Danet wrote: The signed integer division -0x8000___ / -1 must be handled separately to avoid an overflow on the QEMU host. Negative overflow must be a negative number for correct sign extension in Sparc64 mode. Use constants. Signed-off-by: Olivier Danet

Re: [Qemu-devel] Qemu live migration code

2014-03-24 Thread Bechir Bani
Hi Sanidhya, Which function in savevm.c can tell me about the stop time ? 2014-03-24 13:46 GMT-04:00 Sanidhya Kashyap : > savevm.c will tell you about the stop time. > > arch_init.c (ram_save_block) will tell about the number of pages > transferred. > > > On Mon, Mar 24, 2014 at 10:51 PM, Bech

Re: [Qemu-devel] [PULL for-2.0 0/2] target-arm queue

2014-03-24 Thread Peter Maydell
or-2.0' into > staging (2014-03-20 11:45:38 +) > > are available in the git repository at: > > > git://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20140324 > > for you to fetch changes up to da0af40dd70c8f8f821d79c367aecb08618af28e: > &

Re: [Qemu-devel] [PULL 00/15] acpi,pc,test bug fixes

2014-03-24 Thread Peter Maydell
On 24 March 2014 11:24, Michael S. Tsirkin wrote: > The following changes since commit 13f65b2e1073cf7e2c8fb3880c77d8a53fa2f95e: > > acpi-test: update expected SSDT files (2014-03-11 13:27:27 +0200) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.

[Qemu-devel] please release qemu version 1.7.1

2014-03-24 Thread Laszlo Ersek
http://wiki.qemu.org/Planning/1.7 Thank you. Laszlo

Re: [Qemu-devel] [PULL 00/02] seccomp: adding new syscalls to the whitelist

2014-03-24 Thread Paul Moore
On Thursday, March 13, 2014 10:42:42 AM Eduardo Otubo wrote: > The following changes since commit 750036a848ea913ba6343718ffa70da98f7eef6b: > > Merge remote-tracking branch 'remotes/afaerber/tags/prep-for-upstream' > into staging (2014-03-12 17:53:37 +) > > are available in the git reposito

Re: [Qemu-devel] [PULL for-2, 0 0/1] spice: input: Fix absolute mouse y coordinates

2014-03-24 Thread Peter Maydell
On 24 March 2014 07:46, Gerd Hoffmann wrote: > Hi, > > Very short spice patch queue, with a single line bugfix for 2.0. > > please pull, > Gerd > > The following changes since commit 3a87f8b6859e6221b827ab4737779dddb37553ec: > > Merge remote-tracking branch 'remotes/afaerber/tags/ppc-for-2.0

Re: [Qemu-devel] [PATCH] qemu-img: mandate argument to 'qemu-img check --repair'

2014-03-24 Thread Leandro Dorileo
On Tue, Mar 25, 2014 at 12:08:54AM +0530, Prasad Joshi wrote: > qemu-img check --repair option accepts an argument. The argument to > --repair switch can either be 'all' or 'leak'. Fix the long option to > mandate argument with --repair switch. > > The patch fixes following segmentation fault > >

Re: [Qemu-devel] [PATCH] backends/baum.c: Fix compilation when SDL is not available.

2014-03-24 Thread Peter Maydell
On 21 March 2014 21:29, Richard W.M. Jones wrote: > backends/baum.c: In function ‘chr_baum_init’: > backends/baum.c:569:64: error: missing binary operator before token "(" > #if defined(CONFIG_SDL) && SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0) >

[Qemu-devel] [PATCH] qemu-img: mandate argument to 'qemu-img check --repair'

2014-03-24 Thread Prasad Joshi
qemu-img check --repair option accepts an argument. The argument to --repair switch can either be 'all' or 'leak'. Fix the long option to mandate argument with --repair switch. The patch fixes following segmentation fault Core was generated by `qemu-img check -f qcow2 --repair all t.qcow2'. Progr

[Qemu-devel] [Bug 1296882] [NEW] add next free device option to qemu-img

2014-03-24 Thread Karl-Philipp Richter
Public bug reported: I'd like to propose an option to be added to qemu-img which returns the next free NBD (the device file) very similar to losetup -f. It would make life a lot easier. Followers of this enhancement request might be interested in the following workaround: http://stackoverflow.com

Re: [Qemu-devel] [PATCH] spapr_vscsi: remove duplicate condition check

2014-03-24 Thread Paolo Bonzini
Il 24/03/2014 18:19, Prasad Joshi ha scritto: On Mon, Mar 24, 2014 at 9:15 PM, Paolo Bonzini wrote: Il 24/03/2014 16:44, Prasad Joshi ha scritto: Signed-off-by: Prasad Joshi --- hw/scsi/spapr_vscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/spapr_vscsi.c b

Re: [Qemu-devel] [RFC PATCH 03/12] migration: make qemu_savevm_state public.

2014-03-24 Thread Dr. David Alan Gilbert
* Frederic Konrad (fred.kon...@greensocs.com) wrote: > On 21/03/2014 20:54, Dr. David Alan Gilbert wrote: > >* fred.kon...@greensocs.com (fred.kon...@greensocs.com) wrote: > >>From: KONRAD Frederic > >> > >>This makes qemu_savevm_state public for reverse-execution. > >It's interesting that you're

Re: [Qemu-devel] Qemu live migration code

2014-03-24 Thread Sanidhya Kashyap
savevm.c will tell you about the stop time. arch_init.c (ram_save_block) will tell about the number of pages transferred. On Mon, Mar 24, 2014 at 10:51 PM, Bechir Bani wrote: > I have a task to add trace points in the source code of Qemu. The goal is > to know the number of pages transferred a

Re: [Qemu-devel] [PATCH] trace: teach lttng backend to use format strings

2014-03-24 Thread Eric Blake
On 03/24/2014 11:35 AM, alex.ben...@linaro.org wrote: > From: Alex Bennée > > This makes the UST backend pay attention to the format string arguments > that are defined when defining payload data. With this you can now > ensure integers are reported in hex mode if you want. > > Signed-off-by: Al

[Qemu-devel] [PATCH] trace: teach lttng backend to use format strings

2014-03-24 Thread alex . bennee
From: Alex Bennée This makes the UST backend pay attention to the format string arguments that are defined when defining payload data. With this you can now ensure integers are reported in hex mode if you want. Signed-off-by: Alex Bennée --- v2 - remove silly debug statements --- scripts/t

[Qemu-devel] [PULL for-2.0 0/2] target-arm queue

2014-03-24 Thread Peter Maydell
ository at: git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20140324 for you to fetch changes up to da0af40dd70c8f8f821d79c367aecb08618af28e: target-arm: Load ELF images with the correct machine type for CPU (2014-03-24 16:4

[Qemu-devel] [PULL 1/2] target-arm: Fix A64 Neon MLS

2014-03-24 Thread Peter Maydell
The order of operands for the accumulate step in disas_simd_3same_int() was reversed. This only affected the MLS instruction, since all the other accumulating instructions in this category perform an addition rather than a subtraction. Reported-by: Laurent Desnogues Tested-by: Laurent Desnogues

Re: [Qemu-devel] Qemu live migration code

2014-03-24 Thread Bechir Bani
I have a task to add trace points in the source code of Qemu. The goal is to know the number of pages transferred at each iteration and stop time of the machine as well. 2014-03-24 12:50 GMT-04:00 Dr. David Alan Gilbert : > * Bechir Bani (bechir.b...@gmail.com) wrote: > > Hi, > > > > I want to k

Re: [Qemu-devel] [PATCH] spapr_vscsi: remove duplicate condition check

2014-03-24 Thread Prasad Joshi
On Mon, Mar 24, 2014 at 9:15 PM, Paolo Bonzini wrote: > Il 24/03/2014 16:44, Prasad Joshi ha scritto: > >> Signed-off-by: Prasad Joshi >> --- >> hw/scsi/spapr_vscsi.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c >> inde

[Qemu-devel] [PULL 2/2] target-arm: Load ELF images with the correct machine type for CPU

2014-03-24 Thread Peter Maydell
When trying to load an ELF file specified via -kernel, we need to pass load_elf() the ELF machine type corresponding to the CPU we're booting with, not the one corresponding to the softmmu binary we happen to be running. (The two are different in the case of loading a 32-bit ARM ELF file into a 32

Re: [Qemu-devel] [RFC v2 3/5] vmstate: add VMS_MUST_EXIST

2014-03-24 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > Can be used to verify a required field exists or validate > state in some other way. > > Signed-off-by: Michael S. Tsirkin > --- > include/migration/vmstate.h | 1 + > vmstate.c | 10 +- > 2 files changed, 10 insertions(+

Re: [Qemu-devel] Qemu live migration code

2014-03-24 Thread Dr. David Alan Gilbert
* Bechir Bani (bechir.b...@gmail.com) wrote: > Hi, > > I want to know the source code of qemu which is responsible for the > migration of virtual machines, more precisely where the part of the code > that describes the stages of memory transfer. is that you can help me? It's split around a few fi

Re: [Qemu-devel] [RFC v2 2/5] vmstate: add VMS_NONE

2014-03-24 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > The element with this flags value is skipped. > > Signed-off-by: Michael S. Tsirkin > --- > include/migration/vmstate.h | 1 + > vmstate.c | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/include/migra

[Qemu-devel] [PATCH] trace: teach lttng backend to use format strings

2014-03-24 Thread alex . bennee
From: Alex Bennée This makes the UST backend pay attention to the format string arguments that are defined when defining payload data. With this you can now ensure integers are reported in hex mode if you want. Signed-off-by: Alex Bennée --- scripts/tracetool/__init__.py| 13 +++--

Re: [Qemu-devel] [RFC PATCH] block/iscsi: speed up read for unallocated sectors

2014-03-24 Thread Peter Lieven
Am 24.03.2014 16:44, schrieb Paolo Bonzini: > Il 24/03/2014 16:34, Peter Lieven ha scritto: >> this patch implements a cache that tracks if a page on the >> iscsi target is allocated or not. The cache is implemented in >> a way that it allows for false positives >> (e.g. pretending a page is alloca

Re: [Qemu-devel] [RFC v2 0/5] state loading security issues

2014-03-24 Thread Michael S. Tsirkin
On Mon, Mar 24, 2014 at 04:37:43PM +0200, Michael S. Tsirkin wrote: > In an attempt to provide a generic solution for this > set of issues, this adds a way to add validators > in the middle of the structure. > > On failure, we assert on output (should never happen) > and fail migration on input. >

Re: [Qemu-devel] [RFC v2 3/5] vmstate: add VMS_MUST_EXIST

2014-03-24 Thread Michael S. Tsirkin
On Mon, Mar 24, 2014 at 04:38:01PM +0200, Michael S. Tsirkin wrote: > Can be used to verify a required field exists or validate > state in some other way. > > Signed-off-by: Michael S. Tsirkin Sent a wrong patch. this is RFC in any case so not resending everything, but this is needed on top both

Re: [Qemu-devel] [PATCH for-2.0] target-arm: Fix A64 Neon MLS

2014-03-24 Thread Laurent Desnogues
On Mon, Mar 24, 2014 at 5:14 PM, Peter Maydell wrote: > The order of operands for the accumulate step in disas_simd_3same_int() > was reversed. This only affected the MLS instruction, since all the > other accumulating instructions in this category perform an addition > rather than a subtraction.

[Qemu-devel] [PATCH for-2.0] target-arm: Fix A64 Neon MLS

2014-03-24 Thread Peter Maydell
The order of operands for the accumulate step in disas_simd_3same_int() was reversed. This only affected the MLS instruction, since all the other accumulating instructions in this category perform an addition rather than a subtraction. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell

Re: [Qemu-devel] [RFC PATCH] block/iscsi: speed up read for unallocated sectors

2014-03-24 Thread Paolo Bonzini
Il 24/03/2014 16:34, Peter Lieven ha scritto: this patch implements a cache that tracks if a page on the iscsi target is allocated or not. The cache is implemented in a way that it allows for false positives (e.g. pretending a page is allocated, but it isn't), but no false negatives. The cached

Re: [Qemu-devel] [PATCH] migration: Fix possible bug for migrate cancel

2014-03-24 Thread Eric Blake
[adding libvirt] On 03/24/2014 09:47 AM, Paolo Bonzini wrote: > Il 24/03/2014 14:04, arei.gong...@huawei.com ha scritto: >> From: zengjunliang >> >> Return error for migrate cancel, when migration status is not >> MIG_STATE_SETUP or MIG_STATE_ACTIVE. Thus, libvirt can can >> perceive the operatio

Re: [Qemu-devel] n ways block filters

2014-03-24 Thread Kevin Wolf
Am 24.03.2014 um 15:53 hat Benoît Canet geschrieben: > The Thursday 20 Mar 2014 à 17:06:26 (+0100), Benoît Canet wrote : > > The Thursday 20 Mar 2014 à 16:12:34 (+0100), Kevin Wolf wrote : > > > Am 20.03.2014 um 15:05 hat Benoît Canet geschrieben: > > > > The Tuesday 18 Mar 2014 à 14:27:47 (+0100),

Re: [Qemu-devel] [RFC v2 1/5] vmstate: reduce code duplication

2014-03-24 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > move size offset and number of elements math out > to functions, to reduce code duplication. Reviewed-by: Dr. David Alan Gilbert If this was new code I would have rejected the use of signed 'int' for something counting the number of elements and si

Re: [Qemu-devel] Qemu live migration code

2014-03-24 Thread 陈梁
Hi, the function of migration_thread maybe is your want. Best regards. > Hi, > > I want to know the source code of qemu which is responsible for the migration > of virtual machines, more precisely where the part of the code that describes > the stages of memory transfer. is that you can help

Re: [Qemu-devel] [RFC PATCH 02/12] migration: migrate icount fields.

2014-03-24 Thread Paolo Bonzini
Il 24/03/2014 15:49, Frederic Konrad ha scritto: --- a/cpus.c +++ b/cpus.c @@ -427,6 +427,26 @@ void qemu_clock_warp(QEMUClockType type) } } +static bool icount_state_needed(void *opaque) +{ +return (use_icount != 0); +} + +/* + * This is a subsection for icount migration. + */ +static

Re: [Qemu-devel] [PATCH] migration: Fix possible bug for migrate cancel

2014-03-24 Thread Paolo Bonzini
Il 24/03/2014 14:04, arei.gong...@huawei.com ha scritto: From: zengjunliang Return error for migrate cancel, when migration status is not MIG_STATE_SETUP or MIG_STATE_ACTIVE. Thus, libvirt can can perceive the operation fails. Signed-off-by: zengjunliang Signed-off-by: Gonglei I think this

[Qemu-devel] [PATCH] spapr_vscsi: remove duplicate condition check

2014-03-24 Thread Prasad Joshi
Signed-off-by: Prasad Joshi --- hw/scsi/spapr_vscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index 34478f0..d4ada4f 100644 --- a/hw/scsi/spapr_vscsi.c +++ b/hw/scsi/spapr_vscsi.c @@ -690,7 +690,7 @@ static void vscsi_inqui

Re: [Qemu-devel] [PATCH] spapr_vscsi: remove duplicate condition check

2014-03-24 Thread Paolo Bonzini
Il 24/03/2014 16:44, Prasad Joshi ha scritto: Signed-off-by: Prasad Joshi --- hw/scsi/spapr_vscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index 34478f0..d4ada4f 100644 --- a/hw/scsi/spapr_vscsi.c +++ b/hw/scsi/spapr_vsc

[Qemu-devel] [RFC PATCH] block/iscsi: speed up read for unallocated sectors

2014-03-24 Thread Peter Lieven
this patch implements a cache that tracks if a page on the iscsi target is allocated or not. The cache is implemented in a way that it allows for false positives (e.g. pretending a page is allocated, but it isn't), but no false negatives. The cached allocation info is then used to speed up the rea

Re: [Qemu-devel] [PATCH 07/26] tcg-aarch64: Use adrp in tcg_out_movi

2014-03-24 Thread Richard Henderson
On 03/24/2014 07:05 AM, Claudio Fontana wrote: >> > +/* Look for host pointer values within 4G of the PC. This happens >> > + often when loading pointers to QEMU's own data structures. */ >> > +disp = (value >> 12) - ((intptr_t)s->code_ptr >> 12); >> > +if (disp == sextract64(di

Re: [Qemu-devel] [PATCH 01/26] tcg-aarch64: Properly detect SIGSEGV writes

2014-03-24 Thread Richard Henderson
On 03/24/2014 04:05 AM, Claudio Fontana wrote: >> (insn & 0xbfff) == 0x0c00 /* C3.3.1 */ >> > +|| (insn & 0xbfe0) == 0x0c80 /* C3.3.2 */ >> > +|| (insn & 0xbfff) == 0x0d00 /* C3.3.3 */ > I see you exclude the instructions with bit R=1. >

Re: [Qemu-devel] [PATCH 09/26] tcg-aarch64: Create tcg_out_brcond

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > Rearrange code to put the compare and branch in the same place. > > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c | 34 ++ > 1 file changed, 14 insertions(+), 20 deletions(-) > > diff --git a/tcg

Re: [Qemu-devel] [PATCH 10/26] tcg-aarch64: Use CBZ and CBNZ

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > A compare and branch against zero happens at the start of > every single TB. > > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c | 26 -- > 1 file changed, 24 insertions(+), 2 deletions(-) > > diff --git a

Re: [Qemu-devel] [PATCH 08/26] tcg-aarch64: Use symbolic names for branches

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c | 74 > > 1 file changed, 43 insertions(+), 31 deletions(-) > > diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c > i

[Qemu-devel] Qemu live migration code

2014-03-24 Thread Bechir Bani
Hi, I want to know the source code of qemu which is responsible for the migration of virtual machines, more precisely where the part of the code that describes the stages of memory transfer. is that you can help me? Thank you ! -- *Béchir Bani * *

Re: [Qemu-devel] [PATCH 01/26] tcg-aarch64: Properly detect SIGSEGV writes

2014-03-24 Thread Richard Henderson
On 03/24/2014 05:41 AM, Peter Maydell wrote: > On 15 March 2014 02:48, Richard Henderson wrote: >> Since the kernel doesn't pass any info on the reason for the fault, >> disassemble the instruction to detect a store. > > Incidentally, I've been wondering if we could improve > handle_cpu_signal so

Re: [Qemu-devel] [RFC PATCH 03/12] migration: make qemu_savevm_state public.

2014-03-24 Thread Frederic Konrad
On 21/03/2014 20:54, Dr. David Alan Gilbert wrote: * fred.kon...@greensocs.com (fred.kon...@greensocs.com) wrote: From: KONRAD Frederic This makes qemu_savevm_state public for reverse-execution. It's interesting that you're doing this repetitive snapshot; in some ways it's similar to Michael

Re: [Qemu-devel] [PATCH] qcow2: Remove FIXME comment, already fixed

2014-03-24 Thread Leandro Dorileo
On Mon, Mar 24, 2014 at 02:06:15PM +0800, Deepak Kathayat wrote: > > Signed-off-by: Deepak Kathayat Reviewed-by: Leandro Dorileo > --- > block/qcow2.h |1 - > 1 file changed, 1 deletion(-) > > diff --git a/block/qcow2.h b/block/qcow2.h > index 0b0eac8..25663d4 100644 > --- a/block/qcow2.

Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts

2014-03-24 Thread Leandro Dorileo
Hi Chunyan, On Mon, Mar 24, 2014 at 11:02:14AM +0800, Chunyan Liu wrote: > 2014-03-21 20:31 GMT+08:00 Leandro Dorileo : > > > On Fri, Mar 21, 2014 at 06:09:22PM +0800, Chunyan Liu wrote: > > > 2014-03-21 8:07 GMT+08:00 Leandro Dorileo : > > > > > > > Hi Chunyan, > > > > > > > > On Mon, Mar 10, 20

Re: [Qemu-devel] n ways block filters

2014-03-24 Thread Benoît Canet
The Thursday 20 Mar 2014 à 17:06:26 (+0100), Benoît Canet wrote : > The Thursday 20 Mar 2014 à 16:12:34 (+0100), Kevin Wolf wrote : > > Am 20.03.2014 um 15:05 hat Benoît Canet geschrieben: > > > The Tuesday 18 Mar 2014 à 14:27:47 (+0100), Kevin Wolf wrote : > > > > Am 17.03.2014 um 17:02 hat Stefan

Re: [Qemu-devel] [RFC PATCH 02/12] migration: migrate icount fields.

2014-03-24 Thread Frederic Konrad
On 22/03/2014 09:57, Paolo Bonzini wrote: Il 21/03/2014 20:17, fred.kon...@greensocs.com ha scritto: From: KONRAD Frederic This fixes a bug where qemu_icount and qemu_icount_bias are not migrated. Signed-off-by: KONRAD Frederic --- cpus.c | 23 ++- 1 file changed, 22 i

Re: [Qemu-devel] [PATCH v3] scripts: add sample model file for Coverity Scan

2014-03-24 Thread Eric Blake
On 03/24/2014 04:01 AM, Paolo Bonzini wrote: > This is the model file that is being used for the QEMU project's scans > on scan.coverity.com. It fixed about 30 false positives (10% of the > total) and exposed about 60 new memory leaks. > > The file is not automatically used; changes to it must be

[Qemu-devel] [RFC v2 5/5] hpet: fix buffer overrun on invalid state load

2014-03-24 Thread Michael S. Tsirkin
CVE-2013-4527 hw/timer/hpet.c buffer overrun hpet is a VARRAY with a uint8 size but static array of 32 To fix, make sure num_timers is valid using VMSTATE_TEST hook. Reported-by: Anthony Liguori Signed-off-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/timer/hpet.c | 17 +++

[Qemu-devel] [RFC v2 3/5] vmstate: add VMS_MUST_EXIST

2014-03-24 Thread Michael S. Tsirkin
Can be used to verify a required field exists or validate state in some other way. Signed-off-by: Michael S. Tsirkin --- include/migration/vmstate.h | 1 + vmstate.c | 10 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/migration/vmstate.h b/i

[Qemu-devel] [RFC v2 2/5] vmstate: add VMS_NONE

2014-03-24 Thread Michael S. Tsirkin
The element with this flags value is skipped. Signed-off-by: Michael S. Tsirkin --- include/migration/vmstate.h | 1 + vmstate.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index e7e1705..3a15

[Qemu-devel] [RFC v2 4/5] vmstate: add VMSTATE_TEST

2014-03-24 Thread Michael S. Tsirkin
Can validate state using VMS_NONE and VMS_MUST_EXIST Signed-off-by: Michael S. Tsirkin --- include/migration/vmstate.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index eb90cef..e220f09 100644 --- a/include/migration/vmstate

[Qemu-devel] [RFC v2 1/5] vmstate: reduce code duplication

2014-03-24 Thread Michael S. Tsirkin
move size offset and number of elements math out to functions, to reduce code duplication. Signed-off-by: Michael S. Tsirkin --- vmstate.c | 97 ++- 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/vmstate.c b/vmstate.c i

[Qemu-devel] [RFC v2 0/5] state loading security issues

2014-03-24 Thread Michael S. Tsirkin
In an attempt to provide a generic solution for this set of issues, this adds a way to add validators in the middle of the structure. On failure, we assert on output (should never happen) and fail migration on input. The last patch in the series shows how the new infrastructure is used. I'll wait

Re: [Qemu-devel] [PATCH 05/26] tcg-aarch64: Use ORRI in tcg_out_movi

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > The subset of logical immediates that we support is quite quick to test, > and such constants are quite common to want to load. > > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c | 70 > +++---

Re: [Qemu-devel] [PATCH 07/26] tcg-aarch64: Use adrp in tcg_out_movi

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > Loading an qemu pointer as an immediate happens often. E.g. > > - exit_tb $0x7fa8140013 > + exit_tb $0x7f81ee0013 > ... > - : d2800260mov x0, #0x13 > - : f2b50280movkx0, #0xa814, lsl #16 > - : f2c00fe0movkx0, #

Re: [Qemu-devel] [PATCH for-2.0 V4] tests/acpi-test: do not fail if iasl is broken

2014-03-24 Thread Marcel Apfelbaum
On Mon, 2014-03-24 at 15:43 +0200, Marcel Apfelbaum wrote: > On Mon, 2014-03-24 at 13:24 +, Peter Maydell wrote: > > On 24 March 2014 13:23, Stefan Hajnoczi wrote: > > > Did you try running gtester without -q or even with -v? (You can edit > > > tests/Makefile to do that.) > > > > ...or use

Re: [Qemu-devel] [PATCH for-2.0 V4] tests/acpi-test: do not fail if iasl is broken

2014-03-24 Thread Andreas Färber
Am 24.03.2014 14:24, schrieb Peter Maydell: > On 24 March 2014 13:23, Stefan Hajnoczi wrote: >> Did you try running gtester without -q or even with -v? (You can edit >> tests/Makefile to do that.) > > ...or use make V=1. V=1 I already tried. (And I also suggested to use that for Travis since ot

Re: [Qemu-devel] [PATCH 2/6] intc/openpic_kvm: fix MemListener delete regiion callback function

2014-03-24 Thread Andreas Färber
Am 23.03.2014 10:28, schrieb Prasad Joshi: > Signed-off-by: Prasad Joshi > --- > hw/intc/openpic_kvm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks for spotting this, applied to ppc-next (w/ typo fix in subject): https://github.com/afaerber/qemu-cpu/commits/ppc-next Andreas -

Re: [Qemu-devel] [PATCH v2 12/12] iotests: Add test for the JSON protocol

2014-03-24 Thread Benoît Canet
The Friday 07 Mar 2014 à 23:55:56 (+0100), Max Reitz wrote : > Add a test for the JSON protocol driver. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/084 | 123 > + > tests/qemu-iotests/084.out | 39 ++ > tests/qemu-iotests/

Re: [Qemu-devel] [PATCH 04/26] tcg-aarch64: Use MOVN in tcg_out_movi

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > When profitable, initialize the register with MOVN instead of MOVZ, > before setting the remaining lanes with MOVK. > > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c | 62 > ++-- > 1

Re: [Qemu-devel] [PATCH 1/6] audio: set top level latch for each slot

2014-03-24 Thread Andreas Färber
Am 24.03.2014 14:22, schrieb Peter Maydell: > On 24 March 2014 13:19, Stefan Hajnoczi wrote: >> On Sun, Mar 23, 2014 at 02:58:38PM +0530, Prasad Joshi wrote: >>> CSMKeyControll function is supposed to set the top level latch for each >>> slot. However, at the moment, it incorrectly updates only th

Re: [Qemu-devel] [PATCH v2 07/12] block/json: Add bdrv_co_get_block_status()

2014-03-24 Thread Benoît Canet
The Friday 07 Mar 2014 à 23:55:51 (+0100), Max Reitz wrote : > Implement this function in the same way as raw_bsd does: Acknowledge > that this is a passthrough driver (always return BDRV_BLOCK_OFFSET_VALID > and BDRV_BLOCK_DATA and derive the offset directly from the sector > index) and add BDRV_B

Re: [Qemu-devel] [PATCH] migration: Fix possible bug for migrate cancel

2014-03-24 Thread Eric Blake
On 03/24/2014 07:04 AM, arei.gong...@huawei.com wrote: > From: zengjunliang > > Return error for migrate cancel, when migration status is not > MIG_STATE_SETUP or MIG_STATE_ACTIVE. Thus, libvirt can can > perceive the operation fails. > > Signed-off-by: zengjunliang > Signed-off-by: Gonglei >

Re: [Qemu-devel] [PATCH 06/26] tcg-aarch64: Special case small constants in tcg_out_movi

2014-03-24 Thread Claudio Fontana
On 15.03.2014 03:48, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/aarch64/tcg-target.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c > index 0f23e43..417f51a 100644 > --- a/tcg/aarch64/tcg-targe

  1   2   >