Re: [Qemu-devel] [PATCH V6 14/14] hmp: show snapshots on single block device

2013-02-25 Thread Wenchao Xia
于 2013-2-20 4:51, Eric Blake 写道: On 02/18/2013 07:09 AM, Wenchao Xia wrote: This patch added the support of showing internal snapshots on a single block device in hmp layer, by simply change parameter in s/change/changing a/ calling of qmp funtion. s/funtion/function/ OK. Signed-

Re: [Qemu-devel] [PATCH V6 11/14] qmp: add interface query-snapshots

2013-02-25 Thread Wenchao Xia
于 2013-2-21 7:30, Eric Blake 写道: On 02/20/2013 03:57 PM, Eric Blake wrote: On 02/18/2013 03:46 PM, Wenchao Xia wrote: Hi, Eric About the interface,there is actually requirement to know internal snapshots in an image of a backing file, so I think the API should be improved as: # @query-snaps

Re: [Qemu-devel] [PATCH V6 06/14] block: add image info query function bdrv_query_image_info()

2013-02-25 Thread Wenchao Xia
于 2013-2-20 7:04, Eric Blake 写道: On 02/18/2013 07:09 AM, Wenchao Xia wrote: This patch add function bdrv_query_image_info(), which will return image info in qmp object format. The implementation code are based on the code moved from qemu-img.c, but use block layer function to get snapshot inf

Re: [Qemu-devel] [PATCH V6 04/14] block: move collect_snapshots() and collect_image_info() to block.c

2013-02-25 Thread Wenchao Xia
于 2013-2-20 5:24, Eric Blake 写道: On 02/18/2013 07:09 AM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia --- block.c | 81 + include/block/block.h |4 ++ qemu-img.c| 81 --

Re: [Qemu-devel] scp during migration with vhost fails

2013-02-25 Thread Jason Wang
On 02/25/2013 06:01 PM, Michael S. Tsirkin wrote: > On Mon, Feb 25, 2013 at 02:11:44PM +0800, Jason Wang wrote: >> On 02/25/2013 01:57 PM, Jason Wang wrote: >>> On 02/24/2013 05:54 AM, Michael S. Tsirkin wrote: On Sat, Feb 23, 2013 at 10:49:29PM +0200, Michael S. Tsirkin wrote: > On Fri, F

[Qemu-devel] [PATCH 1/1] virtio-serial: make flow control explicit in virtio-console

2013-02-25 Thread Amit Shah
virtio-console.c used to return a value less than the number of bytes asked to be written out to a chardev backend in case the backend is not writable. virtio-serial-bus.c then implicitly enabled flow control for that port. Make this explicit instead. Signed-off-by: Amit Shah --- hw/virtio-con

[Qemu-devel] [PATCH 0/1] virtio-serial: make flow-control logic explicit

2013-02-25 Thread Amit Shah
Hi, This is an add-on patch to the series Anthony posted introducing flow control for chardevs. The previous logic relied on a <= nr_bytes return to the 'write' function, which indicated a short write, triggering flow control in the virtio-serial-bus code. This change explicitly asks the virtio-

[Qemu-devel] [PATCH] pseries: Add compatible property to root of device tree

2013-02-25 Thread David Gibson
Currently, for the pseries machine the device tree supplied by qemu to SLOF and from there to the guest does not include a 'compatible property' at the root level. Usually that works fine, since in this case the compatible property doesn't really give any information not already found in the 'devi

Re: [Qemu-devel] [PATCH v2] piix: define a TOM register to report the base of PCI

2013-02-25 Thread Zhang, Xiantao
For real i440fx, its TOM is fixed to 1G, I think Xen or other VMMs playing with Qemu should break this hardware rule. Maybe we can implement this register as a write-only one, so that OS can't see its existence. If OS reads this register, Qemu always return 0xff, and for any write operations

Re: [Qemu-devel] [PATCH v2] piix: define a TOM register to report the base of PCI

2013-02-25 Thread Hao, Xudong
> -Original Message- > From: qemu-devel-bounces+xudong.hao=intel@nongnu.org > [mailto:qemu-devel-bounces+xudong.hao=intel@nongnu.org] On Behalf > Of Stefano Stabellini > Sent: Tuesday, February 26, 2013 12:06 AM > To: Hao, Xudong > Cc: aligu...@us.ibm.com; Stefano Stabellini; m...@r

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/3] target-ppc: Synchronize VPA state with KVM

2013-02-25 Thread David Gibson
On Mon, Feb 25, 2013 at 01:19:48PM +0100, Alexander Graf wrote: > > On 21.02.2013, at 03:41, David Gibson wrote: > > > For PAPR guests, KVM tracks the various areas registered with the > > H_REGISTER_VPA hypercall. For full emulation, of course, these are tracked > > within qemu. At present the

Re: [Qemu-devel] [PATCH 1/9] chardev: add support for qapi-based chardev initialization

2013-02-25 Thread mdroth
On Mon, Feb 25, 2013 at 10:03:33AM +0100, Gerd Hoffmann wrote: > This patch add support for a new way to initialize chardev devices. > Instead of calling a initialization function with a QemuOpts we will > now create a (qapi) ChardevBackend, optionally call a function to > fill ChardevBackend from

Re: [Qemu-devel] Moving BIOS tables from SeaBIOS to QEMU

2013-02-25 Thread Kevin O'Connor
On Mon, Feb 25, 2013 at 10:51:55AM +0200, Gleb Natapov wrote: > On Sun, Feb 24, 2013 at 01:00:28PM -0500, Kevin O'Connor wrote: > > I did a review of the SeaBIOS code to see what information is > > currently used to generate the ACPI, SMBIOS, MPTABLE, and PIR bios > > tables. Here's what I came up

Re: [Qemu-devel] [PATCH 2/4] Fix cache_resize to keep old entry age

2013-02-25 Thread Juan Quintela
Orit Wasserman wrote: > Instead of using cache_insert do the update itself > > Signed-off-by: Orit Wasserman > --- > page_cache.c | 16 ++-- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/page_cache.c b/page_cache.c > index 748957b..21a4cde 100644 > --- a/page_ca

[Qemu-devel] unix sockets for qemu

2013-02-25 Thread clownix
You know the inet sockets in qemu: ... -net socket,vlan=1,connect=127.0.0.1:47654 ... Well, a bug I looked into lead me to code a very simple process doing a "cable" between two machines connected with this config. This setup gave surprising results and lead me to compare ping timings between this

Re: [Qemu-devel] [PATCH 7/9] chardev: add stdio support to qapi

2013-02-25 Thread Eric Blake
On 02/25/2013 02:03 AM, Gerd Hoffmann wrote: > This patch adds 'stdio' support to qapi and also switches over the > stdio chardev initialization to the new qapi code path. > > Signed-off-by: Gerd Hoffmann > --- > qapi-schema.json | 14 +- > qemu-char.c | 26 +

Re: [Qemu-devel] [PATCH 4/4] libcacard: teach vscclient to use GMainLoop for portability

2013-02-25 Thread Paolo Bonzini
Il 25/02/2013 18:56, Marc-André Lureau ha scritto: > + > +static gboolean > +do_socket(GIOChannel *source, > + GIOCondition condition, > + gpointer data) Extracting do_socket should be a separate patch... Paolo

Re: [Qemu-devel] [PATCH 3/4] libcacard: fix mingw64 cross-compilation

2013-02-25 Thread Marc-André Lureau
- Mensaje original - > Il 25/02/2013 18:56, Marc-André Lureau ha scritto: > > LINK = $(call quiet-command,\ > > $(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=link --tag=CC > > \ > > )$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) $(LIBTOOLFLAGS) > > -o $@ \ > >

[Qemu-devel] [PATCH v2 09/10] hw/arm_sysctl: Implement SYS_CFG_OSC function

2013-02-25 Thread Peter Maydell
Implement the SYS_CFG_OSC function. Since the idea of programmable clock rates doesn't make much sense for QEMU, we simply allow the clock rate to be read back as written. The number and value of the daughterboard oscillators varies between daughterboards, so we provide an array property to allow t

[Qemu-devel] [PATCH] glib: Add compat wrapper for g_poll on old glib

2013-02-25 Thread Alexander Graf
Older glib doesn't implement g_poll(). Most notably the glib version in use on SLE11 is on 2.18 which is hit by this. We do want to use g_poll() in the source however. So on older systems, just wrap it with functions that do exist on older versions. Signed-off-by: Anthony Liguori Signed-off-by:

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-25 Thread Alexander Graf
On 22.02.2013, at 12:47, Paolo Bonzini wrote: > Il 22/02/2013 11:07, Laurent Desnogues ha scritto: >>> The g_poll(3) interface is a portable version of the poll(2) system call. >>> The difference to select(2) is that fine-grained events (G_IO_IN, G_IO_OUT, G_IO_HUP, G_IO_ERR, G_IO_PRI

[Qemu-devel] [PATCH v2 4/6] libcacard: split vscclient main() from socket reading

2013-02-25 Thread Marc-André Lureau
From: Marc-André Lureau --- libcacard/vscclient.c | 314 ++ 1 file changed, 162 insertions(+), 152 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index 9b744f2..5e00db3 100644 --- a/libcacard/vscclient.c +++ b/libcacard/vs

[Qemu-devel] [PATCH v2 3/6] libcacard: fix mingw64 cross-compilation

2013-02-25 Thread Marc-André Lureau
Compile and link with version.lo Signed-off-by: Marc-André Lureau --- Makefile | 8 ++-- rules.mak | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2262410..5f0ded1 100644 --- a/Makefile +++ b/Makefile @@ -148,11 +148,15 @@ recurse-all: $(SUB

[Qemu-devel] [Bug 498417] Re: cache=writeback on disk image doesn't do write-back

2013-02-25 Thread Serge Hallyn
** Changed in: qemu Status: Incomplete => 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/498417 Title: cache=writeback on disk image doesn't do write-back Status in QEMU: New Bug desc

Re: [Qemu-devel] [PATCH 2/4] build-sys: must link with -fstack-protector

2013-02-25 Thread Marc-André Lureau
self nack, it fails to link without libtool

Re: [Qemu-devel] [PATCH 2/2] bridge helper: unified error cleanup for parse_acl_file

2013-02-25 Thread Corey Bryant
On 02/24/2013 09:00 PM, Doug Goldstein wrote: Handle errors and cleanup from the error in a unified place for parse_acl_file(). Signed-off-by: Doug Goldstein CC: Anthony Liguori CC: Richa Marwaha CC: Corey Bryant TO: qemu-devel@nongnu.org --- qemu-bridge-helper.c | 32 +++

Re: [Qemu-devel] [PATCH 1/2] bridge helper: support conf dirs

2013-02-25 Thread Corey Bryant
This series seems reasonable to me. I just have some comments on implementation details. On 02/24/2013 09:00 PM, Doug Goldstein wrote: Allow the bridge helper to take a config directory rather than having to specify every file in the directory manually via an include statement. Signed-off-by:

Re: [Qemu-devel] [Fwd: qemu tx stop in cloonix]

2013-02-25 Thread clownix
Hello Stefan, I coded a socket-based cable between 2 vanilla kvm, here are the commands to do: tar xvf qemu_test_sock.tar.gz cd qemu_test_sock make ./qemu_test_sock kvm \ -nodefaults \ -nographic \ -serial stdio \ -drive file=guest1,media=disk,if=virtio \ -device virti

[Qemu-devel] [PATCH v2 6/6] libcacard: teach vscclient to use GMainLoop for portability

2013-02-25 Thread Marc-André Lureau
This version handles non-blocking sending and receiving from the socket. Signed-off-by: Marc-André Lureau --- libcacard/vscclient.c | 391 +++--- 1 file changed, 246 insertions(+), 145 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vsccli

[Qemu-devel] [PATCH v2 5/6] libcacard: vscclient to use QemuThread for portability

2013-02-25 Thread Marc-André Lureau
From: Marc-André Lureau --- libcacard/vscclient.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index 5e00db3..5f47634 100644 --- a/libcacard/vscclient.c +++ b/libcacard/vscclient.c @@ -218,8 +218,7 @@ on_host_init(VSCM

[Qemu-devel] [PATCH v2 2/6] build-sys: must link with -fstack-protector

2013-02-25 Thread Marc-André Lureau
It is needed to give that flag to the linker as well, but latest libtool 2.4.2 still swallows that argument, so let's pass it with libtool -Wc argument. qemu-1.4.0/stubs/arch-query-cpu-def.c:6: undefined reference to `__stack_chk_guard' Signed-off-by: Marc-André Lureau --- configure | 8 ++

[Qemu-devel] [PATCH v2 1/6] util: move socket_init() to osdep.c

2013-02-25 Thread Marc-André Lureau
From: Marc-André Lureau vscclient needs to call socket_init() for portability. Moving to osdep.c since it has no internal dependency. Signed-off-by: Marc-André Lureau --- util/osdep.c| 23 +++ util/qemu-sockets.c | 24 2 files changed, 23 in

Re: [Qemu-devel] [PATCH v11 5/5] VMXNET3 device implementation

2013-02-25 Thread Andreas Färber
Am 25.02.2013 21:11, schrieb Dmitry Fleytman: [snip] > +static int > +vmxnet3_msix_load(QEMUFile *f, void *opaque, int version_id) > +{ > +msix_load(&((VMXNET3State *)opaque)->dev, f); Apart from doing too much in one line, you should not access the parent field ->dev directly but use PCI_DEVI

[Qemu-devel] [PATCH v4 2/5] usb/hcd-ehci: Split off instance_init from realize

2013-02-25 Thread Andreas Färber
This makes the mem MemoryRegion available to derived instance_inits. Keep the bus in realize for now since naming breaks in instance_init. Signed-off-by: Andreas Färber --- hw/usb/hcd-ehci-pci.c| 19 ++- hw/usb/hcd-ehci-sysbus.c | 16 +--- hw/usb/hcd-ehci.c

[Qemu-devel] [PATCH v3 4/4] Add top level changes for moxie

2013-02-25 Thread Anthony Green
Signed-off-by: Anthony Green --- MAINTAINERS | 5 + arch_init.c | 2 ++ configure | 12 +++- cpu-exec.c| 2 ++ default-configs/moxie-softmmu.mak | 2 ++ qapi-schema.json |

[Qemu-devel] [PATCH v3 2/4] Add moxie disassembler

2013-02-25 Thread Anthony Green
Signed-off-by: Anthony Green --- disas.c | 6 + disas/Makefile.objs | 1 + disas/moxie.c | 360 include/disas/bfd.h | 66 +- 4 files changed, 401 insertions(+), 32 deletions(-) create mode 100644 disas/moxie.c

[Qemu-devel] [PATCH v3 3/4] Add sample moxie system

2013-02-25 Thread Anthony Green
Signed-off-by: Anthony Green --- hw/moxie/Makefile.objs | 6 ++ hw/moxie/moxiesim.c| 175 + include/sysemu/arch_init.h | 1 + 3 files changed, 182 insertions(+) create mode 100644 hw/moxie/Makefile.objs create mode 100644 hw/moxie/mox

[Qemu-devel] [PATCH v3 0/4] Moxie CPU target port

2013-02-25 Thread Anthony Green
One of the patches in v2 of this patch set was botched. This one is clean. Sorry about that, and thanks in advance... Anthony Green Anthony Green (4): Add moxie target code Add moxie disassembler Add sample moxie system Add top level changes for moxie MAINTAINERS

Re: [Qemu-devel] [PATCH] vl.c: Support multiple CPU ranges on -numa option

2013-02-25 Thread Andreas Färber
Am 21.02.2013 21:57, schrieb Eduardo Habkost: > On Thu, Feb 21, 2013 at 09:23:22PM +0100, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >>> This allows "," to be used a separator between each CPU range. Note >>> that commas inside key=value command-line options have to be escaped >>> usi

Re: [Qemu-devel] [libvirt] [PATCH] vl.c: Support multiple CPU ranges on -numa option

2013-02-25 Thread Eric Blake
On 02/21/2013 01:57 PM, Eduardo Habkost wrote: >>> Note that the following format, currently used by libvirt: >>> >>> -numa nodes,cpus=A,B,C,D >>> >>> will _not_ work yet, as "," is the option separator for the command-line >>> option parser, and it will require changing the -numa option parsing

Re: [Qemu-devel] [PATCH V10 0/5] VMXNET3 paravirtual NIC device implementation

2013-02-25 Thread Dmitry Fleytman
Done. On Thu, Feb 21, 2013 at 12:47 PM, Stefan Hajnoczi wrote: > Hi Dmitry, > The net multiqueue feature went into QEMU 1.4 and conflicts with vmxnet3.c. > > Please post a rebased version onto qemu.git/master so vmxnet3 can be > merged. I'm currently getting the following compiler errors with >

[Qemu-devel] [PATCH 2/2] target-arm: Fix sbc_CC carry

2013-02-25 Thread Peter Maydell
From: Richard Henderson While T0+~T1+CF = T0-T1+CF-1 is true for the low 32-bits, it does not produce the correct carry-out to bit 33. Do exactly what the manual says. Using the ~T1 makes the add and subtract code paths nearly identical, so have sbc_CC use adc_CC. Cc: Peter Maydell Reported-b

Re: [Qemu-devel] [PATCH v4 0/6] Efficient VM backup for qemu

2013-02-25 Thread Dietmar Maurer
> >>> If we use nbd, how can we pass additional information to the other > >>> side, for example information about unallocated regions? > >>> > >> > >> You can either send trim commands, or just skip those regions and let > >> the other side figure it out. > > > > But we are lost if we want to tran

[Qemu-devel] [PATCH v11 2/5] iovec checksum calculation fuction

2013-02-25 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman Signed-off-by: Yan Vugenfirer --- include/net/checksum.h | 8 net/checksum.c | 28 2 files changed, 36 insertions(+) diff --git a/include/net/checksum.h b/include/net/checksum.h index 3e7b93d..b1cf18a 100644 --- a/inc

[Qemu-devel] [PATCH V11 0/5] VMXNET3 paravirtual NIC device implementation

2013-02-25 Thread Dmitry Fleytman
This set of patches implements VMWare VMXNET3 paravirtual NIC device. The device supports of all the device features including offload capabilties, VLANs and etc. The device is tested on different OSes: Fedora 15 Ubuntu 10.4 Centos 6.2 Windows 2008R2 Windows 2008 64bit Windo

Re: [Qemu-devel] [PATCH v11 2/5] iovec checksum calculation fuction

2013-02-25 Thread Andreas Färber
Am 25.02.2013 21:11, schrieb Dmitry Fleytman: > Signed-off-by: Dmitry Fleytman > Signed-off-by: Yan Vugenfirer > --- > include/net/checksum.h | 8 > net/checksum.c | 28 > 2 files changed, 36 insertions(+) > > diff --git a/include/net/checksum.h b/

Re: [Qemu-devel] Doubt with qemu_cpu_is_self (non-KVM)

2013-02-25 Thread Peter Maydell
On 25 February 2013 19:07, Alex Barcelo wrote: > I'm struggling with the code to understand the "duty and soul" of the > "qemu_cpu_is_self" function (@cpus.c), and I quite not get it. > > I see that this function is called from some points. E.g., from > tcg_hangle_interrupt and run_on_cpu. Amongst

Re: [Qemu-devel] [PULL 0/2] target-arm queue (fixes breakage)

2013-02-25 Thread Andreas Färber
Am 25.02.2013 21:16, schrieb Peter Maydell: > Hi; here's a pullreq which just contain's RTH's two > patches which fix the bad breakage of target-arm. > Please pull ASAP :-) > > thanks > -- PMM > > > The following changes since commit a345481baa2b2fb3d54f8c9ddb58dfcaf75786df: > > target-mips:

Re: [Qemu-devel] Doubt with qemu_cpu_is_self (non-KVM)

2013-02-25 Thread Andreas Färber
Am 25.02.2013 20:07, schrieb Alex Barcelo: > I'm struggling with the code to understand the "duty and soul" of the > "qemu_cpu_is_self" function (@cpus.c), and I quite not get it. > > I see that this function is called from some points. E.g., from > tcg_hangle_interrupt and run_on_cpu. Amongst oth

[Qemu-devel] [PULL 0/2] target-arm queue (fixes breakage)

2013-02-25 Thread Peter Maydell
Hi; here's a pullreq which just contain's RTH's two patches which fix the bad breakage of target-arm. Please pull ASAP :-) thanks -- PMM The following changes since commit a345481baa2b2fb3d54f8c9ddb58dfcaf75786df: target-mips: fix for sign-issue in MULQ_W helper (2013-02-23 22:20:45 +0100) a

[Qemu-devel] [PATCH 1/2] arm/translate.c: Fix adc_CC/sbc_CC implementation

2013-02-25 Thread Peter Maydell
From: Peter Crosthwaite commits 49b4c31efcce45ab714f286f14fa5d5173f9069d and 2de68a4900ef6eb67380b0c128abfe1976bc66e8 reworked the implementation of adc_CC and sub_CC. The new implementations (on the TCG_TARGET_HAS_add2_i32 code path) are incorrect. The new logic is: CF:NF = 0:A +/- 0:CF CF:NF =

[Qemu-devel] [PATCH v3 3/3] target-ppc: Fix SUBFE carry

2013-02-25 Thread Richard Henderson
While ~T0+T1+CF = T1-T0+CF-1 is true for the low 32-bits, it does not produce the correct carry-out to bit 33. Do exactly what the manual says. Cc: Alexander Graf Signed-off-by: Richard Henderson --- target-ppc/translate.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --

[Qemu-devel] [PATCH v11 4/5] Packet abstraction for VMWARE network devices

2013-02-25 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman Signed-off-by: Yan Vugenfirer --- hw/Makefile.objs | 1 + hw/vmxnet_rx_pkt.c | 187 ++ hw/vmxnet_rx_pkt.h | 174 hw/vmxnet_tx_pkt.c | 567 + hw/vmxnet_tx_pkt.h | 148 ++

[Qemu-devel] [PATCH v11 1/5] Checksum-related utility functions

2013-02-25 Thread Dmitry Fleytman
net_checksum_add_cont() checksum calculation for scattered data with odd chunk sizes net_raw_checksum() checksum calculation for a buffer Signed-off-by: Dmitry Fleytman Signed-off-by: Yan Vugenfirer --- include/net/checksum.h | 14 +- net/checksum.c | 13 +++-- 2 fi

[Qemu-devel] [PATCH v11 3/5] Common definitions for VMWARE devices

2013-02-25 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman Signed-off-by: Yan Vugenfirer --- hw/vmware_utils.h | 143 ++ hw/vmxnet_debug.h | 115 ++ include/net/eth.h | 347 ++ net/Makefile.objs | 1 + net/eth.c | 217

[Qemu-devel] [PATCH v3 2/3] target-arm: Fix sbc_CC carry

2013-02-25 Thread Richard Henderson
While T0+~T1+CF = T0-T1+CF-1 is true for the low 32-bits, it does not produce the correct carry-out to bit 33. Do exactly what the manual says. Using the ~T1 makes the add and subtract code paths nearly identical, so have sbc_CC use adc_CC. Cc: Peter Maydell Reported-by: Laurent Desnogues Sign

[Qemu-devel] [Bug 1129571] Re: libreoffice armhf FTBFS

2013-02-25 Thread Serge Hallyn
@John, with that patch applied on top of 1.4.0, I still get segfault when running javac --version. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1129571 Title: libreoffice armhf FTBFS Status in Q

[Qemu-devel] [PATCH v3 1/3] arm/translate.c: Fix adc_CC/sbc_CC implementation

2013-02-25 Thread Richard Henderson
From: Peter Crosthwaite commits 49b4c31efcce45ab714f286f14fa5d5173f9069d and 2de68a4900ef6eb67380b0c128abfe1976bc66e8 reworked the implementation of adc_CC and sub_CC. The new implementations (on the TCG_TARGET_HAS_add2_i32 code path) are incorrect. The new logic is: CF:NF = 0:A +/- 0:CF CF:NF =

Re: [Qemu-devel] [PATCH v3 0/3] Fix two carry problems in add2 patchset

2013-02-25 Thread Peter Maydell
On 25 February 2013 19:41, Richard Henderson wrote: > V2->V3: > Feedback from Peter Maydell: share code between adc_CC and sbc_CC. > > V1->V2: > Dangit, that's what trying to be speedy gets you, failing to make > all of the changes you wrote in the comment. This time actually > fix the su

Re: [Qemu-devel] [PATCH v2 3/3] target-ppc: Fix SUBFE carry

2013-02-25 Thread Peter Maydell
On 25 February 2013 19:01, Richard Henderson wrote: > While ~T0+T1+CF = T1-T0+CF-1 is true for the low 32-bits, > it does not produce the correct carry-out to bit 33. Do > exactly what the manual says. > > Cc: Alexander Graf > Signed-off-by: Richard Henderson Not a PPC expert but this looks li

Re: [Qemu-devel] [PATCH v3 2/3] target-arm: Fix sbc_CC carry

2013-02-25 Thread Peter Maydell
On 25 February 2013 19:41, Richard Henderson wrote: > While T0+~T1+CF = T0-T1+CF-1 is true for the low 32-bits, > it does not produce the correct carry-out to bit 33. Do > exactly what the manual says. > > Using the ~T1 makes the add and subtract code paths nearly > identical, so have sbc_CC use

Re: [Qemu-devel] [PATCH v3 1/3] arm/translate.c: Fix adc_CC/sbc_CC implementation

2013-02-25 Thread Peter Maydell
On 25 February 2013 19:41, Richard Henderson wrote: > From: Peter Crosthwaite > > commits 49b4c31efcce45ab714f286f14fa5d5173f9069d and > 2de68a4900ef6eb67380b0c128abfe1976bc66e8 reworked the implementation of adc_CC > and sub_CC. The new implementations (on the TCG_TARGET_HAS_add2_i32 code path)

[Qemu-devel] [PATCH v3 0/3] Fix two carry problems in add2 patchset

2013-02-25 Thread Richard Henderson
V2->V3: Feedback from Peter Maydell: share code between adc_CC and sbc_CC. V1->V2: Dangit, that's what trying to be speedy gets you, failing to make all of the changes you wrote in the comment. This time actually fix the sub2 to add2 like I intended, not just the not portion. The patch s

Re: [Qemu-devel] [PATCH v2 0/3] Fix two carry problems in add2 patchset

2013-02-25 Thread Laurent Desnogues
On Mon, Feb 25, 2013 at 8:01 PM, Richard Henderson wrote: > V1->V2: > Dangit, that's what trying to be speedy gets you, failing to make > all of the changes you wrote in the comment. This time actually > fix the sub2 to add2 like I intended, not just the not portion. > > The patch set is re

[Qemu-devel] [PATCH v2 1/3] arm/translate.c: Fix adc_CC/sbc_CC implementation

2013-02-25 Thread Richard Henderson
From: Peter Crosthwaite commits 49b4c31efcce45ab714f286f14fa5d5173f9069d and 2de68a4900ef6eb67380b0c128abfe1976bc66e8 reworked the implementation of adc_CC and sub_CC. The new implementations (on the TCG_TARGET_HAS_add2_i32 code path) are incorrect. The new logic is: CF:NF = 0:A +/- 0:CF CF:NF =

[Qemu-devel] [PATCH qom-cpu v2 6/7] target-arm: Override do_interrupt for ARMv7-M profile

2013-02-25 Thread Andreas Färber
Enable ARMCPUInfo to specify a custom class_init functions. Introduce arm_v7m_class_init() and use it for "cortex-m3" model. Instead of forwarding from arm_cpu_do_interrupt() to do_interrupt_v7m(), override CPUClass::do_interrupt with arm_v7m_cpu_do_interrupt() in arm_v7m_class_init(). Signed-off

[Qemu-devel] [PATCH v2 3/3] target-ppc: Fix SUBFE carry

2013-02-25 Thread Richard Henderson
While ~T0+T1+CF = T1-T0+CF-1 is true for the low 32-bits, it does not produce the correct carry-out to bit 33. Do exactly what the manual says. Cc: Alexander Graf Signed-off-by: Richard Henderson --- target-ppc/translate.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --

[Qemu-devel] [PATCH v2 0/3] Fix two carry problems in add2 patchset

2013-02-25 Thread Richard Henderson
V1->V2: Dangit, that's what trying to be speedy gets you, failing to make all of the changes you wrote in the comment. This time actually fix the sub2 to add2 like I intended, not just the not portion. The patch set is re-pushed at git://github.com/rth7680/qemu.git fix-carry Please *r

[Qemu-devel] [PATCH v2 2/3] target-arm: Fix sbc_CC carry

2013-02-25 Thread Richard Henderson
While T0+~T1+CF = T0-T1+CF-1 is true for the low 32-bits, it does not produce the correct carry-out to bit 33. Do exactly what the manual says. Cc: Peter Maydell Reported-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target-arm/translate.c | 8 1 file changed, 4 insertio

[Qemu-devel] [PATCH v4 1/5] usb/hcd-ehci-sysbus: Convert to QOM realize

2013-02-25 Thread Andreas Färber
The SysBus qdev initfn merely calls SysBusDeviceClass::init, so we can replace it with a realizefn already. This avoids getting into any initfn ambiguity with the upcoming Faraday EHCI implementation. Rename internal usb_ehci_initfn() to usb_ehci_realize() to allow to return Errors from common ini

[Qemu-devel] Doubt with qemu_cpu_is_self (non-KVM)

2013-02-25 Thread Alex Barcelo
I'm struggling with the code to understand the "duty and soul" of the "qemu_cpu_is_self" function (@cpus.c), and I quite not get it. I see that this function is called from some points. E.g., from tcg_hangle_interrupt and run_on_cpu. Amongst others. Sometimes, seems to me that this function duty

Re: [Qemu-devel] [PATCH 0/3] Fix two carry problems in add2 patchset.

2013-02-25 Thread Peter Maydell
On 25 February 2013 18:30, Richard Henderson wrote: > Reported by Laurent for ARM, I made the exact same mistake for PPC. > > The patch set is at > > git://github.com/rth7680/qemu.git fix-carry > > Please apply asap. Still busted :-( -- PMM

[Qemu-devel] [PATCH qom-cpu v2 1/7] target-cris/helper.c: Update Coding Style

2013-02-25 Thread Andreas Färber
Reindent, add missing braces and drop/adjust whitespace. Prepares for CPUArchState-to-CPUState field movements in cpu_cris_handle_mmu_fault(), do_interruptv10() and do_interrupt(). The remaining functions were so minor that they can be fixed in one go. Acked-by: Edgar E. Iglesias Signed-off-by:

[Qemu-devel] [PATCH qom-cpu v2 4/7] cpu: Pass CPUState to cpu_interrupt()

2013-02-25 Thread Andreas Färber
Move it to qom/cpu.h to avoid issues with include order. Change pc_acpi_smi_interrupt() opaque to X86CPU. Signed-off-by: Andreas Färber --- cpus.c |2 +- exec.c |2 +- hw/alpha_typhoon.c | 10 -- hw/apic.c| 21 +++

Re: [Qemu-devel] Block I/O optimizations

2013-02-25 Thread Abel Gordon
Stefan Hajnoczi wrote on wrote on 25/02/2013 02:50:56 PM: > > However, I am concerned dataplane may not solve the scalability > > problem because QEMU will be still running 1 thread > > per VCPU and 1 per virtual device to handle I/O for each VM. > > Assuming we run N VMs with 1 VCPU and 1 virt

[Qemu-devel] [PATCH qom-cpu v2 3/7] exec: Pass CPUState to cpu_reset_interrupt()

2013-02-25 Thread Andreas Färber
Move it to qom/cpu.c to avoid build failures depending on include order of cpu-qom.h and exec/cpu-all.h. Change opaques of various ..._irq_handler() functions to the appropriate CPU type to facilitate using cpu_reset_interrupt(). Fix Coding Style issues while at it (missing braces, indentation).

[Qemu-devel] [PATCH qom-cpu v2 7/7] target-cris: Override do_interrupt for pre-v32 CPU cores

2013-02-25 Thread Andreas Färber
Instead of forwarding from cris_cpu_do_interrupt() to do_interruptv10(), override CPUClass::do_interrupt with crisv10_cpu_do_interrupt() in the newly introduced class_init functions. Signed-off-by: Andreas Färber --- target-cris/cpu-qom.h |1 + target-cris/cpu.c |8 target-c

Re: [Qemu-devel] [PATCH qom-cpu v2 6/7] target-arm: Override do_interrupt for ARMv7-M profile

2013-02-25 Thread Peter Maydell
On 25 February 2013 18:45, Andreas Färber wrote: > Enable ARMCPUInfo to specify a custom class_init functions. > Introduce arm_v7m_class_init() and use it for "cortex-m3" model. > > Instead of forwarding from arm_cpu_do_interrupt() to do_interrupt_v7m(), > override CPUClass::do_interrupt with arm_

[Qemu-devel] [PATCH qom-cpu v2 0/7] QOM CPUState, part 9: CPU_COMMON for interrupts

2013-02-25 Thread Andreas Färber
Hello, Rebased on my CPU VMState series v3, this series proceeds with moving fields from CPU_COMMON / CPU*State to CPUState. Thereby v2 doesn't need to drop x86 CPU version 5 VMState support. v2 also QOM'ifies CRISv10 do_interrupt support. Available for testing at: git://github.com/afaerber/qemu

[Qemu-devel] [PATCH qom-cpu v2 5/7] cpu: Replace do_interrupt() by CPUClass::do_interrupt method

2013-02-25 Thread Andreas Färber
This removes a global per-target function and thus takes us one step closer to compiling multiple targets into one executable. It will also allow to override the interrupt handling for certain CPU families. Signed-off-by: Andreas Färber --- cpu-exec.c | 36 +++

[Qemu-devel] [PATCH 2/2] libcacard: fix mingw64 cross-compilation

2013-02-25 Thread Marc-André Lureau
From: Marc-André Lureau Compile and link with version.lo Signed-off-by: Marc-André Lureau --- Makefile | 8 ++-- rules.mak | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2262410..5f0ded1 100644 --- a/Makefile +++ b/Makefile @@ -148,11 +14

[Qemu-devel] [PATCH 1/2] build-sys: must link with -fstack-protector

2013-02-25 Thread Marc-André Lureau
From: Marc-André Lureau It is needed to give that flag to the linker as well, but latest libtool 2.4.2 still swallows that argument, so let's pass it with libtool -Wc argument. qemu-1.4.0/stubs/arch-query-cpu-def.c:6: undefined reference to `__stack_chk_guard' Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH 2/3] target-arm: Fix sbc_CC carry

2013-02-25 Thread Richard Henderson
While T0+~T1+CF = T0-T1+CF-1 is true for the low 32-bits, it does not produce the correct carry-out to bit 33. Do exactly what the manual says. Cc: Peter Maydell Reported-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target-arm/translate.c | 8 1 file changed, 4 insertio

[Qemu-devel] [PATCH 1/3] arm/translate.c: Fix adc_CC/sbc_CC implementation

2013-02-25 Thread Richard Henderson
From: Peter Crosthwaite commits 49b4c31efcce45ab714f286f14fa5d5173f9069d and 2de68a4900ef6eb67380b0c128abfe1976bc66e8 reworked the implementation of adc_CC and sub_CC. The new implementations (on the TCG_TARGET_HAS_add2_i32 code path) are incorrect. The new logic is: CF:NF = 0:A +/- 0:CF CF:NF =

[Qemu-devel] [PATCH qom-cpu v3 1/6] vmstate: Make vmstate_register() static inline

2013-02-25 Thread Andreas Färber
This avoids adding a duplicate stub for CONFIG_USER_ONLY. Suggested-by: Eduardo Habkost Reviewed-by: Eduardo Habkost Reviewed-by: Juan Quintela Signed-off-by: Andreas Färber --- include/migration/vmstate.h | 12 ++-- savevm.c|7 --- 2 Dateien geändert, 10

[Qemu-devel] [PATCH qom-cpu v3 4/6] cpu: Introduce cpu_class_set_vmsd()

2013-02-25 Thread Andreas Färber
This setter avoids redefining each VMStateDescription value to vmstate_dummy by not referencing the value for CONFIG_USER_ONLY. Suggested-by: Juan Quintela Signed-off-by: Andreas Färber --- include/qom/cpu.h | 17 + 1 Datei geändert, 17 Zeilen hinzugefügt(+) diff --git a/incl

[Qemu-devel] [PATCH 3/3] target-ppc: Fix SUBFE carry

2013-02-25 Thread Richard Henderson
While ~T0+T1+CF = T1-T0+CF-1 is true for the low 32-bits, it does not produce the correct carry-out to bit 33. Do exactly what the manual says. Cc: Alexander Graf Signed-off-by: Richard Henderson --- target-ppc/translate.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --

[Qemu-devel] [PATCH 0/3] Fix two carry problems in add2 patchset.

2013-02-25 Thread Richard Henderson
Reported by Laurent for ARM, I made the exact same mistake for PPC. The patch set is at git://github.com/rth7680/qemu.git fix-carry Please apply asap. r~ Peter Crosthwaite (1): arm/translate.c: Fix adc_CC/sbc_CC implementation Richard Henderson (2): target-arm: Fix sbc_CC carry ta

[Qemu-devel] [PATCH v2 04/10] hw/arm_sysctl: Implement SYS_CFG_DVIMODE as a no-op

2013-02-25 Thread Peter Maydell
SYS_CFG_DVIMODE allows the guest to select whether the output DVI signal is VGA, SVGA, XGA, SGA or UXGA. Since this makes no difference to QEMU, implement writes as a no-op so Linux doesn't complain. Signed-off-by: Peter Maydell --- hw/arm_sysctl.c |8 1 file changed, 8 insertions(+

Re: [Qemu-devel] [RFC qom-cpu v2 6/8] target-alpha: Register VMStateDescription for AlphaCPU

2013-02-25 Thread Andreas Färber
Am 22.02.2013 16:27, schrieb Andreas Färber: > Am 22.02.2013 15:14, schrieb Juan Quintela: >> Eduardo Habkost wrote: >>> On Fri, Feb 22, 2013 at 02:22:43PM +0100, Juan Quintela wrote: Andreas Färber wrote: > Commit b758aca1f6cdb175634812b79f5560c36c902d00 (target-alpha: Enable > the

[Qemu-devel] [PATCH qom-cpu v3 6/6] target-lm32: Update VMStateDescription to LM32CPU

2013-02-25 Thread Andreas Färber
Add a vmstate_lm32_cpu referencing the previous VMStateDescription as a sub-struct and hook it up to CPUClass::vmsd. Drop cpu_{save,load}(). Signed-off-by: Andreas Färber --- target-lm32/cpu-qom.h |4 target-lm32/cpu.c |2 ++ target-lm32/cpu.h |2 -- target-lm32/machine.

Re: [Qemu-devel] [PATCH] arm/translate.c: Fix adc_CC/sbc_CC implementation

2013-02-25 Thread Peter Maydell
On 25 February 2013 17:15, Laurent Desnogues wrote: > I'm afraid this fix is not enough I've confirmed with my risu test tool that sbcs/adcs are indeed broken even with this patch applied. Patterns used: ADC_imm A1 cond:4 0010101 s:1 rn:4 rd:4 imm:12 ADC_reg A1 cond:4 101 s:1 rn:4 rd:4 imm:5

[Qemu-devel] [PATCH qom-cpu v3 0/6] QOM CPUState VMStateDescriptions

2013-02-25 Thread Andreas Färber
Hello, In response to patches from Juan [1], this series implements a declarative way for CPUs to register their CPU-specific VMStateDescription. v3 dropped alpha and openrisc, leaving only x86 as prereq for my qom-cpu-9 and lm32 as proof of concept for leave-CPUArchState-untouched-if-not-needed.

[Qemu-devel] [PATCH qom-cpu v3 5/6] target-i386: Update VMStateDescription to X86CPU

2013-02-25 Thread Andreas Färber
Expose vmstate_cpu as vmstate_x86_cpu and hook it up to CPUClass::vmsd. Adapt opaques and VMState fields to X86CPU. Drop cpu_{save,load}(). Signed-off-by: Andreas Färber --- target-i386/cpu-qom.h |4 + target-i386/cpu.c |2 + target-i386/cpu.h |2 - target-i386/machine.c | 2

[Qemu-devel] [PATCH qom-cpu v3 2/6] stubs: Add a vmstate_dummy struct for CONFIG_USER_ONLY

2013-02-25 Thread Andreas Färber
Reviewed-by: Juan Quintela Signed-off-by: Andreas Färber --- include/migration/vmstate.h |4 stubs/vmstate.c |2 ++ 2 Dateien geändert, 6 Zeilen hinzugefügt(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 6d50f6e..214a8e9 100644 --- a/inc

[Qemu-devel] [PATCH qom-cpu v3 3/6] cpu: Register VMStateDescription through CPUState

2013-02-25 Thread Andreas Färber
In comparison to DeviceClass::vmsd, CPU VMState is split in two, "cpu_common" and "cpu", and uses cpu_index as instance_id instead of -1. Therefore add a CPU-specific CPUClass::vmsd field. Unlike the legacy CPUArchState registration, rather register CPUState. Signed-off-by: Juan Quintela Signed-

[Qemu-devel] [PATCH v2 3/4] page_cache: fix memory leak

2013-02-25 Thread Orit Wasserman
From: Peter Lieven XBZRLE encoded migration introduced a MRU page cache meachnism. Unfortunately, cached items where never freed in case of a collision in the page cache on cache_insert(). This lead to out of memory conditions during XBZRLE migration if the page cache was small and there where a

[Qemu-devel] [PATCH v2 08/10] hw/vexpress: Pass voltage sensor properties to sysctl device

2013-02-25 Thread Peter Maydell
Pass voltage sensor properties to the sysctl device. Since these are daughterboard specific, we specify them via the VEDBoardInfo structure. Signed-off-by: Peter Maydell Message-id: 1359985476-29380-9-git-send-email-peter.mayd...@linaro.org --- hw/vexpress.c | 30 ++

[Qemu-devel] [PATCH v2 06/10] qdev: Implement (variable length) array properties

2013-02-25 Thread Peter Maydell
Add support for declaring array properties for qdev devices. These work by defining an initial static property 'len-arrayname' which the user of the device should set to the desired size of the array. When this property is set, memory is allocated for the array elements, and dynamic properties "arr

Re: [Qemu-devel] [PATCH 1/4] util: move socket_init() to osdep.c

2013-02-25 Thread Paolo Bonzini
Il 25/02/2013 18:56, Marc-André Lureau ha scritto: > vscclient needs to call socket_init() for portability. > Moving to osdep.c since it has no internal dependency. > > Signed-off-by: Marc-André Lureau > --- > util/osdep.c| 23 +++ > util/qemu-sockets.c | 24 -

  1   2   3   4   >