[Qemu-devel] [PATCH] Rename dma.c and its contents to reflect its ISA specific nature

2011-08-15 Thread David Gibson
hw/dma.c does not contain code generally relevant to drivers accessing system memory. In particular, it has no connection to dma.h, which does have headers pertaining to the generally useful dma functions in dma-helpers.c. Rather, it is code specific to emulating the legacy ISA-style DMA controll

Re: [Qemu-devel] [PATCH] Rename dma.c and its contents to reflect its ISA specific nature

2011-08-15 Thread malc
On Mon, 15 Aug 2011, David Gibson wrote: > hw/dma.c does not contain code generally relevant to drivers accessing > system memory. In particular, it has no connection to dma.h, which does > have headers pertaining to the generally useful dma functions in > dma-helpers.c. Rather, it is code speci

[Qemu-devel] [PATCH] block/curl: Handle failed reads gracefully.

2011-08-15 Thread Nicholas Thomas
Current behaviour if a read fails is for the acb to not get finished. This causes an infinite loop in bdrv_read_em (block.c). The read failure never gets reported to the guest and if the error condition clears, the process never recovers. With this patch, when curl reports a failure we finish the

Re: [Qemu-devel] sparc32_dma: correctly initialize ledma base address

2011-08-15 Thread Mark Cave-Ayland
On 11/08/11 17:11, Bob Breuer wrote: The ledma base address defaults to 0xff00 on reset. This fixes a bug with Solaris and SS-20 OBP when boot net is skipped. Signed-off-by: Bob Breuer --- diff --git a/hw/sparc32_dma.c b/hw/sparc32_dma.c index e75694b..61812fb 100644 --- a/hw/sparc32_dma.

Re: [Qemu-devel] [PATCH RFC] sparc32: add dbri audio device

2011-08-15 Thread Mark Cave-Ayland
On 12/08/11 16:57, Bob Breuer wrote: Here's a first look at adding the dbri audio device for sparc32. For now, this is only usable with the SS-20 OBP rom, but I'm looking at adding the slot probing to OpenBIOS to make it work there. It also needs to be adapted to the new memory api. If a bus f

[Qemu-devel] [PATCH 0/4] MIPS64 user mode emulation in QEMU with Cavium specific instruction support

2011-08-15 Thread khansa
From: Khansa Butt This is the team work of Ehsan-ul-Haq, Abdul Qadeer, Abdul Waheed, Khansa Butt from HPCN Lab KICS UET Lahore. Cavium Networks's Octeon processors are based on MIPS64r2 We have Implemented 27 user mode Cavium specific instructions. Richard Henderson told me that QEMU does not su

[Qemu-devel] [PATCH 1/4] linux-user:Support for MIPS64 user mode emulation in QEMU

2011-08-15 Thread khansa
From: Khansa Butt Signed-off-by: Khansa Butt --- configure |1 + default-configs/mips64-linux-user.mak |1 + linux-user/main.c | 21 +++-- linux-user/mips64/syscall.h |2 ++ linux-user/signal.c

[Qemu-devel] [PATCH 2/4] Octeon cpu definitions in target-mips and Octeon specific changes in set_thread_area syscall

2011-08-15 Thread khansa
From: Khansa Butt Signed-off-by: Khansa Butt --- linux-user/syscall.c |5 + target-mips/mips-defs.h |2 ++ target-mips/translate_init.c | 24 3 files changed, 31 insertions(+), 0 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/sy

[Qemu-devel] [PATCH 3/4] target-mips:Support for Cavium specific instructions

2011-08-15 Thread khansa
From: Ehsan-ul-Haq, Abdul Qadeer, Abdul Waheed, Khansa Butt Signed-off-by: Khansa Butt --- target-mips/cpu.h |7 + target-mips/helper.h|5 + target-mips/machine.c | 12 ++ target-mips/op_helper.c | 72 target-mips/translate.c | 434

[Qemu-devel] [PATCH 4/4] Addition of Cavium instruction in disassembler

2011-08-15 Thread khansa
From: Khansa Butt Signed-off-by: Khansa Butt --- disas.c |4 +++ mips-dis.c | 61 +++ target-mips/translate.c |3 ++ 3 files changed, 68 insertions(+), 0 deletions(-) diff --git a/disas.c b/disas.c index 1334b8

[Qemu-devel] [PATCH v?4?] NBD: asynchronous I/O with timeout & reconnection behaviour

2011-08-15 Thread Nicholas Thomas
This patch converts the NBD block driver to the asynchronous I/O API and gives (currently not configurable) timeout and reconnect behaviour too. All reads and writes are done asynchronously. We expect a request + response to take no more than five seconds. If requests time out or the connection to

[Qemu-devel] [PATCH v2 00/24] Memory API batch 4: more conversions

2011-08-15 Thread Avi Kivity
This patchset converts a few more devices (and boards) to the memory API. Nothing is really interesting except for the last patch, which brings proper PAM support (and better SMRAM emulation). It should also fix the regressions that were reported in some non-default pc configurations. v2: fix

[Qemu-devel] [PATCH v2 05/24] arm_timer: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/arm_timer.c | 55 --- 1 files changed, 20 insertions(+), 35 deletions(-) diff --git a/hw/arm_timer.c b/hw/arm_timer.c index fd9448f..457736b 100644 --- a/hw/arm_timer.c +++ b/hw/arm_timer.c @@ -176,6 +176,7 @@

[Qemu-devel] [PATCH v2 02/24] apic: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/apic.c | 25 ++--- 1 files changed, 10 insertions(+), 15 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 9febf40..7d0b0f6 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -80,6 +80,7 @@ typedef struct APICState APICState; struct APICState

[Qemu-devel] [PATCH v2 06/24] armv7m: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/armv7m.c | 24 ++-- 1 files changed, 10 insertions(+), 14 deletions(-) diff --git a/hw/armv7m.c b/hw/armv7m.c index 83f3393..a932f16 100644 --- a/hw/armv7m.c +++ b/hw/armv7m.c @@ -106,31 +106,27 @@ static void bitband_writel(void *opaque, t

[Qemu-devel] [PATCH v2 07/24] gt64xxx.c: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/gt64xxx.c | 36 +++- 1 files changed, 15 insertions(+), 21 deletions(-) diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index d541558..6af9782 100644 --- a/hw/gt64xxx.c +++ b/hw/gt64xxx.c @@ -227,7 +227,7 @@ #define PCI_MAPPING_ENTRY(r

[Qemu-devel] [PATCH v2 10/24] onenand: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/onenand.c | 69 +++-- 1 files changed, 37 insertions(+), 32 deletions(-) diff --git a/hw/onenand.c b/hw/onenand.c index b0cbebc..5b2f01e 100644 --- a/hw/onenand.c +++ b/hw/onenand.c @@ -23,6 +23,8 @@ #include

[Qemu-devel] [PATCH v2 19/24] ppce500_pci: convert to sysbus_init_mmio_cb2()

2011-08-15 Thread Avi Kivity
Not a huge step forward, but at least we now have a 1:1 relationship between registration and unregistration. Signed-off-by: Avi Kivity --- hw/ppce500_pci.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c index 6a9f979..439

[Qemu-devel] [PATCH v2 24/24] 440fx: fix PAM, PCI holes

2011-08-15 Thread Avi Kivity
The current implementation of PAM and the PCI holes is broken in several ways: - PCI BARs are not restricted to the PCI hole (a BAR may hide memory) - PCI devices do not respect PAM (if a PCI device maps a region while PAM maps the region to RAM, the request will be honored) This patch fi

[Qemu-devel] [PATCH v2 04/24] arm_sysctl: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/arm_sysctl.c | 27 ++- 1 files changed, 10 insertions(+), 17 deletions(-) diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c index fd0c8bc..1838401 100644 --- a/hw/arm_sysctl.c +++ b/hw/arm_sysctl.c @@ -17,6 +17,7 @@ typedef struct {

[Qemu-devel] [PATCH v2 09/24] omap_gpmc/nseries/tusb6010: convert to memory API

2011-08-15 Thread Avi Kivity
Somewhat clumsy since it needs a variable sized region. Signed-off-by: Avi Kivity --- hw/omap.h |3 +- hw/omap_gpmc.c | 60 +-- hw/tusb6010.c | 30 --- hw/tusb6010.h |7 - 4 files changed, 56 inser

[Qemu-devel] [PATCH v2 14/24] stellaris_enet: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/stellaris_enet.c | 29 - 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c index 1291931..9f1f37a 100644 --- a/hw/stellaris_enet.c +++ b/hw/stellaris_enet.c @@ -69,7 +69,7 @@ ty

[Qemu-devel] [PATCH v2 01/24] apb_pci: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/apb_pci.c | 84 + 1 files changed, 37 insertions(+), 47 deletions(-) diff --git a/hw/apb_pci.c b/hw/apb_pci.c index 1638226..6ee2068 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -31,7 +31,6 @@ #include

[Qemu-devel] [PATCH] linux-user: fix abi_(u)long, target_ulong mismatch

2011-08-15 Thread Matthias Braun
abi_(u)long might be different from target_ulong, so don't use tswapl but introduce a new tswapal see also https://bugs.launchpad.net/qemu/+bug/824716 Signed-off-by: Matthias Braun --- linux-user/qemu-types.h | 12 +++ linux-user/signal.c | 22 ++-- linux-user/strace.c |4

[Qemu-devel] [PATCH v2 22/24] pci: add pci_address_space()

2011-08-15 Thread Avi Kivity
Returns the PCI address space. Useful for bridges that can obscure part of the PCI address space. Signed-off-by: Avi Kivity --- hw/pci.c |5 + hw/pci.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index dc7271a..4e495b4 100644 --- a/hw/pci

[Qemu-devel] [PATCH v2 12/24] ppc405_uc: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ppc405_uc.c | 116 --- 1 files changed, 51 insertions(+), 65 deletions(-) diff --git a/hw/ppc405_uc.c b/hw/ppc405_uc.c index 06a053b..9caece0 100644 --- a/hw/ppc405_uc.c +++ b/hw/ppc405_uc.c @@ -28,6 +28,7 @@

[Qemu-devel] [PATCH v2 20/24] sysbus: remove sysbus_init_mmio_cb()

2011-08-15 Thread Avi Kivity
This problem with this function is that it is not reversible - it is impossible to know where things are registered and unregister them exactly. As there are no more users, we can remove it. Signed-off-by: Avi Kivity --- hw/sysbus.c | 12 hw/sysbus.h |2 -- 2 files changed, 0

[Qemu-devel] [PATCH v2 13/24] ppc4xx_sdram: convert to memory API

2011-08-15 Thread Avi Kivity
Clumsy due to the lack of clipping support, needed for changing exposed ram size. Signed-off-by: Avi Kivity --- hw/ppc405.h|9 ++--- hw/ppc405_boards.c | 18 +- hw/ppc405_uc.c | 12 hw/ppc440.c|7 +-- hw/ppc4xx.h|2

[Qemu-devel] [PATCH v2 18/24] versatile_pci: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/versatile_pci.c | 92 --- 1 files changed, 43 insertions(+), 49 deletions(-) diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c index e1d5c0b..98e56f1 100644 --- a/hw/versatile_pci.c +++ b/hw/versatile_pci.c @@

[Qemu-devel] [PATCH v2 03/24] arm_gic: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/arm_gic.c | 22 -- hw/armv7m_nvic.c |3 ++- hw/mpcore.c | 37 + hw/realview_gic.c | 38 +- 4 files changed, 44 insertions(+), 56 deletions(-) diff --

[Qemu-devel] [PATCH v2 16/24] sh_pci: convert to memory API

2011-08-15 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/sh_pci.c | 63 +++--- 1 files changed, 42 insertions(+), 21 deletions(-) diff --git a/hw/sh_pci.c b/hw/sh_pci.c index cd86501..76061bb 100644 --- a/hw/sh_pci.c +++ b/hw/sh_pci.c @@ -33,13 +33,16 @@ typedef str

[Qemu-devel] [PATCH v2 23/24] vga: drop get_system_memory() from vga devices and derivatives

2011-08-15 Thread Avi Kivity
Instead, use the bus accessors, or get the address space directly from the board constructor. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 12 ++-- hw/mips_jazz.c |3 ++- hw/pc.c |3 ++- hw/pc.h |5 +++-- hw/qxl.c|2 +- hw/vga-isa-mm.c | 15

[Qemu-devel] [PATCH v2 17/24] arm11mpcore: use sysbus_init_mmio_cb2

2011-08-15 Thread Avi Kivity
This tells the sysbus code it need not use IO_MEM_UNASSIGNED. Signed-off-by: Avi Kivity --- hw/arm11mpcore.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hw/arm11mpcore.c b/hw/arm11mpcore.c index b47707f..7d60ef6 100644 --- a/hw/arm11mpcore.c +++ b/hw/arm11mpcor

[Qemu-devel] [PATCH v2 21/24] isa: add isa_address_space()

2011-08-15 Thread Avi Kivity
A helper that returns the address space used by ISA devices. Useful for getting rid of isa_mem_base, multiple ISA buses, or ISA buses behind bridges. Signed-off-by: Avi Kivity --- hw/isa-bus.c |6 ++ hw/isa.h |1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/h

[Qemu-devel] [PATCH v2 15/24] sysbus: add a variant of sysbus_init_mmio_cb with an unmap callback

2011-08-15 Thread Avi Kivity
sysbus_init_mmio_cb() uses the destructive IO_MEM_UNASSIGNED to remove a region. Provide an alternative that calls an unmap callback, so the removal may be done non-destructively. Signed-off-by: Avi Kivity --- hw/sysbus.c | 15 +++ hw/sysbus.h |3 +++ 2 files changed, 18 inser

[Qemu-devel] [PATCH v2 11/24] pcie_host: convert to memory API

2011-08-15 Thread Avi Kivity
Assuming that mmcfg size cannot change at runtime. Signed-off-by: Avi Kivity --- hw/pcie_host.c | 98 ++- hw/pcie_host.h | 12 +++--- 2 files changed, 31 insertions(+), 79 deletions(-) diff --git a/hw/pcie_host.c b/hw/pcie_host.c index f9f

Re: [Qemu-devel] [PATCH 1/4] linux-user:Support for MIPS64 user mode emulation in QEMU

2011-08-15 Thread Richard Henderson
On 08/15/2011 04:25 AM, kha...@kics.edu.pk wrote: > -# warning signal handling not implemented > - Why? It's still true. Just configure with --disable-werror. r~

[Qemu-devel] [PATCH v2 08/24] tusb6010: move declarations to new file tusb6010.h

2011-08-15 Thread Avi Kivity
Avoid #include hell. Signed-off-by: Avi Kivity --- hw/devices.h |7 --- hw/nseries.c |1 + hw/tusb6010.c |2 +- hw/tusb6010.h | 25 + 4 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 hw/tusb6010.h diff --git a/hw/devices.h b/hw/de

Re: [Qemu-devel] sparc32_dma: correctly initialize ledma base address

2011-08-15 Thread Bob Breuer
Mark Cave-Ayland wrote: > On 11/08/11 17:11, Bob Breuer wrote: > >> The ledma base address defaults to 0xff00 on reset. This >> fixes a bug with Solaris and SS-20 OBP when boot net is skipped. >> >> Signed-off-by: Bob Breuer >> --- >> >> diff --git a/hw/sparc32_dma.c b/hw/sparc32_dma.c >> ind

Re: [Qemu-devel] [PATCH 2/4] Octeon cpu definitions in target-mips and Octeon specific changes in set_thread_area syscall

2011-08-15 Thread Richard Henderson
On 08/15/2011 04:25 AM, kha...@kics.edu.pk wrote: >((CPUMIPSState *) cpu_env)->tls_value = arg1; > + if (((CPUMIPSState *) cpu_env)->insn_flags & CPU_OCTEON) { > + /* tls entry is moved to k0 so that this can be used later > + currently this thing is tested only fo

[Qemu-devel] [PATCH 01/14] char: rename qemu_chr_write() -> qemu_chr_fe_write()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- gdbstub.c |2 +- hw/ccid-card-passthru.c |4 ++-- hw/debugcon.c |2 +- hw/escc.c |2 +- hw/etraxfs_ser.c|2 +- hw/grlib_apbuart.c |2 +- hw/lm32_juart.c |2 +- hw/lm32_uart.c

[Qemu-devel] [PATCH 06/14] char: rename qemu_chr_guest_close() -> qemu_chr_fe_close()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/virtio-console.c |2 +- qemu-char.c |2 +- qemu-char.h |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 21f752b..d3351c8 100644 --- a/hw/virtio-console.c +++ b/hw

[Qemu-devel] [PATCH 12/14] char: rename qemu_chr_get_msgfd() -> qemu_chr_fe_get_msgfd()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/ivshmem.c |2 +- monitor.c|2 +- qemu-char.c |2 +- qemu-char.h |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index 42a5877..1176387 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -401

[Qemu-devel] [PATCH 13/14] char: remove qemu_chr_send_event()

2011-08-15 Thread Anthony Liguori
It's dead code. Signed-off-by: Anthony Liguori --- console.c | 16 hw/baum.c | 15 --- qemu-char.c |6 -- qemu-char.h |2 -- 4 files changed, 0 insertions(+), 39 deletions(-) diff --git a/console.c b/console.c index 489c74c..77285bf 100644 --- a/

Re: [Qemu-devel] [PATCH 4/4] Addition of Cavium instruction in disassembler

2011-08-15 Thread Richard Henderson
On 08/15/2011 04:25 AM, kha...@kics.edu.pk wrote: > index 1334b8e..0137657 100644 > --- a/disas.c > +++ b/disas.c > @@ -140,6 +140,7 @@ print_insn_thumb1(bfd_vma pc, disassemble_info *info) > i386 - nonzero means 16 bit code > arm - nonzero means thumb code > ppc - nonzero means li

[Qemu-devel] [PATCH 03/14] char: rename qemu_chr_read() -> qemu_chr_be_write()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- console.c |2 +- gdbstub.c |2 +- hw/baum.c |8 hw/msmouse.c |2 +- qemu-char.c | 18 +- qemu-char.h |2 +- spice-qemu-char.c |2 +- 7 files changed, 18 insertions(+), 18

[Qemu-devel] [PATCH 10/14] char: qemu_chr_open_opts() -> qemu_chr_new_from_opts()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- qemu-char.c |4 ++-- qemu-char.h |2 +- vl.c|2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 569e989..75fe7b3 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2548,7 +2548,7 @@ static const s

[Qemu-devel] [PATCH 00/14] char: flow control part I

2011-08-15 Thread Anthony Liguori
This is a dump of some of the easier stuff to merge from my character backend flow control branch. It's mostly just renaming functions and adding documentation.

[Qemu-devel] [PATCH 04/14] char: rename qemu_chr_can_read() -> qemu_chr_be_can_read()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- console.c |2 +- hw/baum.c |4 ++-- qemu-char.c | 20 ++-- qemu-char.h |2 +- spice-qemu-char.c |2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/console.c b/console.c index b831

[Qemu-devel] [PATCH 11/14] char: rename qemu_chr_close() -> qemu_chr_delete()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- gdbstub.c |4 ++-- hw/ccid-card-passthru.c |2 +- hw/usb-serial.c |2 +- qemu-char.c |4 ++-- qemu-char.h |2 +- usb-redir.c |2 +- 6 files changed, 8 insertions(+), 8 deletions(-)

[Qemu-devel] [PATCH 09/14] char: rename qemu_chr_open() -> qemu_chr_new()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- gdbstub.c|2 +- hw/mips_malta.c |4 ++-- hw/omap2.c |2 +- hw/omap_uart.c |8 hw/usb-serial.c |4 ++-- hw/xen_console.c |2 +- net/slirp.c |2 +- qemu-char.c |2 +- qemu-char.h |2 +-

[Qemu-devel] [PATCH 08/14] char: rename qemu_chr_set_echo() -> qemu_chr_fe_set_echo()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- monitor.c |2 +- qemu-char.c |4 ++-- qemu-char.h |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 38d4544..e7f41eb 100644 --- a/monitor.c +++ b/monitor.c @@ -5275,7 +5275,7 @@ void monitor_init(Char

[Qemu-devel] [PATCH 05/14] char: rename qemu_chr_guest_open() -> qemu_chr_fe_open()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/virtio-console.c |2 +- qemu-char.c |2 +- qemu-char.h |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 6c386fa..21f752b 100644 --- a/hw/virtio-console.c +++ b/hw

[Qemu-devel] [PATCH 07/14] char: qemu_chr_ioctl() -> qemu_chr_fe_ioctl()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/escc.c |2 +- hw/parallel.c | 30 +++--- hw/serial.c | 10 +- hw/strongarm.c |2 +- hw/usb-serial.c | 10 +- qemu-char.c |2 +- qemu-char.h |2 +- 7 files changed, 29 insertion

[Qemu-devel] [PATCH 14/14] char: document the functions that will be the public interface

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- qemu-char.h | 137 --- 1 files changed, 130 insertions(+), 7 deletions(-) diff --git a/qemu-char.h b/qemu-char.h index fba0290..eebbdd8 100644 --- a/qemu-char.h +++ b/qemu-char.h @@ -76,33 +76,156 @@ stru

Re: [Qemu-devel] [PATCH 3/4] target-mips:Support for Cavium specific instructions

2011-08-15 Thread Richard Henderson
> } > +#if defined(TARGET_MIPS64) > +/* set on equal/not equal immidiate */ You need blank lines between all of these functions. Also, "immediate" is misspelled. > +tcg_gen_xori_tl(t0, t0, uimm); > +switch (opc) { > +case OPC_SEQI: > +tcg_gen_setcondi_tl(TCG_COND_LT, cpu_gpr[

Re: [Qemu-devel] [libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Adam Litke
On 08/15/2011 11:50 AM, Daniel P. Berrange wrote: > On Mon, Aug 15, 2011 at 11:27:43AM -0500, Adam Litke wrote: >> On 08/15/2011 08:23 AM, Osier Yang wrote: >>> 于 2011年08月15日 21:58, Osier Yang 写道: * src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as "balloon: actual=", which ca

[Qemu-devel] [PATCH 02/14] char: rename qemu_chr_printf() -> qemu_chr_fe_printf()

2011-08-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/mips_malta.c | 22 +++--- qemu-char.c |2 +- qemu-char.h |2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/mips_malta.c b/hw/mips_malta.c index ed2a483..9021752 100644 --- a/hw/mips_malta.c +++ b/hw/m

Re: [Qemu-devel] [PATCH] Add a TPM Passthrough backend driver implementation

2011-08-15 Thread Stefan Berger
On 08/12/2011 11:31 AM, Andreas Niederl wrote: This patch is based of off version 7 of Stefan Berger's patch series "Qemu Trusted Platform Module (TPM) integration" and adds a new backend driver for it. This patch adds a passthrough backend driver for passing commands sent to the emulated TPM

Re: [Qemu-devel] [RFC] Planning for 1.0 (and freezing the master branch)

2011-08-15 Thread Anthony Liguori
On 08/14/2011 02:30 PM, Blue Swirl wrote:>> Maybe something more like: 2 months development -rc0 goes out (master enters soft feature freeze) Why an rc0 at this point? 0.15-rc0 was in a bad shape because it was forked just after heavy development (ga etc). It could be called -beta1 instead o

Re: [Qemu-devel] Fix refcounting in hugetlbfs quota handling

2011-08-15 Thread Hugh Dickins
On Sat, 13 Aug 2011, David Gibson wrote: > On Fri, Aug 12, 2011 at 12:15:21PM -0700, Hugh Dickins wrote: > > > > Setting that aside, I think this thing of grabbing a reference to inode > > for each page just does not work as you wish: when we unlink an inode, > > all its pages should be freed; but

Re: [Qemu-devel] [PATCH][RFC] post copy chardevice (was Re: [RFC] postcopy livemigration proposal)

2011-08-15 Thread Avi Kivity
On 08/12/2011 04:07 AM, Isaku Yamahata wrote: This is a character device to hook page access. The page fault in the area is reported to another user process by this chardriver. Then, the process fills the page contents and resolves the page fault. Have you considered CUSE (character device in u

Re: [Qemu-devel] Fix refcounting in hugetlbfs quota handling

2011-08-15 Thread Andrew Barry
I've been doing something similar to this last proposal. I put a hugetlbfs_sb_info pointer into page_private, and dropped a reference counter and an active/inactive bit into the hugetlbfs_sb_info struct. At Umount time, the sbinfo is freed, only if the reference count is zero. Otherwise, the last p

[Qemu-devel] qemu 0.15.0 testing, usb redirection, and libusb_get_device_speed()

2011-08-15 Thread Juergen Lock
Hi! I just prepared a preliminary update of the emulators/qemu-devel port to 0.15.0 [1], and among other things it now also has a usb network redirection feature using usbredir [2], which uses libusb 1.0 and a function that is missing in our version, libusb_get_device_speed(). I added a stub to

[Qemu-devel] [RFC PATCH 01/13] add smp_mb()

2011-08-15 Thread Paolo Bonzini
We'll need a full memory barrier, and __sync_synchronize() is just too ugly to type. Signed-off-by: Paolo Bonzini --- qemu-barrier.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu-barrier.h b/qemu-barrier.h index b77fce2..7bd5268 100644 --- a/qemu-barrier.h +++ b/

[Qemu-devel] [RFC PATCH 00/13] RCU implementation for QEMU

2011-08-15 Thread Paolo Bonzini
Hi, this is a proof of concept of embedding RCU within QEMU. While I had already played a bit with liburcu (from which the algorithms are taken) a while ago, discussions on the migration thread motivated me to "finish" this series on the way to KVM Forum. Unfortunately we cannot use liburcu dire

[Qemu-devel] [RFC PATCH 13/13] RCUify ram_list

2011-08-15 Thread Paolo Bonzini
Incomplete because the users of qemu_get_ram_ptr should be wrapped with rcu_read_lock/rcu_read_unlock. Happens to work because those are nops anyway. :) Signed-off-by: Paolo Bonzini --- arch_init.c | 14 +++ cpu-all.h |4 ++ exec.c | 124 +++

Re: [Qemu-devel] [Bug 826363] [NEW] qemu-img convert does not work with vdi files

2011-08-15 Thread Stefan Hajnoczi
On Sun, Aug 14, 2011 at 5:32 PM, Steve Si <826...@bugs.launchpad.net> wrote: > Public bug reported: > > qemu-img.exe convert -O raw  myfile.vdi zz.raw > > reports 'error while writing' both in 0.15.0 and Beta rc2 > v0.11.1 works file on same file. myfile.vdi is 3.9GB made by VirtualBox. Are you su

[Qemu-devel] [RFC PATCH 02/13] rename qemu_event_{init,read}

2011-08-15 Thread Paolo Bonzini
qemu_event_init clashes with the next patch. Signed-off-by: Paolo Bonzini --- cpus.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpus.c b/cpus.c index 6bf4e3f..73e17a1 100644 --- a/cpus.c +++ b/cpus.c @@ -305,7 +305,7 @@ static void qemu_event_increment(vo

[Qemu-devel] [RFC PATCH 05/13] add rcu library

2011-08-15 Thread Paolo Bonzini
This includes a (mangled) copy of the urcu-qsbr code from liburcu. The main changes are: 1) removing dependencies on many other header files in liburcu; 2) removing for simplicity the tentative busy waiting in synchronize_rcu, which has limited performance effects; 3) replacing futexes in synchroni

[Qemu-devel] [RFC PATCH 10/13] rcu: report quiescent states

2011-08-15 Thread Paolo Bonzini
Our flavor of RCU requires threads to communicate when they are going offline for extended periods of time on a condition variable, or waiting for I/O, or executing guest code. Add markers to this end. Signed-off-by: Paolo Bonzini --- cpus.c | 12 kvm-all.c |3 +++ os-wi

[Qemu-devel] [RFC PATCH 12/13] split MRU ram list

2011-08-15 Thread Paolo Bonzini
Outside the execution threads the normal, non-MRU-ized order of the RAM blocks should always be enough. So manage two separate lists, which will have separate locking rules. Signed-off-by: Paolo Bonzini --- cpu-all.h |4 +++- exec.c| 16 +++- 2 files changed, 14 insertions

[Qemu-devel] [RFC PATCH 08/13] add call_rcu support

2011-08-15 Thread Paolo Bonzini
Unlike the RCU code, this is not (yet) meant to be equivalent to liburcu, because we want to run call_rcu callbacks in the main thread and under the global lock. The data structure is indeed based on those found in liburcu (this makes me feel safer), but more heavily commented and adapted to repla

Re: [Qemu-devel] [PATCH v2 0/8]: Introduce the RunState type

2011-08-15 Thread Luiz Capitulino
On Sun, 14 Aug 2011 11:45:16 -0500 Anthony Liguori wrote: > On 08/10/2011 03:33 PM, Luiz Capitulino wrote: > > It replaces the VMSTOP macros and allows us to drop some global variables. > > > > Additionally, the problem with issuing 'cont' when the VM is in bad state > > is addressed and we make

[Qemu-devel] [RFC PATCH 03/13] qemu-threads: add QemuEvent

2011-08-15 Thread Paolo Bonzini
This emulates Win32 manual-reset events using futexes or conditional variables. Typical ways to use them are with multi-producer, single-consumer data structures, to test for a complex condition whose elements come from different threads: for (;;) { qemu_event_reset(ev); ... t

[Qemu-devel] [RFC PATCH 09/13] rcu: avoid repeated system calls

2011-08-15 Thread Paolo Bonzini
Optimization posted to upstream mailing list. Signed-off-by: Paolo Bonzini --- rcu.c |5 + rcu.h | 22 -- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/rcu.c b/rcu.c index e2f347a..aaf53ad 100644 --- a/rcu.c +++ b/rcu.c @@ -91,6 +91,11 @@ static v

[Qemu-devel] [RFC PATCH 11/13] rcuify iohandlers

2011-08-15 Thread Paolo Bonzini
Just a proof of concept, with the write-side still under the global lock, in order to test the call_rcu code. Signed-off-by: Paolo Bonzini --- iohandler.c | 45 - 1 files changed, 20 insertions(+), 25 deletions(-) diff --git a/iohandler.c b/iohandle

[Qemu-devel] [RFC PATCH 06/13] rcu: add rcutorture

2011-08-15 Thread Paolo Bonzini
A stress test program (works :)). So far not ported to Windows. Signed-off-by: Paolo Bonzini --- rcutorture.c | 433 ++ 1 files changed, 433 insertions(+), 0 deletions(-) create mode 100644 rcutorture.c diff --git a/rcutorture.c b/rcuto

[Qemu-devel] [RFC PATCH 07/13] osdep: add qemu_msleep

2011-08-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- osdep.h |1 + oslib-posix.c |7 ++- oslib-win32.c |5 + 3 files changed, 12 insertions(+), 1 deletions(-) diff --git a/osdep.h b/osdep.h index a817017..6bf4e1c 100644 --- a/osdep.h +++ b/osdep.h @@ -136,6 +136,7 @@ int qemu_madvise(void

[Qemu-devel] [RFC PATCH 04/13] qemu-threads: add QemuOnce

2011-08-15 Thread Paolo Bonzini
Add Windows and POSIX versions, as usual. Signed-off-by: Paolo Bonzini --- compiler.h |2 ++ qemu-thread-posix.c |5 + qemu-thread-posix.h |5 + qemu-thread-win32.c | 19 +++ qemu-thread-win32.h |5 + qemu-thread.h |3 +++ 6 files

[Qemu-devel] [Bug 826363] Re: qemu-img convert does not work with vdi files

2011-08-15 Thread Steve Si
Please see http://virtuallyfun.superglobalmegacorp.com/?p=1214#comment-967 confirmed bug replicated by neozeed. Seems to be something to do with vdi's that contain 3-4GB of data. An unpartitioned freshly created 4Gb vdi can be converted to raw OK, but an 8Gb dynamic vdi with 3.8GB of data fails.

[Qemu-devel] [PATCH] qed: make qed_alloc_clusters round up offset to nearest cluster

2011-08-15 Thread Devin Nakamura
Signed-off-by: Devin Nakamura --- block/qed.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block/qed.c b/block/qed.c index 333f067..9a1e49c 100644 --- a/block/qed.c +++ b/block/qed.c @@ -263,6 +263,8 @@ static int qed_read_string(BlockDriverState *file, uint64_t off

[Qemu-devel] [PATCH] Reorder default ram_size initialization

2011-08-15 Thread Jan Kiszka
code_gen_alloc depends on it, and that is now called earlier via configure_accelerator. Signed-off-by: Jan Kiszka --- vl.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index cc4998f..44ea10c 100644 --- a/vl.c +++ b/vl.c @@ -3087,6 +3087,11 @@ int

[Qemu-devel] [PATCH] Fix up some style nits of last uq/master merge

2011-08-15 Thread Jan Kiszka
Signed-off-by: Jan Kiszka --- cutils.c |2 +- target-i386/kvm.c |5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cutils.c b/cutils.c index 28049e0..92c26a6 100644 --- a/cutils.c +++ b/cutils.c @@ -408,7 +408,7 @@ fail: int64_t strtosz_suffix(const char

Re: [Qemu-devel] [PATCH 1/2] pflash: Support read-only mode

2011-08-15 Thread Jan Kiszka
On 2011-08-11 10:57, Jordan Justen wrote: > On Thu, Jul 28, 2011 at 14:05, Jordan Justen wrote: >> On Thu, Jul 28, 2011 at 11:26, Jan Kiszka wrote: >>> On 2011-07-27 17:38, Jordan Justen wrote: On Wed, Jul 27, 2011 at 02:30, Jan Kiszka wrote: > On 2011-07-25 23:34, Jordan Justen wrote:

Re: [Qemu-devel] [PATCH 1/2] pflash: Support read-only mode

2011-08-15 Thread Jordan Justen
On Mon, Aug 15, 2011 at 16:45, Jan Kiszka wrote: > On 2011-08-11 10:57, Jordan Justen wrote: >> On Thu, Jul 28, 2011 at 14:05, Jordan Justen wrote: >>> On Thu, Jul 28, 2011 at 11:26, Jan Kiszka wrote: On 2011-07-27 17:38, Jordan Justen wrote: > On Wed, Jul 27, 2011 at 02:30, Jan Kiszka

Re: [Qemu-devel] [PATCH][RFC] post copy chardevice (was Re: [RFC] postcopy livemigration proposal)

2011-08-15 Thread Isaku Yamahata
On Mon, Aug 15, 2011 at 12:29:37PM -0700, Avi Kivity wrote: > On 08/12/2011 04:07 AM, Isaku Yamahata wrote: >> This is a character device to hook page access. >> The page fault in the area is reported to another user process by >> this chardriver. Then, the process fills the page contents and >> re

[Qemu-devel] [Question] PCI-to-PCI bridge

2011-08-15 Thread Wen Congyang
Hi, all We'd like to add PCI-to-PCI Bridge for qemu(kvm) for x86/x86_64 box. I read the code, and find the following hardware calls the function pci_bridge_initfn(): 1. apb 2. ioh3420 3. xio3130 ioh3420 and xio3130 is for PCIe, and apb is for sparc box. I do not find any PCI-to-PCI bridge for x86

[Qemu-devel] buildbot failure in qemu on qmp_i386_debian_6_0

2011-08-15 Thread qemu
The Buildbot has detected a new failure on builder qmp_i386_debian_6_0 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/qmp_i386_debian_6_0/builds/1 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: yuzuki Build Reason:

[Qemu-devel] buildbot failure in qemu on qmp_x86_64_debian_6_0

2011-08-15 Thread qemu
The Buildbot has detected a new failure on builder qmp_x86_64_debian_6_0 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/qmp_x86_64_debian_6_0/builds/1 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: yuzuki Build Reas

Re: [Qemu-devel] [PATCH] Rename dma.c and its contents to reflect its ISA specific nature

2011-08-15 Thread David Gibson
On Mon, Aug 15, 2011 at 11:39:29AM +0400, malc wrote: > On Mon, 15 Aug 2011, David Gibson wrote: > > > hw/dma.c does not contain code generally relevant to drivers accessing > > system memory. In particular, it has no connection to dma.h, which does > > have headers pertaining to the generally us

Re: [Qemu-devel] Fix refcounting in hugetlbfs quota handling

2011-08-15 Thread David Gibson
On Mon, Aug 15, 2011 at 03:25:35PM -0500, Andrew Barry wrote: > I've been doing something similar to this last proposal. I put a > hugetlbfs_sb_info pointer into page_private, and dropped a reference counter > and > an active/inactive bit into the hugetlbfs_sb_info struct. At Umount time, the > sb

Re: [Qemu-devel] [PATCH] Rename dma.c and its contents to reflect its ISA specific nature

2011-08-15 Thread malc
On Tue, 16 Aug 2011, David Gibson wrote: > On Mon, Aug 15, 2011 at 11:39:29AM +0400, malc wrote: > > On Mon, 15 Aug 2011, David Gibson wrote: > > > > > hw/dma.c does not contain code generally relevant to drivers accessing > > > system memory. In particular, it has no connection to dma.h, which