Re: [Qemu-devel] Security for QCOW2 format

2014-11-07 Thread Fam Zheng
On Sat, 11/08 00:32, Halsey Pian wrote: > Dear All, > > > > Nice to know all of you! > > > > Recently, I am reading codes of qcow2 format, in order to switch > virtualization solution in my project from VMWare to KVM for more specific > customization based on customer's requirements. > >

Re: [Qemu-devel] Bug#768517: qemu-system-x86: virtio-scsi unreliable - crashes and write failures

2014-11-07 Thread Michael Tokarev
[I forgot to add one comment] 08.11.2014 07:32, Michael Tokarev wrote: > Control: tag -1 + moreinfo confirmed > > [Adding qemu-devel@] > > 08.11.2014 04:28, Ray Kohler wrote: >> >> virtio-scsi is quite unreliable compared to the version in wheezy. I see >> many crashes, with this output: >> >> q

Re: [Qemu-devel] Bug#768517: qemu-system-x86: virtio-scsi unreliable - crashes and write failures

2014-11-07 Thread Michael Tokarev
Control: tag -1 + moreinfo confirmed [Adding qemu-devel@] 08.11.2014 04:28, Ray Kohler wrote: > Package: qemu-system-x86 > Version: 2.1+dfsg-5+b1 > Severity: normal > > virtio-scsi is quite unreliable compared to the version in wheezy. I see > many crashes, with this output: > > qemu-system-x86

Re: [Qemu-devel] What "opaque" stand for?

2014-11-07 Thread Erik de Castro Lopo
Kaiyuan wrote: > and its meaning confuse me. What does "opaque" stand for? Opaque is normal everyday word in English. Its dictionary meaning is here: http://dictionary.reference.com/browse/opaque In the context of code code you posted, opaque means that the code gets passed a pointer to som

[Qemu-devel] [PATCH v2 1/2] PPC: e500: Move CCSR definition to params

2014-11-07 Thread Alexander Graf
We want to have different MMIO region offsets for the mpc8544ds machine and our e500 PV machine, so move the definitions of those into the machine specific params struct. Signed-off-by: Alexander Graf --- v1 -> v2: - make pci pio window device tree exposure dynamic --- hw/ppc/e500.c |

[Qemu-devel] [PATCH v2 0/2] PPC: e500: Support more RAM

2014-11-07 Thread Alexander Graf
The e500 target today only supports 3.5GB of guest RAM. This can be too little depending on your use case, so this patch set increases that limit to a whopping 63.5GB! Of course this change is too intrusive for 2.2, so I'm posting this explicitly for 2.3. v1 -> v2: - make pci pio window device

[Qemu-devel] [PATCH v2 2/2] PPC: e500: Move CCSR and MMIO space to upper end of address space

2014-11-07 Thread Alexander Graf
On e500 we're basically guaranteed to have 36bits of physical address space available for our enjoyment. Older chips (like the mpc8544) only had 32bits, but everything from e500v2 onwards bumped it up. It's reasonably safe to assume that if you're using the PV machine, your guest kernel is configu

[Qemu-devel] [Bug 712416] Re: kvm_intel kernel module crash with via nano vmx

2014-11-07 Thread Timothy
I can confirm this is still an issue. I have tried myself with this and it crashes the whole system and has to be rebooted again to even get it useable again. ** Changed in: linux (Ubuntu) Status: Incomplete => Confirmed -- You received this bug notification because you are a member of qe

Re: [Qemu-devel] [Qemu-ppc] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-07 Thread Alexander Graf
On 07.11.14 22:18, Alexander Graf wrote: > Memory slots have to be page aligned to get entered into KVM. There > is existing logic that tries to ensure that we pad memory slots that > are not page aligned to the biggest region that would still fit in the > alignment requirements. > > Unfortunate

[Qemu-devel] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-07 Thread Alexander Graf
Memory slots have to be page aligned to get entered into KVM. There is existing logic that tries to ensure that we pad memory slots that are not page aligned to the biggest region that would still fit in the alignment requirements. Unfortunately, that logic is broken. It tries to calculate the sta

Re: [Qemu-devel] [PATCH] mips: Set the CP0.Config3.DSP and CP0.Config3.DSP2P bits

2014-11-07 Thread Maciej W. Rozycki
On Fri, 7 Nov 2014, Leon Alrae wrote: > >> I was considering making mips32r5-generic less artificial and slowly > >> evolve it towards some existing MIPS32R5 CPU, for example P5600 (which > >> supports MSA, but doesn't support DSP ASE). Furthermore, none from the > >> latest MIPS CPUs supports bot

Re: [Qemu-devel] [PATCH] qapi: Complete BlkdebugEvent

2014-11-07 Thread Max Reitz
On 07.11.2014 21:57, Eric Blake wrote: On 11/07/2014 04:51 PM, Max Reitz wrote: Several events were missing from the QAPI enum, add them. Reported-by: Kevin Wolf Signed-off-by: Max Reitz --- qapi/block-core.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Do we need any docum

Re: [Qemu-devel] [PATCH] qapi: Complete BlkdebugEvent

2014-11-07 Thread Eric Blake
On 11/07/2014 04:51 PM, Max Reitz wrote: > Several events were missing from the QAPI enum, add them. > > Reported-by: Kevin Wolf > Signed-off-by: Max Reitz > --- > qapi/block-core.json | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Do we need any documentation on these? Or is this

[Qemu-devel] [PATCH 2.2 2/2] target-xtensa: add entry overflow test

2014-11-07 Thread Max Filippov
Check that entry instruction raises window overflow exception when PS.CALLINC points to live registers. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_windowed.S | 51 1 file changed, 51 insertions(+) diff --git a/tests/tcg/xtensa/test_windowed.S

[Qemu-devel] [PATCH 2.2 0/2] target-xtensa: fix missing window check in entry

2014-11-07 Thread Max Filippov
Hi, this series fixes missing window check in the entry opcode and adds a test for it. Max Filippov (2): target-xtensa: add missing window check for entry target-xtensa: add entry overflow test target-xtensa/cpu.h | 6 + target-xtensa/op_helper.c| 6 + tests/t

[Qemu-devel] [PATCH 2.2 1/2] target-xtensa: add missing window check for entry

2014-11-07 Thread Max Filippov
Entry opcode needs to check if moving to new register frame would cause register window overflow. Entry used in function prologue never overflows because preceding windowed call* opcode writes return address to the target register window frame, causing overflow exceptions at the point of call. But

Re: [Qemu-devel] [PATCH] mips: Set the CP0.Config3.DSP and CP0.Config3.DSP2P bits

2014-11-07 Thread Leon Alrae
On 07/11/14 17:36, Maciej W. Rozycki wrote: > On Fri, 7 Nov 2014, Leon Alrae wrote: > >>> I have been working with the current trunk, the change applies >>> correctly there AFAICT. >> >> 55a2201 commit added (1 << CP0C3_MSAP) to CP0_Config3 for >> mips32r5-generic which is not present on your pa

Re: [Qemu-devel] Add CMP2 instruction

2014-11-07 Thread Andreas Schwab
"Guo, Lei" writes: > @@ -2847,6 +2920,7 @@ void register_m68k_insns (CPUM68KState *env) > INSN(bitop_reg, 01c0, f1c0, CF_ISA_A); > INSN(arith_im, 0280, fff8, CF_ISA_A); > INSN(byterev, 02c0, fff8, CF_ISA_APLUSC); > +INSN(cmp2, 02c0, , CF_ISA_A); My copy of the CFPR

[Qemu-devel] [PATCH v2] mips: Correct MIPS16/microMIPS branch size calculation

2014-11-07 Thread Maciej W. Rozycki
Correct MIPS16/microMIPS branch size calculation in PC adjustment needed: - to set the value of CP0.ErrorEPC at the entry to the reset exception, - for the purpose of branch reexecution in the context of device I/O. Follow the approach taken in `exception_resume_pc' for ordinary, Debug and NMI

[Qemu-devel] [PATCH v2 8/9] qemu-iotests: Fix stderr handling in common.qemu

2014-11-07 Thread Kevin Wolf
The original intention was to pipe stderr of qemu into $fifo_out. However, the redirections were specified in the wrong order for this. This patch fixes it. Now qemu's output on stderr can be retrieved with _send_qemu_cmd, which applies several useful filters on the output that were missing before

[Qemu-devel] [PATCH v2 4/9] qtests: Specify image format explicitly

2014-11-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/ahci-test.c | 3 ++- tests/bios-tables-test.c | 2 +- tests/drive_del-test.c| 2 +- tests/fdc-test.c | 2 +- tests/hd-geo-test.c | 2 +- tests/i440fx-test.c | 5 +++-- tests/ide-test.c | 9 + tests/nvme-test.c

[Qemu-devel] [PATCH v2 7/9] raw: Prohibit dangerous writes for probed images

2014-11-07 Thread Kevin Wolf
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 v2 9/9] qemu-iotests: Test writing non-raw image headers to raw image

2014-11-07 Thread Kevin Wolf
This is forbidden if the raw driver was probed. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/109 | 100 ++ tests/qemu-iotests/109.out | 149 + tests/qemu-iotests/group | 1 + 3 files changed, 250 insertions(+) c

[Qemu-devel] [PATCH v2 3/9] qemu-iotests: Add qemu-io format option in Python tests

2014-11-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/030 | 22 +++--- tests/qemu-iotests/040 | 32 tests/qemu-iotests/055 | 18 +- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iote

[Qemu-devel] [PATCH v2 5/9] block: Factor bdrv_probe_all() out of find_image_format()

2014-11-07 Thread Kevin Wolf
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- block.c | 45 - 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/block.c b/block.c index 4b5735c..2fdc33f 100644 --- a/block.c +++ b/block.c @@ -648

[Qemu-devel] [PATCH v2 6/9] block: Read only one sector for format probing

2014-11-07 Thread Kevin Wolf
The only image format driver that even potentially accesses anything after 512 bytes in its bdrv_probe() implementation is VMDK, which reads a plain-text descriptor file. In practice, the field it's looking for seems to come first and will be well within the first 512 bytes, too. Signed-off-by: Ke

[Qemu-devel] [PATCH v2 1/9] qemu-io: Allow explicitly specifying format

2014-11-07 Thread Kevin Wolf
This adds a -f option to qemu-io which allows to explicitly specify the block driver to use for the given image. Signed-off-by: Kevin Wolf --- qemu-io.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 60f84dd..91a445a

[Qemu-devel] [PATCH v2 2/9] qemu-iotests: Use qemu-io -f $IMGFMT

2014-11-07 Thread Kevin Wolf
This patch changes $QEMU_IO so that all tests by default pass a format argument to qemu-io. There are a few cases where -f $IMGFMT is not wanted because it selects the wrong driver or json: filenames including a driver are used. They are changed to use $QEMU_IO_PROG, which doesn't include any opti

[Qemu-devel] [PATCH v2 0/9] raw: Prohibit dangerous writes for probed images

2014-11-07 Thread Kevin Wolf
See the commit message of patch 7 for the why and how. This series will probably be only part of the solution and doesn't mean that we should stop looking for other patches which improve different parts of the problem. See the mailing list thread "Image probing: how it can be insecure, and what we

Re: [Qemu-devel] [PATCHv3] seccomp: change configure to avoid arm 32 to break

2014-11-07 Thread Paul Moore
On Friday, November 07, 2014 10:05:44 AM Eduardo Otubo wrote: > Current stable version of libseccomp (2.1.1) only supports i386 and > x86_64 archs correctly. This patch limits the usage of the syscall > filter for those archs and updates to the correct last version of > libseccomp. > > This patch

Re: [Qemu-devel] [PATCH] mips: Set the CP0.Config3.DSP and CP0.Config3.DSP2P bits

2014-11-07 Thread Maciej W. Rozycki
On Fri, 7 Nov 2014, Leon Alrae wrote: > > I have been working with the current trunk, the change applies > > correctly there AFAICT. > > 55a2201 commit added (1 << CP0C3_MSAP) to CP0_Config3 for > mips32r5-generic which is not present on your patch. Indeed, my mistake for some reason. > > I

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-07 Thread Jeff Cody
On Fri, Nov 07, 2014 at 04:21:38PM +0100, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 06.11.2014 um 14:57 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > Am 04.11.2014 um 19:45 hat Markus Armbruster geschrieben: > >> >> I'll try to explain all solutions fairly.

[Qemu-devel] [Bug 1387881] Re: qemu fails to recognize full virtualization

2014-11-07 Thread Iggy
Nested on Intel should be much improved in newer kernel versions (especially with regard to nested ept as the original report seems to indicate is in use. So if the original emulation failure is reproducible, I'd suggest testing on a newer kernel. -- You received this bug notification because yo

Re: [Qemu-devel] [PATCH 1/3] vl: fix max_cpus check

2014-11-07 Thread Eduardo Habkost
On Fri, Nov 07, 2014 at 05:04:38PM +0100, Andrew Jones wrote: > We should confirm max_cpus, which is >= smp_cpus, is > <= the machine's true max_cpus, not just smp_cpus. > > Signed-off-by: Andrew Jones Reviewed-by: Eduardo Habkost I was sure I had fixed this before. But it looks like my patche

[Qemu-devel] [PULL 3/7] mips: Add macros for CP0.Config3 and CP0.Config4 bits

2014-11-07 Thread Leon Alrae
From: "Maciej W. Rozycki" Define macros for CP0.Config3 and CP0.Config4 bits. These used to be exhaustive as at MIPS32r3, but more bits may have been added since. Signed-off-by: Maciej W. Rozycki Signed-off-by: Leon Alrae --- target-mips/cpu.h | 13 + 1 file changed, 13 insertion

[Qemu-devel] [PULL 6/7] mips: Ensure PC update with MTC0 single-stepping

2014-11-07 Thread Leon Alrae
From: "Maciej W. Rozycki" Correct the way PC is updated when single-stepping instructions, by keeping the old PC only for the BS_EXCP (exception condition) state. Some MTC0 (and possibly other) instructions switch to the BS_STOP state to terminate the current translation block, so that the state

[Qemu-devel] [PULL 5/7] target-mips: fix for missing delay slot in BC1EQZ and BC1NEZ

2014-11-07 Thread Leon Alrae
New R6 COP1 conditional branches currently don't have delay slot. Fixing this by setting MIPS_HFLAG_BDS32 flag which is required for branches having 4-byte delay slot. Signed-off-by: Leon Alrae Reviewed-by: Yongbok Kim --- target-mips/translate.c | 1 + 1 file changed, 1 insertion(+) diff --gi

[Qemu-devel] [PULL 4/7] mips: Set the CP0.Config3.DSP and CP0.Config3.DSP2P bits

2014-11-07 Thread Leon Alrae
From: "Maciej W. Rozycki" Set the CP0.Config3.DSP2P bit for the 74kf processor and both that bit and the CP0.Config3.DSP bit for the artificial mips32r5-generic and mips64dspr2 processors. They have the DSPr2 ASE enabled in `insn_flags' and CPUs that implement that ASE need to have both CP0.Conf

[Qemu-devel] [PULL 1/7] mips: Remove CONFIG_VT82C686 from non-Fulong configs

2014-11-07 Thread Leon Alrae
From: "Maciej W. Rozycki" Fix the regression introduced with commit 47934d0aadc075b05ce2d9e8a44fa6a46edd1afa [hw: move ISA bridges and devices to hw/isa/, configure with default-configs/], by removing CONFIG_VT82C686 from configurations that previously did not enable it. That southbridge is only

[Qemu-devel] [PULL 2/7] mips: Respect CP0.Status.CU1 for microMIPS FP branches

2014-11-07 Thread Leon Alrae
From: "Maciej W. Rozycki" Make microMIPS FP branches respect CP0.Status.CU1 and trap with a Coprocessor Unusable exception if COP1 has been disabled; also trap if no FPU is present at all. Standard MIPS FP instruction encodings have a more regular structure and branches are covered with a single

[Qemu-devel] [PULL 7/7] target-mips: fix multiple TCG registers covering same data

2014-11-07 Thread Leon Alrae
From: Yongbok Kim Avoid to allocate different TCG registers for the FPU registers that are mapped on the MSA vectore registers. Signed-off-by: Yongbok Kim Reviewed-by: Richard Henderson Signed-off-by: Leon Alrae --- target-mips/translate.c | 8 +++- 1 file changed, 3 insertions(+), 5 del

[Qemu-devel] [PULL 0/7] target-mips queue

2014-11-07 Thread Leon Alrae
://github.com/lalrae/qemu.git tags/mips-20141107 for you to fetch changes up to cb269f273fdbdb26ddb1cba4a0fe2249418a8e77: target-mips: fix multiple TCG registers covering same data (2014-11-07 14:15:28 +) MIPS patches 2014-11

Re: [Qemu-devel] [PATCH] qapi: Complete BlkdebugEvent

2014-11-07 Thread Kevin Wolf
Am 07.11.2014 um 16:51 hat Max Reitz geschrieben: > Several events were missing from the QAPI enum, add them. > > Reported-by: Kevin Wolf > Signed-off-by: Max Reitz Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH 03/11] pc: check if KVM has enough memory slots for DIMM devices

2014-11-07 Thread Paolo Bonzini
On 04/11/2014 17:14, Igor Mammedov wrote: >> > Note that option ROM BARs (which are usually mapped only by firmware, >> > but also when accessed via sysfs) and device assignment both consume >> > memory slots. Slots occupied by pflash can also come and go, depending >> > on whether the flash is

[Qemu-devel] Security for QCOW2 format

2014-11-07 Thread Halsey Pian
Dear All, Nice to know all of you! Recently, I am reading codes of qcow2 format, in order to switch virtualization solution in my project from VMWare to KVM for more specific customization based on customer's requirements. I have one consideration related to qcow2 format in QEMU. As y

[Qemu-devel] [PATCH 0/2] PPC: e500: Support more RAM

2014-11-07 Thread Alexander Graf
The e500 target today only supports 3.5GB of guest RAM. This can be too little depending on your use case, so this patch set increases that limit to a whopping 63.5GB! Of course this change is too intrusive for 2.2, so I'm posting this explicitly for 2.3. Alex Alexander Graf (2): PPC: e500: M

[Qemu-devel] [PATCH 2/2] PPC: e500: Move CCSR and MMIO space to upper end of address space

2014-11-07 Thread Alexander Graf
On e500 we're basically guaranteed to have 36bits of physical address space available for our enjoyment. Older chips (like the mpc8544) only had 32bits, but everything from e500v2 onwards bumped it up. It's reasonably safe to assume that if you're using the PV machine, your guest kernel is configu

[Qemu-devel] [PATCH 1/2] PPC: e500: Move CCSR definition to params

2014-11-07 Thread Alexander Graf
We want to have different MMIO region offsets for the mpc8544ds machine and our e500 PV machine, so move the definitions of those into the machine specific params struct. Signed-off-by: Alexander Graf --- hw/ppc/e500.c | 28 +--- hw/ppc/e500.h | 3 +++ hw/ppc/e

[Qemu-devel] [PATCH 3/3] vl: warn on topology <-> maxcpus mismatch

2014-11-07 Thread Andrew Jones
Start guiding users towards making sure their topology supports the maximum number of cpus they wish to support. A future patch series will enforce this for new machine types. Signed-off-by: Andrew Jones --- vl.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/vl.c b/vl.c index c62fe2

[Qemu-devel] [PATCH 2/3] vl: sanity check cpu topology

2014-11-07 Thread Andrew Jones
smp_parse allows partial or complete cpu topology to be given. In either case there may be inconsistencies in the input which are currently not sounding any alarms. In some cases the input is even being silently corrected. We shouldn't do this. Add warnings when input isn't adding up right, and eve

[Qemu-devel] [PATCH 1/3] vl: fix max_cpus check

2014-11-07 Thread Andrew Jones
We should confirm max_cpus, which is >= smp_cpus, is <= the machine's true max_cpus, not just smp_cpus. Signed-off-by: Andrew Jones --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index f4a6e5e05bce2..9d9855092ab4a 100644 --- a/vl.c +++ b/vl.c @@ -390

[Qemu-devel] [PATCH 0/3] vl: smp_parse sanity checks

2014-11-07 Thread Andrew Jones
See individual patches. Andrew Jones (3): vl: fix max_cpus check vl: sanity check cpu topology vl: warn on topology <-> maxcpus mismatch vl.c | 38 -- 1 file changed, 32 insertions(+), 6 deletions(-) -- 1.9.3

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Thu, Nov 06, 2014 at 05:09:35PM +0100, Andrew Jones wrote: > smp_parse has a couple problems. First, it should use max_cpus, > not smp_cpus when calculating missing topology information. > Conversely, if maxcpus is not input, then the topology should > dictate max_cpus, as the topology may suppo

Re: [Qemu-devel] [RFC PATCH v4 05/25] replay: internal functions for replay log

2014-11-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > This patch adds functions to perform read and write operations > with replay log. > > Signed-off-by: Pavel Dovgalyuk > + > +/* File for replay writing */ > +FILE *replay_file; > + > +void replay_put_byte(unsigned char byte) > +{ > +if (replay_file) { > +fw

Re: [Qemu-devel] Geometry and blocksize support for backing devices

2014-11-07 Thread Markus Armbruster
Christian Borntraeger writes: > Am 07.11.2014 10:17, schrieb Markus Armbruster: >> Christian Borntraeger writes: [...] >>> Now here comes my proposal: >>> Markus statement brought up an idea of special casing DASDs support. We can >>> call an ioctl BIODASDINFO on the block device that will only

[Qemu-devel] [PATCH] qapi: Complete BlkdebugEvent

2014-11-07 Thread Max Reitz
Several events were missing from the QAPI enum, add them. Reported-by: Kevin Wolf Signed-off-by: Max Reitz --- qapi/block-core.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 77a0cfb..8c3e45d 100644 --- a/qapi/block-c

Re: [Qemu-devel] [RFC PATCH v4 04/25] sysemu: system functions for replay

2014-11-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > This patch removes "static" specifier from several qemu function to make > them visible to the replay module. It also invents several system functions > that will be used by replay. > > Signed-off-by: Pavel Dovgalyuk > --- > > void do_savevm(Monitor *mon, const QDi

Re: [Qemu-devel] [RFC PATCH 0/8] Add Generic PCI host device update

2014-11-07 Thread Claudio Fontana
Hi Alvise, I now got to test the series for my use case, in particular to enable the ARM 64bit OSv guest (OSv's devices come from pci + virtio). Could you respin the series, possibly including also Rob's patches, addressing the issues which have been raised before? Thanks! Claudio On 11.07.20

Re: [Qemu-devel] [PATCH] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-11-07 Thread Max Reitz
On 2014-11-07 at 15:48, Jun Li wrote: When bs->filename and bs->backing_file are relative pathname and not under the same directory, path_combine() can not give the correct path for bs->backing_file. So add get_localfile_absolute_path to get absolute path for local file. Well, for me it is the

[Qemu-devel] [PATCH] virtio-scsi: work around bug in old BIOSes

2014-11-07 Thread Paolo Bonzini
Old BIOSes left some padding by mistake after the req_size/resp_size. New QEMU does not like it, thinking it is a bidirectional command. As a workaround, we can check if the ANY_LAYOUT bit is set; if not, we always consider the first buffer as the virtio-scsi request/response, because, back when Q

Re: [Qemu-devel] What "opaque" stand for?

2014-11-07 Thread Peter Maydell
On 7 November 2014 14:42, Kaiyuan wrote: > > Hello, all > > I am reviewing source of Qemu. I can see parameter called "opaque" from a lot > of function like this: > //@hw/timer/xilinx_timer.c > static uint64_t timer_read(void *opaque, hwaddr addr, unsigned int size) > > { > ... > } > > > , and it

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-07 Thread Markus Armbruster
Kevin Wolf writes: > Am 06.11.2014 um 14:57 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 04.11.2014 um 19:45 hat Markus Armbruster geschrieben: >> >> I'll try to explain all solutions fairly. Isn't easy when you're as >> >> biased towards one of them as I am. Please bea

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-07 Thread Max Reitz
On 2014-11-07 at 15:52, Markus Armbruster wrote: Max Reitz writes: On 2014-11-06 at 15:56, Jeff Cody wrote: On Thu, Nov 06, 2014 at 01:53:35PM +0100, Max Reitz wrote: On 2014-11-06 at 13:26, Markus Armbruster wrote: Max Reitz writes: On 2014-11-04 at 19:45, Markus Armbruster wrote: [...

Re: [Qemu-devel] [PATCH v6 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap

2014-11-07 Thread Vladimir Sementsov-Ogievskiy
from [PATCH v6 02/10] +void qmp_block_dirty_bitmap_remove(const char *device, const char *name, + Error **errp) +{ +BlockDriverState *bs; +BdrvDirtyBitmap *bitmap; + +bs = bdrv_find(device); +if (!bs) { +error_set(errp, QERR_DEVICE_NOT_FOU

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-07 Thread Markus Armbruster
Max Reitz writes: > On 2014-11-06 at 15:56, Jeff Cody wrote: >> On Thu, Nov 06, 2014 at 01:53:35PM +0100, Max Reitz wrote: >>> On 2014-11-06 at 13:26, Markus Armbruster wrote: Max Reitz writes: > On 2014-11-04 at 19:45, Markus Armbruster wrote: [...] >> = How this lets the gues

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-07 Thread Markus Armbruster
Kevin Wolf writes: > Am 06.11.2014 um 13:26 hat Markus Armbruster geschrieben: >> >> * Reuse the image *without* specifying the raw format. QEMU guesses the >> >>format based on untrusted image contents. Now QEMU guesses a format >> >>chosen by the guest, with meta-data chosen by the gu

[Qemu-devel] [PATCH] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-11-07 Thread Jun Li
When bs->filename and bs->backing_file are relative pathname and not under the same directory, path_combine() can not give the correct path for bs->backing_file. So add get_localfile_absolute_path to get absolute path for local file. e.g: $ pwd /tmp $ /opt/qemu-git-arm/bin/qemu-img create -f qcow2

[Qemu-devel] What "opaque" stand for?

2014-11-07 Thread Kaiyuan
Hello, all I am reviewing source of Qemu. I can see parameter called "opaque" from a lot of function like this: //@hw/timer/xilinx_timer.c static uint64_t timer_read(void *opaque, hwaddr addr, unsigned int size) { ... } , and its meaning confuse me. What does "opaque" stand for? Thanks, Kai

Re: [Qemu-devel] [PATCHv3] seccomp: change configure to avoid arm 32 to break

2014-11-07 Thread Peter Maydell
On 7 November 2014 09:05, Eduardo Otubo wrote: > Current stable version of libseccomp (2.1.1) only supports i386 and > x86_64 archs correctly. This patch limits the usage of the syscall > filter for those archs and updates to the correct last version of > libseccomp. > > This patch also fixes the

Re: [Qemu-devel] Add CMP2 instruction

2014-11-07 Thread Laurent Vivier
> Le 7 novembre 2014 à 11:14, "Guo, Lei" a écrit : > > > This patch aims to add CMP2 instruction for m68k family. > > > > Description: Compares the value in Rn to each bound. The effective address > contains the > > bounds pair: upper bound following the lower bound. For signed compa

Re: [Qemu-devel] Geometry and blocksize support for backing devices

2014-11-07 Thread Ekaterina Tumanova
On 11/07/2014 12:17 PM, Markus Armbruster wrote: Christian Borntraeger writes: Markus, Kevin, Stefan, here is a (somewhat late) followup of some KVM forum discussions regarding block size and geometry of pass-through block devices. Let's just do a quick wrap-up (as of my understanding) and a

Re: [Qemu-devel] [PATCH] mips: Set the CP0.Config3.DSP and CP0.Config3.DSP2P bits

2014-11-07 Thread Leon Alrae
On 07/11/2014 12:33, Maciej W. Rozycki wrote: > On Fri, 7 Nov 2014, Leon Alrae wrote: > >> When I've been applying this patch to my mips-next candidate branch for >> 2.2 I realized that you haven't rebased it onto the recent version where >> MSA has been added to mips32r5-generic. Now I don't thin

[Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-07 Thread Francesco Romani
Managing applications, like oVirt (http://www.ovirt.org), make extensive use of thin-provisioned disk images. To let the guest run smoothly and be not unnecessarily paused, oVirt sets a disk usage threshold (so called 'high water mark') based on the occupation of the device, and automatically exte

[Qemu-devel] [RFC][PATCH v2] add write threshold reporting for block devices

2014-11-07 Thread Francesco Romani
v1 was: "add watermark reporting for block devices", but "watermark" is incorrectly unused. Hence the change in subject. Sorry for long pause from v1 [0]; Only recently I was able to sort out all the missing details. Context for this RFC/patch is presented below as remider. Why RFC? See

Re: [Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-07 Thread Eric Blake
On 10/30/2014 04:22 AM, Fam Zheng wrote: > The new command pair is added to manage user created dirty bitmap. The > dirty bitmap's name is mandatory and must be unique for the same device, > but different devices can have bitmaps with the same names. > > Signed-off-by: Fam Zheng > --- > blockdev

Re: [Qemu-devel] [PATCH] linux-user: Do not subtract offset from end address

2014-11-07 Thread Jonas Maebe
On 07 Nov 2014, at 08:23, Riku Voipio wrote: On Thu, Nov 06, 2014 at 01:43:13PM -0600, Tom Musta wrote: When computing the upper address of a program segment, do not subtract the offset from the virtual address; instead compute the sum of the virtual address and the memory size. Thanks,

Re: [Qemu-devel] [PATCH v6 01/10] qapi: Add optional field "name" to block dirty bitmap

2014-11-07 Thread Eric Blake
On 10/30/2014 04:22 AM, Fam Zheng wrote: > This field will be set for user created dirty bitmap. Also pass in an > error pointer to bdrv_create_dirty_bitmap, so when a name is already > taken on this BDS, it can report an error message. This is not global > check, two BDSes can have dirty bitmap wi

Re: [Qemu-devel] [PATCH v2 16/16] hw/intc/arm_gic: add gic_update() for grouping

2014-11-07 Thread Daniel Thompson
On 30/10/14 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > GICs with grouping (GICv2 or GICv1 with Security Extensions) have a > different exception generation model which is more complicated than > without interrupt grouping. We add a new function to handle this model. > > Signed-off-by:

Re: [Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-07 Thread Vladimir Sementsov-Ogievskiy
+if (!name || name[0] == '\0') { Isn't is better to move "name[0] == '\0'" check to bdrv_create_dirty_bitmap, near existed name checking? +if (granularity < 512 || is_power_of_2(granularity)) { +error_setg(errp, "Granularity must be power of 2 " +

Re: [Qemu-devel] [PATCH] mips: Set the CP0.Config3.DSP and CP0.Config3.DSP2P bits

2014-11-07 Thread Maciej W. Rozycki
On Fri, 7 Nov 2014, Leon Alrae wrote: > When I've been applying this patch to my mips-next candidate branch for > 2.2 I realized that you haven't rebased it onto the recent version where > MSA has been added to mips32r5-generic. Now I don't think that having > DSP and MSA on one CPU makes sense, t

Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 13:22, Hannes Reinecke wrote: > A linux guest will be issuing messages: > > [ 32.124042] DC390: Deadlock in DataIn_0: DMA aborted unfinished: 00 > bytes remain!! > [ 32.126348] DC390: DataIn_0: DMA State: 0 > > and the HBA will fail to work properly. > Reason is the emula

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Eduardo Habkost
On Fri, Nov 07, 2014 at 01:23:12PM +0100, Andrew Jones wrote: > On Fri, Nov 07, 2014 at 10:16:06AM -0200, Eduardo Habkost wrote: > > On Fri, Nov 07, 2014 at 12:21:26PM +0100, Andrew Jones wrote: > > > On Fri, Nov 07, 2014 at 10:52:31AM +0100, Andrew Jones wrote: [...] > > > After talking with Igor,

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:16:06AM -0200, Eduardo Habkost wrote: > On Fri, Nov 07, 2014 at 12:21:26PM +0100, Andrew Jones wrote: > > On Fri, Nov 07, 2014 at 10:52:31AM +0100, Andrew Jones wrote: > > > On Fri, Nov 07, 2014 at 10:40:14AM +0100, Paolo Bonzini wrote: > > > > > > > > > > > > On 07/11/

[Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux

2014-11-07 Thread Hannes Reinecke
A linux guest will be issuing messages: [ 32.124042] DC390: Deadlock in DataIn_0: DMA aborted unfinished: 00 bytes remain!! [ 32.126348] DC390: DataIn_0: DMA State: 0 and the HBA will fail to work properly. Reason is the emulation is not setting the 'DMA transfer done' status correctly.

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Eduardo Habkost
On Fri, Nov 07, 2014 at 12:21:26PM +0100, Andrew Jones wrote: > On Fri, Nov 07, 2014 at 10:52:31AM +0100, Andrew Jones wrote: > > On Fri, Nov 07, 2014 at 10:40:14AM +0100, Paolo Bonzini wrote: > > > > > > > > > On 07/11/2014 10:29, Andrew Jones wrote: > > > >> > I think this would cause too many

Re: [Qemu-devel] [RFC PATCH v4 17/25] cpus: make icount warp deterministic in replay mode

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 12:45, Pavel Dovgaluk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 07/11/2014 11:33, Pavel Dovgalyuk wrote: >>> This patch adds saving and replaying warping parameters in record and replay >>> modes. These parameters affect on virtual clock values and therefore s

Re: [Qemu-devel] [PATCH] mips: Set the CP0.Config3.DSP and CP0.Config3.DSP2P bits

2014-11-07 Thread Leon Alrae
On 05/11/2014 15:26, Leon Alrae wrote: > On 04/11/2014 15:41, Maciej W. Rozycki wrote: >> Set the CP0.Config3.DSP2P bit for the 74kf processor and both that bit >> and the CP0.Config3.DSP bit for the artificial mips32r5-generic and >> mips64dspr2 processors. They have the DSPr2 ASE enabled in `i

Re: [Qemu-devel] Add CMP2 instruction

2014-11-07 Thread Laurent Vivier
Hi, did you test it ? because after just a first glance this patch seems wrong as the tmp variables cannot be used beyond the first tcg_gen_cond() (conditional branches clobber temporary vars), you must use tcg_temp_local_new() and tcg_temp_free(). Regards, Laurent > Le 7 novembre 2014 à 11:1

Re: [Qemu-devel] about qga on windows

2014-11-07 Thread Thomas Stein
Am 07.11.14 12:31, schrieb Paolo Bonzini: > On 07/11/2014 12:01, Thomas Stein wrote: >> Hello. >> >> A quick question about qga and windows. Is setting vpus supposed to >> work? I compiled qemu-guest-agent myself and installed it on a windows7 >> ultimate machine. Libvirt is version 1.2.10. Qemu i

Re: [Qemu-devel] [RFC PATCH v4 17/25] cpus: make icount warp deterministic in replay mode

2014-11-07 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 07/11/2014 11:33, Pavel Dovgalyuk wrote: > > This patch adds saving and replaying warping parameters in record and replay > > modes. These parameters affect on virtual clock values and therefore should > > be deterministic. > > Why are QEMU_C

Re: [Qemu-devel] [RFC PATCH v4 07/25] icount: implement icount requesting

2014-11-07 Thread Frederic Konrad
On 07/11/2014 12:36, Pavel Dovgaluk wrote: From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 07/11/2014 11:32, Pavel Dovgalyuk wrote: Replay uses number of executed instructions to determine corrent events injection moments. This patch introduces new function for querying the instructions coun

Re: [Qemu-devel] [RFC PATCH v4 10/25] i386: do not cross the pages boundaries in replay mode

2014-11-07 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 07/11/2014 11:32, Pavel Dovgalyuk wrote: > > This patch denies crossing the boundary of the pages in the replay mode, > > because it can cause an exception. Do it only when boundary is > > crossed by the first instruction in the block. > > If

Re: [Qemu-devel] [RFC PATCH v4 07/25] icount: implement icount requesting

2014-11-07 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 07/11/2014 11:32, Pavel Dovgalyuk wrote: > > Replay uses number of executed instructions to determine corrent events > > injection moments. This patch introduces new function for querying the > > instructions counter. > > > > Signed-off-by: Pa

Re: [Qemu-devel] about qga on windows

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 12:01, Thomas Stein wrote: > Hello. > > A quick question about qga and windows. Is setting vpus supposed to > work? I compiled qemu-guest-agent myself and installed it on a windows7 > ultimate machine. Libvirt is version 1.2.10. Qemu is version 2.1.2. Here > the output of a setvcpu c

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:22:39AM +0100, Andrew Jones wrote: > On Thu, Nov 06, 2014 at 05:17:44PM -0200, Eduardo Habkost wrote: > > On Thu, Nov 06, 2014 at 05:09:35PM +0100, Andrew Jones wrote: > > > smp_parse has a couple problems. First, it should use max_cpus, > > > not smp_cpus when calculatin

Re: [Qemu-devel] [RFC PATCH v4 06/25] cpu-exec: reset exception_index correctly

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 11:32, Pavel Dovgalyuk wrote: > Exception index is reset at every entry at every entry into cpu_exec() > function. This may cause missing the exceptions while replaying them. > This patch moves exception_index reset to the locations where they are > processed. > > Signed-off-by: Pa

Re: [Qemu-devel] [RFC PATCH v4 10/25] i386: do not cross the pages boundaries in replay mode

2014-11-07 Thread Andreas Färber
Am 07.11.2014 um 11:32 schrieb Pavel Dovgalyuk: > This patch denies crossing the boundary of the pages in the replay mode, > because it can cause an exception. Do it only when boundary is > crossed by the first instruction in the block. > If current instruction already crossed the bound - it's ok,

Re: [Qemu-devel] Add CMP2 instruction

2014-11-07 Thread Richard Henderson
On 11/07/2014 11:14 AM, Guo, Lei wrote: > This patch aims to add CMP2 instruction for m68k family. Mainline target-m68k supports coldfire only. There is an external tree for full m68k support: https://gitorious.org/qemu-m68k That said, before you send this to them... > +if (ext & 0x8000

Re: [Qemu-devel] [RFC PATCH v4 17/25] cpus: make icount warp deterministic in replay mode

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 11:33, Pavel Dovgalyuk wrote: > This patch adds saving and replaying warping parameters in record and replay > modes. These parameters affect on virtual clock values and therefore should > be deterministic. Why are QEMU_CLOCK_REALTIME timers not recorded/replayed like QEMU_CLOCK_HOST

Re: [Qemu-devel] [RFC PATCH v4 11/25] cpu-exec: allow temporary disabling icount

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 11:32, Pavel Dovgalyuk wrote: > This patch is required for deterministic replay to generate an exception > by trying executing an instruction without changing icount. > It adds new flag to TB for disabling icount while translating it. > > Signed-off-by: Pavel Dovgalyuk > --- > cp

  1   2   >