[Qemu-devel] [PATCH RESEND] isa: Split off instance_init for ISADevice

2013-02-16 Thread Andreas Färber
Prepares for assigning IRQs before QOM realize. Signed-off-by: Andreas Färber --- hw/isa-bus.c | 12 +--- 1 Datei geändert, 9 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-) diff --git a/hw/isa-bus.c b/hw/isa-bus.c index fce311b..6dc34f0 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -12

Re: [Qemu-devel] [PATCH V23 2/7] Add TPM (frontend) hardware interface (TPM TIS) to QEMU

2013-02-16 Thread Andreas Färber
Am 15.02.2013 20:39, schrieb Stefan Berger: > diff --git a/tpm/tpm_tis.c b/tpm/tpm_tis.c > new file mode 100644 > index 000..565e28d > --- /dev/null > +++ b/tpm/tpm_tis.c [...] > +/* > + * This function is called when the machine starts, resets or due to > + * S3 resume. > + */ > +static void t

Re: [Qemu-devel] [PATCH V23 1/7] Support for TPM command line options

2013-02-16 Thread Andreas Färber
Am 15.02.2013 20:39, schrieb Stefan Berger: > diff --git a/tpm/tpm_tis.h b/tpm/tpm_tis.h > new file mode 100644 > index 000..6cf18bc > --- /dev/null > +++ b/tpm/tpm_tis.h > @@ -0,0 +1,78 @@ > +/* > + * tpm_tis.h - QEMU's TPM TIS interface emulator > + * > + * Copyright (C) 2006, 2010-2013 IBM C

Re: [Qemu-devel] [PATCH V23 4/7] Build the TPM frontend code

2013-02-16 Thread Andreas Färber
Am 15.02.2013 20:39, schrieb Stefan Berger: > Build the TPM frontend code that has been added so far. The previous two patches were not compile-testable?! That's not cool. > > Signed-off-by: Stefan Berger > Reviewed-by: Corey Bryant > --- > configure | 11 +++ > tpm/Makefile.o

Re: [Qemu-devel] [RFC PATCH v2 13/23] qcow2: handle_copied(): Implement non-zero host_offset

2013-02-16 Thread Blue Swirl
On Fri, Feb 15, 2013 at 9:35 AM, Kevin Wolf wrote: > On Thu, Feb 14, 2013 at 09:40:22PM +, Blue Swirl wrote: >> On Thu, Feb 14, 2013 at 9:40 AM, Kevin Wolf wrote: >> > Am 13.02.2013 22:17, schrieb Blue Swirl: >> >> On Wed, Feb 13, 2013 at 1:22 PM, Kevin Wolf wrote: >> >>> Look only for clust

Re: [Qemu-devel] [PATCH v2] Move File operations to qemu-file.c

2013-02-16 Thread Blue Swirl
On Thu, Feb 14, 2013 at 10:09 PM, Anthony Liguori wrote: > Blue Swirl writes: > >> On Thu, Feb 14, 2013 at 2:34 AM, Anthony Liguori >> wrote: >>> Joel Schopp writes: >>> >> +if(popen_file == NULL) { > > Please make a preparatory patch which adds missing spaces between 'if'

Re: [Qemu-devel] [PATCH for-next v3 2/5] tmp105: Add debug output

2013-02-16 Thread Andreas Färber
Am 15.02.2013 14:14, schrieb Alexander Graf: > In parallel to the completely disastrous user experience when using trace > points. Debug printfs are easy and understandable. Tracepoints are not. > > However, how about we take this one gradually? +1, I'm looking for a minimally invasive solution

[Qemu-devel] [PATCH] PReP Software Reset

2013-02-16 Thread Julio Guerra
The software reset of a PReP machine should reset the entire system and not only the processor. It occurs when changing the 7th bit of port 0092 from 0 to 1. Adding a new variable in PReP's sysctrl_t to store the soft reset bit makes possible to be compliant with PReP specification : * reset the s

[Qemu-devel] HP-UX 10.20 C180 emulation

2013-02-16 Thread Philippe Leduc
Hi ! I would like to run HP-UX 10.20 on a Visualize C180 workstation emulated by qemu. I know it is not possible for now, so I would like to add it (and learn how to do it btw). What is the current state of the HPPA support in qemu ? (I can't find many informations on that) and do you have any ti

Re: [Qemu-devel] [PATCH] PReP Software Reset

2013-02-16 Thread Andreas Färber
Am 16.02.2013 13:19, schrieb Julio Guerra: > The software reset of a PReP machine should reset the entire system > and not only the processor. It occurs when changing the 7th bit of > port 0092 from 0 to 1. > > Adding a new variable in PReP's sysctrl_t to store the soft reset bit > makes possible

Re: [Qemu-devel] [PATCH] PReP Software Reset

2013-02-16 Thread Julio Guerra
2013/2/16 Andreas Färber > > Am 16.02.2013 13:19, schrieb Julio Guerra: > How did you test this change? > With a program (a kernel debugger) doing a software reset (when leaving the debug session). Hence, it is not possible to reconnect without this patch since the platform has not been corretly

Re: [Qemu-devel] HP-UX 10.20 C180 emulation

2013-02-16 Thread Andreas Färber
Hi, Am 16.02.2013 13:29, schrieb Philippe Leduc: > What is the current state of the HPPA support in qemu ? (I can't find > many informations on that) and do you have any tips to start (I started > to read the code, but without an entry point, it can be very long)? In short there is tcg/hppa/ for

[Qemu-devel] [PATCH] e600 core for MPC86xx processors

2013-02-16 Thread Julio Guerra
The MPC86xx processors are based on a e600 core which is not currently the case in qemu where they are based on the 7400 processor. This patch creates the e600 core and instantiates the MPC86xx processors based on it. Therefore, adding the high BATs and the SPRG 4..7 registers, which are e600-spec

Re: [Qemu-devel] [PATCH] e600 core for MPC86xx processors

2013-02-16 Thread Andreas Färber
Am 16.02.2013 13:48, schrieb Julio Guerra: > The MPC86xx processors are based on a e600 core which is not currently > the case in qemu where they are based on the 7400 processor. > > This patch creates the e600 core and instantiates the MPC86xx > processors based on it. Therefore, adding the high

Re: [Qemu-devel] [PATCH] qemu-log: Remove qemu_log_try_set_file() and its users

2013-02-16 Thread Blue Swirl
Thanks, applied. On Tue, Feb 12, 2013 at 4:13 PM, Peter Maydell wrote: > Remove the function qemu_log_try_set_file() and its users (which > are all in TCG code generation functions for various targets). > This function was added to abstract out code which was originally > written as "if (!logfile

[Qemu-devel] [PATCH] qemu-log: Introduce qemu_log_mask_vprintf()

2013-02-16 Thread Andreas Färber
Corresponds to existing qemu_log_vprintf() but uses a mask. Signed-off-by: Andreas Färber --- include/qemu/log.h |8 1 Datei geändert, 8 Zeilen hinzugefügt(+) diff --git a/include/qemu/log.h b/include/qemu/log.h index 58f69cb..4bfa60c 100644 --- a/include/qemu/log.h +++ b/include/q

Re: [Qemu-devel] [PATCH 0/2] Fainal TCG clean-up patches

2013-02-16 Thread Blue Swirl
Thanks, applied. On Thu, Jan 31, 2013 at 6:47 PM, Evgeny Voevodin wrote: > > This set of patches moves rest global variables to tcg_ctx. > Also second patch introduces new TBContext for translation blocks > ans moves translation block globals there. We place tb_ctx inside > tcg_ctx and get notica

Re: [Qemu-devel] [PATCH qom-cpu-next v5] target-i386: Split command line parsing out of cpu_x86_register()

2013-02-16 Thread Andreas Färber
Am 15.02.2013 14:06, schrieb Igor Mammedov: > From: Andreas Färber > > In order to instantiate a CPU subtype we will need to know which type, > so move the cpu_model splitting into cpu_x86_init(). > > Parameters need to be set on the X86CPU instance, so move > cpu_x86_parse_featurestr() into cpu

Re: [Qemu-devel] [PATCH 0/6] qemu_log: remove 'cpu' from qemu log function names

2013-02-16 Thread Blue Swirl
Thanks, applied. On Mon, Feb 11, 2013 at 4:41 PM, Peter Maydell wrote: > This patchset is just cleanups; it has two major aims: > * remove 'cpu' from public-facing qemu_log function/type/etc >names, since the logging is now entirely generic and not >tied to TCG CPU debug logging at all >

Re: [Qemu-devel] [PATCH v2 00/10] Cleanup bitops vs host-utils

2013-02-16 Thread Blue Swirl
Thanks, applied. On Thu, Feb 14, 2013 at 1:47 AM, Richard Henderson wrote: > Version 1 merely tried to adjust bitops_flsl, here I instead eliminate > it all from bitops.h, and standardizes on the routines from host-utils.h. > > > r~ > > > Richard Henderson (10): > host-utils: Add host long spec

[Qemu-devel] [PATCH] prep: Fix software reset

2013-02-16 Thread Julio Guerra
The software reset of a PReP machine should reset the entire system and not only the processor. It occurs when changing the 7th bit of port 0092 from 0 to 1. Adding a new variable in PReP's sysctrl_t to store the soft reset bit makes possible to be compliant with PReP specification : * reset the s

[Qemu-devel] correct step to invoke a single step?

2013-02-16 Thread Peter Cheung
Hi AllIs it the correct step to invoke a single step? It will fail when currec IP hit a breakpoint, but i can't find any different than the gdb stub. static int sstep_flags = SSTEP_ENABLE | SSTEP_NOIRQ | SSTEP_NOTIMER;CPUArchState *cpu = first_cpu;cpu_single_step(cpu, sstep_flags);vm_start()

Re: [Qemu-devel] [PATCH] e600 core for MPC86xx processors

2013-02-16 Thread Julio Guerra
2013/2/16 Andreas Färber : > > This patch is just as broken as the PReP one... > > The patch contradicts your description. Did you diff the wrong way?! > Indeed... Forget it, I'll resubmit it. > This patch conflicts with our ongoing CPU definition refactoring: > http://lists.nongnu.org/archive/ht

[Qemu-devel] [PATCH v2] pc-bios: build OpenBIOS if possible

2013-02-16 Thread Blue Swirl
Check if xsltproc and Sparc32, Sparc64 and PPC compilers are available. If found, rebuild OpenBIOS ROMs from submodule. Signed-off-by: Blue Swirl --- v2: fix crossgcc check print which ROMs will be built create the build directory in configure don't overwrite source versions when building ou

Re: [Qemu-devel] [PATCH for-1.4? qom-cpu-next 1/9] target-s390x: Drop unused cpu_s390x_close() prototype

2013-02-16 Thread Andreas Färber
Am 15.02.2013 18:47, schrieb Alexander Graf: > > On 15.02.2013, at 18:44, Andreas Färber wrote: > >> Alex, >> >> Am 02.02.2013 12:57, schrieb Andreas Färber: >>> It was never implemented. >>> >>> Signed-off-by: Andreas Färber >> >> Too late for 1.4 now obviously. ;) >> >> Do you want to queue th

Re: [Qemu-devel] [PATCH for-1.4? qom-cpu-next 2/9] target-lm32: Drop unused cpu_lm32_close() prototype

2013-02-16 Thread Andreas Färber
Am 02.02.2013 12:57, schrieb Andreas Färber: > It was never implemented. > > Signed-off-by: Andreas Färber Applied to qom-cpu: https://github.com/afaerber/qemu-cpu/commits/qom-cpu Andreas > --- > target-lm32/cpu.h |1 - > 1 Datei geändert, 1 Zeile entfernt(-) > > diff --git a/target-lm32

[Qemu-devel] [PATCH 21/47] target-microblaze: Move TCG initialization to MicroBlazeCPU initfn

2013-02-16 Thread Andreas Färber
Split off TCG initialization from cpu_mb_init() into mb_tcg_init() to call it from the initfn. Ensures that a QOM-created MicroBlazeCPU is usable. Signed-off-by: Andreas Färber --- target-microblaze/cpu.c |6 ++ target-microblaze/cpu.h |1 + target-microblaze/translate.c

[Qemu-devel] [PATCH 11/47] target-mips: Introduce QOM realizefn for MIPSCPU

2013-02-16 Thread Andreas Färber
Introduce a realizefn and set realized = true from cpu_mips_init(). Signed-off-by: Andreas Färber --- target-mips/cpu-qom.h |2 ++ target-mips/cpu.c | 15 +++ target-mips/translate.c |5 +++-- 3 Dateien geändert, 20 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff

[Qemu-devel] [PATCH 12/47] target-s390x: Introduce QOM realizefn for S390CPU

2013-02-16 Thread Andreas Färber
Introduce realizefn and set realized = true in cpu_s390x_init(). Defer CPU reset from initfn to realizefn. Acked-by: Richard Henderson [AF: Invoke parent's realizefn] Signed-off-by: Andreas Färber --- target-s390x/cpu-qom.h |2 ++ target-s390x/cpu.c | 16 ++-- target-s390

[Qemu-devel] [PATCH 17/47] target-arm: Move TCG initialization to ARMCPU initfn

2013-02-16 Thread Andreas Färber
Ensures that a QOM-created ARMCPU is usable. Signed-off-by: Andreas Färber --- target-arm/cpu.c|6 ++ target-arm/helper.c |6 -- 2 Dateien geändert, 6 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 9915172..f54d200 100644 -

[Qemu-devel] [PATCH 16/47] target-xtensa: Introduce QOM realizefn for XtensaCPU

2013-02-16 Thread Andreas Färber
Introduce realizefn and set realized = true in cpu_xtensa_init(). Signed-off-by: Andreas Färber --- target-xtensa/cpu-qom.h |2 ++ target-xtensa/cpu.c | 13 + target-xtensa/helper.c |4 +++- 3 Dateien geändert, 18 Zeilen hinzugefügt(+), 1 Zeile entfernt(-) diff --git

[Qemu-devel] [PATCH 26/47] target-sparc: Move TCG initialization to SPARCCPU initfn

2013-02-16 Thread Andreas Färber
Signed-off-by: Andreas Färber --- target-sparc/cpu.c |8 1 Datei geändert, 4 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-) diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c index 1690cf5..759be53 100644 --- a/target-sparc/cpu.c +++ b/target-sparc/cpu.c @@ -114,10 +114,6 @@ SPARCCPU

[Qemu-devel] [PATCH 20/47] target-m68k: Move TCG initialization to M68kCPU initfn

2013-02-16 Thread Andreas Färber
Add a tcg_enabled() check to suppress it for qtest. Signed-off-by: Andreas Färber --- target-m68k/cpu.c|6 ++ target-m68k/helper.c |7 --- 2 Dateien geändert, 6 Zeilen hinzugefügt(+), 7 Zeilen entfernt(-) diff --git a/target-m68k/cpu.c b/target-m68k/cpu.c index e3eaffc..4273

[Qemu-devel] [PATCH] hw/ds1338.c: implement clock enable/disable (CH bit)

2013-02-16 Thread Antoine Mathys
Signed-off-by: Antoine Mathys --- hw/ds1338.c | 156 --- 1 file changed, 95 insertions(+), 61 deletions(-) diff --git a/hw/ds1338.c b/hw/ds1338.c index 1da0f96..5a93fb6 100644 --- a/hw/ds1338.c +++ b/hw/ds1338.c @@ -48,17 +48,32 @@ static

[Qemu-devel] [PATCH 43/47] spapr_hcall: Replace open-coded CPU loop with qemu_get_cpu()

2013-02-16 Thread Andreas Färber
The helper functions all access ppc-specific fields only so don't bother to change arguments to PowerPCCPU and use env_ptr instead. No functional change. Acked-by: Alexander Graf Signed-off-by: Andreas Färber --- hw/spapr_hcall.c | 11 +++ 1 Datei geändert, 3 Zeilen hinzugefügt(+), 8

[Qemu-devel] [PATCH] kvmvapic: add read operation to the MemoryRegionOps to fix segfault

2013-02-16 Thread Tommi Rantala
QEMU would occasionally segfault when fuzzing the linux kernel with Trinity. Add a read op (copied from hw/kvm/apic.c) to vapic_ops to prevent the crash. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffeddcc700 (LWP 15999)] 0x in ?? () (gdb) bt

[Qemu-devel] [PULL 00/47] QOM CPUState patch queue 2013-02-16

2013-02-16 Thread Andreas Färber
Hello, This is my current QOM CPU patch queue. Please pull. It includes: * QOM realize support for CPUs, cleaning up cpu_init(), * cpu_init() TCG cleanups for device_add, * preparations for CPUState refactorings, * CRIS CPU subclasses, * CPUState part 8 refactorings, * bug fixes for e500 CPU iter

[Qemu-devel] [PATCH 08/47] target-lm32: Introduce QOM realizefn for LM32CPU

2013-02-16 Thread Andreas Färber
Introduce a realizefn and set realized = true in cpu_lm32_init(). Also move cpu_reset() call from initfn to realizefn. Signed-off-by: Andreas Färber --- target-lm32/cpu-qom.h |2 ++ target-lm32/cpu.c | 18 -- target-lm32/helper.c |4 ++-- 3 Dateien geändert, 20 Ze

[Qemu-devel] [PATCH 36/47] cpu: Move running field to CPUState

2013-02-16 Thread Andreas Färber
Pass CPUState to cpu_exec_{start,end}() functions. Signed-off-by: Andreas Färber --- include/exec/cpu-defs.h |1 - include/qom/cpu.h |2 ++ linux-user/main.c | 37 ++--- 3 Dateien geändert, 24 Zeilen hinzugefügt(+), 16 Zeilen entfernt(-) dif

[Qemu-devel] [PATCH 04/47] target-i386: Update X86CPU to QOM realizefn

2013-02-16 Thread Andreas Färber
Adapt the signature of x86_cpu_realize(), hook up to DeviceClass::realize and set realized = true in cpu_x86_init(). The QOM realizefn cannot depend on errp being non-NULL as in cpu_x86_init(), so use a local Error to preserve error handling behavior on APIC initialization errors. Reviewed-by: Ig

Re: [Qemu-devel] [PATCH V23 1/7] Support for TPM command line options

2013-02-16 Thread Stefan Berger
On 02/16/2013 06:04 AM, Andreas Färber wrote: Am 15.02.2013 20:39, schrieb Stefan Berger: diff --git a/tpm/tpm_tis.h b/tpm/tpm_tis.h new file mode 100644 index 000..6cf18bc --- /dev/null +++ b/tpm/tpm_tis.h @@ -0,0 +1,78 @@ +/* + * tpm_tis.h - QEMU's TPM TIS interface emulator + * + * Copyri

Re: [Qemu-devel] [PATCH V23 2/7] Add TPM (frontend) hardware interface (TPM TIS) to QEMU

2013-02-16 Thread Stefan Berger
On 02/16/2013 05:56 AM, Andreas Färber wrote: Am 15.02.2013 20:39, schrieb Stefan Berger: diff --git a/tpm/tpm_tis.c b/tpm/tpm_tis.c new file mode 100644 index 000..565e28d --- /dev/null +++ b/tpm/tpm_tis.c [...] +/* + * This function is called when the machine starts, resets or due to + *

[Qemu-devel] [PATCH 01/47] cpu: Prepare QOM realizefn

2013-02-16 Thread Andreas Färber
Overwrite the default implementation with a no-op, no longer attempting to call DeviceClass::init. Signed-off-by: Andreas Färber --- qom/cpu.c |5 + 1 Datei geändert, 5 Zeilen hinzugefügt(+) diff --git a/qom/cpu.c b/qom/cpu.c index 8fb538b..870e9ba 100644 --- a/qom/cpu.c +++ b/qom/cpu.c

[Qemu-devel] [PATCH 29/47] ppc405_uc: Pass PowerPCCPU to ppc40x_{core, chip, system}_reset()

2013-02-16 Thread Andreas Färber
Prepares for changing cpu_interrupt() argument to CPUState. Signed-off-by: Andreas Färber Acked-by: Alexander Graf --- hw/ppc.c | 12 ++-- hw/ppc.h |6 +++--- hw/ppc405_uc.c | 16 ++-- 3 Dateien geändert, 19 Zeilen hinzugefügt(+), 15 Zeilen entfernt(-) d

[Qemu-devel] [PATCH 05/47] target-openrisc: Update OpenRISCCPU to QOM realizefn

2013-02-16 Thread Andreas Färber
Update the openrisc_cpu_realize() signature, hook it up to DeviceClass::realize and set realized = true in cpu_openrisc_init(). qapi/error.h is now included through qdev and no longer needed. Signed-off-by: Andreas Färber Cc: Jia Liu --- target-openrisc/cpu.c | 13 ++--- target-openr

[Qemu-devel] [PATCH 13/47] target-sh4: Introduce QOM realizefn for SuperHCPU

2013-02-16 Thread Andreas Färber
Introduce a realizefn and set realized = true in cpu_sh4_init(). Signed-off-by: Andreas Färber --- target-sh4/cpu-qom.h |2 ++ target-sh4/cpu.c | 14 ++ target-sh4/translate.c |5 +++-- 3 Dateien geändert, 19 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a

[Qemu-devel] [PATCH 07/47] target-cris: Introduce QOM realizefn for CRISCPU

2013-02-16 Thread Andreas Färber
Introduce realizefn and set realized = true from cpu_cris_init(). Reviewed-by: Eduardo Habkost Signed-off-by: Andreas Färber --- target-cris/cpu-qom.h |2 ++ target-cris/cpu.c | 15 +++ target-cris/translate.c |3 +-- 3 Dateien geändert, 18 Zeilen hinzugefügt(+), 2

Re: [Qemu-devel] [PATCH for-1.4 07/19] target-sparc: Fix debug output for DEBUG_MMU

2013-02-16 Thread Blue Swirl
Thanks, applied. On Sun, Jan 27, 2013 at 1:32 PM, Andreas Färber wrote: > Signed-off-by: Andreas Färber > --- > target-sparc/ldst_helper.c |2 +- > 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-) > > diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c > index

[Qemu-devel] [PATCH 27/47] target-unicore32: Move TCG initialization to UniCore32CPU initfn

2013-02-16 Thread Andreas Färber
Normalize the "inited" logic and add a tcg_enabled() check to suppress it for qtest. Ensures that a QOM-created UniCore32CPU is usable. Acked-by: Guan Xuetao Signed-off-by: Andreas Färber --- target-unicore32/cpu.c|6 ++ target-unicore32/helper.c |6 -- 2 Dateien geändert,

[Qemu-devel] [PATCH 24/47] target-s390x: Move TCG initialization to S390CPU initfn

2013-02-16 Thread Andreas Färber
Ensures that a QOM-created S390CPU is usable. Acked-by: Richard Henderson Signed-off-by: Andreas Färber --- target-s390x/cpu.c|6 ++ target-s390x/helper.c |7 --- 2 Dateien geändert, 6 Zeilen hinzugefügt(+), 7 Zeilen entfernt(-) diff --git a/target-s390x/cpu.c b/target-s390

[Qemu-devel] [PATCH 45/47] target-lm32: Drop unused cpu_lm32_close() prototype

2013-02-16 Thread Andreas Färber
It was never implemented. Signed-off-by: Andreas Färber --- target-lm32/cpu.h |1 - 1 Datei geändert, 1 Zeile entfernt(-) diff --git a/target-lm32/cpu.h b/target-lm32/cpu.h index 4e202db..6948d0e 100644 --- a/target-lm32/cpu.h +++ b/target-lm32/cpu.h @@ -189,7 +189,6 @@ struct CPULM32State

[Qemu-devel] [PATCH 30/47] target-m68k: Return M68kCPU from cpu_m68k_init()

2013-02-16 Thread Andreas Färber
Turn cpu_init() into a static inline function for backwards compatibility. Signed-off-by: Andreas Färber --- target-m68k/cpu.h| 12 ++-- target-m68k/helper.c |4 ++-- 2 Dateien geändert, 12 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-) diff --git a/target-m68k/cpu.h b/target-m68

[Qemu-devel] [PATCH 19/47] target-lm32: Move TCG initialization to LM32CPU initfn

2013-02-16 Thread Andreas Färber
Signed-off-by: Andreas Färber --- target-lm32/cpu.c|6 ++ target-lm32/helper.c |6 -- 2 Dateien geändert, 6 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-) diff --git a/target-lm32/cpu.c b/target-lm32/cpu.c index 6a84f51..5f16734 100644 --- a/target-lm32/cpu.c +++ b/target-lm32/c

[Qemu-devel] [Bug 1127369] [NEW] i386 emulation unreliable since commit b76f0d8c2e3eac94bc7fd90a510cb7426b2a2699

2013-02-16 Thread Andreas Gustafsson
Public bug reported: I am running daily automated tests of the qemu git mainline that involve building qemu on a Linux host (32-bit), booting a NetBSD guest in qemu-system-i386, and running the NetBSD operating system test suite on the guest. Since commit b76f0d8c2e3eac94bc7fd90a510cb7426b2a2699,

[Qemu-devel] [PATCH 47/47] target-i386: Split command line parsing out of cpu_x86_register()

2013-02-16 Thread Andreas Färber
In order to instantiate a CPU subtype we will need to know which type, so move the cpu_model splitting into cpu_x86_init(). Parameters need to be set on the X86CPU instance, so move cpu_x86_parse_featurestr() into cpu_x86_init() as well. This leaves cpu_x86_register() operating on the model name

[Qemu-devel] [PATCH 31/47] mcf5206: Pass M68kCPU to mcf5206_init()

2013-02-16 Thread Andreas Färber
Store it in m5206_mbar_state. Prepares for passing M68kCPU to m68k_set_irq_level(). Signed-off-by: Andreas Färber --- hw/an5206.c | 11 +++ hw/mcf.h |2 +- hw/mcf5206.c |8 3 Dateien geändert, 12 Zeilen hinzugefügt(+), 9 Zeilen entfernt(-) diff --git a/hw/an5206.

[Qemu-devel] [PATCH 46/47] target-i386: Move cpu_x86_init()

2013-02-16 Thread Andreas Färber
Consolidate CPU functions in cpu.c. Allows to make cpu_x86_register() static. No functional changes. Reviewed-by: Eduardo Habkost Reviewed-by: Igor Mammedov Signed-off-by: Andreas Färber --- target-i386/cpu.c| 26 +- target-i386/cpu.h|1 - target-i386/hel

[Qemu-devel] [PATCH 03/47] target-arm: Update ARMCPU to QOM realizefn

2013-02-16 Thread Andreas Färber
Turn arm_cpu_realize() into a QOM realize function, no longer called via cpu.h prototype. To maintain the semantics of cpu_init(), set realized = true explicitly in cpu_arm_init(). Move GDB coprocessor registration, CPU reset and vCPU initialization into the realizefn. Signed-off-by: Andreas Färb

[Qemu-devel] [PATCH 33/47] target-m68k: Pass M68kCPU to m68k_set_irq_level()

2013-02-16 Thread Andreas Färber
Simplifies use of cpu_reset_interrupt() et al. Signed-off-by: Andreas Färber --- hw/mcf5206.c |2 +- hw/mcf_intc.c|2 +- target-m68k/cpu.h|2 +- target-m68k/helper.c |4 +++- 4 Dateien geändert, 6 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-) diff --git a/hw/mc

Re: [Qemu-devel] [PATCH V23 4/7] Build the TPM frontend code

2013-02-16 Thread Stefan Berger
On 02/16/2013 06:19 AM, Andreas Färber wrote: Am 15.02.2013 20:39, schrieb Stefan Berger: if test "$sdl_too_old" = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -4251,6 +4256,12 @@ if test "$gprof" = "yes" ; then fi fi +if test "$tpm" = "ye

[Qemu-devel] [PATCH 15/47] target-unicore32: Introduce QOM realizefn for UniCore32CPU

2013-02-16 Thread Andreas Färber
Introduce a realizefn and set realized = true in uc32_cpu_init(). Acked-by: Guan Xuetao [AF: Invoke the parent's realizefn] Signed-off-by: Andreas Färber --- target-unicore32/cpu-qom.h |3 +++ target-unicore32/cpu.c | 14 ++ target-unicore32/helper.c |3 ++- 3 Dateien

[Qemu-devel] [PATCH 02/47] target-alpha: Update AlphaCPU to QOM realizefn

2013-02-16 Thread Andreas Färber
Update the alpha_cpu_realize() signature and hook up to DeviceClass::realize. Set realized = true in cpu_alpha_init(). qapi/error.h is included through qdev now and no longer needed. Acked-by: Richard Henderson [AF: Invoke parent's realizefn] Signed-off-by: Andreas Färber --- target-alpha/cpu-

[Qemu-devel] [PATCH 41/47] e500: Replace open-coded loop with qemu_get_cpu()

2013-02-16 Thread Andreas Färber
Since we still need env for ppc-specific fields, obtain it via the new env_ptr fields to avoid "cpu" name conflicts between CPUState and PowerPCCPU for now. This fixes a potential issue with env being NULL at the end of the loop but cpu still being a valid pointer corresponding to a previous env.

[Qemu-devel] [PATCH 22/47] target-mips: Move TCG initialization to MIPSCPU initfn

2013-02-16 Thread Andreas Färber
Make mips_tcg_init() non-static and add tcg_enabled() check to suppress it for qtest. Signed-off-by: Andreas Färber --- target-mips/cpu.c |4 target-mips/cpu.h |1 + target-mips/translate.c |3 +-- 3 Dateien geändert, 6 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) di

[Qemu-devel] [PATCH 06/47] target-ppc: Update PowerPCCPU to QOM realizefn

2013-02-16 Thread Andreas Färber
Adapt ppc_cpu_realize() signature, hook it up to DeviceClass and set realized = true in cpu_ppc_init(). Reviewed-by: Eduardo Habkost Signed-off-by: Andreas Färber --- target-ppc/cpu-qom.h|2 ++ target-ppc/translate_init.c | 12 +--- 2 Dateien geändert, 11 Zeilen hinzugefüg

[Qemu-devel] [Bug 1127053] Re: assertion failed in exec.c while attempting to start a guest (latest commit)

2013-02-16 Thread Milos Ivanovic
For what it's worth, I got the same problem in 1.4 - not sure what's going on there: eclipse ~ # qemu-kvm --version QEMU emulator version 1.4.0, Copyright (c) 2003-2008 Fabrice Bellard eclipse ~ # qemu-kvm qemu-kvm: /var/tmp/portage/app-emulation/qemu-1.4.0/work/qemu-1.4.0/exec.c:982: qemu_ram_s

[Qemu-devel] [PATCH 35/47] cpu: Move host_tid field to CPUState

2013-02-16 Thread Andreas Färber
Change gdbstub's cpu_index() argument to CPUState now that CPUArchState is no longer used. Signed-off-by: Andreas Färber --- dump.c |8 ++-- gdbstub.c | 14 +- include/exec/cpu-defs.h |1 - include/exec/gdbstub.h |5 ++--- include/qom

[Qemu-devel] [PATCH 10/47] target-microblaze: Introduce QOM realizefn for MicroBlazeCPU

2013-02-16 Thread Andreas Färber
Introduce realizefn and set realized = true from cpu_mb_init(). Signed-off-by: Andreas Färber --- target-microblaze/cpu-qom.h |2 ++ target-microblaze/cpu.c | 14 ++ target-microblaze/translate.c |3 +-- 3 Dateien geändert, 17 Zeilen hinzugefügt(+), 2 Zeilen entfern

[Qemu-devel] [PATCH 39/47] cputlb: Pass CPUState to cpu_unlink_tb()

2013-02-16 Thread Andreas Färber
CPUArchState is no longer needed. Signed-off-by: Andreas Färber --- exec.c |2 +- translate-all.c |9 + translate-all.h |2 +- 3 Dateien geändert, 7 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-) diff --git a/exec.c b/exec.c index dbb893a..a41bcb8 100644 --- a/exec.c +

[Qemu-devel] [PATCH 37/47] cpu: Move exit_request field to CPUState

2013-02-16 Thread Andreas Färber
Since it was located before breakpoints field, it needs to be reset. Signed-off-by: Andreas Färber --- cpu-exec.c |8 exec.c |4 +++- hw/spapr_hcall.c|5 +++-- include/exec/cpu-defs.h |2 -- include/qom/cpu.h |2 ++ kvm-all

[Qemu-devel] [PATCH 44/47] target-s390x: Drop unused cpu_s390x_close() prototype

2013-02-16 Thread Andreas Färber
It was never implemented. Signed-off-by: Andreas Färber --- target-s390x/cpu.h |1 - 1 Datei geändert, 1 Zeile entfernt(-) diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index fa8dfe0..e450db7 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -315,7 +315,6 @@ static inline i

[Qemu-devel] [Bug 1127053] [NEW] assertion failed in exec.c while attempting to start a guest (latest commit)

2013-02-16 Thread Milos Ivanovic
Public bug reported: Hi team, I decided to try the latest commit on git (previously used version 1.3.0), and I got failed assertions while attempting to start my guests: eclipse ~ # qemu-kvm -enable-kvm -hda arch.img -m 4096 -smp sockets=1,cores=4 -vnc :0 -cpu host -vga std -net nic,model=e1000

[Qemu-devel] [PATCH 09/47] target-m68k: Introduce QOM realizefn for M68kCPU

2013-02-16 Thread Andreas Färber
Introduce realizefn and set realized = true in cpu_m68k_init(). Split off GDB registration to a new m68k_cpu_init_gdb() so that it can be called from the realizefn. Signed-off-by: Andreas Färber --- target-m68k/cpu-qom.h |2 ++ target-m68k/cpu.c | 16 target-m68k/cpu.

[Qemu-devel] [PATCH 14/47] target-sparc: Introduce QOM realizefn for SPARCCPU

2013-02-16 Thread Andreas Färber
Introduce realizefn and set realized = true in cpu_sparc_init(). Signed-off-by: Andreas Färber --- target-sparc/cpu-qom.h |2 ++ target-sparc/cpu.c | 17 - 2 Dateien geändert, 18 Zeilen hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/target-sparc/cpu-qom.h b/target-sp

[Qemu-devel] [PATCH 34/47] target-cris: Introduce CRISCPU subclasses

2013-02-16 Thread Andreas Färber
Use class_init functions to initialize the VR in preparation for overriding v32+ behavior there. Move cpu_cris_init() to cpu.c and hook up a class_by_name callback. This change leads to unknown -cpu model names no longer falling back to a CPU with VR 32 but instead returning NULL. Acked-by: Edga

[Qemu-devel] [PATCH 40/47] cpu: Add CPUArchState pointer to CPUState

2013-02-16 Thread Andreas Färber
The target-specific ENV_GET_CPU() macros have allowed us to navigate from CPUArchState to CPUState. The reverse direction was not supported. Avoid introducing CPU_GET_ENV() macros by initializing an untyped pointer that is initialized in derived instance_init functions. The field may not be called

[Qemu-devel] [Bug 925412] Re: Cannot build on Mac using Xcode 4 and LLVM

2013-02-16 Thread Rui Carmo
Awesome, thanks. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/925412 Title: Cannot build on Mac using Xcode 4 and LLVM Status in QEMU: Fix Released Bug description: As detailed in the mailin

[Qemu-devel] [PATCH 38/47] cpu: Move current_tb field to CPUState

2013-02-16 Thread Andreas Färber
Explictly NULL it on CPU reset since it was located before breakpoints. Change vapic_report_tpr_access() argument to CPUState. This also resolves the use of void* for cpu.h independence. Change vAPIC patch_instruction() argument to X86CPU. Signed-off-by: Andreas Färber --- cpu-exec.c

[Qemu-devel] [PATCH 42/47] ppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()

2013-02-16 Thread Andreas Färber
Potentially env could be NULL whereas cpu would still be valid and correspond to a previous env. Wrapping this in qemu_get_cpu(), env is no longer needed, so simplify code that existed before 55e5c2850293547203874098f7cec148ffd12dfa. Acked-by: Alexander Graf Signed-off-by: Andreas Färber --- h

[Qemu-devel] [PATCH] move qemu-ga from bin to libexec dir, use $HELPERS

2013-02-16 Thread Michael Tokarev
This patch does 3 things: 1. Renames HELPERS-y Makefile variable to HELPERS 2. Moves its definition from Makefile to configure 3. Moves qemu-ga binary from TOOLS to HELPERS. The effects are: 1. qemu-ga binary is now installed into libexecdir, not bindir. This is the main effect/motivation of thi

[Qemu-devel] [PATCH] w32: Always compile with __builtin_ffs

2013-02-16 Thread Stefan Weil
Not all MinGW build environments include a library which provides ffs(), and some versions of gcc create a function call instead of inline code. When gcc is called with -ansi, it will always create a function call. This usually results in an unresolved symbol "ffs" at link time. The patch enforce

[Qemu-devel] [PATCH 25/47] target-sh4: Move TCG initialization to SuperHCPU initfn

2013-02-16 Thread Andreas Färber
Add a tcg_enabled() check to suppress it for qtest. Signed-off-by: Andreas Färber --- target-sh4/cpu.c |4 target-sh4/cpu.h |1 + target-sh4/translate.c |3 +-- 3 Dateien geändert, 6 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a/target-sh4/cpu.c b/target-

[Qemu-devel] [PATCH 23/47] target-ppc: Move TCG initialization to PowerPCCPU initfn

2013-02-16 Thread Andreas Färber
Ensures that a QOM-created PowerPCCPU is usable. Signed-off-by: Andreas Färber --- target-ppc/translate_init.c |9 - 1 Datei geändert, 4 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 49eaeac..5a2acaa 100644 -

Re: [Qemu-devel] [PATCH] w32: Always compile with __builtin_ffs

2013-02-16 Thread Jacob Kroon
Hi Stefan, On Sat, Feb 16, 2013 at 7:30 PM, Stefan Weil wrote: > Not all MinGW build environments include a library which provides ffs(), > and some versions of gcc create a function call instead of inline code. > > When gcc is called with -ansi, it will always create a function call. > This usua

[Qemu-devel] [PATCH 28/47] target-xtensa: Move TCG initialization to XtensaCPU initfn

2013-02-16 Thread Andreas Färber
Combine this with breakpoint handler registration, guarding both with tcg_enabled() to suppress also TCG init for qtest. Rename the handler to xtensa_breakpoint_handler() since it needs to become global. Signed-off-by: Andreas Färber --- target-xtensa/cpu.c|7 +++ target-xtensa/cpu.h

[Qemu-devel] [PATCH 32/47] mcf_intc: Pass M68kCPU to mcf_intc_init()

2013-02-16 Thread Andreas Färber
Store it in mcf_intc_state. Prepares for passing it to m68k_set_irq_level(). Signed-off-by: Andreas Färber --- hw/mcf.h |2 +- hw/mcf5208.c | 11 +++ hw/mcf_intc.c |8 3 Dateien geändert, 12 Zeilen hinzugefügt(+), 9 Zeilen entfernt(-) diff --git a/hw/mcf.h b/hw/

[Qemu-devel] [PATCH 18/47] target-cris: Move TCG initialization to CRISCPU initfn

2013-02-16 Thread Andreas Färber
Split out TCG initialization from cpu_cris_init(). Avoid CPUCRISState dependency for v10-specific initialization and for non-v10 by inlining the decision into the initfn as well. Signed-off-by: Andreas Färber --- target-cris/cpu.c | 10 ++ target-cris/cpu.h |3 +

Re: [Qemu-devel] [PATCH V23 1/7] Support for TPM command line options

2013-02-16 Thread Andreas Färber
Am 16.02.2013 17:48, schrieb Stefan Berger: > On 02/16/2013 06:04 AM, Andreas Färber wrote: >> Am 15.02.2013 20:39, schrieb Stefan Berger: >>> diff --git a/tpm/tpm_tis.h b/tpm/tpm_tis.h >>> new file mode 100644 >>> index 000..6cf18bc >>> --- /dev/null >>> +++ b/tpm/tpm_tis.h >>> @@ -0,0 +1,78 @

[Qemu-devel] [PATCH v2 0/3] Improve 64-bit widening multiply

2013-02-16 Thread Richard Henderson
Version 2 is a simple rebase and conflict fix in the tests/Makefile. r~ Richard Henderson (3): host-utils: Use __int128_t for mul[us]64 host-utils: Improve mulu64 and muls64 tests: Add unit tests for mulu64 and muls64 configure | 20 ++ include/qemu/host-utils.h

[Qemu-devel] [PATCH 1/3] host-utils: Use __int128_t for mul[us]64

2013-02-16 Thread Richard Henderson
Replace some x86_64 specific inline assembly with something that all 64-bit hosts ought to optimize well. At worst this becomes a call to the gcc __multi3 routine, which is no worse than our implementation in util/host-utils.c. With gcc 4.7, we get identical code generation for x86_64. We now ge

[Qemu-devel] [PATCH 3/3] tests: Add unit tests for mulu64 and muls64

2013-02-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tests/Makefile | 6 - tests/test-mul64.c | 70 ++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 tests/test-mul64.c diff --git a/tests/Makefile b/tests/Makefile index a2d62b8..

[Qemu-devel] [PATCH 2/3] host-utils: Improve mulu64 and muls64

2013-02-16 Thread Richard Henderson
The new formulation makes better use of add-with-carry type insns that the host may have. Use gcc's sign adjustment trick to avoid having to perform a 128-bit negation. Signed-off-by: Richard Henderson --- util/host-utils.c | 92 +++ 1 file ch

[Qemu-devel] [PATCH v4 0/3] qtest: tmp105 cleanups and MMIO support

2013-02-16 Thread Andreas Färber
Hello Anthony, These are the follow-ups to permanently fix qtest endianness issues. v4 is a resend of just the qtest stuff from v3, to buy me time to respin tmp105 debug output separately. Regards, Andreas v3 -> v4: * Split off tmp105-test and tmp105 changes. v2 -> v3: * Split off libi2c-omap

[Qemu-devel] [PATCH v4 2/3] libqtest: Introduce qtest_qmpv() and convert remaining macro

2013-02-16 Thread Andreas Färber
In order to convert qmp() macro to an inline function, expose a qtest_qmpv() function, reused by qtest_qmp(). We can't apply GCC_FMT_ATTR() since fdc-test is using zero-length format strings, which would result in warnings treated as errors. Signed-off-by: Andreas Färber --- tests/libqtest.c |

[Qemu-devel] [PATCH v4 3/3] qtest: Add MMIO support

2013-02-16 Thread Andreas Färber
Introduce [qtest_]{read,write}[bwlq]() libqtest functions and corresponding QTest protocol commands to replace local versions in libi2c-omap.c. Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b(). Signed-off-by: Andreas Färber --- Makefile.objs |1 - Makefile.target

[Qemu-devel] [PATCH v4 1/3] libqtest: Convert macros to functions and clean up documentation

2013-02-16 Thread Andreas Färber
libqtest.h provides a number of shortcut macros to avoid tests feeding it the QTestState they operate on. Most of these can easily be turned into static inline functions, so let's do that for clarity. This avoids getting off-by-one error messages when passing wrong args. Some macros had a val argu

Re: [Qemu-devel] fixing qemu busy wait

2013-02-16 Thread Richard Henderson
On 2013-02-15 03:12, Orr Dvory wrote: when debugging with qemu(user mode), qemu waits in infinite loop to read a signal from gdb (when it waits on breakpoint for example). I added sleeps to reduce the cpu usage from 100% to about ~0%. Wouldn't it be better to toggle the O_NONBLOCK state of the

Re: [Qemu-devel] [PATCH V23 4/7] Build the TPM frontend code

2013-02-16 Thread Stefan Berger
On 02/16/2013 06:19 AM, Andreas Färber wrote: @@ -1 +1,2 @@ common-obj-y = tpm.o +common-obj-$(CONFIG_TPM) += tpm_tis.o Some softmmus might not even support ISA, so this needs to be conditional on more than just the host's $(CONFIG_TPM), it should be a combination of the host's CONFIG_TPM=y and

[Qemu-devel] [PATCH buildfix] tcg/ppc: Fix build of tcg_qemu_tb_exec()

2013-02-16 Thread Andreas Färber
Commit 0b0d3320db74cde233ee7855ad32a9c121d20eb4 (TCG: Final globals clean-up) moved code_gen_prologue but forgot to update ppc code. This broke the build on 32-bit ppc. ppc64 is unaffected. Cc: Evgeny Voevodin Cc: Blue Swirl Signed-off-by: Andreas Färber --- tcg/ppc/tcg-target.h |2 +- 1 D

[Qemu-devel] [PATCH 1/1] highbank: set default power domain register

2013-02-16 Thread Jean-Christophe PLAGNIOL-VILLARD
at 0xfff3cf20 enable SATA, MMC, PCI c: Rob Herring Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- hw/highbank.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/highbank.c b/hw/highbank.c index defcc09..64aef30 100644 --- a/hw/highbank.c +++ b/hw/highbank.c @@ -143,6 +143,7 @@ s

  1   2   >