[Qemu-devel] [PATCH 1/2] Fix buffer overrun in sched_getaffinity

2011-04-19 Thread Mike McCormack
Zeroing of the cpu array should start from cpus[kernel_ret] not cpus[num_zeros_to_fill]. This fixes a crash in EFL's edje_cc running under qemu-arm. Signed-off-by: Mike McCormack mj.mccorm...@samsung.com Reviewed-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Acked-by: Mike Frysinger

[Qemu-devel] [PATCH 2/2] Don't zero out buffer in sched_getaffinity

2011-04-19 Thread Mike McCormack
The kernel doesn't fill the buffer provided to sched_getaffinity with zero bytes, so neither should QEMU. Signed-off-by: Mike McCormack mj.mccorm...@samsung.com Reviewed-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- linux-user/syscall.c | 13 + 1 files changed, 1

Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256

2011-04-19 Thread Alexander Graf
On 19.04.2011, at 03:54, David Gibson wrote: From: Anton Blanchard an...@au1.ibm.com The original pSeries machine was limited to 32 CPUs, more or less arbitrarily. Particularly when we get SMT KVM guests it will be pretty easy to exceed this. Therefore, raise the max number of CPUs in a

Re: [Qemu-devel] [PATCH] acpi_piix4: fix save/load of PIIX4PMState

2011-04-19 Thread Isaku Yamahata
On Mon, Apr 18, 2011 at 06:26:08PM +0200, Juan Quintela wrote: Isaku Yamahata yamah...@valinux.co.jp wrote: It's vmstate parameter was wrong. This patch fixes it. Reported-by: Avi Kivity a...@redhat.com Signed-off-by: Isaku Yamahata yamah...@valinux.co.jp --- hw/acpi_piix4.c |3

Re: [Qemu-devel] [PATCH 00/26] q35 chipset support for native pci express support

2011-04-19 Thread Isaku Yamahata
On Tue, Apr 19, 2011 at 04:28:01PM +0800, Hu Tao wrote: On Wed, Mar 16, 2011 at 06:29:11PM +0900, Isaku Yamahata wrote: This patch series adds basic q35 chipset support for native pci express support. Some bios related patches are still needed. For those who want to try it, the following

[Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug

2011-04-19 Thread Peter Maydell
Work around a SPARC glibc bug which caused the epoll_create1 configure test to wrongly claim that the function was present. Some versions of SPARC glibc provided the function in the library but didn't declare it in the include file; the result is that gcc warns about an implicit declaration but a

Re: [Qemu-devel] [PATCH 00/26] q35 chipset support for native pci express support

2011-04-19 Thread Hu Tao
On Tue, Apr 19, 2011 at 05:51:27PM +0900, Isaku Yamahata wrote: On Tue, Apr 19, 2011 at 04:28:01PM +0800, Hu Tao wrote: On Wed, Mar 16, 2011 at 06:29:11PM +0900, Isaku Yamahata wrote: This patch series adds basic q35 chipset support for native pci express support. Some bios related

[Qemu-devel] [OOT] gcc trick to help studying Qemu source

2011-04-19 Thread Mulyadi Santosa
Hi all Just a result of my adventure lately to get better understanding with Qemu source, that is how to easily expand the result of preprocessing and assembling unknown to me before, gcc could already do this for us:

Re: [Qemu-devel] iPXE/Etherboot prompts twice for booting?

2011-04-19 Thread Stefan Hajnoczi
On Mon, Apr 18, 2011 at 5:10 PM, Alex Williamson alex.william...@redhat.com wrote: On Mon, 2011-04-18 at 10:45 +0100, Stefan Hajnoczi wrote: On Sat, Apr 16, 2011 at 8:41 PM, Michael Tokarev m...@tls.msk.ru wrote: I'm playing with iPXE ROM images again, and see iPXE prompts two times during

[Qemu-devel] [PATCH/RFC] Port Wine preloader to QEMU

2011-04-19 Thread Mike McCormack
This is the only way I know to get qemu 0.14.0 to work reliably with Scratchbox 2 (libsb2.so) The problem stems from two things: * The shared object loader is permitted to load LD_PRELOAD objects below the QEMU load address (0x6000), and does this with libsb2.so * QEMU's do_brk()

Re: [Qemu-devel] [PATCH 00/26] q35 chipset support for native pci express support

2011-04-19 Thread Hu Tao
On Wed, Mar 16, 2011 at 06:29:11PM +0900, Isaku Yamahata wrote: This patch series adds basic q35 chipset support for native pci express support. Some bios related patches are still needed. For those who want to try it, the following repo is avaiable. (vgabios doesn't need patches, so use the

Re: [Qemu-devel] [PATCH 01/20] softfloat: fix floatx80 handling of NaN

2011-04-19 Thread Peter Maydell
On 18 April 2011 21:59, Aurelien Jarno aurel...@aurel32.net wrote: The floatx80 format uses an explicit bit that should be taken into account when converting to and from commonNaN format. When converting to commonNaN, the explicit bit should be removed if it is a 1, and a default NaN should

Re: [Qemu-devel] [PATCH 02/20] softfloat: fix floatx80_is_infinity()

2011-04-19 Thread Peter Maydell
On 18 April 2011 21:59, Aurelien Jarno aurel...@aurel32.net wrote: With floatx80, the explicit bit is set for infinity. Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org -- PMM

[Qemu-devel] [PATCH v2 2a/6] x86: Allow multiple cpu feature matches of lookup_feature

2011-04-19 Thread Jan Kiszka
kvmclock is represented by two feature bits. Therefore, lookup_feature needs to continue its search even after the first match. Enhance it accordingly and switch to a bool return type at this chance. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- target-i386/cpuid.c | 14 --

[Qemu-devel] [PATCH v2 2b/6] kvm: add kvmclock to its second bit

2011-04-19 Thread Jan Kiszka
From: Glauber Costa glom...@redhat.com We have two bits that can represent kvmclock in cpuid. They signal the guest which msr set to use. When we tweak flags involving this value - specially when we use -, we have to act on both. [Jan: factored out lookup_feature changes] Signed-off-by: Jan

Re: [Qemu-devel] [PATCH 03/20] softfloat: add floatx80 constants

2011-04-19 Thread Peter Maydell
On 18 April 2011 21:59, Aurelien Jarno aurel...@aurel32.net wrote: Add floatx80 constants similarly to float32 or float64. Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org NB: I didn't actually check you got the ln2 value right :-) Also

Re: [Qemu-devel] [PATCH 04/20] softfloat: add pi constants

2011-04-19 Thread Peter Maydell
On 18 April 2011 21:59, Aurelien Jarno aurel...@aurel32.net wrote: +#define float64_pi make_float32(0x400921fb54442d18LL) This doesn't look quite right :-) -- PMM

Re: [Qemu-devel] [PATCH 05/20] softfloat-native: add a few constant values

2011-04-19 Thread Peter Maydell
On 18 April 2011 21:59, Aurelien Jarno aurel...@aurel32.net wrote: Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org

Re: [Qemu-devel] [PATCH 06/20] softfloat: add floatx80_compare*() functions

2011-04-19 Thread Peter Maydell
On 18 April 2011 21:59, Aurelien Jarno aurel...@aurel32.net wrote: Add floatx80_compare() and floatx80_compare_quiet() functions to match the softfloat-native ones. Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org

Re: [Qemu-devel] [PATCH 07/20] softfloat: fix float*_scalnb() corner cases

2011-04-19 Thread Peter Maydell
On 18 April 2011 21:59, Aurelien Jarno aurel...@aurel32.net wrote: @@ -6349,6 +6352,12 @@ float32 float32_scalbn( float32 a, int n STATUS_PARAM )     else if ( aSig == 0 )         return a; +    if (n 0x80) { +        n = 0x80; +    } else if (n -0x80) { +        n = -0x80; +    } +  

Re: [Qemu-devel] [PATCH] acpi_piix4: fix save/load of PIIX4PMState

2011-04-19 Thread Juan Quintela
Isaku Yamahata yamah...@valinux.co.jp wrote: shouldn't last one still be uint16_t? It results in an error by type_check_pointer. You are right. We are just lying. Will think about how to fix this properly (basically move the whole thing to a uint8_t array, and work from there. I guess that

[Qemu-devel] [PATCH 0/5] atapi: Some code restructuring

2011-04-19 Thread Kevin Wolf
Not marking this as an RFC because I want to commit itif everyone is happy with it. Otherwise please treat it like an RFC. I don't mind too much if you think we shouldn't do this, it's just an option for which I wanted to try what it would look like. Kevin Wolf (5): ide: Split atapi.c out

[Qemu-devel] [PATCH 4/5] ide/atapi: Replace bdrv_get_geometry calls by s-nb_sectors

2011-04-19 Thread Kevin Wolf
The disk size can only change when the medium is changed, and the change callback takes care of updating s-nb_sectors in this case. Signed-off-by: Kevin Wolf kw...@redhat.com --- hw/ide/atapi.c | 21 ++--- 1 files changed, 6 insertions(+), 15 deletions(-) diff --git

[Qemu-devel] [PATCH 5/5] ide/atapi: Introduce NEED_DISK flag for commands

2011-04-19 Thread Kevin Wolf
Some commands require a medium to be present in order to execute successfully. Instead of duplicating the check in each command implementation, let's add a flag and check it before calling the command. This patch only converts existing checks, it does not introduce new checks for any of the other

[Qemu-devel] [PATCH 3/5] ide/atapi: Use table instead of switch for commands

2011-04-19 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com --- hw/ide/atapi.c | 115 +++ 1 files changed, 48 insertions(+), 67 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index d161bf7..e8ac764 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@

[Qemu-devel] [PATCH 2/5] ide/atapi: Factor some commands out

2011-04-19 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com --- hw/ide/atapi.c | 837 +++- 1 files changed, 459 insertions(+), 378 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 25a636e..d161bf7 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c

Re: [Qemu-devel] [PATCH 08/20] softfloat-native: fix float*_scalbn() functions

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: float*_scalbn() should be able to take a status parameter. Fix that. Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org -- PMM

Re: [Qemu-devel] [PATCH 09/20] softfloat-native: add float*_is_any_nan() functions

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: @@ -511,4 +530,11 @@ int floatx80_is_quiet_nan( floatx80 a1 )     return ( ( u.i.high 0x7FFF ) == 0x7FFF ) (uint64_t) ( u.i.low1 );  } +int floatx80_is_any_nan( floatx80 a1 ) +{ +    floatx80u u; +    u.f = a1; +    

Re: [Qemu-devel] [PATCH 5/5] ide/atapi: Introduce NEED_DISK flag for commands

2011-04-19 Thread Amit Shah
On (Tue) 19 Apr 2011 [14:36:43], Kevin Wolf wrote: diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 032d1b0..88e7791 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -813,11 +813,7 @@ error_cmd: static void cmd_test_unit_ready(IDEState *s, uint8_t *buf) { -if

Re: [Qemu-devel] [PATCH 3/5] ide/atapi: Use table instead of switch for commands

2011-04-19 Thread Amit Shah
On (Tue) 19 Apr 2011 [14:36:41], Kevin Wolf wrote: +struct { +void (*handler)(IDEState *s, uint8_t *buf); +int flags; +} atapi_cmd_table[0x100] = { +[ 0x00 ] = { cmd_test_unit_ready, 0 }, +[ 0x03 ] = { cmd_request_sense, ALLOW_UA }, +[ 0x12

Re: [Qemu-devel] [PATCH 0/5] atapi: Some code restructuring

2011-04-19 Thread Amit Shah
On (Tue) 19 Apr 2011 [14:36:38], Kevin Wolf wrote: Not marking this as an RFC because I want to commit itif everyone is happy with it. Otherwise please treat it like an RFC. I don't mind too much if you think we shouldn't do this, it's just an option for which I wanted to try what it would

Re: [Qemu-devel] [PATCH] acpi_piix4: fix save/load of PIIX4PMState

2011-04-19 Thread Isaku Yamahata
On Tue, Apr 19, 2011 at 02:33:46PM +0200, Juan Quintela wrote: Isaku Yamahata yamah...@valinux.co.jp wrote: shouldn't last one still be uint16_t? It results in an error by type_check_pointer. You are right. We are just lying. Will think about how to fix this properly (basically move

[Qemu-devel] [PATCH] trace: allow ) in trace output string

2011-04-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- scripts/tracetool |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/tracetool b/scripts/tracetool index 412f695..9912f36 100755 --- a/scripts/tracetool +++ b/scripts/tracetool @@ -51,7 +51,7 @@ get_args() {

Re: [Qemu-devel] [PATCH 3/5] ide/atapi: Use table instead of switch for commands

2011-04-19 Thread Kevin Wolf
Am 19.04.2011 15:20, schrieb Amit Shah: On (Tue) 19 Apr 2011 [14:36:41], Kevin Wolf wrote: +struct { +void (*handler)(IDEState *s, uint8_t *buf); +int flags; +} atapi_cmd_table[0x100] = { +[ 0x00 ] = { cmd_test_unit_ready, 0 }, +[ 0x03 ] = {

Re: [Qemu-devel] [PATCH 5/5] ide/atapi: Introduce NEED_DISK flag for commands

2011-04-19 Thread Kevin Wolf
Am 19.04.2011 15:18, schrieb Amit Shah: On (Tue) 19 Apr 2011 [14:36:43], Kevin Wolf wrote: diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 032d1b0..88e7791 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -813,11 +813,7 @@ error_cmd: static void cmd_test_unit_ready(IDEState *s,

Re: [Qemu-devel] KVM call agenda for April 19th

2011-04-19 Thread Juan Quintela
Antonio Galindo Castro funkymons...@gmail.com wrote: Tools for resource accounting the virtual machines. This was the only topic for today call. Moving item to next week agenda. It appears that it is Eastern all around and not everybody able to attend. Have a nice day, Juan.

Re: [Qemu-devel] [PATCH] trace: allow ) in trace output string

2011-04-19 Thread Stefan Hajnoczi
On Tue, Apr 19, 2011 at 2:29 PM, Paolo Bonzini pbonz...@redhat.com wrote: Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---  scripts/tracetool |    2 +-  1 files changed, 1 insertions(+), 1 deletions(-) Acked-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com I have merged it into my tracing

Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256

2011-04-19 Thread David Gibson
On Tue, Apr 19, 2011 at 09:38:58AM +0200, Alexander Graf wrote: On 19.04.2011, at 03:54, David Gibson wrote: From: Anton Blanchard an...@au1.ibm.com The original pSeries machine was limited to 32 CPUs, more or less arbitrarily. Particularly when we get SMT KVM guests it will be

Re: [Qemu-devel] [PATCH 1/2] Implement basic part of SA-1110/SA-1100

2011-04-19 Thread Dmitry Eremin-Solenikov
On 4/18/11, Aurelien Jarno aurel...@aurel32.net wrote: On Thu, Apr 14, 2011 at 10:18:02AM +0400, Dmitry Eremin-Solenikov wrote: Basic implementation of DEC/Intel SA-1100/SA-1110 chips emulation. Implemented: - IRQs - GPIO - PPC - RTC - UARTs (no IrDA/etc.) - OST reused from pxa25x

Re: [Qemu-devel] [PATCH] Slirp reverse UDP firewall

2011-04-19 Thread Daisuke Nojiri
I'll take a look at libpcap and update the thread. Thanks, Avi. Dai On Sun, Apr 17, 2011 at 5:36 AM, Avi Kivity a...@redhat.com wrote: On 04/14/2011 11:04 PM, Daisuke Nojiri wrote: Hi, Avi, Complex and complete firewalling is probably out of my focus for now. I'm trying to introduce a

[Qemu-devel] [PATCH 2/2] Basic implementation of Sharp Zaurus SL-5500 collie PDA

2011-04-19 Thread Dmitry Eremin-Solenikov
Add very basic implementation of collie PDA emulation. The system lacks LoCoMo and graphics/sound emulation. Linux kernel boots up to mounting rootfs (theoretically it can be provided in pflash images). Signed-off-by: Dmitry Eremin-Solenikov dbarysh...@gmail.com --- Makefile.target |1 +

[Qemu-devel] [PATCH 1/2] Implement basic part of SA-1110/SA-1100

2011-04-19 Thread Dmitry Eremin-Solenikov
Basic implementation of DEC/Intel SA-1100/SA-1110 chips emulation. Implemented: - IRQs - GPIO - PPC - RTC - UARTs (no IrDA/etc.) - OST reused from pxa25x Everything else is TODO (esp. PM/idle/sleep!) - see the todo in the hw/strongarm.c V6: * license fixup * DPRINTF V5: * syntax

Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256

2011-04-19 Thread Alexander Graf
On 04/19/2011 02:44 PM, David Gibson wrote: On Tue, Apr 19, 2011 at 09:38:58AM +0200, Alexander Graf wrote: On 19.04.2011, at 03:54, David Gibson wrote: From: Anton Blanchardan...@au1.ibm.com The original pSeries machine was limited to 32 CPUs, more or less arbitrarily. Particularly when we

[Qemu-devel] [PATCH] hw/arm_boot.c: move initrd load address up to accommodate large kernels

2011-04-19 Thread Peter Maydell
Newer kernels are large enough that they can overlap the address where qemu places the initrd. Move the initrd up so that there is enough space for the kernel again. Unfortunately it's not possible to automatically determine the size of the kernel if it is compressed, so this is the best we can

Re: [Qemu-devel] [PATCH/RFC] Port Wine preloader to QEMU

2011-04-19 Thread Richard Henderson
On 04/19/2011 02:19 AM, Mike McCormack wrote: This is the only way I know to get qemu 0.14.0 to work reliably with Scratchbox 2 (libsb2.so) The problem stems from two things: * The shared object loader is permitted to load LD_PRELOAD objects below the QEMU load address (0x6000),

[Qemu-devel] [PATCH 21/24] target-alpha: Include the PCC_OFS in the RPCC return value.

2011-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/op_helper.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c index cc8a33d..5902cd6 100644 --- a/target-alpha/op_helper.c +++ b/target-alpha/op_helper.c

[Qemu-devel] [PATCH 10/24] target-alpha: Tidy up arithmetic exceptions.

2011-04-19 Thread Richard Henderson
Introduce and use arith_excp, filling in the trap_arg[01] IPRs. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/op_helper.c | 34 +- 1 files changed, 21 insertions(+), 13 deletions(-) diff --git a/target-alpha/op_helper.c

[Qemu-devel] [PATCH 22/24] target-alpha: Implement TLB flush primitives.

2011-04-19 Thread Richard Henderson
Expose these via MTPR, more or less like the real HW does. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/helper.h|3 +++ target-alpha/op_helper.c | 11 ++- target-alpha/translate.c | 32 +--- 3 files changed, 34 insertions(+),

[Qemu-devel] [PATCH 05/24] target-alpha: Tidy exception constants.

2011-04-19 Thread Richard Henderson
There's no need to attempt to match EXCP_* values with PALcode entry point offsets. Instead, compress all the values to make for more efficient switch statements within QEMU. We will be doing TLB fill within QEMU proper, not within the PALcode, so all of the ITB/DTB miss, double fault, and

[Qemu-devel] [PATCH 17/24] target-alpha: Implement more CALL_PAL values inline.

2011-04-19 Thread Richard Henderson
In particular, SWPIPL is used quite a lot by the Linux kernel. Doing this inline makes it significantly easier to step through without the debugger getting confused by the mode switch. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/translate.c | 141

[Qemu-devel] [PATCH 09/24] target-alpha: Add IPRs to be used by the emulation PALcode.

2011-04-19 Thread Richard Henderson
These aren't actually used yet, but we can at least access them via the HW_MFPR and HW_MTPR instructions. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/cpu.h | 13 +++ target-alpha/translate.c | 87 - 2 files changed,

[Qemu-devel] [PATCH 19/24] target-alpha: Implement cpu_alpha_handle_mmu_fault for system mode.

2011-04-19 Thread Richard Henderson
Reads the page table how PALcode would, except that the virtual page table base register is not used. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/cpu.h| 12 + target-alpha/helper.c | 129 +++-- 2 files changed, 137

[Qemu-devel] [PATCH 11/24] target-alpha: Merge HW_REI and HW_RET implementations.

2011-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/translate.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 7c90ad9..c8ef31d 100644 --- a/target-alpha/translate.c +++

[Qemu-devel] [PATCH 24/24] target-alpha: Add SX164 emulation.

2011-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- Makefile.target |1 + hw/alpha_pci.c | 327 + hw/alpha_pyxis.c | 1057 ++ hw/alpha_sx164.c | 195 ++ hw/alpha_sys.h | 41 +++ 5 files changed, 1621

[Qemu-devel] How to test support of a new board?

2011-04-19 Thread Li Xin
Hi all, I want to make a new support of arm board TH68 of THOMSON TELECOM in QEMU. This board have a microprocessor called PNX8019. So I made some simulations of the functional blocs. But I don't know how to test the code in QEMU. Is there anyone have any experience or any example?

[Qemu-devel] [PATCH 15/24] target-alpha: All ISA checks to use TB-FLAGS.

2011-04-19 Thread Richard Henderson
We had two different methods in use, both of which referenced ENV, and neither of which indicated to the generic code when different compilation modes are not compatible. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/cpu.h | 32 - target-alpha/translate.c | 396

[Qemu-devel] [PATCH 14/24] target-alpha: Add various symbolic constants.

2011-04-19 Thread Richard Henderson
The EXC_M_* constants were being set for the EV6, not as set for the Unix kernel entry point. Use PS_USER_MODE instead of hard-coding access to the PS register. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/cpu.h | 56 +++--

[Qemu-devel] [PATCH 03/24] pci: Export pci_to_cpu_addr.

2011-04-19 Thread Richard Henderson
This is, more or less, the read accessor to pci_bus_set_mem_base as a write accessor. It will be needed for implementing sparse memory spaces for Alpha. Signed-off-by: Richard Henderson r...@twiddle.net --- hw/pci.c |3 +-- hw/pci.h |1 + 2 files changed, 2 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [PATCH/RFC] Port Wine preloader to QEMU

2011-04-19 Thread Riku Voipio
On Tue, Apr 19, 2011 at 06:19:49PM +0900, Mike McCormack wrote: * modifying do_brk to not use MAP_FIXED - causes an out of memory failure rather than a crash Have you tried the patch posted by Peter Maydell yesterday: http://www.mail-archive.com/qemu-devel@nongnu.org/msg61733.html Riku

[Qemu-devel] [PATCH 12/24] target-alpha: Implement do_interrupt for system mode.

2011-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/helper.c | 115 1 files changed, 105 insertions(+), 10 deletions(-) diff --git a/target-alpha/helper.c b/target-alpha/helper.c index c5479fd..d5923e0 100644 ---

[Qemu-devel] [PATCH 16/24] target-alpha: Disable interrupts properly.

2011-04-19 Thread Richard Henderson
Interrupts are disabled in PALmode, and when the PS IL is high enough. We don't actually get the interrupt levels correct yet; settle for interrupts enabled only at IL0. Signed-off-by: Richard Henderson r...@twiddle.net --- cpu-exec.c | 16 +--- target-alpha/exec.h |7

[Qemu-devel] [PATCH 23/24] target-alpha: Enable the alpha-softmmu target.

2011-04-19 Thread Richard Henderson
Compiles, but no machine defined yet, so this will crash on startup. Signed-off-by: Richard Henderson r...@twiddle.net --- Makefile.target |3 +- configure |1 + default-configs/alpha-softmmu.mak |9 target-alpha/machine.c|

[Qemu-devel] [PATCH 08/24] target-alpha: Fixup translation of PALmode instructions.

2011-04-19 Thread Richard Henderson
All of the raw memory accesses should be phys instead. Fix some confusion about argument ordering of the store routines. Fix the implementation of store-conditional. Delete the alt-mode helpers. Because we only implement two mmu modes, let /a imply user-mode unconditionally. For the moment,

[Qemu-devel] [PATCH 01/24] Export the unassigned_mem read/write functions.

2011-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- cpu-common.h |7 +++ exec.c | 12 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index 96c02ae..e17020b 100644 --- a/cpu-common.h +++ b/cpu-common.h @@ -45,6 +45,13 @@

[Qemu-devel] [PATCH 02/24] target-alpha: Disassemble EV6 PALcode instructions.

2011-04-19 Thread Richard Henderson
The QEMU emulation PALcode will use EV6 PALcode insns regardless of the real cpu instruction set being emulated. Signed-off-by: Richard Henderson r...@twiddle.net --- alpha-dis.c |4 dis-asm.h |3 +++ disas.c |2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH 06/24] target-alpha: Rationalize internal processor registers.

2011-04-19 Thread Richard Henderson
Delete all the code that tried to emulate the real IPRs of some unnamed CPU. Replace those with just 3 slots that we can use to communicate trap information between the helper functions that signal exceptions and the OS trap handler. Signed-off-by: Richard Henderson r...@twiddle.net ---

[Qemu-devel] [PATCH 04/24] target-alpha: Remove partial support for palcode emulation.

2011-04-19 Thread Richard Henderson
This code does not work, and will be replaced by a bios image. Signed-off-by: Richard Henderson r...@twiddle.net --- Makefile.target |2 +- hw/alpha_palcode.c | 1048 -- target-alpha/cpu.h | 35 -- target-alpha/helper.c|

[Qemu-devel] [PATCH 13/24] target-alpha: Swap shadow registers moving to/from PALmode.

2011-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/cpu.h |1 + target-alpha/helper.c| 37 - target-alpha/op_helper.c |5 - 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/target-alpha/cpu.h

[Qemu-devel] [PATCH 20/24] target-alpha: Trap for unassigned and unaligned addresses.

2011-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- exec-all.h |2 +- exec.c | 12 ++-- target-alpha/cpu.h |6 +- target-alpha/op_helper.c | 39 ++- 4 files changed, 50 insertions(+), 9

[Qemu-devel] [PATCH 00/24] Alpha system emulation, v2

2011-04-19 Thread Richard Henderson
Changes from v1 to v2: - Split patch 5 up into little pieces. These pieces were compile tested by applying patch 23 (Enable alpha-softmmu) out of sequence so that both softmmu and linux-user targets were built. But in the end I chickened out and re-ordered the enable patch to last.

[Qemu-devel] [PATCH 18/24] target-alpha: Add custom PALcode image for SX164 emulation.

2011-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- .gitmodules |3 +++ Makefile |3 ++- configure |2 +- pc-bios/palcode-sx164 | Bin 0 - 107621 bytes roms/qemu-palcode |1 + 5 files changed, 7 insertions(+), 2 deletions(-) create mode

[Qemu-devel] [PATCH 07/24] target-alpha: Cleanup MMU modes.

2011-04-19 Thread Richard Henderson
Don't bother including executive and supervisor modes. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/cpu.h | 36 1 files changed, 28 insertions(+), 8 deletions(-) diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h index

Re: [Qemu-devel] [PATCH/RFC] Port Wine preloader to QEMU

2011-04-19 Thread Peter Maydell
On 19 April 2011 16:48, Riku Voipio riku.voi...@iki.fi wrote: On Tue, Apr 19, 2011 at 06:19:49PM +0900, Mike McCormack wrote:  * modifying do_brk to not use MAP_FIXED - causes an out of memory    failure rather than a crash Have you tried the patch posted by Peter Maydell yesterday:  

[Qemu-devel] [PATCH] target-arm: Set Invalid flag for NaN in float-to-int conversions

2011-04-19 Thread Peter Maydell
When we catch the special case of an input NaN in ARM float to int helper functions, set the Invalid flag as well as returning the correct result. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/helper.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-)

Re: [Qemu-devel] [PATCH 10/20] target-i386: fix helper_fscale() wrt softfloat

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: Use the scalbn softfloat function to implement helper_fscale(). This fixes corner cases (e.g. NaN) and makes a few more GNU libc math tests to pass. Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter

Re: [Qemu-devel] [PATCH 11/20] target-i386: fix helper_flbd_ST0() wrt softfloat

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: Signed-off-by: Aurelien Jarno aurel...@aurel32.net ---  target-i386/op_helper.c |    7 ---  1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index

Re: [Qemu-devel] [PATCH 13/20] target-i386: fix helper_fdiv() wrt softfloat

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: +++ b/target-i386/op_helper.c @@ -3440,9 +3440,10 @@ static void fpu_set_exception(int mask)  static inline CPU86_LDouble helper_fdiv(CPU86_LDouble a, CPU86_LDouble b)  { -    if (b == 0.0) +    if (floatx_is_zero(b)) {    

Re: [Qemu-devel] [PATCH 14/20] target-i386: fix helper_fsqrt() wrt softfloat

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org -- PMM

Re: [Qemu-devel] [PATCH 15/20] target-i386: replace approx_rsqrt and approx_rcp by softfloat ops

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org -- PMM

Re: [Qemu-devel] [PATCH 19/20] target-i386: fix constants wrt softfloat

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org -- PMM

Re: [Qemu-devel] [PATCH 20/20] target-i386: switch to softfloat

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: diff --git a/configure b/configure index da2da04..6e445b4 100755 --- a/configure +++ b/configure @@ -3276,9 +3276,6 @@ if test ! -z $gdb_xml_files ; then  fi  case $target_arch2 in -  i386|x86_64) -    echo

Re: [Qemu-devel] [PATCH 16/20] target-i386: add CPU86_LDouble - double conversion functions

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: Add functions to convert CPU86_LDouble to double and vice versa. They are going to be used to implement logarithmic and trigonometric function until softfloat implement them. Signed-off-by: Aurelien Jarno aurel...@aurel32.net

Re: [Qemu-devel] [PATCH 17/20] target-i386: fix logarithmic and trigonometric helpers wrt softfloat

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: +#include math.h Why does this patch need this? I couldn't see anywhere where the patch added calls to math functions we weren't calling before, or did I miss one?  void helper_fptan(void)  { -    CPU86_LDouble fptemp; +    

Re: [Qemu-devel] [PATCH 18/20] target-i386: fix helper_fprem() and helper_fprem1() wrt softfloat

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: Signed-off-by: Aurelien Jarno aurel...@aurel32.net Reviewed-by: Peter Maydell peter.mayd...@linaro.org -- PMM

Re: [Qemu-devel] [PATCH 12/20] target-i386: fix helper_fxtract() wrt softfloat

2011-04-19 Thread Peter Maydell
On 18 April 2011 22:00, Aurelien Jarno aurel...@aurel32.net wrote: With softfloat it's not possible to play with the overflow of an unsigned value to get the 0 case partially correct. Use a special case for that. Using a division to generate an infinity is the easiest way that works for both

Re: [Qemu-devel] QEMU-KVM and hardened (GRSEC/PaX) kernel

2011-04-19 Thread Blue Swirl
2011/4/17 Антон Кочков anton.koch...@gmail.com: Good day! I'm trying to make working qemu-kvm with hardened gentoo on hardened kernel. When i'm using CONFIG_PAX_KERNPAGEXEC and CONFIG_PAX_MEM_UNDEREF qemu just start and go to infinite loop and take 100% of one of my CPU core. adn it even

Re: [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug

2011-04-19 Thread Blue Swirl
On Tue, Apr 19, 2011 at 11:57 AM, Peter Maydell peter.mayd...@linaro.org wrote: Work around a SPARC glibc bug which caused the epoll_create1 configure test to wrongly claim that the function was present. Some versions of SPARC glibc provided the function in the library but didn't declare it in

Re: [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug

2011-04-19 Thread Peter Maydell
On 19 April 2011 20:37, Blue Swirl blauwir...@gmail.com wrote: On Tue, Apr 19, 2011 at 11:57 AM, Peter Maydell peter.mayd...@linaro.org wrote: Work around a SPARC glibc bug which caused the epoll_create1 configure test to wrongly claim that the function was present. Some versions of SPARC

Re: [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug

2011-04-19 Thread Blue Swirl
On Tue, Apr 19, 2011 at 10:48 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 19 April 2011 20:37, Blue Swirl blauwir...@gmail.com wrote: On Tue, Apr 19, 2011 at 11:57 AM, Peter Maydell peter.mayd...@linaro.org wrote: Work around a SPARC glibc bug which caused the epoll_create1 configure

Re: [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug

2011-04-19 Thread Peter Maydell
On 19 April 2011 20:59, Blue Swirl blauwir...@gmail.com wrote: On Tue, Apr 19, 2011 at 10:48 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 19 April 2011 20:37, Blue Swirl blauwir...@gmail.com wrote: But then epoll would not be used. I think that's fine -- on a system which isn't

[Qemu-devel] [PATCH] vfio: Add an ioctl to reset the device

2011-04-19 Thread Alex Williamson
When using VFIO to assign a device to a guest, we want to make sure the device is quiesced on VM reset to stop all DMA within the guest mapped memory. Add an ioctl which just calls pci_reset_function() and returns whether it succeeds. Signed-off-by: Alex Williamson alex.william...@redhat.com ---

Re: [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug

2011-04-19 Thread Blue Swirl
On Tue, Apr 19, 2011 at 11:16 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 19 April 2011 20:59, Blue Swirl blauwir...@gmail.com wrote: On Tue, Apr 19, 2011 at 10:48 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 19 April 2011 20:37, Blue Swirl blauwir...@gmail.com wrote: But

Re: [Qemu-devel] [PATCH] vfio: Add an ioctl to reset the device

2011-04-19 Thread Randy Dunlap
On Tue, 19 Apr 2011 14:32:59 -0600 Alex Williamson wrote: When using VFIO to assign a device to a guest, we want to make sure the device is quiesced on VM reset to stop all DMA within the guest mapped memory. Add an ioctl which just calls pci_reset_function() and returns whether it succeeds.

Re: [Qemu-devel] [PATCH] vfio: Add an ioctl to reset the device

2011-04-19 Thread Chris Wright
* Randy Dunlap (rdun...@xenotime.net) wrote: I can't find include/linux/vfio.h in linux-next or mainline git, but ioctls need to be documented in Documentation/ioctl/ioctl-number.txt It is in the full patchset: https://github.com/pugs/vfio-linux-2.6

Re: [Qemu-devel] [PATCH] vfio: Add an ioctl to reset the device

2011-04-19 Thread Chris Wright
* Alex Williamson (alex.william...@redhat.com) wrote: When using VFIO to assign a device to a guest, we want to make sure the device is quiesced on VM reset to stop all DMA within the guest mapped memory. Add an ioctl which just calls pci_reset_function() and returns whether it succeeds.

Re: [Qemu-devel] [PATCH] vfio: Add an ioctl to reset the device

2011-04-19 Thread Alex Williamson
On Tue, 2011-04-19 at 15:07 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: When using VFIO to assign a device to a guest, we want to make sure the device is quiesced on VM reset to stop all DMA within the guest mapped memory. Add an ioctl which just calls

Re: [Qemu-devel] [PATCH] vfio: Add an ioctl to reset the device

2011-04-19 Thread Chris Wright
* Alex Williamson (alex.william...@redhat.com) wrote: On Tue, 2011-04-19 at 15:07 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: When using VFIO to assign a device to a guest, we want to make sure the device is quiesced on VM reset to stop all DMA within

Re: [Qemu-devel] [PATCH] vfio: Add an ioctl to reset the device

2011-04-19 Thread Alex Williamson
On Tue, 2011-04-19 at 15:26 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: On Tue, 2011-04-19 at 15:07 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: When using VFIO to assign a device to a guest, we want to make sure

Re: [Qemu-devel] [PATCH] vfio: Add an ioctl to reset the device

2011-04-19 Thread Chris Wright
* Alex Williamson (alex.william...@redhat.com) wrote: On Tue, 2011-04-19 at 15:26 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: On Tue, 2011-04-19 at 15:07 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: When using

Re: [Qemu-devel] [PATCH] vfio: Add an ioctl to reset the device

2011-04-19 Thread Tom Lyon
On Tuesday, April 19, 2011 01:32:59 pm Alex Williamson wrote: When using VFIO to assign a device to a guest, we want to make sure the device is quiesced on VM reset to stop all DMA within the guest mapped memory. Add an ioctl which just calls pci_reset_function() and returns whether it

  1   2   >