Re: [Qemu-devel] [PATCH 2/2] disas: Add disas-objdump.pl

2013-08-09 Thread Max Filippov
On Fri, Aug 9, 2013 at 11:19 PM, Richard Henderson wrote: > The script massages the output produced for architectures that are > not supported internally by qemu though an external objdump program > for disassembly. I'd add something like the following to get disassembled hunks with correct addre

Re: [Qemu-devel] [SeaBIOS] [PATCH] acpi: hide 64-bit PCI hole for Windows XP

2013-08-09 Thread Kevin O'Connor
On Fri, Aug 09, 2013 at 11:45:59AM +0200, Gerd Hoffmann wrote: > Hi, > > > Converting src/smm.c to use a runtime value isn't hard - just change > > the assembler from: "mov $" __stringify(PORT_ACPI_PM_BASE) " + 0x04, > > %dx\n" to: "mov 4(my_acpi_base), %dx\n" and make sure to define the > > glo

Re: [Qemu-devel] [RFC] [PATCHv8 09/30] aio / timers: Add QEMUTimerListGroup and helper functions

2013-08-09 Thread liu ping fan
[...] >> typedef struct QEMUClock QEMUClock; >> typedef struct QEMUTimerList QEMUTimerList; >> +typedef QEMUTimerList *QEMUTimerListGroup[QEMU_CLOCK_MAX]; > > Please wrap this in a struct for easier future extensibility. > > I'm not a big fan of the TimerListGroup name, but I cannot think of > an

[Qemu-devel] [RFC] Convert AioContext to Gsource sub classes

2013-08-09 Thread Wenchao Xia
Hi folks, I'd like form a series which remove AioContext's concept and bind to glib's main loop more closely. Since changed place will be a bit much so want to know your opinion before real coding: changes: **before patch: typedef struct AioContext { GSource source; int walking_handlers;

Re: [Qemu-devel] [PATCH v5 2/2] hw/arm: Add 'virt' platform

2013-08-09 Thread Anup Patel
Hi PMM, On Fri, Aug 9, 2013 at 9:53 PM, Peter Maydell wrote: > From: John Rigby > > Add 'virt' platform support corresponding to arch/arm/mach-virt > in the Linux kernel tree. This has no platform-specific code but > can use any device whose kernel driver is is able to work purely > from a devic

Re: [Qemu-devel] [SeaBIOS] [PATCH] acpi: hide 64-bit PCI hole for Windows XP

2013-08-09 Thread Kevin O'Connor
On Fri, Aug 09, 2013 at 08:25:00AM +0200, Gerd Hoffmann wrote: > > I don't think SeaBIOS should continue to do the above once the tables > > are moved to QEMU. QEMU has all the info SeaBIOS has, so it can > > generate the tables correctly on its own. > > The loader script provided by qemu has fix

Re: [Qemu-devel] [SeaBIOS] [PATCH] acpi: hide 64-bit PCI hole for Windows XP

2013-08-09 Thread Kevin O'Connor
On Fri, Aug 09, 2013 at 06:49:18PM +0300, Michael S. Tsirkin wrote: > On Fri, Aug 09, 2013 at 12:13:06AM -0400, Kevin O'Connor wrote: > > I don't think SeaBIOS should continue to do the above once the tables > > are moved to QEMU. QEMU has all the info SeaBIOS has, so it can > > generate the table

Re: [Qemu-devel] [PATCH 0/2] Disassembly with external objdump

2013-08-09 Thread Jia Liu
Hi Richard, On Sat, Aug 10, 2013 at 3:19 AM, Richard Henderson wrote: > We have one host platform (aarch64), and three target platforms > (openrisc, unicore32, xtensa) with no built-in disassembly support, > thanks largely to gplv3 silliness. Thank you for doing this for or32. > > Here's a firs

Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper

2013-08-09 Thread Alex Bligh
On 9 Aug 2013, at 15:36, Paolo Bonzini wrote: >>> >>> Since we're doing a new API, I would prefer to have it as timer_init and >>> aio_timer_init. We can remove the allocation completely, it is a >>> useless indirection and we misuse it since we hardly ever call >>> qemu_free_timer. >> >> Woul

Re: [Qemu-devel] [ceph-users] qemu-1.4.0 and onwards, linux kernel 3.2.x, ceph-RBD, heavy I/O leads to kernel_hung_tasks_timout_secs message and unresponsive qemu-process, [Bug 1207686]

2013-08-09 Thread Andrei Mikhailovsky
I can confirm that I am having similar issues with ubuntu vm guests using fio with bs=4k direct=1 numjobs=4 iodepth=16. Occasionally i see hang tasks, occasionally guest vm stops responding without leaving anything in the logs and sometimes i see kernel panic on the console. I typically leave th

Re: [Qemu-devel] [PATCH v2 for-1.6 6/6] rdma: remaining documentation fixes

2013-08-09 Thread Eric Blake
On 08/09/2013 02:32 PM, Michael R. Hines wrote: >>> "total-time":12345, >>> +"setup-time":12345, >> Theoretically, if setup-time == total-time, then we are still in the >> setup phase, right? The example might be more realistic if it uses a >> smaller number for setup ti

Re: [Qemu-devel] [PATCH v2 for-1.6 6/6] rdma: remaining documentation fixes

2013-08-09 Thread Michael R. Hines
On 08/09/2013 04:26 PM, Eric Blake wrote: On 08/09/2013 02:05 PM, mrhi...@linux.vnet.ibm.com wrote: From: "Michael R. Hines" Was missing 'setup-time' in some of the QMP documentation... Signed-off-by: Michael R. Hines --- qmp-commands.hx | 10 ++ 1 file changed, 10 insertions(+)

Re: [Qemu-devel] [PATCH v2 for-1.6 6/6] rdma: remaining documentation fixes

2013-08-09 Thread Eric Blake
On 08/09/2013 02:05 PM, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > Was missing 'setup-time' in some of the QMP documentation... > > Signed-off-by: Michael R. Hines > --- > qmp-commands.hx | 10 ++ > 1 file changed, 10 insertions(+) Reviewed-by: Eric Blake > @

[Qemu-devel] [PATCH v2 for-1.6 0/6] rdma: uh oh! IPv6 broken in linux - need workaround

2013-08-09 Thread mrhines
From: "Michael R. Hines" Changes since v1: 1. IPv6 support over RDMA ethernet is broken in linux right now. Although a patch is in review on linux-rdma, we need a work-around to make sure the user knows why it's not working. See PATCH 0/5 for a detailed description. Isaku Yamahata (3

Re: [Qemu-devel] -cpu host (was Re: KVM call minutes for 2013-08-06)

2013-08-09 Thread Andreas Färber
Am 09.08.2013 15:12, schrieb Peter Maydell: > possibly add support >for "-cpu host,+32bitvm" style syntax. Please use only property-name=value style syntax. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 1674

[Qemu-devel] [PATCH v2 for-1.6 5/6] rdma: IPv6 over Ethernet (RoCE) is broken in linux - workaround

2013-08-09 Thread mrhines
From: "Michael R. Hines" We've gotten reports from multiple testers (including Frank Yangjie and myself) that RDMA IPv6 support over RocE (Ethernet) is broken in linux. A patch to Linux is still in review: http://comments.gmane.org/gmane.linux.drivers.rdma/16448 If the user is listening on '[:

[Qemu-devel] [PATCH v2 for-1.6 1/6] rdma: use resp.len after validation in qemu_rdma_registration_stop

2013-08-09 Thread mrhines
From: Isaku Yamahata resp.len is given from remote host. So should be validated before use. Otherwise memcpy can access beyond the buffer. Cc: Michael R. Hines Reviewed-by: Orit Wasserman Reviewed-by: Michael R. Hines Signed-off-by: Isaku Yamahata Signed-off-by: Michael R. Hines --- migrat

[Qemu-devel] [PATCH v2 for-1.6 2/6] rdma: validate RDMAControlHeader::len

2013-08-09 Thread mrhines
From: Isaku Yamahata RMDAControlHeader::len is provided from remote, so validate it. Reviewed-by: Orit Wasserman Reviewed-by: Michael R. Hines Signed-off-by: Isaku Yamahata Signed-off-by: Michael R. Hines --- migration-rdma.c |5 + 1 file changed, 5 insertions(+) diff --git a/migra

[Qemu-devel] [PATCH v2 for-1.6 3/6] rdma: check if RDMAControlHeader::len match transferred byte

2013-08-09 Thread mrhines
From: Isaku Yamahata RDMAControlHeader::len is provided from remote, so check if the value match the actual transferred byte_len. Reviewed-by: Orit Wasserman Reviewed-by: Michael R. Hines Signed-off-by: Isaku Yamahata Signed-off-by: Michael R. Hines --- migration-rdma.c | 32 +

[Qemu-devel] [PATCH v2 for-1.6 6/6] rdma: remaining documentation fixes

2013-08-09 Thread mrhines
From: "Michael R. Hines" Was missing 'setup-time' in some of the QMP documentation... Signed-off-by: Michael R. Hines --- qmp-commands.hx | 10 ++ 1 file changed, 10 insertions(+) diff --git a/qmp-commands.hx b/qmp-commands.hx index 2e59b0d..cf47e3f 100644 --- a/qmp-commands.hx +++

[Qemu-devel] [PATCH v2 for-1.6 4/6] rdma: proper getaddrinfo() handling

2013-08-09 Thread mrhines
From: "Michael R. Hines" getaddrinfo() already knows what it's doing, but it can potentially return multiple addresses. We need to handle that... Reviewed-by: Orit Wasserman Signed-off-by: Michael R. Hines --- migration-rdma.c | 56 -- 1 f

[Qemu-devel] [PATCH 1/2] disas: Implement fallback to dump object code as hex

2013-08-09 Thread Richard Henderson
The OBJD-[HT] tags will be used by a script to run the hex blob through objdump --disassemble. Signed-off-by: Richard Henderson --- disas.c | 46 -- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/disas.c b/disas.c index 71007fb..bd74e8

[Qemu-devel] [PATCH 2/2] disas: Add disas-objdump.pl

2013-08-09 Thread Richard Henderson
The script massages the output produced for architectures that are not supported internally by qemu though an external objdump program for disassembly. Signed-off-by: Richard Henderson --- scripts/disas-objdump.pl | 87 1 file changed, 87 insertio

[Qemu-devel] [PATCH 0/2] Disassembly with external objdump

2013-08-09 Thread Richard Henderson
We have one host platform (aarch64), and three target platforms (openrisc, unicore32, xtensa) with no built-in disassembly support, thanks largely to gplv3 silliness. Here's a first-cut at handling these cases with an external tool. The qemu-produced dump file contains just a hex dump of bytes, an

Re: [Qemu-devel] [PATCH v2 7/7] AARCH64: Use the spin-table method for booting secondary processors in machvirt

2013-08-09 Thread Mian M. Hamayun
On 09/08/2013 16:34, Peter Maydell wrote: On 23 July 2013 10:33, Mian M. Hamayun wrote: From: "Mian M. Hamayun" As the SMP bootloader uses a spin-table to wait for the cpu_release_addr, we disable the PSCI method for AArch64 in machvirt and use spin-table instead. Marc Z says we should be us

Re: [Qemu-devel] [PATCH v2 3/7] AARCH64: Add aarch64 CPU initialization, get and put registers support

2013-08-09 Thread Mian M. Hamayun
On 09/08/2013 15:24, Peter Maydell wrote: On 23 July 2013 10:33, Mian M. Hamayun wrote: From: "Mian M. Hamayun" The cpu init function tries to initialize with all possible cpu types, as KVM does not provide a means to detect the real cpu type and simply refuses to initialize on cpu type mis-m

Re: [Qemu-devel] [PATCH 1/2] memory: Provide separate handling of unassigned io ports accesses

2013-08-09 Thread Richard Henderson
On 08/09/2013 06:49 AM, Andreas Färber wrote: > Am 09.08.2013 09:41, schrieb Paolo Bonzini: >> Il 08/08/2013 17:43, Jan Kiszka ha scritto: >>> On 2013-08-08 17:33, Peter Maydell wrote: On 3 August 2013 09:31, Jan Kiszka wrote: > --- a/ioport.c > +++ b/ioport.c > @@ -44,6 +44,22 @@

Re: [Qemu-devel] GDB debugging of QEMU.

2013-08-09 Thread Yaodong Yang
It works! Thank you very much! Best, Yaodong -- Yaodong Yang Ph.D. Student Department of Computer Science & Engineering University of Nebraska-Lincoln Email: yaodong.ya...@gmail.com OR yy...@cse.unl.edu On Aug 9, 2013, at 12:25 PM, Max Filippov wro

[Qemu-devel] [RFC v2 03/15] Explicitly mark BlockDriver function .bdrv_create as coroutine and rename it bdrv_co_create.

2013-08-09 Thread Charlie Shepherd
Signed-off-by: Charlie Shepherd --- block.c | 4 ++-- block/cow.c | 4 ++-- block/qcow.c | 4 ++-- block/qcow2.c | 4 ++-- block/qed.c | 4 ++-- block/raw-posix.c | 14 +++--- block/raw.c |

[Qemu-devel] [RFC v2 11/15] Make bdrv_discard coroutine only and add bdrv_sync_discard

2013-08-09 Thread Charlie Shepherd
This patch renames the coroutine only bdrv_co_discard to bdrv_discard and the original bdrv_discard to bdrv_sync_discard. bdrv_sync_discard is synchronous only. Signed-off-by: Charlie Shepherd --- block.c | 12 +++- include/block/block.h | 3 ++- 2 files changed, 5 insert

[Qemu-devel] [RFC v2 08/15] Convert bdrv_create and associated functions to be coroutine_fn

2013-08-09 Thread Charlie Shepherd
This patch converts bdrv_create, bdrv_create_file and bdrv_img_create to be coroutine only functions. It adds a synchronous wrapper, bdrv_sync_create, for any synchronous callers. Signed-off-by: Charlie Shepherd --- block.c | 56 +--

[Qemu-devel] [RFC v2 05/15] Make qcow2_open synchronous

2013-08-09 Thread Charlie Shepherd
The previous patch convert all .bdrv_open functions to run from a coroutine context. However qcow2's open method is also called from qcow2_invalidate_cache. bdrv_invalidate_cache is mainly called by migration.c, which doesn't run in coroutine context, so rather than propagating coroutine_fn anno

[Qemu-devel] [RFC v2 04/15] Convert .bdrv_open and .bdrv_file_open to coroutine_fn

2013-08-09 Thread Charlie Shepherd
Signed-off-by: Charlie Shepherd --- block.c | 8 block/blkdebug.c | 4 ++-- block/blkverify.c | 4 ++-- block/bochs.c | 4 ++-- block/cloop.c | 4 ++-- block/cow.c | 4 ++-- block/curl.c | 12

Re: [Qemu-devel] [PATCH v3 for-1.6 0/3] Remove legacy sysfw code

2013-08-09 Thread Markus Armbruster
Anthony sent out this series for me, because local e-mail misconfiguration has routed my attempts to the bit bucket.

[Qemu-devel] [PULL] block: Bugfix 'format' and 'snapshot' used in drive option

2013-08-09 Thread Kevin Wolf
From: Mike Qiu When use -drive file='xxx',format=qcow2,snapshot=on the error message "Can't use snapshot=on with driver-specific options" can be show, and fail to start the qemu. This should not be happened, and there is no file.driver option in qemu command line. It is because the commit 74fe5

[Qemu-devel] [PULL] Block fix for 1.6

2013-08-09 Thread Kevin Wolf
The following changes since commit 2e985fe000e73097e325e18b943e8babfa96c35c: mips: revert commit b332d24a8e1290954029814d09156b06ede358e2 (2013-08-08 23:06:15 +0200) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony for you to fetch changes up to 6db5f5d68

Re: [Qemu-devel] -cpu host (was Re: KVM call minutes for 2013-08-06)

2013-08-09 Thread Eduardo Habkost
On Thu, Aug 08, 2013 at 12:29:07PM -0700, Christoffer Dall wrote: > On Thu, Aug 08, 2013 at 08:05:11PM +0100, Peter Maydell wrote: > > On 8 August 2013 19:39, Christoffer Dall > > wrote: > > > FWIW, from the kernel point of view I'd much prefer to return "this is > > > the type of VCPU that I pre

[Qemu-devel] [RFC v2 12/15] Make bdrv_flush coroutine only and add bdrv_sync_flush

2013-08-09 Thread Charlie Shepherd
This patch renames the coroutine only bdrv_co_flush to bdrv_flush and the original bdrv_flush to bdrv_sync_flush. bdrv_sync_flush is synchronous only. This patch also converts a caller in block/mirror.c to coroutine_fn. Signed-off-by: Charlie Shepherd --- block.c | 12 +++-

[Qemu-devel] [RFC v2 09/15] Add a synchronous wrapper bdrv_sync_rwco

2013-08-09 Thread Charlie Shepherd
A number of functions in block.c pass an RwCo struct to a coroutine entry point in order to synchronise an asynchronous function. This patch factors this pattern out into a function. Signed-off-by: Charlie Shepherd --- block.c | 37 + 1 file changed, 17 inse

[Qemu-devel] [RFC v2 06/15] Explicitly mark BlockDriver functions .bdrv_write and .bdrv_read as coroutine functions

2013-08-09 Thread Charlie Shepherd
Convert .bdrv_write and .bdrv_read to coroutine functions and rename them to .bdrv_co_write and .bdrv_co_read. Signed-off-by: Charlie Shepherd --- block.c | 4 ++-- block/bochs.c | 2 +- block/cloop.c | 2 +- block/cow.c | 4 ++-- block/dm

[Qemu-devel] [RFC v2 14/15] Add coroutine annotations for qemu_co_rwlock_rdlock and qemu_co_rwlock_wrlock

2013-08-09 Thread Charlie Shepherd
qemu_co_rwlock_rdlock and qemu_co_rwlock_wrlock can only run in a coroutine context, so annotate them with coroutine_fn. Signed-off-by: Charlie Shepherd --- include/block/coroutine.h | 4 ++-- qemu-coroutine-lock.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/incl

[Qemu-devel] [RFC v2 13/15] Introduce a run_handler function in qemu-img.c

2013-08-09 Thread Charlie Shepherd
qemu-img doesn't run in a coroutine context, but uses block layer functions which do need to run in a coroutine context. This patch converts qemu-img to run the various qemu-img functions in a coroutine context correctly. Signed-off-by: Charlie Shepherd --- qemu-img.c | 54 ++

[Qemu-devel] [RFC v2 07/15] Call bdrv->open via a synchronous wrapper in block/snapshot.c

2013-08-09 Thread Charlie Shepherd
block/snapshot.c calls bdrv->open directly from a non-coroutine context. Provide a synchronous wrapper to ensure correctness. Signed-off-by: Charlie Shepherd --- block/snapshot.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/block/snapshot.

[Qemu-devel] [RFC v2 10/15] Convert bdrv_read, bdrv_write and associated functions to coroutine functions

2013-08-09 Thread Charlie Shepherd
Now that .bdrv_co_read and .bdrv_co_write are only called in a coroutine context, convert their callers in block.c to be coroutine only, and add bdrv_sync_* versions for synchronous callers. Signed-off-by: Charlie Shepherd --- block.c | 106 +++--

[Qemu-devel] [RFC v2 15/15] Add coroutine_fn annotations to nbd_co_* functions.

2013-08-09 Thread Charlie Shepherd
nbd_co_* are all meant to be only be run in a coroutine context, annotate them accordingly. Signed-off-by: Charlie Shepherd --- block/nbd.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index a0e3562..3e037ba 100644 --- a/

[Qemu-devel] [RFC v2 01/15] Add an explanation of when a function should be marked coroutine_fn

2013-08-09 Thread Charlie Shepherd
Coroutine functions that can yield directly or indirectly should be annotated with a coroutine_fn annotation. Add an explanation to that effect in include/block/coroutine.h. Signed-off-by: Charlie Shepherd --- include/block/coroutine.h | 8 1 file changed, 8 insertions(+) diff --git a/

[Qemu-devel] [RFC v2 02/15] Rename qemu_coroutine_self to qemu_coroutine_self_int and add an annotated wrapper

2013-08-09 Thread Charlie Shepherd
While it only really makes sense to call qemu_coroutine_self() in a coroutine context, some coroutine internals need to call it from functions not annotated as coroutine_fn, so add an annotated wrapper and rename the implementation versions to qemu_coroutine_self_int. Signed-off-by: Charlie Shephe

[Qemu-devel] [PATCH v3 1/3] sysfw: remove read-only pc_sysfw_flash_vs_rom_bug_compatible

2013-08-09 Thread Anthony Liguori
From: Paolo Bonzini The variable is not written anymore. This cleans up after 9e1c2ec (which accidentally left variable pc_sysfw_flash_vs_rom_bug_compatible behind, value always zero), and buries dead code from commit dafb82e (which resurrected the pc_sysfw code for pc_sysfw_flash_vs_rom_bug_com

[Qemu-devel] [PATCH v3 2/3] pc_sysfw: remove the rom_only property

2013-08-09 Thread Anthony Liguori
From: Paolo Bonzini With the new semantics of pc_sysfw (no -pflash implies "old-style" ROM setup, -pflash implies "new-style" ROM setup), there is no need anymore for a compat property. Old machines simply will never use -pflash, and thus will always use old-style setup. Signed-off-by: Paolo Bo

[Qemu-devel] [PATCH v3 for-1.6 0/3] Remove legacy sysfw code

2013-08-09 Thread Anthony Liguori
Paolo's cover letter for v2: The sysfw code to choose between ROM and flash BIOS was a bad idea, because it triggered different behavior between TCG and KVM. We deleted the behavior in 1.5, but we left the code around because it was close to the release. Now it's time to delete it. v1->v2 only

[Qemu-devel] [PATCH v3 3/3] pc_sysfw: do not make it a device anymore

2013-08-09 Thread Anthony Liguori
From: Paolo Bonzini Move the code to hw/i386, the sole remaining property is available as !pci_enabled. Signed-off-by: Paolo Bonzini Rebased. Signed-off-by: Markus Armbruster --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/block/Makefile.objs

Re: [Qemu-devel] [PATCH for 1.6 2/2] Revert "memory: Return -1 again on reads from unsigned regions"

2013-08-09 Thread Andreas Färber
Am 09.08.2013 14:01, schrieb Jan Kiszka: > This reverts commit 9b8c69243585a32d14b9bb9fcd52c37b0b5a1b71. > > The commit was wrong: We only return -1 on invalid accesses, not on > valid but unbacked ones. This broke various corner cases. > > Signed-off-by: Jan Kiszka Tested-by: Andreas Färber

Re: [Qemu-devel] [PATCH] pc: compat: remove PCLMULQDQ from Westmere on pc-*-1.4 and older

2013-08-09 Thread Eduardo Habkost
On Fri, Aug 09, 2013 at 04:47:53PM +0200, Andreas Färber wrote: > Am 09.08.2013 16:11, schrieb Eduardo Habkost: > > commit 41cb383f42d0cb51d8e3e25e3ecebc954dd4196f made a guest-visible > > change by adding the PCLMULQDQ bit to Westmere without adding > > compatibility code to keep the ABI older mac

Re: [Qemu-devel] GDB debugging of QEMU.

2013-08-09 Thread Max Filippov
On Fri, Aug 9, 2013 at 9:14 PM, Peter Maydell wrote: > On 9 August 2013 18:11, Yaodong Yang wrote: >> 2. how to invoke QEMU with gdb, >> because my previous attempt failed. "gdb sudo >> /usr/local/kvm/bin/qemu-system/x86_64 -s -enable-kvm -hda" > > This won't work because you're running gdb as yo

Re: [Qemu-devel] [PATCH 00/16 RFC v6] ACPI memory hotplug

2013-08-09 Thread Anthony Liguori
Anthony Liguori writes: > Applied. Thanks. > Something went bad here... Apologies, it was not applied. Regards, Anthony Liguori > Regards, > > Anthony Liguori

Re: [Qemu-devel] GDB debugging of QEMU.

2013-08-09 Thread Peter Maydell
On 9 August 2013 18:11, Yaodong Yang wrote: > I think I did not make my question clear. I do not know > 1. how to add "-g" flag when compile QEMU, in order to use gdb This is what passing --enable-debug to configure does. > 2. how to invoke QEMU with gdb, > because my previous attempt failed. "g

Re: [Qemu-devel] GDB debugging of QEMU.

2013-08-09 Thread Yaodong Yang
Hello Peter, Best, Yaodong -- Yaodong Yang Ph.D. Student Department of Computer Science & Engineering University of Nebraska-Lincoln Email: yaodong.ya...@gmail.com OR yy...@cse.unl.edu On Aug 9, 2013, at 11:56 AM, Peter Maydell wrote: > On 9 Augu

Re: [Qemu-devel] GDB debugging of QEMU.

2013-08-09 Thread Peter Maydell
On 9 August 2013 17:45, Yaodong Yang wrote: > I tried the following commands. > > ./configure --enable-debug --disable-werror --enable-kvm > --prefix=/usr/local/kvm --disable-werror is usually not a good idea for developers. > make -j4 > > sudo make install > > gdb sudo /usr/local/kvm/bin/qemu-s

Re: [Qemu-devel] [libvirt] [PATCH] qemu: Drop qemuDomainMemoryLimit

2013-08-09 Thread Daniel P. Berrange
On Fri, Aug 09, 2013 at 10:58:55AM -0500, Anthony Liguori wrote: > Michal Privoznik writes: > > > [CC'ing qemu-devel list] > > On 09.08.2013 15:17, Daniel P. Berrange wrote: > >> On Fri, Aug 09, 2013 at 07:13:58AM -0600, Eric Blake wrote: > >>> On 08/09/2013 06:56 AM, Michal Privoznik wrote: > >>

Re: [Qemu-devel] [PATCH 1/2] memory: Provide separate handling of unassigned io ports accesses

2013-08-09 Thread Andreas Färber
Am 09.08.2013 09:41, schrieb Paolo Bonzini: > Il 08/08/2013 17:43, Jan Kiszka ha scritto: >> On 2013-08-08 17:33, Peter Maydell wrote: >>> On 3 August 2013 09:31, Jan Kiszka wrote: --- a/ioport.c +++ b/ioport.c @@ -44,6 +44,22 @@ typedef struct MemoryRegionPortioList { Mem

[Qemu-devel] GDB debugging of QEMU.

2013-08-09 Thread Yaodong Yang
Hello everyone, I have a simple question about the debugging of qemu. I used the qemu-1.5.1, and added several .c and .h files related the block drivers. I want to debug my own implementations using gdb. but I have no idea how to do it. I tried the following commands. ./configure --enable-debug

Re: [Qemu-devel] [libvirt] [PATCH] qemu: Drop qemuDomainMemoryLimit

2013-08-09 Thread Andreas Färber
Am 09.08.2013 17:58, schrieb Anthony Liguori: > Even if we had an algorithm for calculating memory overhead (we don't), > glibc will still introduce uncertainty since malloc(size) doesn't > translate to allocating size bytes from the kernel. When you throw in > fragmentation too it becomes extreme

[Qemu-devel] [PATCH v5 0/2] hw/arm: add 'virt' platform

2013-08-09 Thread Peter Maydell
This patch series adds a 'virt' platform which uses the kernel's mach-virt (fully device-tree driven) support to create a simple minimalist platform intended for use for KVM VM guests. It's based on John Rigby's patches, but I've overhauled it a lot: * renamed user-facing machine to just "virt"

[Qemu-devel] [PATCH v5 2/2] hw/arm: Add 'virt' platform

2013-08-09 Thread Peter Maydell
From: John Rigby Add 'virt' platform support corresponding to arch/arm/mach-virt in the Linux kernel tree. This has no platform-specific code but can use any device whose kernel driver is is able to work purely from a device tree node. We use this to instantiate a minimal set of devices: a GIC an

[Qemu-devel] [PATCH v5 1/2] hw/arm/boot: Allow boards to provide an fdt blob

2013-08-09 Thread Peter Maydell
From: John Rigby If no fdt is provided on command line and the new field get_dtb in struct arm_boot_info is set then call it to get a device tree blob. Signed-off-by: John Rigby [PMM: minor tweaks and cleanup] Signed-off-by: Peter Maydell --- hw/arm/boot.c| 32 --

[Qemu-devel] [PATCH v2 3/4] target-arm: Implement the generic timer

2013-08-09 Thread Peter Maydell
The ARMv7 architecture specifies a 'generic timer' which is implemented via cp15 registers. Newer kernels will prefer to use this rather than a devboard-level timer. Implement the generic timer for TCG; for KVM we will already use the hardware's virtualized timer for this. Signed-off-by: Peter May

[Qemu-devel] [PATCH v2 2/4] target-arm: Support coprocessor registers which do I/O

2013-08-09 Thread Peter Maydell
Add an ARM_CP_IO flag which an ARMCPRegInfo definition can use to indicate that the register's implementation does I/O and thus its accesses need to be surrounded by gen_io_start()/gen_io_end() in order for icount to work. Most notably, cp registers which implement clocks or timers need this. Sign

[Qemu-devel] [PATCH v2 1/4] target-arm: Allow raw_read() and raw_write() to handle 64 bit regs

2013-08-09 Thread Peter Maydell
Extend the raw_read() and raw_write() helper accessors so that they can be used for 64 bit registers as well as 32 bit registers. Signed-off-by: Peter Maydell Tested-by: Laurent Desnogues --- target-arm/helper.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 4/4] hw/cpu/a15mpcore: Wire generic timer outputs to GIC inputs

2013-08-09 Thread Peter Maydell
Now our A15 CPU implements the generic timers, we can wire them up to the appropriate inputs on the GIC. Signed-off-by: Peter Maydell Tested-by: Laurent Desnogues --- hw/cpu/a15mpcore.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpco

[Qemu-devel] [PATCH v2 0/4] target-arm: Implement support for generic timers

2013-08-09 Thread Peter Maydell
This patch series implements support for the 'generic timers', which are a set of timers defined in the ARM Architecture Reference Manual and implemented by the Cortex-A15. We've got away without these up til now because Linux will generally fall back on whatever random timer is present on the devb

Re: [Qemu-devel] [libvirt] [PATCH] qemu: Drop qemuDomainMemoryLimit

2013-08-09 Thread Anthony Liguori
Michal Privoznik writes: > [CC'ing qemu-devel list] > On 09.08.2013 15:17, Daniel P. Berrange wrote: >> On Fri, Aug 09, 2013 at 07:13:58AM -0600, Eric Blake wrote: >>> On 08/09/2013 06:56 AM, Michal Privoznik wrote: This function is to guess the correct limit for maximal memory usage by

Re: [Qemu-devel] [RFC] [PATCHv8 09/30] aio / timers: Add QEMUTimerListGroup and helper functions

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 16:47, Alex Bligh ha scritto: > > On 9 Aug 2013, at 15:35, Paolo Bonzini wrote: > >> The point is that you can get rid altogether of TimerListGroup if you >> just stick the array in the AioContext. There's no use in adding a >> concept with an easy plan to delete it, only waiting f

Re: [Qemu-devel] Are there plans to achieve ram live Snapshot feature?

2013-08-09 Thread Eric Blake
On 08/09/2013 09:45 AM, Anthony Liguori wrote: > Chijianchun writes: > >> Now in KVM, when RAM snapshot, vcpus needs stopped, it is Unfriendly >> restrictions to users. >> >> Are there plans to achieve ram live Snapshot feature? > > I think you mean a live version of the savevm command. > > Yo

Re: [Qemu-devel] [PATCH] pc: drop external DSDT loading

2013-08-09 Thread Michael S. Tsirkin
On Fri, Aug 09, 2013 at 03:26:22PM +0200, Gerd Hoffmann wrote: > On 08/09/13 14:38, Anthony Liguori wrote: > > Gerd Hoffmann writes: > > > >> On 08/08/13 18:38, Anthony Liguori wrote: > >>> This breaks migration and is unneeded with modern SeaBIOS. > >> > >> No. Dropping for piix is fine. It wi

Re: [Qemu-devel] [PATCH v2 for-1.6 0/2] virtio-mmio: fixes to QueueNum, QueueNumMax

2013-08-09 Thread Peter Maydell
On 26 July 2013 16:41, Peter Maydell wrote: > These patches fix a couple of bugs in virtio-mmio's > handling of the registers that deal with the queue size: > > * as mst points out, letting the guest flip a queue between >"exists" and "doesn't exist" is a bad idea > * QueueNumMax wasn't read

Re: [Qemu-devel] [PATCH] pc: drop external DSDT loading

2013-08-09 Thread Michael S. Tsirkin
On Fri, Aug 09, 2013 at 07:38:36AM -0500, Anthony Liguori wrote: > Gerd Hoffmann writes: > > > On 08/08/13 18:38, Anthony Liguori wrote: > >> This breaks migration and is unneeded with modern SeaBIOS. > > > > No. Dropping for piix is fine. It will break q35 though. > > Can you elaborate? When

Re: [Qemu-devel] [SeaBIOS] [PATCH] acpi: hide 64-bit PCI hole for Windows XP

2013-08-09 Thread Michael S. Tsirkin
On Fri, Aug 09, 2013 at 12:13:06AM -0400, Kevin O'Connor wrote: > On Thu, Aug 08, 2013 at 04:56:55PM +0200, Gerd Hoffmann wrote: > > On 08/08/13 16:13, Michael S. Tsirkin wrote: > > > On Thu, Aug 08, 2013 at 12:21:32PM +0200, Gerd Hoffmann wrote: > > >> On 08/08/13 11:52, Michael S. Tsirkin wrote:

Re: [Qemu-devel] Are there plans to achieve ram live Snapshot feature?

2013-08-09 Thread Anthony Liguori
Chijianchun writes: > Now in KVM, when RAM snapshot, vcpus needs stopped, it is Unfriendly > restrictions to users. > > Are there plans to achieve ram live Snapshot feature? I think you mean a live version of the savevm command. You can approximate live migrating to a file, creating an externa

Re: [Qemu-devel] Are there plans to achieve ram live Snapshot feature?

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 12:20, Chijianchun ha scritto: > Now in KVM, when RAM snapshot, vcpus needs stopped, it is Unfriendly > restrictions to users. > > Are there plans to achieve ram live Snapshot feature? > > in my mind, Snapshots can not occupy additional too much memory, So when > the memory needs

Re: [Qemu-devel] [RFC] [PATCHv8 09/30] aio / timers: Add QEMUTimerListGroup and helper functions

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 17:09, Stefan Hajnoczi ha scritto: >> Perhaps, but do we really need it to work outside AioContexts? Using a >> second AioContext for bottom halves has been mentioned for a while. It >> would fix issues where a bottom half runs spuriously before QEMU starts, >> just because somethin

Re: [Qemu-devel] [PATCH 1/7] virtio: allow byte swapping for vring and config access

2013-08-09 Thread Andreas Färber
Am 09.08.2013 09:35, schrieb Rusty Russell: > Andreas Färber writes: >> [...] If we name it >> cpu_get_byteswap() as proposed by you, then its first argument should be >> a CPUState *cpu. Its value would be read from the derived type's state, >> such as the MSR bit in the code path that you wanted

[Qemu-devel] [PATCH v3] pci: Introduce helper to retrieve a PCI device's DMA address space

2013-08-09 Thread Alexey Kardashevskiy
A PCI device's DMA address space (possibly an IOMMU) is returned by a method on the PCIBus. At the moment that only has one caller, so the method is simply open coded. We'll need another caller for VFIO, so this patch introduces a helper/wrapper function. If IOMMU is not set, the pci_device_iomm

Re: [Qemu-devel] [RFC] [PATCHv8 09/30] aio / timers: Add QEMUTimerListGroup and helper functions

2013-08-09 Thread Stefan Hajnoczi
On Fri, Aug 09, 2013 at 04:35:31PM +0200, Paolo Bonzini wrote: > Il 09/08/2013 16:27, Alex Bligh ha scritto: > > Paolo, > > > >>> diff --git a/include/qemu/timer.h b/include/qemu/timer.h > >>> index 1baa0e2..3b46f60 100644 > >>> --- a/include/qemu/timer.h > >>> +++ b/include/qemu/timer.h > >>> @@

Re: [Qemu-devel] [ceph-users] qemu-1.4.0 and onwards, linux kernel 3.2.x, ceph-RBD, heavy I/O leads to kernel_hung_tasks_timout_secs message and unresponsive qemu-process, [Bug 1207686]

2013-08-09 Thread Stefan Hajnoczi
On Fri, Aug 09, 2013 at 03:05:22PM +0100, Andrei Mikhailovsky wrote: > I can confirm that I am having similar issues with ubuntu vm guests using fio > with bs=4k direct=1 numjobs=4 iodepth=16. Occasionally i see hang tasks, > occasionally guest vm stops responding without leaving anything in the

Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 16:57, Alex Bligh ha scritto: > > On 9 Aug 2013, at 15:51, Paolo Bonzini wrote: > >>> One nit: >>> >>> Currently struct QEMUTimer lives nicely within qemu_timer.c, hidden >>> from the .h, which only contains: >>> typedef struct QEMUTimer QEMUTimer; >>> >>> If what you are after is

Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper

2013-08-09 Thread Alex Bligh
On 9 Aug 2013, at 15:51, Paolo Bonzini wrote: >> One nit: >> >> Currently struct QEMUTimer lives nicely within qemu_timer.c, hidden >> from the .h, which only contains: >> typedef struct QEMUTimer QEMUTimer; >> >> If what you are after is for people to put a QEMUTimer into their >> struct, rat

Re: [Qemu-devel] [RFC] [PATCHv8 12/30] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-09 Thread Alex Bligh
On 9 Aug 2013, at 15:41, Paolo Bonzini wrote: > It would just be these five lines of code, no? > >for (type = 0; type < QEMU_CLOCK_MAX; type++) { >if (qemu_clock_use_for_deadline(qemu_clock_ptr(type))) { >deadline = qemu_soonest_timeout(deadline, >

Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 16:51, Alex Bligh ha scritto: > > On 9 Aug 2013, at 15:36, Paolo Bonzini wrote: > >>> Would that not require change the huge number of qemu_timer_new references >>> to use this new API? That sounds less than automatic! Not in favour of >>> that one. >> >> qemu_timer_new can remain f

Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper

2013-08-09 Thread Alex Bligh
On 9 Aug 2013, at 15:36, Paolo Bonzini wrote: >> Would that not require change the huge number of qemu_timer_new references >> to use this new API? That sounds less than automatic! Not in favour of >> that one. > > qemu_timer_new can remain for now (only waiting for the next > mass-rewriting scr

Re: [Qemu-devel] [PATCH] pc: compat: remove PCLMULQDQ from Westmere on pc-*-1.4 and older

2013-08-09 Thread Andreas Färber
Am 09.08.2013 16:11, schrieb Eduardo Habkost: > commit 41cb383f42d0cb51d8e3e25e3ecebc954dd4196f made a guest-visible > change by adding the PCLMULQDQ bit to Westmere without adding > compatibility code to keep the ABI older machine-types. This patch fixes > it by adding the missing compat code. >

Re: [Qemu-devel] [RFC] [PATCHv8 09/30] aio / timers: Add QEMUTimerListGroup and helper functions

2013-08-09 Thread Alex Bligh
On 9 Aug 2013, at 15:35, Paolo Bonzini wrote: > The point is that you can get rid altogether of TimerListGroup if you > just stick the array in the AioContext. There's no use in adding a > concept with an easy plan to delete it, only waiting for someone willing > to do the work. It is not relat

Re: [Qemu-devel] [PATCH for-1.6] pc: compat: remove PCLMULQDQ from Westmere on pc-*-1.4 and older

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 16:11, Eduardo Habkost ha scritto: > commit 41cb383f42d0cb51d8e3e25e3ecebc954dd4196f made a guest-visible > change by adding the PCLMULQDQ bit to Westmere without adding > compatibility code to keep the ABI older machine-types. This patch fixes > it by adding the missing compat code.

Re: [Qemu-devel] [RFC] [PATCHv8 28/30] aio / timers: Add scripts/switch-timer-api

2013-08-09 Thread Alex Bligh
On 9 Aug 2013, at 11:26, Paolo Bonzini wrote: > Il 08/08/2013 23:42, Alex Bligh ha scritto: >> +# these have just changed name >> +$line =~ s/\bqemu_mod_timer\b/qemu_timer_mod/g; >> +$line =~ s/\bqemu_mod_timer_(ns|us|ms)\b/qemu_timer_mod_$1/g; >> +$line =~ s/\bqem

Re: [Qemu-devel] [RFC] [PATCHv8 12/30] aio / timers: aio_ctx_prepare sets timeout from AioContext timers

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 16:30, Alex Bligh ha scritto: > > On 9 Aug 2013, at 11:04, Paolo Bonzini wrote: > >>> @@ -180,7 +189,7 @@ aio_ctx_check(GSource *source) >>> return true; >>> } >>> } >>> -return aio_pending(ctx); >>> +return aio_pending(ctx) || (timerlistgroup_deadline_ns

Re: [Qemu-devel] [RFC] [PATCHv8 28/30] aio / timers: Add scripts/switch-timer-api

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 16:35, Alex Bligh ha scritto: > > On 9 Aug 2013, at 11:26, Paolo Bonzini wrote: > >> Il 08/08/2013 23:42, Alex Bligh ha scritto: >>> + # these have just changed name >>> + $line =~ s/\bqemu_mod_timer\b/qemu_timer_mod/g; >>> + $line =~ s/\bqemu_mod_timer_(ns|us|ms)\

Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 16:32, Alex Bligh ha scritto: > > On 9 Aug 2013, at 11:06, Paolo Bonzini wrote: > >>> +/** >>> + * aio_timer_new: >>> + * @ctx: the aio context >>> + * @type: the clock type >>> + * @scale: the scale >>> + * @cb: the callback to call on timer expiry >>> + * @opaque: the opaque point

Re: [Qemu-devel] [RFC] [PATCHv8 09/30] aio / timers: Add QEMUTimerListGroup and helper functions

2013-08-09 Thread Paolo Bonzini
Il 09/08/2013 16:27, Alex Bligh ha scritto: > Paolo, > >>> diff --git a/include/qemu/timer.h b/include/qemu/timer.h >>> index 1baa0e2..3b46f60 100644 >>> --- a/include/qemu/timer.h >>> +++ b/include/qemu/timer.h >>> @@ -52,8 +52,10 @@ typedef enum { >>> >>> typedef struct QEMUClock QEMUClock; >>>

Re: [Qemu-devel] [PATCH v2 7/7] AARCH64: Use the spin-table method for booting secondary processors in machvirt

2013-08-09 Thread Peter Maydell
On 23 July 2013 10:33, Mian M. Hamayun wrote: > From: "Mian M. Hamayun" > > As the SMP bootloader uses a spin-table to wait for the cpu_release_addr, we > disable the PSCI method for AArch64 in machvirt and use spin-table instead. Marc Z says we should be using PSCI for secondary CPU boot for aa

Re: [Qemu-devel] [RFC] [PATCHv8 13/30] aio / timers: Add aio_timer_new wrapper

2013-08-09 Thread Alex Bligh
On 9 Aug 2013, at 11:06, Paolo Bonzini wrote: >> +/** >> + * aio_timer_new: >> + * @ctx: the aio context >> + * @type: the clock type >> + * @scale: the scale >> + * @cb: the callback to call on timer expiry >> + * @opaque: the opaque pointer to pass to the callback >> + * >> + * Generate a new t

Re: [Qemu-devel] [RFC] [PATCHv8 28/30] aio / timers: Add scripts/switch-timer-api

2013-08-09 Thread Alex Bligh
On 9 Aug 2013, at 11:23, Paolo Bonzini wrote: >> + -r, --rtc Only fix up rtc usage > > What is this option useful for? I used it to produce the patch: aio / timers: Convert rtc_clock to be a QEMUClockType though it required a little tweaking IIRC. I left the option in because I feared

  1   2   3   >