Re: [Qemu-devel] [PULL for-2.0 2/2] cpu: Avoid QOM casts for CPU()

2014-04-01 Thread Laurent Desnogues
On Mon, Mar 31, 2014 at 7:37 PM, Andreas Färber wrote: > CPU address spaces touching load and store helpers as well as the > movement of (almost) all fields from CPU_COMMON to CPUState have led to > a noticeable increase of CPU() usage in "hot" paths for both TCG and KVM. > > While CPU()'s OBJECT_

[Qemu-devel] [Bug 1278977] Re: qemu-system-sparc64 crash when initializing disk

2014-04-01 Thread wbx
Hi, here is the kernel and image: http://www.openadk.org/sparc64/ Inside the system do: rw tar xvf perl-5.18.1.tar.gz The kernel contains full debug info. Be sure that your system has a high load. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscr

[Qemu-devel] [PATCH] block: Handle error of bdrv_getlength in bdrv_create_dirty_bitmap

2014-04-01 Thread Fam Zheng
bdrv_getlength could fail, check the return value before using it. Signed-off-by: Fam Zheng --- block-migration.c | 28 block.c | 10 -- block/mirror.c| 5 - include/block/block.h | 3 ++- 4 files changed, 38 insertions(+), 8 d

Re: [Qemu-devel] [PATCH v17 00/14] Drop in_use from BlockDriverState and enable point-in-time snapshot exporting over NBD

2014-04-01 Thread Fam Zheng
On Mon, 03/10 15:25, Fam Zheng wrote: > v17: Rebase to current master. Ping?

[Qemu-devel] [PATCH] qemu-iotests: Improve and make use of QMPTestCase.wait_until_completed()

2014-04-01 Thread Fam Zheng
This eliminates code duplication. Signed-off-by: Fam Zheng --- tests/qemu-iotests/030| 50 +-- tests/qemu-iotests/056| 9 +--- tests/qemu-iotests/iotests.py | 5 +++-- 3 files changed, 9 insertions(+), 55 deletions(-) diff --git a/te

Re: [Qemu-devel] [Qemu-ppc] [PATCH for-2.0 2/2] ohw: let the right reset entry point 0xfff00100 jump to the currently wrong entry point (0xfffffffc)

2014-04-01 Thread Alexander Graf
> Am 02.04.2014 um 07:36 schrieb Alexander Graf : > > > >> Am 02.04.2014 um 07:23 schrieb Hervé Poussineau : >> >> Le mer. 02 avril 2014 07:14:48 CEST, Alexander Graf a écrit : >>> >>> Am 01.04.2014 um 23:18 schrieb Hervé Poussineau : This is easier to do this than to copy t

Re: [Qemu-devel] Unresponsive linux guest once migrated

2014-04-01 Thread Chris Dunlop
On Mon, Mar 31, 2014 at 10:39:47AM +0200, Marcin Gibuła wrote: >>> I've seen very similar problem on our installation. Have you tried to >>> run with kvm-clock explicitly disabled (either via no-kvmclock in >>> guest kernel or with -kvm-clock in qemu) ? >> >> No, I haven't tried it yet (I've confir

Re: [Qemu-devel] [Qemu-ppc] [PATCH for-2.0 2/2] ohw: let the right reset entry point 0xfff00100 jump to the currently wrong entry point (0xfffffffc)

2014-04-01 Thread Alexander Graf
> Am 02.04.2014 um 07:23 schrieb Hervé Poussineau : > > Le mer. 02 avril 2014 07:14:48 CEST, Alexander Graf a écrit : >> >> >>> Am 01.04.2014 um 23:18 schrieb Hervé Poussineau : >>> >>> This is easier to do this than to copy the code from the wrong entry point >>> to the right entry point. >

[Qemu-devel] [Bug 1278977] Re: qemu-system-sparc64 crash when initializing disk

2014-04-01 Thread wbx
Hi Artyom, unfortunately there is no output, when the system gets the deadlock: perl-5.18.1/pod/perlvms.pod perl-5.18.1/pod/rofftoc telnet> send brk When the system is running, I get ENTER and can then push the t key to get the running threads/tasks. Any other idea? best regards Waldemar --

Re: [Qemu-devel] [Qemu-ppc] [PATCH for-2.0 2/2] ohw: let the right reset entry point 0xfff00100 jump to the currently wrong entry point (0xfffffffc)

2014-04-01 Thread Hervé Poussineau
Le mer. 02 avril 2014 07:14:48 CEST, Alexander Graf a écrit : Am 01.04.2014 um 23:18 schrieb Hervé Poussineau : This is easier to do this than to copy the code from the wrong entry point to the right entry point. Signed-off-by: Hervé Poussineau --- src/vectors.S |7 ++- 1 file chang

Re: [Qemu-devel] [Qemu-ppc] [PATCH for-2.0 2/2] ohw: let the right reset entry point 0xfff00100 jump to the currently wrong entry point (0xfffffffc)

2014-04-01 Thread Alexander Graf
> Am 01.04.2014 um 23:18 schrieb Hervé Poussineau : > > This is easier to do this than to copy the code from the wrong entry point to > the right entry point. > > Signed-off-by: Hervé Poussineau > --- > src/vectors.S |7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --

Re: [Qemu-devel] [RFC PATCH V2 4/6] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64

2014-04-01 Thread Pranavkumar Sawargaonkar
On 1 April 2014 17:43, Peter Maydell wrote: > On 1 April 2014 12:53, Pranavkumar Sawargaonkar > wrote: >> To implement kvm_arch_reset_vcpu(), we simply re-init the VCPU >> using kvm_arch_init_vcpu() so that all registers of VCPU are set >> to their reset values by in-kernel KVM code. >> >> Signe

Re: [Qemu-devel] [RFC PATCH V2 3/6] target-arm: Enable KVM_ARM_VCPU_PSCI_0_2 feature when possible

2014-04-01 Thread Pranavkumar Sawargaonkar
Hi Peter, On 1 April 2014 17:46, Peter Maydell wrote: > On 1 April 2014 12:53, Pranavkumar Sawargaonkar > wrote: >> Latest linux kernel supports in-kernel emulation of PSCI v0.2 but >> to enable it we need to select KVM_ARM_VCPU_PSCI_0_2 feature using >> KVM_ARM_VCPU_INIT ioctl. >> >> Also, we

Re: [Qemu-devel] [RFC PATCH]pci-assign: Fix memory out of bound when MSI-X table not fit in a single page

2014-04-01 Thread Alex Williamson
On Wed, 2014-04-02 at 04:18 +, Gonglei (Arei) wrote: > > > Hi, > > > > > > I have a problem about SR-IOV pass-through. > > > > > > The PF is Emulex Corporation OneConnect NIC (Lancer)(rev 10), > > > and the VF pci config is as follow: > > > > > > LINUX:/sys/bus/pci/devices/:04:00.6 # hexdum

Re: [Qemu-devel] [RFC PATCH]pci-assign: Fix memory out of bound when MSI-X table not fit in a single page

2014-04-01 Thread Gonglei (Arei)
> > Hi, > > > > I have a problem about SR-IOV pass-through. > > > > The PF is Emulex Corporation OneConnect NIC (Lancer)(rev 10), > > and the VF pci config is as follow: > > > > LINUX:/sys/bus/pci/devices/:04:00.6 # hexdump config > > 000 0010 0010 0200 0080 > > 010

Re: [Qemu-devel] [RFC PATCH]pci-assign: Fix memory out of bound when MSI-X table not fit in a single page

2014-04-01 Thread Alex Williamson
On Tue, 2014-04-01 at 15:23 +, Gonglei (Arei) wrote: > Hi, > > I have a problem about SR-IOV pass-through. > > The PF is Emulex Corporation OneConnect NIC (Lancer)(rev 10), > and the VF pci config is as follow: > > LINUX:/sys/bus/pci/devices/:04:00.6 # hexdump config > 000

Re: [Qemu-devel] [RFC PATCH]pci-assign: Fix memory out of bound when MSI-X table not fit in a single page

2014-04-01 Thread Gonglei (Arei)
> > Hi, > > > > I have a problem about SR-IOV pass-through. > > > > The PF is Emulex Corporation OneConnect NIC (Lancer)(rev 10), > > and the VF pci config is as follow: > > > > LINUX:/sys/bus/pci/devices/:04:00.6 # hexdump config > > 000 0010 0010 0200 0080 > > 010

Re: [Qemu-devel] [PATCH] qcow2: Patch for shrinking qcow2 disk image

2014-04-01 Thread Fam Zheng
On Tue, 04/01 10:06, Jun Lee wrote: > Signed-off-by: Jun Li > > This patch can make sure the data still existing after shrinking. And only > discard the unused (guest) clusters. If shrinking to the size which stored > data, It will return an error and will not do any change. > As this patch can

Re: [Qemu-devel] [PATCH v2] Fix for qemu-img info to supply FORMAT values for SPARSE extents

2014-04-01 Thread Fam Zheng
On Tue, 04/01 17:49, Shwetha Mathangi Chandra Choodamani wrote: > This patch fixes the bug in qemu-img info that wouldn't populate the extent > type for default formats. > The extent type has now been set where necessary. This is the second version > in the series after inputs > from Fam Zheng(f.

Re: [Qemu-devel] hmp interface for kdump compressed format

2014-04-01 Thread qiaonuohan
Hello guys, I have sent the patch, please check here: http://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg00018.html On 03/27/2014 04:38 PM, Markus Armbruster wrote: "qiaonuo...@cn.fujitsu.com" writes: On 03/27/2014 01:04 AM, Markus Armbruster wrote: So something like adding dum

Re: [Qemu-devel] [PATCH v2] Fix for qemu-img info to supply FORMAT values for SPARSE extents

2014-04-01 Thread Eric Blake
On 04/01/2014 03:49 PM, Shwetha Mathangi Chandra Choodamani wrote: > This patch fixes the bug in qemu-img info that wouldn't populate the extent > type for default formats. > The extent type has now been set where necessary. This is the second version > in the series after inputs > from Fam Zheng

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-04-01 Thread Laszlo Ersek
On 04/02/14 00:00, Kevin O'Connor wrote: > On Tue, Apr 01, 2014 at 11:44:12PM +0200, Laszlo Ersek wrote: >> Right now, OVMF can accept individual fields, or table-at-a-time blobs, >> via fw_cfg. >> >> The internal interface (EFI_SMBIOS_PROTOCOL) expects one table at a time >> (for which table-at-a-

[Qemu-devel] [PATCH v2 5/7] hw/net/stellaris_enet: Fix debug format strings

2014-04-01 Thread Peter Maydell
Fix various debug format strings which were incorrect for the data type, so that building with debug enabled is possible. Signed-off-by: Peter Maydell Reviewed-by: Dr. David Alan Gilbert --- hw/net/stellaris_enet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/net

[Qemu-devel] [PATCH v2 6/7] hw/net/stellaris_enet: Get rid of rx_fifo pointer

2014-04-01 Thread Peter Maydell
The rx_fifo pointer is awkward to migrate, and is actually redundant since it is always possible to determine it from the current rx[].len/.data and rx_fifo_len. Remove both rx_fifo and rx_fifo_len from the state, replacing them with a simple rx_fifo_offset which points at the current location in t

[Qemu-devel] [PATCH v2 2/7] hw/net/stellaris_enet: Correct handling of packet padding

2014-04-01 Thread Peter Maydell
The PADEN bit in the transmit control register enables padding of short data packets out to the required minimum length. However a typo here meant we were adjusting tx_fifo_len rather than tx_frame_len, so the padding didn't actually happen. Fix this bug. Signed-off-by: Peter Maydell Reviewed-by:

[Qemu-devel] [PATCH v2 1/7] hw/net/stellaris_enet: Restructure tx_fifo code to avoid buffer overrun

2014-04-01 Thread Peter Maydell
The current tx_fifo code has a corner case where the guest can overrun the fifo buffer: if automatic CRCs are disabled we allow the guest to write the CRC word even if there isn't actually space for it in the FIFO. The datasheet is unclear about exactly how the hardware deals with this situation; t

[Qemu-devel] [PATCH v2 3/7] hw/net/stellaris_enet: Rewrite tx fifo handling code

2014-04-01 Thread Peter Maydell
The datasheet is clear that the frame length written to the DATA register is actually stored in the TX FIFO; this means we don't need to keep both tx_frame_len and tx_fifo_len state separately. Signed-off-by: Peter Maydell Reviewed-by: Dr. David Alan Gilbert --- hw/net/stellaris_enet.c | 121 ++

[Qemu-devel] [PATCH v2 4/7] hw/net/stellaris_enet: Correctly implement the TR and THR registers

2014-04-01 Thread Peter Maydell
Packet transmission for the stellaris ethernet controller can be triggered in one of two ways: * by setting a threshold value in the THR register; when the FIFO fill level reaches the threshold, the h/w starts transmitting. Software has to finish filling the FIFO before the transmit proce

[Qemu-devel] [PATCH v2 0/7] stellaris_enet: overhaul tx/rx, convert to vmstate

2014-04-01 Thread Peter Maydell
This patchset overhauls the stellaris_enet TX and RX handling code, and converts it to use vmstate. The principal motivation is to fix the buffer overrun noted in the first patch, and to reimplement things using simpler state fields which are easier to migrate and to validate in post_load. I also

[Qemu-devel] [PATCH v2 7/7] hw/net/stellaris_enet: Convert to vmstate

2014-04-01 Thread Peter Maydell
Convert this device to use vmstate for its save/load, including providing a post_load function that sanitizes inbound data to avoid possible buffer overflows if it is malicious. Signed-off-by: Peter Maydell --- hw/net/stellaris_enet.c | 147 ++-- 1 fil

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-04-01 Thread Kevin O'Connor
On Tue, Apr 01, 2014 at 11:44:12PM +0200, Laszlo Ersek wrote: > Right now, OVMF can accept individual fields, or table-at-a-time blobs, > via fw_cfg. > > The internal interface (EFI_SMBIOS_PROTOCOL) expects one table at a time > (for which table-at-a-time blobs are a perfect match). I wasn't awar

[Qemu-devel] [PATCH v2] Fix for qemu-img info to supply FORMAT values for SPARSE extents

2014-04-01 Thread Shwetha Mathangi Chandra Choodamani
This patch fixes the bug in qemu-img info that wouldn't populate the extent type for default formats. The extent type has now been set where necessary. This is the second version in the series after inputs from Fam Zheng(f...@redhat.com). Signed-off-by: Shwetha Mathangi Chandra Choodamani ---

[Qemu-devel] [PATCH] prep: add support for OpenBIOS

2014-04-01 Thread Hervé Poussineau
Note that OHW is still the default firmware. Signed-off-by: Hervé Poussineau --- hw/ppc/prep.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index dfe4a5c..e59d5b9 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-04-01 Thread Kevin O'Connor
On Tue, Apr 01, 2014 at 05:28:10PM -0400, Gabriel L. Somlo wrote: > Assuming all relevant QEMU maintainers are OK with the idea of > creating a full SMBIOS blob (with e.g. type 0 defaulting to the > relevant SeaBIOS values, override-able to fit some different bios, > e.g. OVMF), would you take a pa

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-04-01 Thread Laszlo Ersek
On 04/01/14 23:28, Gabriel L. Somlo wrote: > On Tue, Apr 01, 2014 at 04:28:32PM -0400, Kevin O'Connor wrote: >>> From the conversation so far, it seems to me that: >>> >>> - type 0 is best left to the BIOS (user overrides via >>> command line at their own risk) >>> >>> - therefore, th

Re: [Qemu-devel] [PATCH v2 7/9] tcg-ppc64: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-01 Thread Richard Henderson
On 04/01/2014 02:12 PM, Peter Maydell wrote: >> -static uint16_t reloc_pc14_val(void *pc, tcg_target_long target) >> +static uint16_t reloc_pc14_val(void *pc, tcg_insn_unit *target) > > Should be tcg_insn_unit *pc like the others I guess? Yep. >> -value += addend; >> +/* Note that we alw

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-04-01 Thread Gabriel L. Somlo
On Tue, Apr 01, 2014 at 04:28:32PM -0400, Kevin O'Connor wrote: > > From the conversation so far, it seems to me that: > > > > - type 0 is best left to the BIOS (user overrides via > > command line at their own risk) > > > > - therefore, the maximum granularity of QEMU-generated > >

[Qemu-devel] [PATCH for-2.0 0/2] prep: remove last OHW hacks

2014-04-01 Thread Hervé Poussineau
Hi, This patchset remove the last two hacks related to shortcuts in OHW firmware. Note that related OHW patches must be applied first, and binary updated, before applying those patches. Hervé Hervé Poussineau (2): prep: remove PCI memory hack related to OpenHack'Ware prep: remove CPU reset

[Qemu-devel] [PATCH for-2.0 2/2] prep: remove CPU reset entry point hack related to OpenHack'Ware

2014-04-01 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/ppc/prep.c |3 --- 1 file changed, 3 deletions(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 035b5b2..dfe4a5c 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -346,9 +346,6 @@ static void ppc_prep_reset(void *opaque) PowerPCCPU *cpu = opaqu

[Qemu-devel] [PATCH for-2.0 1/2] prep: remove PCI memory hack related to OpenHack'Ware

2014-04-01 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/pci-host/prep.c |4 +--- hw/ppc/prep.c |9 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c index d3e746c..56234e5 100644 --- a/hw/pci-host/prep.c +++ b/hw/pci-host/prep.c @@ -256,

Re: [Qemu-devel] [PULL for-2.0 0/1] Tracing patches

2014-04-01 Thread Peter Maydell
On 1 April 2014 19:11, Stefan Hajnoczi wrote: > This SystemTap fix makes the .stp file we generate work again. > > The following changes since commit 63678e17cf399ff81b93417fe7bee8d6ef6b6b1b: > > configure: add option to disable -fstack-protector flags (2014-03-31 > 20:16:02 +0100) > > are avai

[Qemu-devel] [PATCH for-2.0 2/2] ohw: let the right reset entry point 0xfff00100 jump to the currently wrong entry point (0xfffffffc)

2014-04-01 Thread Hervé Poussineau
This is easier to do this than to copy the code from the wrong entry point to the right entry point. Signed-off-by: Hervé Poussineau --- src/vectors.S |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vectors.S b/src/vectors.S index 691d568..05cd1d9 100644 --- a/s

[Qemu-devel] [PATCH for-2.0 0/2] prep: Remove some clearly wrong assumptions

2014-04-01 Thread Hervé Poussineau
Hi, These two patches remove some bugs for a PReP firmware. Note that first patch is very PReP-oriented, and breaks OHW compatibility with other QEMU emulations (oldworld and newworld machines). Patches to remove corresponding hacks on QEMU side will be sent shortly. Hervé Hervé Poussineau (2)

[Qemu-devel] [PATCH for-2.0 1/2] ohw: correctly program BAR addresses of PCI devices

2014-04-01 Thread Hervé Poussineau
Note that offsets are PReP ones, so this breaks compatibility with hardware which has different values. Signed-off-by: Hervé Poussineau --- src/pci.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pci.c b/src/pci.c index 38aad27..7c0ebad 100644 --- a/src/pci

Re: [Qemu-devel] [PATCH v2 0/9] tcg: tidy the type of code_ptr

2014-04-01 Thread Peter Maydell
On 1 April 2014 21:53, Richard Henderson wrote: > Here's a second revision, attempting to take Peter's review on board. > > In particular, inlines to hide some of the pointer differencing issues. > I also chose a different name for the type: tcg_insn_unit as suggested > by Jay Foad. I had a few n

Re: [Qemu-devel] [PATCH v2 7/9] tcg-ppc64: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-01 Thread Peter Maydell
On 1 April 2014 21:53, Richard Henderson wrote: > And use tcg pointer differencing functions as appropriate. > > Signed-off-by: Richard Henderson Few minor nits and queries below. > --- > tcg/ppc64/tcg-target.c | 163 > - > tcg/ppc64/tcg-target.

[Qemu-devel] qemu leaving unix sockets behind after VM is shut down

2014-04-01 Thread Chris Friesen
When running qemu with something like this -device virtio-serial \ -chardev socket,path=/tmp/foo,server,nowait,id=foo \ -device virtserialport,chardev=foo,name=host.port.0 the VM starts up as expected and creates a socket at /tmp/foo as expected. However, when I shut down the VM the socket at /

[Qemu-devel] [Bug 1300863] [NEW] Qemu does not show all files on floppy or hard drive (MS DOS 6.22 guest)

2014-04-01 Thread James Lacey
Public bug reported: My host system is a raspberry pi model B 512MB. To start qemu I typed into lxterminal: qemu-system-i386 -hda qemu.img -Fda Dos622-1.img -boot a Qemu version 1.7.0+dfsg-3 installed as package. The DOS disks were downloaded from winworldpc.com and if I mount them under Linu

[Qemu-devel] [PATCH] qcow2: Patch for shrinking qcow2 disk image

2014-04-01 Thread Jun Li
Signed-off-by: Jun Li This patch can make sure the data still existing after shrinking. And only discard the unused (guest) clusters. If shrinking to the size which stored data, It will return an error and will not do any change. As this patch can support shrinking, so changed the func name

[Qemu-devel] [PATCH v2 8/9] tcg-ppc: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-01 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 194 --- tcg/ppc/tcg-target.h | 1 + 2 files changed, 93 insertions(+), 102 deletions(-) diff --git a/tcg/ppc/tcg-target.c b/t

[Qemu-devel] [PATCH v2 6/9] tcg-i386: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-01 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 48 tcg/i386/tcg-target.h | 1 + 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/

[Qemu-devel] [PATCH v2 9/9] tcg-sparc: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-01 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 138 ++--- tcg/sparc/tcg-target.h | 2 +- 2 files changed, 64 insertions(+), 76 deletions(-) diff --git a/tcg/sparc/tcg-target.c

[Qemu-devel] [PATCH v2 5/9] tcg: Define tcg_insn_unit for code pointers

2014-04-01 Thread Richard Henderson
To be defined by the tcg backend based on the elemental unit of the ISA. During the transition, allow TCG_TARGET_INSN_UNIT_SIZE to be undefined, which allows us to default tcg_insn_unit to the current uint8_t. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +- tcg/tcg-be-ldst

[Qemu-devel] [PATCH v2 7/9] tcg-ppc64: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-01 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 163 - tcg/ppc64/tcg-target.h | 1 + 2 files changed, 80 insertions(+), 84 deletions(-) diff --git a/tcg/ppc64/tcg-target.c

[Qemu-devel] [PATCH v2 0/9] tcg: tidy the type of code_ptr

2014-04-01 Thread Richard Henderson
Here's a second revision, attempting to take Peter's review on board. In particular, inlines to hide some of the pointer differencing issues. I also chose a different name for the type: tcg_insn_unit as suggested by Jay Foad. r~ Peter Maydell (3): exec-all.h: Use stl_p to avoid undefined beh

[Qemu-devel] [PATCH v2 4/9] tcg: Introduce byte pointer arithmetic helpers

2014-04-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.h | 45 + 1 file changed, 45 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index f7efcb4..8df1641 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -717,6 +717,51 @@ TCGv_i32 tcg_const_local_i32(int32_t val); TC

[Qemu-devel] [PATCH v2 3/9] tcg: Avoid undefined behaviour patching code at unaligned addresses

2014-04-01 Thread Richard Henderson
From: Peter Maydell To avoid C undefined behaviour when patching generated code, provide wrappers tcg_patch8/16/32/64 which use the usual memcpy trick, and use them in the i386 backend. Reviewed-by: Alex Bennée Signed-off-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/i386/tcg-ta

[Qemu-devel] [PATCH v2 2/9] tcg: Avoid stores to unaligned addresses

2014-04-01 Thread Richard Henderson
From: Peter Maydell Avoid stores to unaligned addresses in TCG code generation, by using the usual memcpy() approach. (Using bswap.h would drag a lot of QEMU baggage into TCG, so it's simpler just to do direct memcpy() here.) Reviewed-by: Alex Bennée Signed-off-by: Peter Maydell Signed-off-by:

[Qemu-devel] [PATCH v2 1/9] exec-all.h: Use stl_p to avoid undefined behaviour patching x86 jumps

2014-04-01 Thread Richard Henderson
From: Peter Maydell The code which patches x86 jump instructions assumes it can do an unaligned write of a uint32_t. This is actually safe on x86, but it's still undefined behaviour. We have infrastructure for doing efficient unaligned accesses which doesn't engage in undefined behaviour, so use

Re: [Qemu-devel] [PATCHv2] block: optimize zero writes with bdrv_write_zeroes

2014-04-01 Thread Peter Lieven
Am 28.03.2014 16:53, schrieb Eric Blake: > On 03/28/2014 08:46 AM, Peter Lieven wrote: >> this patch tries to optimize zero write requests >> by automatically using bdrv_write_zeroes if it is >> supported by the format. >> >> This significantly speeds up file system initialization and >> should spe

[Qemu-devel] [RFC PATCH 2/2] input: sdl2: Fix relative mode to match SDL1 behavior

2014-04-01 Thread Cole Robinson
Right now relative mode accelerates too fast, and has the 'invisible wall' problem. SDL2 added an explicit API to handle this use case, so let's use it. Signed-off-by: Cole Robinson --- While this fixes things for me, I'm not positive it doesn't have other side effects. I didn't test transition f

[Qemu-devel] [PATCH 0/2] sdl2: Fix relative mouse mode

2014-04-01 Thread Cole Robinson
sdl.c received a fix for relative mouse mode, but it wasn't copied to sdl2.c. Patch #2 uses new SDL2 API to make relative mode behave similar to sdl.c, but I'm not fully confident that it's safe. See patch comments. Also, relative mode is a mess in gtk as well. I started fixing these only to find

[Qemu-devel] [PATCH 1/2] input: sdl2: Fix guest_cursor logic

2014-04-01 Thread Cole Robinson
Unbreaks relative mouse mode with sdl2, just like was done with sdl.c in c3aa84b6. Signed-off-by: Cole Robinson --- ui/sdl2.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index f1532e9..e4cb9fb 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.

Re: [Qemu-devel] [PATCH 0/4] Fix relative pointer tracking on Gtk UI

2014-04-01 Thread Cole Robinson
On 02/13/2014 06:15 AM, Takashi Iwai wrote: > Hi, > > this is a series of patches to fix / improve the behavior of Gtk UI > in the relative pointer tracking mode. Most people didn't notice > the bug likely because it doesn't appear as long as the aboslute > mode is used, e.g. when vmmouse input d

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-04-01 Thread Kevin O'Connor
On Tue, Apr 01, 2014 at 02:47:27PM -0400, Gabriel L. Somlo wrote: > On Tue, Apr 01, 2014 at 05:47:09PM +0200, Laszlo Ersek wrote: > > bit 2 of the BIOS Characteristics Extension Byte 2 (7.1.2.2) is set, for > > "Enable Targeted Content Distribution". > > > > In OVMF, the same byte has the followin

Re: [Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and control kvm device

2014-04-01 Thread Christian Borntraeger
On 01/04/14 21:36, Alexander Graf wrote: [...] >>> Speaking of which, why don't we just forward STSI to user space with an >>> ENABLE_CAP and handle all of this there? It's not performance critical at >>> all, right? >> >> No, performance is not critical. >> The thing is, that we definitely need

[Qemu-devel] [PATCH v7] target-ppc: gdbstub allow byte swapping for reading/writing registers

2014-04-01 Thread Thomas Falcon
This patch allows registers to be properly read from and written to when using the gdbstub to debug a ppc guest running in little endian mode. It accomplishes this goal by byte swapping the values of any registers if the MSR:LE value is set. Signed-off-by: Thomas Falcon --- Differences from v6:

Re: [Qemu-devel] Qemu 2.0 regression with xen: qemu crash on any domUs S.O. start

2014-04-01 Thread John Baboval
Can you post your options to configure? The tip seems to be working here... On 04/01/2014 11:01 AM, Fabio Fantoni wrote: Today I tried latest qemu 2.0 compiled from git (commit 63678e17cf399ff81b93417fe7bee8d6ef6b6b1b) on this dom0: Debian 7 (Wheezy) 64 bit with kernel from package linux-image-

Re: [Qemu-devel] [PATCH/RFC] s390: Provide a configuration and control device

2014-04-01 Thread Alexander Graf
On 01.04.2014, at 21:23, Christian Borntraeger wrote: > On 01/04/14 16:59, Alexander Graf wrote: >> On 04/01/2014 04:47 PM, Christian Borntraeger wrote: >>> We want to configure several things in KVM that go beyond what >>> ENABLE_CAP (we need payload) or ONE_REG (we need it for the VM >>> and w

Re: [Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and control kvm device

2014-04-01 Thread Alexander Graf
On 01.04.2014, at 21:19, Christian Borntraeger wrote: > On 01/04/14 17:12, Alexander Graf wrote: >> On 04/01/2014 05:04 PM, Christian Borntraeger wrote: >>> On 01/04/14 16:58, Alexander Graf wrote: On 04/01/2014 04:47 PM, Christian Borntraeger wrote: > From: Ekaterina Tumanova > >

Re: [Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and control kvm device

2014-04-01 Thread Alexander Graf
On 01.04.2014, at 21:19, Christian Borntraeger wrote: > On 01/04/14 17:12, Alexander Graf wrote: >> On 04/01/2014 05:04 PM, Christian Borntraeger wrote: >>> On 01/04/14 16:58, Alexander Graf wrote: On 04/01/2014 04:47 PM, Christian Borntraeger wrote: > From: Ekaterina Tumanova > >

Re: [Qemu-devel] [PATCH/RFC] s390: Provide a configuration and control device

2014-04-01 Thread Christian Borntraeger
On 01/04/14 16:59, Alexander Graf wrote: > On 04/01/2014 04:47 PM, Christian Borntraeger wrote: >> We want to configure several things in KVM that go beyond what >> ENABLE_CAP (we need payload) or ONE_REG (we need it for the VM >> and we need to do more complex actions) can provide. Instead of >> a

Re: [Qemu-devel] [PATCH/RFC] KVM: s390: Add S390 configuration and control kvm device

2014-04-01 Thread Christian Borntraeger
On 01/04/14 17:12, Alexander Graf wrote: > On 04/01/2014 05:04 PM, Christian Borntraeger wrote: >> On 01/04/14 16:58, Alexander Graf wrote: >>> On 04/01/2014 04:47 PM, Christian Borntraeger wrote: From: Ekaterina Tumanova Add KVM_DEV_TYPE_S390_CONFIG kvm device that contains co

[Qemu-devel] [PULL for-2.0 39/51] dmg: sanitize chunk length and sectorcount (CVE-2014-0145)

2014-04-01 Thread Stefan Hajnoczi
Chunk length and sectorcount are used for decompression buffers as well as the bdrv_pread() count argument. Ensure that they have reasonable values so neither memory allocation nor conversion from uint64_t to int will cause problems. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf Revi

Re: [Qemu-devel] [PATCH/RFC] s390x/kvm: implement and use QEMU config device for s390

2014-04-01 Thread Christian Borntraeger
On 01/04/14 17:38, Paolo Bonzini wrote: > Il 01/04/2014 16:47, Christian Borntraeger ha scritto: >> From: Ekaterina Tumanova >> >> The following patch adds Qemu CONFIG device, >> which interacts with kvm CONFIG device by calling KVM_CREATE_DEVICE >> (to create the device in kernel), KVM_GET_DEVICE

Re: [Qemu-devel] [PATCH 3/5] hw/net/stellaris_enet: Rewrite tx fifo handling code

2014-04-01 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 1 April 2014 18:26, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > >> The datasheet is clear that the frame length written to the DATA > >> register is actually stored in the TX FIFO; this means we don't

[Qemu-devel] [PULL for-2.0 51/51] qcow2: link all L2 meta updates in preallocate()

2014-04-01 Thread Stefan Hajnoczi
preallocate() only links the first QCowL2Meta's data clusters into the L2 table and ignores any chained QCowL2Metas in the linked list. Chains of QCowL2Meta structs are built up when contiguous clusters span L2 tables. Each QCowL2Meta describes one L2 table update. This is a rare case in preallo

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-04-01 Thread Gabriel L. Somlo
On Tue, Apr 01, 2014 at 05:47:09PM +0200, Laszlo Ersek wrote: > On 04/01/14 16:39, Kevin O'Connor wrote: > > On Tue, Apr 01, 2014 at 10:40:00AM +0200, Laszlo Ersek wrote: > >> On 03/31/14 22:18, Gabriel L. Somlo wrote: > >>> The only sticking point remaining would be who gets to generate the > >>>

[Qemu-devel] [PULL for-2.0 16/51] bochs: Fix bitmap offset calculation

2014-04-01 Thread Stefan Hajnoczi
From: Kevin Wolf 32 bit truncation could let us access the wrong offset in the image. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- block/bochs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/block

[Qemu-devel] [PULL for-2.0 19/51] vdi: add bounds checks for blocks_in_image and disk_size header fields (CVE-2014-0144)

2014-04-01 Thread Stefan Hajnoczi
From: Jeff Cody The maximum blocks_in_image is 0x / 4, which also limits the maximum disk_size for a VDI image to 1024TB. Note that this is the maximum size that QEMU will currently support with this driver, not necessarily the maximum size allowed by the image format. This also fixes a

[Qemu-devel] [PULL for-2.0 46/51] qcow2: Fix L1 allocation size in qcow2_snapshot_load_tmp() (CVE-2014-0145)

2014-04-01 Thread Stefan Hajnoczi
From: Kevin Wolf For the L1 table to loaded for an internal snapshot, the code allocated only enough memory to hold the currently active L1 table. If the snapshot's L1 table is actually larger than the current one, this leads to a buffer overflow. Signed-off-by: Kevin Wolf Reviewed-by: Max Reit

Re: [Qemu-devel] [PATCH v4 29/30] vmxnet3: validate queues configuration coming from quest

2014-04-01 Thread Dmitry Fleytman
> On Apr 1, 2014, at 5:52 PM, "Michael S. Tsirkin" wrote: > >> On Tue, Apr 01, 2014 at 01:04:12PM +0300, Dmitry Fleytman wrote: >> >> On Mar 31, 2014, at 18:48 PM, Dr. David Alan Gilbert >> wrote: >> >> >>* Michael S. Tsirkin (m...@redhat.com) wrote: >> >>From: Dmitry Fleytman

[Qemu-devel] [PULL for-2.0 32/51] qcow2: Fix types in qcow2_alloc_clusters and alloc_clusters_noref

2014-04-01 Thread Stefan Hajnoczi
From: Kevin Wolf In order to avoid integer overflows. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- block/qcow2-refcount.c | 11 ++- block/qcow2.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/block/qcow2-re

[Qemu-devel] [PULL for-2.0 20/51] vhdx: Bounds checking for block_size and logical_sector_size (CVE-2014-0148)

2014-04-01 Thread Stefan Hajnoczi
From: Jeff Cody Other variables (e.g. sectors_per_block) are calculated using these variables, and if not range-checked illegal values could be obtained causing infinite loops and other potential issues when calculating BAT entries. The 1.00 VHDX spec requires BlockSize to be min 1MB, max 256MB.

[Qemu-devel] [PULL for-2.0 30/51] qcow2: Avoid integer overflow in get_refcount (CVE-2014-0143)

2014-04-01 Thread Stefan Hajnoczi
From: Kevin Wolf This ensures that the checks catch all invalid cluster indexes instead of returning the refcount of a wrong cluster. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- block/qcow2-refcount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [Qemu-devel] [PATCH v5 10/11] spapr-vfio: add spapr-pci-vfio-host-bridge to support vfio

2014-04-01 Thread Alex Williamson
On Tue, 2014-04-01 at 17:25 +1100, Alexey Kardashevskiy wrote: > On 04/01/2014 07:09 AM, Alex Williamson wrote: > > On Fri, 2014-03-28 at 17:01 +1100, Alexey Kardashevskiy wrote: > >> On 03/20/2014 06:57 AM, Alex Williamson wrote: > >>> On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote:

[Qemu-devel] [PULL for-2.0 35/51] dmg: coding style and indentation cleanup

2014-04-01 Thread Stefan Hajnoczi
Clean up the mix of tabs and spaces, as well as the coding style violations in block/dmg.c. There are no semantic changes since this patch simply reformats the code. This patch is necessary before we can make meaningful changes to this file, due to the inconsistent formatting and confusing indent

[Qemu-devel] [PULL for-2.0 27/51] qcow2: Validate active L1 table offset and size (CVE-2014-0144)

2014-04-01 Thread Stefan Hajnoczi
From: Kevin Wolf This avoids an unbounded allocation. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- block/qcow2.c | 16 tests/qemu-iotests/080 | 18 ++ tests/qemu-iotests/080.out | 11 +++ 3 files

[Qemu-devel] [PULL for-2.0 38/51] dmg: use appropriate types when reading chunks

2014-04-01 Thread Stefan Hajnoczi
Use the right types instead of signed int: size_t new_size; This is a byte count for g_realloc() that is calculated from uint32_t and size_t values. uint32_t chunk_count; Use the same type as s->n_chunks, which is used together with chunk_count. This patch is a cleanup and does not

[Qemu-devel] [PULL for-2.0 0/1] Tracing patches

2014-04-01 Thread Stefan Hajnoczi
This SystemTap fix makes the .stp file we generate work again. The following changes since commit 63678e17cf399ff81b93417fe7bee8d6ef6b6b1b: configure: add option to disable -fstack-protector flags (2014-03-31 20:16:02 +0100) are available in the git repository at: git://github.com/stefanha

[Qemu-devel] [PULL for-2.0 1/1] trace: add workaround for SystemTap PR13296

2014-04-01 Thread Stefan Hajnoczi
From: "Frank Ch. Eigler" SystemTap sdt.h sometimes results in compiled probes without sufficient information to extract arguments. This can be solved in a slightly hacky way by encouraging the compiler to place arguments into registers. This patch fixes the apic_reset_irq_delivered() trace even

[Qemu-devel] [Bug 1297487] Re: MTU not honored in virtio vnet

2014-04-01 Thread Serge Hallyn
** Also affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1297487 Title: MTU not honored in virtio vnet Status in QEMU: New Status in “qemu-

Re: [Qemu-devel] [PATCH 4/5] hw/net/stellaris_enet: Correctly implement the TR and THR registers

2014-04-01 Thread Peter Maydell
On 1 April 2014 18:44, Dr. David Alan Gilbert wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > >> @@ -338,9 +347,11 @@ static void stellaris_enet_write(void *opaque, hwaddr >> offset, >> case 0x2c: /* MTXD */ >> s->mtxd = value & 0xff; >> break; >> +cas

[Qemu-devel] [PULL for-2.0 14/51] bochs: Check catalog_size header field (CVE-2014-0143)

2014-04-01 Thread Stefan Hajnoczi
From: Kevin Wolf It should neither become negative nor allow unbounded memory allocations. This fixes aborts in g_malloc() and an s->catalog_bitmap buffer overflow on big endian hosts. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PULL for-2.0 11/51] qemu-iotests: Support for bochs format

2014-04-01 Thread Stefan Hajnoczi
From: Kevin Wolf Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/078 | 53 +++ tests/qemu-iotests/078.out | 6 +++ tests/qemu-iotests/com

[Qemu-devel] [PULL for-2.0 09/51] block/cloop: refuse images with bogus offsets (CVE-2014-0144)

2014-04-01 Thread Stefan Hajnoczi
The offsets[] array allows efficient seeking and tells us the maximum compressed data size. If the offsets are bogus the maximum compressed data size will be unrealistic. This could cause g_malloc() to abort and bogus offsets mean the image is broken anyway. Therefore we should refuse such image

Re: [Qemu-devel] [PATCH 3/5] hw/net/stellaris_enet: Rewrite tx fifo handling code

2014-04-01 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 1 April 2014 18:45, Dr. David Alan Gilbert wrote: > > (resend reply - the mail gru got some of the 1st one) > > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > >> > You should probably increment the migration state version number to 2.

[Qemu-devel] [PULL for-2.0 48/51] qcow2: Limit snapshot table size

2014-04-01 Thread Stefan Hajnoczi
From: Kevin Wolf Even with a limit of 64k snapshots, each snapshot could have a filename and an ID with up to 64k, which would still lead to pretty large allocations, which could potentially lead to qemu aborting. Limit the total size of the snapshot table to an average of 1k per entry when the l

Re: [Qemu-devel] [PATCH 3/5] hw/net/stellaris_enet: Rewrite tx fifo handling code

2014-04-01 Thread Peter Maydell
On 1 April 2014 18:45, Dr. David Alan Gilbert wrote: > (resend reply - the mail gru got some of the 1st one) > > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> > You should probably increment the migration state version number to 2. >> >> Oops, yes. > > Fix if you need to reroll, but not too

Re: [Qemu-devel] [PATCH 5/5] hw/net/stellaris_enet: Fix debug format strings

2014-04-01 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > Fix various debug format strings which were incorrect for the > data type, so that building with debug enabled is possible. > > Signed-off-by: Peter Maydell Reviewed-by: Dr. David Alan Gilbert > --- > hw/net/stellaris_enet.c | 6 +++--- > 1

  1   2   3   >