Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-28 Thread Markus Armbruster
Jeff Cody writes: > On Tue, Oct 28, 2014 at 05:03:40PM +0100, Markus Armbruster wrote: >> If the user neglects to specify the image format, QEMU probes the >> image to guess it automatically, for convenience. >> >> Relying on format probing is insecure for raw images (CVE-2008-2004). >> If the g

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-28 Thread Markus Armbruster
Fam Zheng writes: > On Tue, 10/28 17:03, Markus Armbruster wrote: >> diff --git a/block/vmdk.c b/block/vmdk.c >> index 673d3f5..91a42d2 100644 >> --- a/block/vmdk.c >> +++ b/block/vmdk.c >> @@ -2225,6 +2225,7 @@ static BlockDriver bdrv_vmdk = { >> .format_name = "vmdk", >>

[Qemu-devel] [PATCH v3] qemu-log: add log category for MMU info

2014-10-28 Thread Antony Pavlov
Running barebox on qemu-system-mips* with '-d unimp' overloads stderr by very very many mips_cpu_handle_mmu_fault() messages: mips_cpu_handle_mmu_fault address=b80003fd ret 0 physical 180003fd prot 3 mips_cpu_handle_mmu_fault address=a0800884 ret 0 physical 00800884 prot 3

[Qemu-devel] [PATCH 2/4] block: Add bdrv_get_node_name

2014-10-28 Thread Fam Zheng
This returns the node name of a BDS. Remove the TODO comment and expect the callers to be explicit. Signed-off-by: Fam Zheng --- block.c | 6 +- include/block/block.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index c92a913..1448e38 1

[Qemu-devel] [PATCH 4/4] qmp: Add optional switch "query-nodes" in query-blockstats

2014-10-28 Thread Fam Zheng
This bool option will allow query all the node names. It iterates all the BDSes that are assigned a name, also in this case don't query up the backing chain. Signed-off-by: Fam Zheng --- block/qapi.c | 20 +--- hmp.c| 2 +- qapi/block-core.json | 4 +++-

[Qemu-devel] [PATCH 3/4] block: Include "node-name" if present in query-blockstats

2014-10-28 Thread Fam Zheng
Node name is a better identifier of BDS. We will want to query statistics of a BDS node buried in the BDS graph, so reporting the node's name if there is one will do the good. Signed-off-by: Fam Zheng --- block/qapi.c | 5 + qapi/block-core.json | 5 - 2 files changed, 9 inserti

[Qemu-devel] [PATCH 1/4] block: Add bdrv_next_node

2014-10-28 Thread Fam Zheng
Similar to bdrv_next, this traverses through graph_bdrv_states. Will be useful to enumerate all the named nodes. Signed-off-by: Fam Zheng --- block.c | 8 include/block/block.h | 1 + 2 files changed, 9 insertions(+) diff --git a/block.c b/block.c index 88f6d9b..c92a913 1

[Qemu-devel] [PATCH 0/4] block: Allow query stats for drive-mirror target

2014-10-28 Thread Fam Zheng
This series adds an optional bool parameter "query-nodes" to query-blockstats. By default, if omitted, the behavior is unchanged. If set to "true", the command will iterate through all named nodes in BDS graph and report the statistics in a list, similarly. But the backing chain is not built. Th

[Qemu-devel] [PATCH] inetd enabled qemu-nbd

2014-10-28 Thread Jun Sheng
From: Chaos Eternal Signed-off-by: Jun Sheng --- qemu-nbd.c | 42 ++ 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index b524b34..44bc349 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -49,6 +49,7 @@ static NBDExport

[Qemu-devel] [PATCH] A Patch to enable qemu-nbd run as an inetd service

2014-10-28 Thread Jun Sheng
run qemu-nbd as an inetd service has some benefits * more scriptable, such as serve multiple images to different clients on one ip/port * access control using tcpd simple usage: #!/bin/sh # qemu-nbd wrapper, select image file according to client ip address IMG_FILE=`sed -n "s/$REMOTE_HOST //p" /pa

[Qemu-devel] Restricted User mode networking issue

2014-10-28 Thread Sebastian Unger
Hello Everybody, I've got an issue with qemu user-mode networking: I've got a KVM running on a host started with this command line: *qemu-system-x86_64 -enable-kvm -drive file=vms/disk.qcow2,if=virtio,cache=writeback -netdev type=user,id=net0,restrict=on,hostfwd=tcp::2011-:22 -device virtio-net-pc

Re: [Qemu-devel] [PATCH] block/curl: Improve type safety of s->timeout.

2014-10-28 Thread Gonglei
On 2014/10/28 22:29, Stefan Hajnoczi wrote: > On Mon, Oct 06, 2014 at 03:32:10PM +0100, Richard W.M. Jones wrote: >> qemu_opt_get_number returns a uint64_t, and curl_easy_setopt expects a >> long (not an int). >> >> Store the timeout (which is a positive number of seconds) as a >> uint64_t. Check

[Qemu-devel] [PATCH v2 20/20] target-mips: add MSA support to mips32r5-generic

2014-10-28 Thread Yongbok Kim
add MSA support to mips32r5-generic core definition Signed-off-by: Yongbok Kim --- target-mips/translate_init.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index 8fb8bf8..0b4b597 100644 --- a/target-mips/

[Qemu-devel] [PATCH v2 18/20] target-mips: add MSA MI10 format instructions

2014-10-28 Thread Yongbok Kim
add MSA MI10 format instructions update LSA and DLSA for MSA Signed-off-by: Yongbok Kim --- target-mips/helper.h|3 ++ target-mips/op_helper.c | 77 +++ target-mips/translate.c | 50 ++- 3 files changed, 129 inse

[Qemu-devel] [PATCH v2 17/20] target-mips: add MSA 2RF format instructions

2014-10-28 Thread Yongbok Kim
add MSA 2RF format instructions Signed-off-by: Yongbok Kim --- target-mips/helper.h | 17 ++ target-mips/msa_helper.c | 579 ++ target-mips/translate.c | 76 ++ 3 files changed, 672 insertions(+), 0 deletions(-) diff --git a/target-mips/

[Qemu-devel] [PATCH v2 14/20] target-mips: add MSA ELM format instructions

2014-10-28 Thread Yongbok Kim
add MSA ELM format instructions Signed-off-by: Yongbok Kim --- target-mips/helper.h | 10 +++ target-mips/msa_helper.c | 162 ++ target-mips/translate.c | 118 + 3 files changed, 290 insertions(+), 0 deletions(-

[Qemu-devel] [PATCH v2 16/20] target-mips: add MSA VEC/2R format instructions

2014-10-28 Thread Yongbok Kim
add MSA VEC/2R format instructions Signed-off-by: Yongbok Kim --- target-mips/helper.h | 12 target-mips/msa_helper.c | 140 ++ target-mips/translate.c | 113 + 3 files changed, 265 insertions(+), 0 del

[Qemu-devel] [PATCH v2 11/20] target-mips: add MSA I5 format instruction

2014-10-28 Thread Yongbok Kim
add MSA I5 format instructions Signed-off-by: Yongbok Kim --- target-mips/helper.h | 13 target-mips/msa_helper.c | 142 ++ target-mips/translate.c | 79 + 3 files changed, 234 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH v2 10/20] target-mips: add MSA I8 format instructions

2014-10-28 Thread Yongbok Kim
add MSA I8 format instructions Reviewed-by: James Hogan Signed-off-by: Yongbok Kim --- target-mips/helper.h | 10 + target-mips/msa_helper.c | 67 +++ target-mips/translate.c | 86 - 3 files changed, 161

[Qemu-devel] [PATCH v2 08/20] target-mips: add msa_helper.c

2014-10-28 Thread Yongbok Kim
add msa_helper.c Signed-off-by: Yongbok Kim --- target-mips/Makefile.objs |2 +- target-mips/msa_helper.c | 49 + 2 files changed, 50 insertions(+), 1 deletions(-) create mode 100644 target-mips/msa_helper.c diff --git a/target-mips/Makefile.o

[Qemu-devel] [PATCH v2 13/20] target-mips: add MSA 3R format instructions

2014-10-28 Thread Yongbok Kim
add MSA 3R format instructions Signed-off-by: Yongbok Kim --- target-mips/helper.h | 64 + target-mips/msa_helper.c | 628 ++ target-mips/translate.c | 244 ++ 3 files changed, 936 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH v2 19/20] disas/mips.c: disassemble MSA instructions

2014-10-28 Thread Yongbok Kim
disassemble MIPS SIMD Architecture instructions Signed-off-by: Yongbok Kim --- disas/mips.c | 716 +- 1 files changed, 714 insertions(+), 2 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index 4974bc0..2614c52 100644 --- a/disas/mi

[Qemu-devel] [PATCH v2 09/20] target-mips: add MSA branch instructions

2014-10-28 Thread Yongbok Kim
add MSA branch instructions Signed-off-by: Yongbok Kim --- target-mips/translate.c | 333 +++ 1 files changed, 219 insertions(+), 114 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index f1160aa..0df86cc 100644 --- a/targ

[Qemu-devel] [PATCH v2 05/20] target-mips: stop translation after ctc1

2014-10-28 Thread Yongbok Kim
stop translation as ctc1 instruction can change hflags Signed-off-by: Yongbok Kim --- target-mips/translate.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 9a8f5c9..b388ba5 100644 --- a/target-mips/translate.

[Qemu-devel] [PATCH v2 07/20] target-mips: add msa_reset(), global msa register

2014-10-28 Thread Yongbok Kim
add msa_reset() and global msa register (d type only) Signed-off-by: Yongbok Kim --- target-mips/translate.c | 56 ++ target-mips/translate_init.c | 35 ++ 2 files changed, 91 insertions(+), 0 deletions(-) diff --git a/tar

[Qemu-devel] [PATCH v2 15/20] target-mips: add MSA 3RF format instructions

2014-10-28 Thread Yongbok Kim
add MSA 3RF format instructions Signed-off-by: Yongbok Kim --- target-mips/helper.h | 42 ++ target-mips/msa_helper.c | 1497 ++ target-mips/translate.c | 162 + 3 files changed, 1701 insertions(+), 0 deletions(-) diff --git a/target-mips/

[Qemu-devel] [PATCH v2 06/20] target-mips: add MSA opcode enum

2014-10-28 Thread Yongbok Kim
add MSA opcode enum Reviewed-by: James Hogan Reviewed-by: Leon Alrae Signed-off-by: Yongbok Kim --- target-mips/translate.c | 245 +++ 1 files changed, 245 insertions(+), 0 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c

[Qemu-devel] [PATCH v2 01/20] target-mips: add MSA defines and data structure

2014-10-28 Thread Yongbok Kim
add defines and data structure for MIPS SIMD Architecture Signed-off-by: Yongbok Kim --- target-mips/cpu.h | 52 +- target-mips/mips-defs.h |1 + target-mips/op_helper.c |1 + 3 files changed, 52 insertions(+), 2 deletions(-) diff --gi

[Qemu-devel] [PATCH v2 03/20] target-mips: remove duplicated mips/ieee mapping function

2014-10-28 Thread Yongbok Kim
Signed-off-by: Yongbok Kim --- target-mips/cpu.h |4 target-mips/gdbstub.c |7 --- target-mips/op_helper.c |4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index fb5abda..6d3db79 100644 --- a/target-mips/cp

[Qemu-devel] [PATCH v2 12/20] target-mips: add MSA BIT format instructions

2014-10-28 Thread Yongbok Kim
add MSA BIT format instructions Signed-off-by: Yongbok Kim --- target-mips/helper.h | 13 +++ target-mips/msa_helper.c | 197 ++ target-mips/translate.c | 85 3 files changed, 295 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH v2 00/20] target-mips: add MSA module

2014-10-28 Thread Yongbok Kim
The following patchset implements MIPS SIMD Architecture module. MSA adds new instructions to MIPS Architecture that allow efficient parallel processing of vector operations. For more information refer to: MIPS Architecture Reference Manual Volume IV-j: The MIPS32 SIMD Architecture Module The docu

[Qemu-devel] [PATCH v2 02/20] target-mips: add MSA exceptions

2014-10-28 Thread Yongbok Kim
add MSA exceptions Signed-off-by: Yongbok Kim --- target-mips/helper.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/target-mips/helper.c b/target-mips/helper.c index c92b25c..3a93c20 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c @@ -426,6 +426

[Qemu-devel] [PATCH v2 04/20] target-mips: add 16, 64 bit load and store

2014-10-28 Thread Yongbok Kim
Signed-off-by: Yongbok Kim --- target-mips/op_helper.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 7cbf4cf..e878442 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -90,10 +90,10 @@ st

Re: [Qemu-devel] [Qemu-trivial] [PATCH] vmdk: Fix cylinders number during convert

2014-10-28 Thread Fam Zheng
On Tue, 10/28 16:00, Stefan Hajnoczi wrote: > On Thu, Oct 23, 2014 at 10:03:25AM +0200, Markus Armbruster wrote: > > Michael Tokarev writes: > > > > > On 10/22/2014 05:25 PM, Arthur Gautier wrote: > > >> We can not rely on int cast to get a correct number of cylinders. The > > >> cylinders inform

Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes

2014-10-28 Thread John Snow
On 10/28/2014 08:27 PM, Paolo Bonzini wrote: Yeah, I was wondering if any commands could have <512 bytes response... I sort of convinced myself that the answer was no for ATA commands, but stupidly forgot about packet (SCSI) commands. Their results are obviously shorter than 512 bytes.

Re: [Qemu-devel] [PATCH] virtio: link the rng backend through an alias property

2014-10-28 Thread Gonglei
On 2014/10/29 7:17, Paolo Bonzini wrote: > The virtio-rng backend is currently linked twice, once in > virtio-rng-pci/virtio-rng-ccw and once in virtio-rng-device. This > causes a double unref of the backend when the parent device is unplugged. > > To fix this, make virtio-rng-pci/virtio-rng-ccw

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-28 Thread Fam Zheng
On Tue, 10/28 17:03, Markus Armbruster wrote: > diff --git a/block/vmdk.c b/block/vmdk.c > index 673d3f5..91a42d2 100644 > --- a/block/vmdk.c > +++ b/block/vmdk.c > @@ -2225,6 +2225,7 @@ static BlockDriver bdrv_vmdk = { > .format_name = "vmdk", > .instance_size

Re: [Qemu-devel] Dirty block tracking : External file

2014-10-28 Thread Fam Zheng
On Tue, 10/28 09:52, Jd wrote: > Hi > We are looking for dirty block tracking feature in qemu/kvm for > implementing more efficient incremental backup. I saw some patches around > it, but from the conversation could not figure out if it is complete or not. > If it is complete, can some one poin

Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes

2014-10-28 Thread Paolo Bonzini
>> Yeah, I was wondering if any commands could have <512 bytes response... >> I sort of convinced myself that the answer was no for ATA commands, but >> stupidly forgot about packet (SCSI) commands. Their results are >> obviously shorter than 512 bytes. > > Are you referencing the sglist under

Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes

2014-10-28 Thread John Snow
On 10/28/2014 08:03 PM, Paolo Bonzini wrote: On 10/29/2014 12:54 AM, John Snow wrote: On 10/28/2014 09:51 AM, Stefan Hajnoczi wrote: On Wed, Oct 01, 2014 at 06:55:45PM -0400, John Snow wrote: Based off of feedback from the RFC of the same name, this series batches together a group of fix

Re: [Qemu-devel] nbd-server / monitor to copy files/directory in to running VM.

2014-10-28 Thread Paolo Bonzini
On 10/28/2014 06:02 PM, Jd wrote: > Hi > I see an option to start nbd-server from running VM via qemu monitor. > This is very useful. The option seems to allow sharing the disk with > read/write permission. Can I really export and use the nbd-served disk > from running vm in read/write ? Isnt t

Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes

2014-10-28 Thread Paolo Bonzini
On 10/29/2014 12:54 AM, John Snow wrote: > > > On 10/28/2014 09:51 AM, Stefan Hajnoczi wrote: >> On Wed, Oct 01, 2014 at 06:55:45PM -0400, John Snow wrote: >>> Based off of feedback from the RFC of the same name, >>> this series batches together a group of fixes that >>> improve the AHCI device

Re: [Qemu-devel] [PULL 00/28] Changes for 2014-10-27

2014-10-28 Thread Paolo Bonzini
On 10/28/2014 06:57 PM, Paolo Bonzini wrote: > > > On 10/28/2014 05:49 PM, Peter Maydell wrote: >> On 28 October 2014 16:40, Peter Maydell wrote: >>> I'm in the process of testing whether this is actually introduced >>> by this set of patches or if they just happened to disturb something >>> t

Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes

2014-10-28 Thread John Snow
On 10/28/2014 09:51 AM, Stefan Hajnoczi wrote: On Wed, Oct 01, 2014 at 06:55:45PM -0400, John Snow wrote: Based off of feedback from the RFC of the same name, this series batches together a group of fixes that improve the AHCI device to fix a number of bugs. A number of fixes included in the

Re: [Qemu-devel] [PATCH 10/20] target-mips: add MSA I8 format instructions

2014-10-28 Thread James Hogan
On Mon, Jul 14, 2014 at 10:55:53AM +0100, Yongbok Kim wrote: > add MSA I8 format instructions > > Signed-off-by: Yongbok Kim > --- > target-mips/helper.h | 11 > target-mips/msa_helper.c | 140 > ++ > target-mips/translate.c | 94 ++

Re: [Qemu-devel] configure fails if path contains spaces

2014-10-28 Thread Peter Maydell
On 28 October 2014 23:31, Liviu Ionescu wrote: > > On 28 Oct 2014, at 23:10, Peter Maydell wrote: > >> ... and make >> is notoriously bad at dealing with spaces in filenames. > > really? my Eclipse CDT based build plug-in generates makefiles > which have no problems dealing with spaces in file na

Re: [Qemu-devel] configure fails if path contains spaces

2014-10-28 Thread Liviu Ionescu
On 28 Oct 2014, at 23:10, Peter Maydell wrote: > ... and make > is notoriously bad at dealing with spaces in filenames. really? my Eclipse CDT based build plug-in generates makefiles which have no problems dealing with spaces in file names or folders. > I could be wrong though, so feel free

[Qemu-devel] [PATCH] virtio: link the rng backend through an alias property

2014-10-28 Thread Paolo Bonzini
The virtio-rng backend is currently linked twice, once in virtio-rng-pci/virtio-rng-ccw and once in virtio-rng-device. This causes a double unref of the backend when the parent device is unplugged. To fix this, make virtio-rng-pci/virtio-rng-ccw use an alias, similar to what is already being done

Re: [Qemu-devel] [PATCH 09/20] target-mips: add MSA branch instructions

2014-10-28 Thread James Hogan
Hi Yongbok, I know you're preparing another patchset, but thought I may as well continue reviewing this patchset until that one lands, sorry it's taken me a while to get round to it. On Mon, Jul 14, 2014 at 10:55:52AM +0100, Yongbok Kim wrote: > +static void determ_zero_element(TCGv tresult, uint

Re: [Qemu-devel] configure fails if path contains spaces

2014-10-28 Thread Peter Maydell
On 28 October 2014 20:33, Liviu Ionescu wrote: > I tried to build from git and configure fails, since the current > path contains spaces (a common situation on OS X). Two options here: (1) don't do that, then (2) submit a patch to fix things I suspect (2) will turn out to be somewhere between

[Qemu-devel] configure fails if path contains spaces

2014-10-28 Thread Liviu Ionescu
I tried to build from git and configure fails, since the current path contains spaces (a common situation on OS X). Regards, Liviu

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-28 Thread Jeff Cody
On Tue, Oct 28, 2014 at 12:56:37PM -0600, Eric Blake wrote: > On 10/28/2014 12:29 PM, Jeff Cody wrote: > > >>> This patch is RFC because of open questions: > >>> > >>> * Should tools warn, too? Probing isn't insecure there, but a "this > >>> may pick a different format in the future" warning ma

[Qemu-devel] [PATCH 4/5] target-arm/translate.c: Don't pass CPUARMState around in the decoder

2014-10-28 Thread Peter Maydell
Passing the CPUARMState around in the decoder is a recipe for bugs where we accidentally generate code that depends on CPU state which isn't reflected in the TB flags. Stop doing this and instead use DisasContext as a way to pass around those bits of CPU state which are known to be safe to use. Th

[Qemu-devel] [PATCH 2/5] target-arm/translate.c: Use arm_dc_feature() rather than arm_feature()

2014-10-28 Thread Peter Maydell
Use arm_dc_feature() rather than arm_feature() to avoid using CPUARMState unnecessarily. Signed-off-by: Peter Maydell --- target-arm/translate.c | 140 - 1 file changed, 80 insertions(+), 60 deletions(-) diff --git a/target-arm/translate.c b/targe

[Qemu-devel] [PATCH 1/5] target-arm/translate.c: Use arm_dc_feature() in ENABLE_ARCH_ macros

2014-10-28 Thread Peter Maydell
All the places where we use the ENABLE_ARCH_* and ARCH() macros have a DisasContext* s, so switch them over to use arm_dc_feature() rather than arm_feature() so we don't need to pass the CPUARMState* env around too. Signed-off-by: Peter Maydell --- target-arm/translate.c | 16 1

[Qemu-devel] [PATCH 0/5] target-arm: Avoid passing CPUARMState around the decoder

2014-10-28 Thread Peter Maydell
This is a set of cleanup patches which avoid passing CPUARMState around the decoder unnecessarily, since we were pretty much only using it to check feature bits, which we now also have in the DisasContext structure. We still pass CPUARMState into disas_thumb_insn() and disas_thumb2_insn() purely s

[Qemu-devel] [PATCH 3/5] target-arm/translate.c: Don't use IS_M()

2014-10-28 Thread Peter Maydell
Instead of using IS_M(), use arm_dc_feature(s, ARM_FEATURE_M), so we don't need to pass CPUARMState pointers around the decoder. Signed-off-by: Peter Maydell --- target-arm/translate.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/target-arm/translate.c

[Qemu-devel] [PATCH 5/5] target-arm/translate.c: Don't pass CPUARMState * to disas_arm_insn()

2014-10-28 Thread Peter Maydell
Refactor to avoid passing a CPUARMState * to disas_arm_insn(). To do this we move the "read insn from memory" code to the callsite and pass the insn to the function instead. Signed-off-by: Peter Maydell --- target-arm/translate.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-28 Thread Eric Blake
On 10/28/2014 12:29 PM, Jeff Cody wrote: >>> This patch is RFC because of open questions: >>> >>> * Should tools warn, too? Probing isn't insecure there, but a "this >>> may pick a different format in the future" warning may be >>> appropriate. >> >> Yes. For precedent, libvirt can be consid

Re: [Qemu-devel] [PATCH v7 09/32] target-arm: add banked register accessors

2014-10-28 Thread Greg Bellows
On 24 October 2014 11:37, Peter Maydell wrote: > On 21 October 2014 17:55, Greg Bellows wrote: > > From: Fabian Aggeler > > > > If EL3 is in AArch32 state certain cp registers are banked (secure and > > non-secure instance). When reading or writing to coprocessor registers > > the following mac

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-28 Thread Jeff Cody
On Tue, Oct 28, 2014 at 05:03:40PM +0100, Markus Armbruster wrote: > If the user neglects to specify the image format, QEMU probes the > image to guess it automatically, for convenience. > > Relying on format probing is insecure for raw images (CVE-2008-2004). > If the guest writes a suitable head

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-28 Thread Jeff Cody
On Tue, Oct 28, 2014 at 11:02:56AM -0600, Eric Blake wrote: > On 10/28/2014 10:03 AM, Markus Armbruster wrote: > > If the user neglects to specify the image format, QEMU probes the > > image to guess it automatically, for convenience. > > > > Relying on format probing is insecure for raw images (C

Re: [Qemu-devel] [PULL 00/28] Changes for 2014-10-27

2014-10-28 Thread Paolo Bonzini
On 10/28/2014 05:49 PM, Peter Maydell wrote: > On 28 October 2014 16:40, Peter Maydell wrote: >> I'm in the process of testing whether this is actually introduced >> by this set of patches or if they just happened to disturb something >> to the point where it caused glibc on the 32 bit box to co

Re: [Qemu-devel] [PATCH v3 0/5] vmware-vga: fix CVE-2014-3689

2014-10-28 Thread Don Koch
On Tue, 28 Oct 2014 10:50:37 +0100 Gerd Hoffmann wrote: > Hi, > > vmware-vga emulation lacks sanity checks in the hardware acceleration > (blit + fill) functions. This patch series plugs the holes. > > v3 changes: > * throw badcmd errors in case the rectangles fail the sanity checks. > v2 c

Re: [Qemu-devel] [PATCH v3 4/5] vmware-vga: use vmsvga_verify_rect in vmsvga_copy_rect

2014-10-28 Thread Don Koch
On Tue, 28 Oct 2014 10:50:41 +0100 Gerd Hoffmann wrote: > Add verification to vmsvga_copy_rect, re-enable HW_RECT_ACCEL. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Don Koch > hw/display/vmware_vga.c | 20 ++-- > 1 file changed, 14 insert

Re: [Qemu-devel] [PATCH v3 5/5] vmware-vga: use vmsvga_verify_rect in vmsvga_fill_rect

2014-10-28 Thread Don Koch
On Tue, 28 Oct 2014 10:50:42 +0100 Gerd Hoffmann wrote: > Add verification to vmsvga_fill_rect, re-enable HW_FILL_ACCEL. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Don Koch > hw/display/vmware_vga.c | 17 ++--- > 1 file changed, 10 insertion

Re: [Qemu-devel] Better Cortex-M support?

2014-10-28 Thread Peter Maydell
On 28 October 2014 16:38, Liviu Ionescu wrote: > I'm not sure what the QEMU definition of '-machine' stands for, a device > or a board, but I think that the ARM definitions are good candidates for > QEMU emulation names. -machine specifies a board name. We don't care how you build the binary for

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-28 Thread Eric Blake
On 10/28/2014 10:03 AM, Markus Armbruster wrote: > If the user neglects to specify the image format, QEMU probes the > image to guess it automatically, for convenience. > > Relying on format probing is insecure for raw images (CVE-2008-2004). > If the guest writes a suitable header to the device,

[Qemu-devel] nbd-server / monitor to copy files/directory in to running VM.

2014-10-28 Thread Jd
Hi I see an option to start nbd-server from running VM via qemu monitor. This is very useful. The option seems to allow sharing the disk with read/write permission. Can I really export and use the nbd-served disk from running vm in read/write ? Isnt there a risk for corrupting the file syste

[Qemu-devel] Dirty block tracking : External file

2014-10-28 Thread Jd
Hi We are looking for dirty block tracking feature in qemu/kvm for implementing more efficient incremental backup. I saw some patches around it, but from the conversation could not figure out if it is complete or not. If it is complete, can some one point to the branch / label from which I

Re: [Qemu-devel] [PULL 00/28] Changes for 2014-10-27

2014-10-28 Thread Peter Maydell
On 28 October 2014 16:40, Peter Maydell wrote: > I'm in the process of testing whether this is actually introduced > by this set of patches or if they just happened to disturb something > to the point where it caused glibc on the 32 bit box to complain. It does seem to also be present in master.

Re: [Qemu-devel] [PATCH v4 7/7] iotests: Expand test 061

2014-10-28 Thread Max Reitz
On 2014-10-28 at 17:38, Kevin Wolf wrote: Am 27.10.2014 um 11:12 hat Max Reitz geschrieben: Add some tests for progress output to 061. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Benoît Canet diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index 9bbd5d3..6e

Re: [Qemu-devel] [PATCH RFC 1/2] block: Factor bdrv_probe_all() out of find_image_format()

2014-10-28 Thread Jeff Cody
On Tue, Oct 28, 2014 at 05:03:39PM +0100, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > block.c | 45 - > 1 file changed, 32 insertions(+), 13 deletions(-) > > diff --git a/block.c b/block.c > index 88f6d9b..8da6e61 100644 > --- a

Re: [Qemu-devel] [PULL 00/28] Changes for 2014-10-27

2014-10-28 Thread Peter Maydell
On 27 October 2014 15:13, Paolo Bonzini wrote: > The following changes since commit e40830afa1cff3ffdc37bdfdd40d80860074636c: > > Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2014-10-22-tag' > into staging (2014-10-22 21:42:33 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH v4 0/7] block/qcow2: Improve zero cluster expansion

2014-10-28 Thread Kevin Wolf
Am 27.10.2014 um 11:12 hat Max Reitz geschrieben: > The main purpose of this series is to add a progress report to > qemu-img amend. This is achieved by adding a callback function to > bdrv_amend_options() - the reasons for this choice are explained in > patch 1. > > While adapting qcow2's expand_

Re: [Qemu-devel] Better Cortex-M support?

2014-10-28 Thread Liviu Ionescu
On 28 Oct 2014, at 17:38, Peter Maydell wrote: > It is simply not possible to avoid being specific here. QEMU > insists that you say which machine model you want to run on, > and the Cortex-M3 CPU itself does not define all the properties > of a machine. > > If your test code really restricts i

Re: [Qemu-devel] [PATCH v4 7/7] iotests: Expand test 061

2014-10-28 Thread Kevin Wolf
Am 27.10.2014 um 11:12 hat Max Reitz geschrieben: > Add some tests for progress output to 061. > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > Reviewed-by: Benoît Canet > diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group > index 9bbd5d3..6e67da4 100644 > --- a/tests/qem

Re: [Qemu-devel] [PATCH RFC 1/2] block: Factor bdrv_probe_all() out of find_image_format()

2014-10-28 Thread Eric Blake
On 10/28/2014 10:03 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > block.c | 45 - > 1 file changed, 32 insertions(+), 13 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virt

[Qemu-devel] [PATCH] Simple performance logging and network limiting based on trace option

2014-10-28 Thread Harald Schieche
diff --git a/block/raw-posix.c b/block/raw-posix.c index 475cf74..3c5cc71 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -1031,6 +1031,27 @@ static int aio_worker(void *arg) return ret; } +static void log_guest_storage_performance(void) +{ +/* + * Performance logging isn'

Re: [Qemu-devel] [PATCH 0/2] block: JSON filenames and relative backing files

2014-10-28 Thread Stefan Hajnoczi
On Thu, Oct 23, 2014 at 04:56:13PM +0200, Max Reitz wrote: > Sometimes, qemu does not have a filename to work with (it then generates > a JSON filename), so it does not know which directory to use for a > backing file specified by a relative filename. > > In this case, qemu should not somehow try

[Qemu-devel] [PATCH RFC 1/2] block: Factor bdrv_probe_all() out of find_image_format()

2014-10-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- block.c | 45 - 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/block.c b/block.c index 88f6d9b..8da6e61 100644 --- a/block.c +++ b/block.c @@ -644,11 +644,40 @@ BlockDriver *bdrv_find_protocol(const

Re: [Qemu-devel] Help wanted: QEMU Advent Calendar 2014 extravaganza

2014-10-28 Thread Stefan Hajnoczi
On Thu, Oct 23, 2014 at 03:08:02PM +0200, Gerd Hoffmann wrote: > Hi, > > > Disk images: > > * Need a disk image for each day: 1-25 December > > * Must be freely redistributable (i.e. no proprietary license that > > prevents distribution) > > * Ideally under 100 MB per disk image > > * Please

[Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-10-28 Thread Markus Armbruster
If the user neglects to specify the image format, QEMU probes the image to guess it automatically, for convenience. Relying on format probing is insecure for raw images (CVE-2008-2004). If the guest writes a suitable header to the device, the next probe will recognize a format chosen by the guest.

[Qemu-devel] [PATCH RFC 0/2] block: Warn on insecure format probing

2014-10-28 Thread Markus Armbruster
The meat is in PATCH 2. Its commit message could use even more detail, but I want to get this out for discussion. Prompted by the discussion we had back in August: https://lists.nongnu.org/archive/html/qemu-devel/2014-08/msg02456.html Markus Armbruster (2): block: Factor bdrv_probe_all() out o

Re: [Qemu-devel] [Qemu-trivial] [PATCH] vmdk: Fix cylinders number during convert

2014-10-28 Thread Stefan Hajnoczi
On Thu, Oct 23, 2014 at 10:03:25AM +0200, Markus Armbruster wrote: > Michael Tokarev writes: > > > On 10/22/2014 05:25 PM, Arthur Gautier wrote: > >> We can not rely on int cast to get a correct number of cylinders. The > >> cylinders information was wrong in 49.% of cases. > >> > >> This en

Re: [Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices

2014-10-28 Thread Greg Kurz
On Tue, 7 Oct 2014 16:40:01 +0200 Cornelia Huck wrote: > Introduce a helper function to indicate whether a virtio device is > operating in legacy or virtio standard mode. > > It may be used to make decisions about the endianess of virtio accesses > and other virtio-1 specific changes, enabling

Re: [Qemu-devel] Better Cortex-M support?

2014-10-28 Thread Peter Maydell
On 28 October 2014 15:22, Liviu Ionescu wrote: > On 28 Oct 2014, at 17:03, Peter Maydell wrote: >> existing stellaris boards a bit more flexible, so they honour >> the command line '-m' option to specify the SRAM size; > > thank you, I'll consider this, but generally I would like to avoid > makin

Re: [Qemu-devel] [PATCHv3 3/6] block: add a knob to disable multiwrite_merge

2014-10-28 Thread Eric Blake
On 10/25/2014 10:55 AM, Peter Lieven wrote: > The block layer silently merges write requests since > commit 40b4f539. This patch adds a knob to disable > this feature as there has been some discussion lately > if multiwrite is a good idea at all and as it falsifies > benchmarks. > > Signed-off-by:

Re: [Qemu-devel] [PATCH RFC 07/11] dataplane: allow virtio-1 devices

2014-10-28 Thread Greg Kurz
On Tue, 7 Oct 2014 16:40:03 +0200 Cornelia Huck wrote: > Handle endianness conversion for virtio-1 virtqueues correctly. > > Note that dataplane now needs to be built per-target. > It also affects hw/virtio/virtio-pci.c: In file included from include/hw/virtio/dataplane/vring.h:23:0,

Re: [Qemu-devel] Better Cortex-M support?

2014-10-28 Thread Liviu Ionescu
On 28 Oct 2014, at 17:03, Peter Maydell wrote: > existing stellaris boards a bit more flexible, so they honour > the command line '-m' option to specify the SRAM size; thank you, I'll consider this, but generally I would like to avoid making my plug-in configuration specific for a certain ven

Re: [Qemu-devel] [PATCH v7 10/32] target-arm: add non-secure Translation Block flag

2014-10-28 Thread Greg Bellows
On 24 October 2014 11:40, Peter Maydell wrote: > On 21 October 2014 17:55, Greg Bellows wrote: > > From: Sergey Fedorov > > > > This patch is based on idea found in patch at > > git://github.com/jowinter/qemu-trustzone.git > > f3d955c6c0ed8c46bc0eb10b634201032a651dd2 by > > Johannes Winter . >

Re: [Qemu-devel] [PATCH bugfix] snapshot: add bdrv_drain_all() to bdrv_snapshot_delete() to avoid concurrency problem

2014-10-28 Thread Stefan Hajnoczi
On Tue, Oct 21, 2014 at 04:38:01PM +0800, Zhang Haoyu wrote: > If there are still pending i/o while deleting snapshot, > because deleting snapshot is done in non-coroutine context, and > the pending i/o read/write (bdrv_co_do_rw) is done in coroutine context, > so it's possible to cause concurrency

Re: [Qemu-devel] [PATCH v3 1/1] virtio: serial: expose a 'guest_writable' callback for users

2014-10-28 Thread Marc-André Lureau
Reviewed-by: Marc-André Lureau I have a somewhat related question, that perhaps someone may help me with: Why isn't the qemu char driver/device interface based (for most devices) on socketpair (and equivalent bi-directional pipe on other OS). It looks to me like it could simplify API and event h

Re: [Qemu-devel] [PATCH] block: fix implicit convertion to invalid type

2014-10-28 Thread Stefan Hajnoczi
On Thu, Oct 16, 2014 at 02:10:06PM +0200, Igor Mammedov wrote: > change type of variable to expected IoOperationType which fixes compile > warning: > > block.c:3655:20: warning: implicit conversion from enumeration > type enum IoOperationType to different enumeration type BlockErrorAction > > Si

Re: [Qemu-devel] [PATCH] block.c: Fix type of IoOperationType variable in send_qmp_error_event()

2014-10-28 Thread Stefan Hajnoczi
On Fri, Oct 10, 2014 at 08:33:03PM +0100, Peter Maydell wrote: > The local variable 'ac' in send_qmp_error_event() is declared with the > wrong type, which causes clang to complain when it is initialized > and again when it is used: > > block.c:3655:20: warning: implicit conversion from enumeratio

Re: [Qemu-devel] [PATCH] rbd: Add support for bdrv_invalidate_cache

2014-10-28 Thread Stefan Hajnoczi
On Thu, Oct 09, 2014 at 11:44:32AM -0700, adamcr...@gmail.com wrote: > From: Adam Crume > > This fixes Ceph issue 2467. > > Signed-off-by: Adam Crume > --- > block/rbd.c | 16 > 1 file changed, 16 insertions(+) Added URL to commit description and dropped return statement as

Re: [Qemu-devel] Better Cortex-M support?

2014-10-28 Thread Peter Maydell
On 28 October 2014 14:59, Peter Maydell wrote: > On 28 October 2014 14:50, Liviu Ionescu wrote: >> I'll probably make a branch and see if I can bring back >> -cpu cortex-m3, otherwise I'll add a virtual cortex-m3 >> 'machine', so I can run my tests. > > Pick some real hardware to model, please.

Re: [Qemu-devel] [PATCH v5] Support vhd type VHD_DIFFERENCING

2014-10-28 Thread Stefan Hajnoczi
On Wed, Oct 08, 2014 at 08:42:32PM +0800, Xiaodong Gong wrote: > Now qemu only supports vhd type VHD_FIXED and VHD_DYNAMIC, so qemu > can't read snapshot volume of vhd, and can't support other storage > features of vhd file. > > This patch add read parent information in function "vpc_open", read >

Re: [Qemu-devel] Better Cortex-M support?

2014-10-28 Thread Peter Maydell
On 28 October 2014 14:50, Liviu Ionescu wrote: > > On 28 Oct 2014, at 16:40, Peter Maydell wrote: > >> There's no such thing as a "generic Cortex-M3 emulation". >> We model actual hardware (though in this case not a very >> useful set of boards). > > at least for now I do not plan to go into emul

Re: [Qemu-devel] [PATCH 2/2] spice-char: notify the server when chardev is writable

2014-10-28 Thread Amit Shah
On (Mon) 27 Oct 2014 [17:32:31], Marc-André Lureau wrote: > On Mon, Oct 27, 2014 at 1:43 PM, Amit Shah wrote: > > > Great, so there's no other change required to actually use the > > functionality in my patch? Does my patch fit your need fine, or do > > you need to tweak the notification somehow

  1   2   >