Re: [Qemu-devel] [PATCH v2 00/15] SCSI s/g + SCSI migration + virtio-scsi

2012-02-09 Thread Hu Tao
On Thu, Feb 09, 2012 at 08:13:52AM +0100, Paolo Bonzini wrote: On 02/09/2012 06:46 AM, Hu Tao wrote: I've re-tested today, with host kernel 2.6.35.6-45.fc14.x86_64, 2.6.32-71.el6.x86_64, 3.1.0 and 3.3.0-rc1+, qemu version and guest configuration remain the same, including guest kernel.

Re: [Qemu-devel] spawning and killing threads in qemu

2012-02-09 Thread 陳韋任
On Wed, Feb 08, 2012 at 09:40:08PM -0500, Xin Tong wrote: can you show me where these threads get created in the qemu code ? If you mean vcpu thread, see cpu_x86_init (target-i386/helper.c). At the end of this function, CPUX86State *cpu_x86_init(const char *cpu_model) {

[Qemu-devel] how to run a application compiled for sparc platform using qemu-sparc?

2012-02-09 Thread Dylan
I want to run a application using qemu-sparc,for example $qemu-sparc hello,where hello is an application compiled for sparc platform. And the host os and architecture are linux and x86. But it catches an error when loading elf file hello,the spesific error is as follow: // in load_elf_image

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread Jan Kiszka
Looks like the subject would warmly welcome a kvm: tag. On 2012-02-09 05:22, David Gibson wrote: In kvm-all.c we store an ioctl cmd number in the irqchip_inject_ioctl field of KVMState, which has type 'int'. This seems to make sense since the ioctl() man page says that the cmd parameter has

[Qemu-devel] subpages with memory region aliases (was: [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests)

2012-02-09 Thread Jan Kiszka
Avi, Before I forget: On 2012-02-05 13:39, Jan Kiszka wrote: +static void vapic_map_rom_writable(VAPICROMState *s) +{ +target_phys_addr_t rom_paddr = s-rom_state_paddr ROM_BLOCK_MASK; +MemoryRegionSection section; +MemoryRegion *as; +size_t rom_size; +uint8_t *ram; +

[Qemu-devel] [PATCH v14 00/10] ARM: Samsung Exynos4210-based boards support.

2012-02-09 Thread Evgeny Voevodin
This set of patches adds support for Samsung Exynos4210-based boards NURI and SMDKC210. Tested on Linux kernel v3.x series. Usage: Exynos4210 SOC boards are modelled to run two CPU cores.. Linux kernel v3.x configured with exynos4_defconfig can be used for boards models testing with rootfs on

[Qemu-devel] [PATCH v14 05/10] ARM: exynos4210: basic Power Management Unit implementation

2012-02-09 Thread Evgeny Voevodin
From: Maksim Kozlov m.koz...@samsung.com Patch adds basic model for Exynos4210 SoC PMU. This model implements PMU registers just as a bulk of memory. Currently, the only reason this device exists is that secondary CPU boot loader uses PMU INFORM5 register as a holding pen. Signed-off-by: Maksim

[Qemu-devel] [PATCH v14 06/10] ARM: exynos4210: MCT support.

2012-02-09 Thread Evgeny Voevodin
Signed-off-by: Evgeny Voevodin e.voevo...@samsung.com --- Makefile.target |2 +- hw/exynos4210.c | 19 + hw/exynos4210_mct.c | 1488 +++ 3 files changed, 1508 insertions(+), 1 deletions(-) create mode 100644 hw/exynos4210_mct.c diff

Re: [Qemu-devel] [PATCH v3 1/6] suspend: add infrastructure

2012-02-09 Thread Gleb Natapov
On Wed, Feb 08, 2012 at 12:00:14PM +0100, Gerd Hoffmann wrote: This patch adds some infrastructure to handle suspend and resume to qemu. First there are two functions to switch state and second there is a suspend notifier: * qemu_system_suspend_request() is supposed to be called when the

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gleb Natapov
On Wed, Feb 08, 2012 at 12:00:15PM +0100, Gerd Hoffmann wrote: This patch switches pc s3 suspend over to the new infrastructure. The cmos_s3 qemu_irq is killed, the new notifier is used instead. The xen hack goes away with that too, the hypercall can simply be done in a notifier function now.

Re: [Qemu-devel] [PATCH v3 3/6] suspend: add system_wakeup monitor command

2012-02-09 Thread Gleb Natapov
On Wed, Feb 08, 2012 at 12:00:16PM +0100, Gerd Hoffmann wrote: This patch adds the system_wakeup monitor command which will simply wake up suspended guests. We can report this one as power button wakeup. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hmp-commands.hx | 14

Re: [Qemu-devel] [PATCH v3 6/6] suspend: make rtc alarm wakeup the guest.

2012-02-09 Thread Gleb Natapov
On Wed, Feb 08, 2012 at 12:00:19PM +0100, Gerd Hoffmann wrote: Add a 'wakeup' property to the mc146818rtc. It is on by default. When enabled the rtc will wake up the guest when the alarm fires. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/mc146818rtc.c |5 + 1 files

[Qemu-devel] [PATCH v14 03/10] ARM: exynos4210: UART support

2012-02-09 Thread Evgeny Voevodin
From: Maksim Kozlov m.koz...@samsung.com Add basic support of exynos4210 UART Signed-off-by: Maksim Kozlov m.koz...@samsung.com Signed-off-by: Evgeny Voevodin e.voevo...@samsung.com --- Makefile.target |2 +- hw/exynos4210.c | 29 +++ hw/exynos4210.h |9 +

[Qemu-devel] [PATCH v14 07/10] hw/lan9118: Add basic 16-bit mode support.

2012-02-09 Thread Evgeny Voevodin
Signed-off-by: Evgeny Voevodin e.voevo...@samsung.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- hw/lan9118.c | 124 +++--- 1 files changed, 118 insertions(+), 6 deletions(-) diff --git a/hw/lan9118.c b/hw/lan9118.c index

[Qemu-devel] [PATCH v14 08/10] hw/exynos4210.c: Add LAN support for SMDKC210.

2012-02-09 Thread Evgeny Voevodin
SMDKC210 uses lan9215 chip, but lan9118 in 16-bit mode seems to be enough. Signed-off-by: Evgeny Voevodin e.voevo...@samsung.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- hw/exynos4_boards.c | 27 +-- 1 files changed, 25 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [PATCH] make: Remove duplicate use of GLIB_CFLAGS

2012-02-09 Thread Andreas Färber
Am 08.02.2012 22:41, schrieb Stefan Weil: Makefile, Makefile.hw, Makefile.target and libcacard/Makefile added GLIB_CFLAGS to QEMU_CFLAGS. Makefile.objs does this, too, and is included by all other Makefiles, so GLIB_CFLAGS were added twice (reported by malc). Signed-off-by: Stefan Weil

[Qemu-devel] [PATCH v14 01/10] ARM: exynos4210: IRQ subsystem support.

2012-02-09 Thread Evgeny Voevodin
Signed-off-by: Evgeny Voevodin e.voevo...@samsung.com --- Makefile.target |1 + hw/exynos4210.h | 82 hw/exynos4210_combiner.c | 469 ++ hw/exynos4210_gic.c | 458 4

Re: [Qemu-devel] [Qemu-trivial] [PATCH] linux-user: fail execve() if env/args too big

2012-02-09 Thread Stefan Hajnoczi
On Tue, Jan 31, 2012 at 12:43:16PM +0100, Ulrich Hecht wrote: If the host's page size is equal to or smaller than the target's, native execve() will fail appropriately with E2BIG if called with too big an environment for the target to handle. It may falsely succeed, however, if the host's page

Re: [Qemu-devel] [Qemu-trivial] [PATCH] ide: fix compilation errors when DEBUG_IDE is set

2012-02-09 Thread Stefan Hajnoczi
On Mon, Feb 06, 2012 at 10:19:42PM +0100, Hervé Poussineau wrote: Signed-off-by: Hervé Poussineau hpous...@reactos.org --- hw/ide/pci.c |2 +- hw/ide/piix.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) The types in this code are a mess but your patch doesn't make it

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] cpu-exec.c: Correct comment about this file and indentation cleanup

2012-02-09 Thread Stefan Hajnoczi
On Mon, Feb 06, 2012 at 02:02:55PM +0800, 陳韋任 wrote: Each target use #define marco (in target-xxx/cpu.h) to rename cpu_exec (cpu-exec.c) to cpu_xxx_exec, then defines its own cpu_loop which calls cpu_xxx_exec. So basically, cpu-exec.c is not i386 (only) emulator main execution loop. This

Re: [Qemu-devel] [Qemu-trivial] [PATCH] memory-region: Report if region is read-only on info mtree

2012-02-09 Thread Stefan Hajnoczi
On Sat, Feb 04, 2012 at 03:51:43PM +0100, Jan Kiszka wrote: On 2012-02-04 13:32, Blue Swirl wrote: On Sat, Feb 4, 2012 at 12:23, Jan Kiszka jan.kis...@web.de wrote: On 2012-02-04 13:12, Blue Swirl wrote: On Fri, Feb 3, 2012 at 12:02, Jan Kiszka jan.kis...@siemens.com wrote: Helpful to

Re: [Qemu-devel] [PATCH 09/10] memory: use a MemoryListener for core memory map updates too

2012-02-09 Thread Avi Kivity
On 02/09/2012 09:58 AM, Paolo Bonzini wrote: On 02/08/2012 04:27 PM, Avi Kivity wrote: +static void core_log_stop(MemoryListener *listener, + MemoryRegionSection *section) +{ +} + +static void core_log_sync(MemoryListener *listener, +

Re: [Qemu-devel] subpages with memory region aliases

2012-02-09 Thread Avi Kivity
On 02/09/2012 10:35 AM, Jan Kiszka wrote: Avi, Before I forget: On 2012-02-05 13:39, Jan Kiszka wrote: +static void vapic_map_rom_writable(VAPICROMState *s) +{ +target_phys_addr_t rom_paddr = s-rom_state_paddr ROM_BLOCK_MASK; +MemoryRegionSection section; +MemoryRegion

Re: [Qemu-devel] [PATCH] net: remove extra spaces in help messages

2012-02-09 Thread Stefan Hajnoczi
On Mon, Jan 23, 2012 at 03:42:38AM +0900, Benjamin MARSILI wrote: Signed-off-by: Benjamin MARSILI mlspira...@gmail.com --- net/socket.c |8 1 files changed, 4 insertions(+), 4 deletions(-) Thanks, applied to the trivial patches tree:

[Qemu-devel] [PATCH v14 10/10] MAINTAINERS: Add maintainers for Exynos SOC.

2012-02-09 Thread Evgeny Voevodin
Signed-off-by: Evgeny Voevodin e.voevo...@samsung.com --- MAINTAINERS |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 173e893..e55ea0f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -183,6 +183,14 @@ F: *win32* ARM Machines

Re: [Qemu-devel] [PATCH] vl.c: Fix typo in variable name

2012-02-09 Thread Stefan Hajnoczi
On Tue, Feb 07, 2012 at 08:57:27PM +, Peter Maydell wrote: Fix a typo in a local variable name. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- vl.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Thanks, applied to the trivial patches tree:

Re: [Qemu-devel] [RFC] CODING_STYLE: Clarify style for enum and function type names

2012-02-09 Thread Stefan Hajnoczi
On Fri, Jan 13, 2012 at 08:29:49PM +, Peter Maydell wrote: Clarify that enum type names and function type names should follow the CamelCase style used for structured type names. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- During a conversation on IRC with Anthony, I

Re: [Qemu-devel] [PATCH] ARM devboards: Set arm_sysctl properties before init, not after

2012-02-09 Thread Paolo Bonzini
On 02/09/2012 07:11 AM, Peter Maydell wrote: The ARM devboard models (vexpress-a9, realview, versatilepb, etc) were accidentally trying to set one of the arm_sysctl properties after device init. This has now become a fatal error; set the property before device init where it should be done

[Qemu-devel] [PATCH v14 02/10] ARM: Samsung exynos4210-based boards emulation

2012-02-09 Thread Evgeny Voevodin
Add initial support of NURI and SMDKC210 boards Signed-off-by: Evgeny Voevodin e.voevo...@samsung.com --- Makefile.target |3 +- hw/exynos4210.c | 193 +++ hw/exynos4210.h | 40 +++ hw/exynos4_boards.c | 153

[Qemu-devel] [PATCH v14 04/10] ARM: exynos4210: PWM support.

2012-02-09 Thread Evgeny Voevodin
Signed-off-by: Evgeny Voevodin e.voevo...@samsung.com --- Makefile.target |2 +- hw/exynos4210.c | 12 ++ hw/exynos4210_pwm.c | 422 +++ 3 files changed, 435 insertions(+), 1 deletions(-) create mode 100644 hw/exynos4210_pwm.c diff

Re: [Qemu-devel] Restore consistent formatting

2012-02-09 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: On 02/08/2012 09:04 AM, malc wrote: On Wed, 8 Feb 2012, Andreas F?rber wrote: malc, Arbitrarily reformatting your files is not okay. If you want a different formatting, you need to fix checkpatch.pl first to not error on that formatting in

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread David Gibson
On Thu, Feb 09, 2012 at 09:30:09AM +0100, Jan Kiszka wrote: Looks like the subject would warmly welcome a kvm: tag. On 2012-02-09 05:22, David Gibson wrote: [snip] What about naming the problem instead: /* Comparison with IOCTL macros on 32-bit hosts requires unsigned. */ Just once, it

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread Jan Kiszka
On 2012-02-09 10:58, David Gibson wrote: On Thu, Feb 09, 2012 at 09:30:09AM +0100, Jan Kiszka wrote: Looks like the subject would warmly welcome a kvm: tag. On 2012-02-09 05:22, David Gibson wrote: [snip] What about naming the problem instead: /* Comparison with IOCTL macros on 32-bit

Re: [Qemu-devel] [Qemu-trivial] [PATCH] memory-region: Report if region is read-only on info mtree

2012-02-09 Thread Jan Kiszka
On 2012-02-09 09:35, Stefan Hajnoczi wrote: On Sat, Feb 04, 2012 at 03:51:43PM +0100, Jan Kiszka wrote: On 2012-02-04 13:32, Blue Swirl wrote: On Sat, Feb 4, 2012 at 12:23, Jan Kiszka jan.kis...@web.de wrote: On 2012-02-04 13:12, Blue Swirl wrote: On Fri, Feb 3, 2012 at 12:02, Jan Kiszka

[Qemu-devel] [PATCH 0/5] rom build scripting, switch vgabios implementation

2012-02-09 Thread Gerd Hoffmann
Hi folks, There is a vgabios sitting implementation in the seabios repository for a while. Recently it got a huge overhaul and should be on-par with the lgpl vgabios implementation. I'd like to see qemu switch to that implementation, for very simliar reasons which made us switch from bochs

[Qemu-devel] [PATCH 1/5] update seabios to latest master [feb 9th]

2012-02-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- pc-bios/vgabios-cirrus.bin | Bin 35840 - 35328 bytes roms/seabios |2 +- 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pc-bios/vgabios-cirrus.bin b/pc-bios/vgabios-cirrus.bin index

Re: [Qemu-devel] [PATCH v3 1/6] suspend: add infrastructure

2012-02-09 Thread Gerd Hoffmann
On 02/09/12 09:48, Gleb Natapov wrote: On Wed, Feb 08, 2012 at 12:00:14PM +0100, Gerd Hoffmann wrote: * qemu_system_wakeup_request is supposed to be called on events which should wake up the guest. qemu_system_wakeup_request() should get wakeup source as a parameter. There are ways to

[Qemu-devel] [PATCH 4/5] Add seabios build scripts to roms/

2012-02-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- roms/Makefile |6 ++ roms/config.seabios |1 + 2 files changed, 7 insertions(+), 0 deletions(-) create mode 100644 roms/config.seabios diff --git a/roms/Makefile b/roms/Makefile index 5c3d5f4..b24c728 100644 ---

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gerd Hoffmann
Hi, Pretend that resume was caused by power button */ pm1a-sts |= (ACPI_BITMASK_WAKE_STATUS | ACPI_BITMASK_POWER_BUTTON_STATUS); Here we should report real reason for a wakeup (if it can be reported in mp1sts that is). These are available I

[Qemu-devel] [PATCH 2/5] Add vgabios build scripts to roms/

2012-02-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- roms/Makefile | 17 + roms/config.vga.cirrus|3 +++ roms/config.vga.isavga|3 +++ roms/config.vga.qxl |6 ++ roms/config.vga.stdvga|3 +++ roms/config.vga.vmware|6 ++

Re: [Qemu-devel] [Xen-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Stefano Stabellini
On Wed, 8 Feb 2012, Gerd Hoffmann wrote: This patch switches pc s3 suspend over to the new infrastructure. The cmos_s3 qemu_irq is killed, the new notifier is used instead. The xen hack goes away with that too, the hypercall can simply be done in a notifier function now. nice cleanup

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 11:51:45AM +0100, Gerd Hoffmann wrote: Hi, Pretend that resume was caused by power button */ pm1a-sts |= (ACPI_BITMASK_WAKE_STATUS | ACPI_BITMASK_POWER_BUTTON_STATUS); Here we should report real reason for a

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Paolo Bonzini
On 02/08/2012 12:00 PM, Gerd Hoffmann wrote: +/* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE) + BIOS will read it and start S3 resume at POST Entry */ +static void rtc_notify_suspend(Notifier *notifier, void *data) +{ +RTCState *s = container_of(notifier, RTCState,

Re: [Qemu-devel] [PATCH v3 1/6] suspend: add infrastructure

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 11:45:21AM +0100, Gerd Hoffmann wrote: On 02/09/12 09:48, Gleb Natapov wrote: On Wed, Feb 08, 2012 at 12:00:14PM +0100, Gerd Hoffmann wrote: * qemu_system_wakeup_request is supposed to be called on events which should wake up the guest.

Re: [Qemu-devel] [PATCH 1/3] Device isolation group infrastructure (v3)

2012-02-09 Thread Joerg Roedel
On Thu, Feb 09, 2012 at 08:39:28AM +1100, Benjamin Herrenschmidt wrote: On Wed, 2012-02-08 at 16:27 +0100, Joerg Roedel wrote: Again, device grouping is done by the IOMMU drivers, so this all belongs into the generic iommu-code rather than the driver core. Except that there isn't really

Re: [Qemu-devel] [Qemu-trivial] [PATCH] memory-region: Report if region is read-only on info mtree

2012-02-09 Thread Stefan Hajnoczi
On Thu, Feb 9, 2012 at 10:08 AM, Jan Kiszka jan.kis...@web.de wrote: On 2012-02-09 09:35, Stefan Hajnoczi wrote: On Sat, Feb 04, 2012 at 03:51:43PM +0100, Jan Kiszka wrote: On 2012-02-04 13:32, Blue Swirl wrote: On Sat, Feb 4, 2012 at 12:23, Jan Kiszka jan.kis...@web.de wrote: On 2012-02-04

Re: [Qemu-devel] [PATCH v3 6/6] suspend: make rtc alarm wakeup the guest.

2012-02-09 Thread Gerd Hoffmann
On 02/09/12 09:56, Gleb Natapov wrote: On Wed, Feb 08, 2012 at 12:00:19PM +0100, Gerd Hoffmann wrote: Add a 'wakeup' property to the mc146818rtc. It is on by default. When enabled the rtc will wake up the guest when the alarm fires. Signed-off-by: Gerd Hoffmann kra...@redhat.com ---

Re: [Qemu-devel] [PATCH v3 1/6] suspend: add infrastructure

2012-02-09 Thread Gerd Hoffmann
On 02/09/12 12:19, Gleb Natapov wrote: On Thu, Feb 09, 2012 at 11:45:21AM +0100, Gerd Hoffmann wrote: On 02/09/12 09:48, Gleb Natapov wrote: On Wed, Feb 08, 2012 at 12:00:14PM +0100, Gerd Hoffmann wrote: * qemu_system_wakeup_request is supposed to be called on events which should wake up

Re: [Qemu-devel] [RFC PATCH] arm boot: added QOM device definition

2012-02-09 Thread Paul Brook
/* multicore boards that use the default secondary core boot functions * can ignore these two function calls. If the default functions won't * work, then write_secondary_boot() should write a suitable blob of * code mimicing the secondary CPU startup process used by the

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread Paul Brook
What about naming the problem instead: /* Comparison with IOCTL macros on 32-bit hosts requires unsigned. */ Just once, it would be nice to post something to this list and get a substantive comment _before_ the bitching about minutiae. Oh, and it's not just 32-bit hosts, it's

Re: [Qemu-devel] [PATCH] ARM devboards: Set arm_sysctl properties before init, not after

2012-02-09 Thread Paul Brook
The ARM devboard models (vexpress-a9, realview, versatilepb, etc) were accidentally trying to set one of the arm_sysctl properties after device init. This has now become a fatal error; set the property before device init where it should be done instead. Signed-off-by: Peter Maydell

Re: [Qemu-devel] how to run a application compiled for sparc platform using qemu-sparc?

2012-02-09 Thread Paul Brook
the results of readelf -l hello are as follow: program headers: TYPE offsetvirtAddr phyAddr FileSiz MemSiz LOAD 0x0540x4000 0x4000 0x02bf0 0x02bf0 Clearly not a linux binary. Those have file offsets and

Re: [Qemu-devel] [PATCH v3 6/6] suspend: make rtc alarm wakeup the guest.

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 01:00:47PM +0100, Gerd Hoffmann wrote: On 02/09/12 09:56, Gleb Natapov wrote: On Wed, Feb 08, 2012 at 12:00:19PM +0100, Gerd Hoffmann wrote: Add a 'wakeup' property to the mc146818rtc. It is on by default. When enabled the rtc will wake up the guest when the alarm

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 12:17:33PM +0100, Paolo Bonzini wrote: On 02/08/2012 12:00 PM, Gerd Hoffmann wrote: +/* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE) + BIOS will read it and start S3 resume at POST Entry */ +static void rtc_notify_suspend(Notifier *notifier, void

Re: [Qemu-devel] [PATCH] ARM devboards: Set arm_sysctl properties before init, not after

2012-02-09 Thread Andreas Färber
Am 09.02.2012 13:15, schrieb Paul Brook: The ARM devboard models (vexpress-a9, realview, versatilepb, etc) were accidentally trying to set one of the arm_sysctl properties after device init. This has now become a fatal error; set the property before device init where it should be done instead.

Re: [Qemu-devel] [PATCH] ARM devboards: Set arm_sysctl properties before init, not after

2012-02-09 Thread Andreas Färber
Am 09.02.2012 13:34, schrieb Andreas Färber: Am 09.02.2012 13:15, schrieb Paul Brook: The ARM devboard models (vexpress-a9, realview, versatilepb, etc) were accidentally trying to set one of the arm_sysctl properties after device init. This has now become a fatal error; set the property

Re: [Qemu-devel] [PATCH v3 1/6] suspend: add infrastructure

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 01:02:47PM +0100, Gerd Hoffmann wrote: On 02/09/12 12:19, Gleb Natapov wrote: On Thu, Feb 09, 2012 at 11:45:21AM +0100, Gerd Hoffmann wrote: On 02/09/12 09:48, Gleb Natapov wrote: On Wed, Feb 08, 2012 at 12:00:14PM +0100, Gerd Hoffmann wrote: *

Re: [Qemu-devel] [PATCH v3 1/6] suspend: add infrastructure

2012-02-09 Thread Gerd Hoffmann
Hi, Incremental patch (just infrastructure, no acpi windup yet) attached. Something like this? We need to give ACPI ability to prevent wakeup. So, for instance, if RTC alarm calls wakeup but ACPI detects that RTC_EN is cleared it can prevent it. Yea, already figured that after reading

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Paolo Bonzini
On 02/09/2012 01:31 PM, Gleb Natapov wrote: Real HW may have other ways to notify BIOS that system was S3 suspended (special chipset register for instance). I think we can write DSDT magic to write RTC for us, but I prefer to do it from inside QEMU. Heh, I would prefer DSDT magic, but I

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 01:47:30PM +0100, Paolo Bonzini wrote: On 02/09/2012 01:31 PM, Gleb Natapov wrote: Real HW may have other ways to notify BIOS that system was S3 suspended (special chipset register for instance). I think we can write DSDT magic to write RTC for us, but I prefer to do

Re: [Qemu-devel] [PATCH] hw/arm_sysctl: Drop legacy init function

2012-02-09 Thread Andreas Färber
Am 09.02.2012 07:59, schrieb Peter Maydell: Drop the legacy init function arm_sysctl_init(), since it has no users left any more. This allows us to drop the awkward '1' from the actual device init function. Signed-off-by: Peter Maydell peter.mayd...@linaro.org No other occurrences in the

Re: [Qemu-devel] [PATCH v3 1/6] suspend: add infrastructure

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 01:46:07PM +0100, Gerd Hoffmann wrote: Hi, Incremental patch (just infrastructure, no acpi windup yet) attached. Something like this? We need to give ACPI ability to prevent wakeup. So, for instance, if RTC alarm calls wakeup but ACPI detects that RTC_EN is

Re: [Qemu-devel] [PATCH] ARM devboards: Set arm_sysctl properties before init, not after

2012-02-09 Thread Paul Brook
Am 09.02.2012 13:15, schrieb Paul Brook: The ARM devboard models (vexpress-a9, realview, versatilepb, etc) were accidentally trying to set one of the arm_sysctl properties after device init. This has now become a fatal error; set the property before device init where it should be done

[Qemu-devel] int128_add assumes the result will not exceed 128bits?

2012-02-09 Thread Wizard
All, I am reading this code. static inline Int128 int128_add(Int128 a, Int128 b){    Int128 r = { a.lo + b.lo, a.hi + b.hi };    r.hi += (r.lo a.lo) || (r.lo b.lo);   return r;} This assumes the result r will not exceed 128 bits?-- Wizard

Re: [Qemu-devel] [RFC PATCH] arm boot: added QOM device definition

2012-02-09 Thread Andreas Färber
Am 08.02.2012 08:55, schrieb Peter A. G. Crosthwaite: From: Peter A. G. Crosthwaite peter.crosthwa...@petalogix.com Create a QOM device for bootstrapping linux on arm. Wraps the existing arm_boot code and calls arm_load_kernel() at device init. Allows booting of linux without -kernel -initrd

Re: [Qemu-devel] [PATCH v3 1/6] suspend: add infrastructure

2012-02-09 Thread Gerd Hoffmann
Hi, We need to give ACPI ability to prevent wakeup. So, for instance, if RTC alarm calls wakeup but ACPI detects that RTC_EN is cleared it can prevent it. Yea, already figured that after reading your rtc reply ... One more incremental attached for review. We can start from that. But

[Qemu-devel] [TRIVIAL] virtio_cleanup(): Remove unneeded g_free() parameter check

2012-02-09 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- hw/virtio.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 74cc038..064aecf 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -845,8 +845,7 @@ int virtio_load(VirtIODevice *vdev,

Re: [Qemu-devel] Support for multiboot images in elf64 (EM_X86_64) format

2012-02-09 Thread Goswin von Brederlow
Paul Brook p...@codesourcery.com writes: starting your own toy kernel is a fun thing to do and there are many tutorials out there on how to do it. Unfortunately when one wants to write a kernel in 64bit it becomes much harder because one can't compile 64bit code as elf32 image and

Re: [Qemu-devel] Support for multiboot images in elf64 (EM_X86_64) format

2012-02-09 Thread Paul Brook
Paul Brook p...@codesourcery.com writes: starting your own toy kernel is a fun thing to do and there are many tutorials out there on how to do it. Unfortunately when one wants to write a kernel in 64bit it becomes much harder because one can't compile 64bit code as elf32 image and

Re: [Qemu-devel] Restore consistent formatting

2012-02-09 Thread Anthony Liguori
On 02/09/2012 03:48 AM, Markus Armbruster wrote: Anthony Liguorianth...@codemonkey.ws writes: On 02/08/2012 09:04 AM, malc wrote: On Wed, 8 Feb 2012, Andreas F?rber wrote: malc, Arbitrarily reformatting your files is not okay. If you want a different formatting, you need to fix

Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC64: Add support for ldbrx and stdbrx instructions

2012-02-09 Thread Alexander Graf
On 09.02.2012, at 08:43, Thomas Huth wrote: Am Thu, 9 Feb 2012 11:26:09 +1100 schrieb David Gibson d...@au1.ibm.com: On Wed, Feb 08, 2012 at 02:27:35PM +0100, Thomas Huth wrote: Am Wed, 8 Feb 2012 21:48:40 +1100 schrieb David Gibson da...@gibson.dropbear.id.au: On Wed, Feb 08, 2012 at

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread Jan Kiszka
On 2012-02-09 13:07, Paul Brook wrote: What about naming the problem instead: /* Comparison with IOCTL macros on 32-bit hosts requires unsigned. */ Just once, it would be nice to post something to this list and get a substantive comment _before_ the bitching about minutiae. Oh, and it's

Re: [Qemu-devel] subpages with memory region aliases

2012-02-09 Thread Jan Kiszka
On 2012-02-09 10:32, Avi Kivity wrote: On 02/09/2012 10:35 AM, Jan Kiszka wrote: Avi, Before I forget: On 2012-02-05 13:39, Jan Kiszka wrote: +static void vapic_map_rom_writable(VAPICROMState *s) +{ +target_phys_addr_t rom_paddr = s-rom_state_paddr ROM_BLOCK_MASK; +

Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop

2012-02-09 Thread Kevin Wolf
Am 30.01.2012 23:29, schrieb Alexander Graf: When using Windows 8 with an AHCI disk drive, it issues a blue screen. The reason is that WIN_SECURITY_FREEZE_LOCK / CFA_WEAR_LEVEL is not supported by our ATA implementation, but Windows expects it to be there. Is there anything that makes Windows

[Qemu-devel] [PATCH 0/9] qdev deconstruction, command-line episode

2012-02-09 Thread Paolo Bonzini
This patch substitutes more qdev code with shared infrastructure. The code is now ripe enough that we can attack command-line parsing. Parsing to a string is replaced with a StringInputVisitor (there is also a StringOutputVisitor, but it's not used yet). This lets us remove most integer

[Qemu-devel] [PATCH 1/9] qapi: allow sharing enum implementation across visitors

2012-02-09 Thread Paolo Bonzini
Most visitors will use the same code for enum parsing. Move it to the core. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qapi/qapi-visit-core.c| 51 + qapi/qapi-visit-impl.h| 23 qapi/qmp-input-visitor.c |

[Qemu-devel] [PATCH 6/9] qdev: accept both strings and integers for PCI addresses

2012-02-09 Thread Paolo Bonzini
Visitors allow a limited form of polymorphism. Exploit it to support setting the non-legacy PCI address property both as a DD.F string and as an 8-bit integer. The 8-bit integer form is just too clumsy, it is unlikely that we will ever drop it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com

Re: [Qemu-devel] [PATCH] AHCI: Masking of IRQs actually masks them

2012-02-09 Thread Kevin Wolf
Am 30.01.2012 23:29, schrieb Alexander Graf: When masking IRQ lines, we should actually mask them out and not declare them active anymore. Once we mask them in again, they are allowed to trigger again. Signed-off-by: Alexander Graf ag...@suse.de --- hw/ide/ahci.c |2 ++ 1 files

Re: [Qemu-devel] [PATCH] AHCI: Fix port reset race

2012-02-09 Thread Kevin Wolf
Am 30.01.2012 23:29, schrieb Alexander Graf: bdrv_aio_cancel() can trigger bdrv_aio_flush() which makes all aio that is currently in flight finish. So what we do is: port reset detect ncq in flight cancel ncq delete ncq sg list at which point we have double freed the sg list.

Re: [Qemu-devel] [PATCH] sheepdog: fix co_recv coroutine context

2012-02-09 Thread Kevin Wolf
Am 30.01.2012 18:10, schrieb MORITA Kazutaka: The co_recv coroutine has two things that will try to enter it: 1. The select(2) read callback on the sheepdog socket. 2. The aio_add_request() blocking operations, including a coroutine mutex. This patch fixes it by setting NULL to

Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop

2012-02-09 Thread Alexander Graf
On 09.02.2012, at 15:28, Kevin Wolf wrote: Am 30.01.2012 23:29, schrieb Alexander Graf: When using Windows 8 with an AHCI disk drive, it issues a blue screen. The reason is that WIN_SECURITY_FREEZE_LOCK / CFA_WEAR_LEVEL is not supported by our ATA implementation, but Windows expects it to be

[Qemu-devel] [PATCH 4/9] qapi: add tests for string-based visitors

2012-02-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- .gitignore |2 + test-string-input-visitor.c | 160 +++ test-string-output-visitor.c | 188 ++ tests/Makefile | 12 ++- 4 files

Re: [Qemu-devel] [PATCH] AHCI: Masking of IRQs actually masks them

2012-02-09 Thread Alexander Graf
On 09.02.2012, at 15:41, Kevin Wolf wrote: Am 30.01.2012 23:29, schrieb Alexander Graf: When masking IRQ lines, we should actually mask them out and not declare them active anymore. Once we mask them in again, they are allowed to trigger again. Signed-off-by: Alexander Graf ag...@suse.de

Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop

2012-02-09 Thread Kevin Wolf
Am 09.02.2012 15:49, schrieb Alexander Graf: On 09.02.2012, at 15:28, Kevin Wolf wrote: Am 30.01.2012 23:29, schrieb Alexander Graf: When using Windows 8 with an AHCI disk drive, it issues a blue screen. The reason is that WIN_SECURITY_FREEZE_LOCK / CFA_WEAR_LEVEL is not supported by our

[Qemu-devel] [PATCH] checkpatch: Don't WARN about missing spaces in audio files

2012-02-09 Thread Andreas Färber
Disable warnings for spaces before opening parenthesis in hw/{ac97,adlib,cs4231a,es1370,gus,sb16}.c. Signed-off-by: Andreas Färber afaer...@suse.de Cc: Blue Swirl blauwir...@gmail.com Cc: malc av1...@comtv.ru --- scripts/checkpatch.pl |5 + 1 files changed, 5 insertions(+), 0

[Qemu-devel] [PATCH 5/9] qom: add generic string parsing/printing

2012-02-09 Thread Paolo Bonzini
Add generic property accessors that take a string and parse it appropriately for the property type. All the magic here is done by the new string-based visitors. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/object.h | 24 qom/object.c |

Re: [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT BLOCK_MEDIUM_CHANGED

2012-02-09 Thread Markus Armbruster
Luiz Capitulino lcapitul...@redhat.com writes: I've tried to implement a BLOCK_MEDIUM_EJECT event that, as we discussed[1], would be emitted by guest-initiated ejects and by the QMP/HMP eject and change commands. However, that turned to be a bit problematic, because the eject and change

Re: [Qemu-devel] [PATCH] ATA: Allow WIN_SECURITY_FREEZE_LOCK as nop

2012-02-09 Thread Alexander Graf
On 09.02.2012, at 15:59, Kevin Wolf wrote: Am 09.02.2012 15:49, schrieb Alexander Graf: On 09.02.2012, at 15:28, Kevin Wolf wrote: Am 30.01.2012 23:29, schrieb Alexander Graf: When using Windows 8 with an AHCI disk drive, it issues a blue screen. The reason is that

Re: [Qemu-devel] [PATCH] checkpatch: Don't WARN about missing spaces in audio files

2012-02-09 Thread Andreas Färber
Am 09.02.2012 15:59, schrieb Andreas Färber: Disable warnings for spaces before opening parenthesis in hw/{ac97,adlib,cs4231a,es1370,gus,sb16}.c. Signed-off-by: Andreas Färber afaer...@suse.de Cc: Blue Swirl blauwir...@gmail.com Cc: malc av1...@comtv.ru --- For testing I used the

[Qemu-devel] [PATCH 7/9] qdev: accept hex properties only if prefixed by 0x

2012-02-09 Thread Paolo Bonzini
Hex properties are an obstacle to removal of old qdev string parsing, but even here we can lay down the foundations for future simplification. In general, they are rarely used and their printed form is more interesting than the parsing. For example you'd usually set isa-serial.index instead of

Re: [Qemu-devel] subpages with memory region aliases

2012-02-09 Thread Avi Kivity
On 02/09/2012 04:23 PM, Jan Kiszka wrote: On 2012-02-09 10:32, Avi Kivity wrote: On 02/09/2012 10:35 AM, Jan Kiszka wrote: Avi, Before I forget: On 2012-02-05 13:39, Jan Kiszka wrote: +static void vapic_map_rom_writable(VAPICROMState *s) +{ +target_phys_addr_t rom_paddr =

[Qemu-devel] [PATCH 9/9] qdev: drop unnecessary parse/print methods

2012-02-09 Thread Paolo Bonzini
More qdev printers could have been removed in the previous series, and object_property_parse also made several parsers unnecessary. In fact, the new code is even more robust with respect to overflows, so clean them up! Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev-properties.c |

[Qemu-devel] [PATCH 8/9] qdev: use built-in QOM string parser

2012-02-09 Thread Paolo Bonzini
object_property_parse lets us drop the legacy setters when their task is done just as well by the string visitors. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev-properties.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-properties.c

[Qemu-devel] [PATCH 3/9] qapi: add string-based visitors

2012-02-09 Thread Paolo Bonzini
String based visitors provide a consistent interface for parsing strings to C values, as well as consuming C values as strings. They will be used to parse command-line options. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Makefile.objs|5 +-

Re: [Qemu-devel] [PATCH 06/19] gdbstub: Error locations for -gdb

2012-02-09 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 07.02.2012 15:09, schrieb Markus Armbruster: Stash away the option argument with add_device_config(), so we still have its location when we get around to parsing it. This doesn't improve any messages I can see just yet, but that'll change shortly.

[Qemu-devel] [PATCH 2/9] qapi: drop qmp_input_end_optional

2012-02-09 Thread Paolo Bonzini
This method is optional, do not implement it if it is empty. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qapi/qmp-input-visitor.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c index 012cd0a..e6b6152

Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part

2012-02-09 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 07.02.2012 15:09, schrieb Markus Armbruster: This part takes care of backends file, pipe, pty and stdio. Unlike many other backends, these leave open error reporting to their caller. Because the caller doesn't know what went wrong, this results in a

Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests

2012-02-09 Thread Avi Kivity
On 02/05/2012 02:39 PM, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com This enables acceleration for MMIO-based TPR registers accesses of 32-bit Windows guest systems. It is mostly useful with KVM enabled, either on older Intel CPUs (without flexpriority feature, can also be

Re: [Qemu-devel] [Qemu-trivial] [TRIVIAL] virtio_cleanup(): Remove unneeded g_free() parameter check

2012-02-09 Thread Stefan Hajnoczi
On Thu, Feb 09, 2012 at 11:29:42AM -0200, Luiz Capitulino wrote: Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- hw/virtio.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) Tweaked commit message to be more conventional with virtio: Remove unneeded g_free() check in

[Qemu-devel] [BUG] checkpatch: ERROR due to * recognized as operator

2012-02-09 Thread Andreas Färber
Hello Blue, I recently stumbled over the following checkpatch.pl false positive: --8-- --- a/hw/his.c +++ b/hw/his.c @@ -1,1 +1,1 @@ -cpu_reset(CPUState *env); +cpu_state_reset(CPUState *env); --- a/hw/hers.c +++ b/hw/hers.c @@ -1,1 +1,1 @@ -cpu_reset(CPUX86State *env); +

  1   2   3   >