Re: [Qemu-devel] [PATCH 0/7] cpu model bug fixes and definition corrections

2011-05-23 Thread Markus Armbruster
john cooper writes: > This series is a resend of several pending patches which > have been brought up-to-date. All address problems we have > found and corrected in our codebase in the process of test > and deploy of cpu model support. > > A few have been modified slightly to address minor white

Re: [Qemu-devel] [PATCH 2/3] softfloat: extract softfloat-target.h

2011-05-23 Thread Paolo Bonzini
On 05/23/2011 11:11 PM, Aurelien Jarno wrote: Looks ok in principle, but I wonder if we should really create a new header for that. softfloat-specialize.h is already supposed to contain the target specific functions, so it's probably a good idea to move them there instead. I was wondering about

Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000

2011-05-23 Thread Markus Armbruster
Anthony Liguori writes: > On 05/23/2011 11:18 AM, Markus Armbruster wrote: >> Anthony Liguori writes: >> >>> If it's left up to the application, doesn't that mean that we can't >>> ever send 64-bit memory/disk faithfully? >>> >>> Because a client would be allowed to represent integers as signed

Re: [Qemu-devel] Use a hex string

2011-05-23 Thread Jamie Lokier
Anthony Liguori wrote: > On 05/23/2011 06:02 PM, Jamie Lokier wrote: > >Richard W.M. Jones wrote: > >>The problem is to be able to send 64 bit memory and disk offsets > >>faithfully. This doesn't just fail to solve the problem, it's > >>actually going to make it a whole lot worse. > > > >Such offs

Re: [Qemu-devel] Use a hex string

2011-05-23 Thread Anthony Liguori
On 05/23/2011 06:02 PM, Jamie Lokier wrote: Richard W.M. Jones wrote: The problem is to be able to send 64 bit memory and disk offsets faithfully. This doesn't just fail to solve the problem, it's actually going to make it a whole lot worse. Such offsets would be so much more readable in hexa

Re: [Qemu-devel] The process of kernel cross-compiling in arm-test-0.2.tar.gz

2011-05-23 Thread daixiaoke
于 2011-5-23 19:19, Brad Hards 写道: On Monday 23 May 2011 19:26:45 daixiaoke wrote: 3.Compiled uClinux following steps in the attachment(Chapter 4: Building the uClinux image). “STM3210E-EVAL-jffs” was selected for "Porduct" while Configure uClinux for STM3210E-EVAL. So you have built the image

Re: [Qemu-devel] [PATCH 21/26] target-xtensa: implement unaligned exception option

2011-05-23 Thread Max Filippov
> > This is also done by gen_load_store_alignment. > > Does it really worth copying part of this logic to do_unaligned_access just > > to use ALIGNED_ONLY framework? > > Yes, because it is done out-of-line, as a part of the TLB load slow path. I probably just don't get what you call 'out-of-line

[Qemu-devel] Use a hex string (was: [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000)

2011-05-23 Thread Jamie Lokier
Richard W.M. Jones wrote: > The problem is to be able to send 64 bit memory and disk offsets > faithfully. This doesn't just fail to solve the problem, it's > actually going to make it a whole lot worse. Such offsets would be so much more readable in hexadecimal. So why not use a string "0x8

Re: [Qemu-devel] [PATCH] Add support for fd: protocol

2011-05-23 Thread Jamie Lokier
Markus Armbruster wrote: > Anthony Liguori writes: > > > On 05/23/2011 05:30 AM, Daniel P. Berrange wrote: > >> It feels to me that turning the current block driver code which just does > >> open(2) on files, into something which issues events& asynchronously > >> waits for a file would potentia

Re: [Qemu-devel] [RFC] Memory API

2011-05-23 Thread Jamie Lokier
Gleb Natapov wrote: > On Sun, May 22, 2011 at 10:50:22AM +0300, Avi Kivity wrote: > > On 05/20/2011 02:25 PM, Gleb Natapov wrote: > > >> > > >> A) Removing regions will change significantly. So far this is done by > > >> setting a region to IO_MEM_UNASSIGNED, keeping truncation. With the new > >

[Qemu-devel] [PATCH 6/7] cpu model bug fixes and definition corrections

2011-05-23 Thread john cooper
This patch adds Westmere as a qemu cpu model. The only additional guest visible feature of a Westmere relative to Nehalem is the inclusion of AES instructions. However as other non-ABI visible modifications exist along with fabrication changes, the CPUID data of the corresponding deployed silicon

[Qemu-devel] [PATCH 5/7] cpu model bug fixes and definition corrections

2011-05-23 Thread john cooper
This patch was intended to address the replicated feature flags in cpuid 8000_0001:edx from cpuid _0001:edx. This is due to AMD's definition where these flags are mostly cloned in the 8000_0001:edx cpuid function. qemu64 attempted to glue together the respective Intel and AMD nearly disjoint fe

Re: [Qemu-devel] [PATCH v2 6/9] target-i386: use floatx80 constants in helper_fld*_ST0()

2011-05-23 Thread Peter Maydell
On 23 May 2011 22:42, Aurelien Jarno wrote: > Instead of using a table which doesn't correspond to anything from > physical in the CPU, use directly the constants in helper_fld*_ST0(). > > Cc: Andreas Färber > Signed-off-by: Aurelien Jarno Reviewed-by: Peter Maydell

[Qemu-devel] [PATCH 4/7] cpu model bug fixes and definition corrections

2011-05-23 Thread john cooper
Failure by qemu to open a default config file isn't cause to error exit -- it just quietly continues on. After puzzling issues with otherwise opaque config file locations and startup handling numerous times, some help from qemu seemed justified. In the case of a "?" pseudo filename arg to -readc

[Qemu-devel] [PATCH 7/7] cpu model bug fixes and definition corrections

2011-05-23 Thread john cooper
Launching qemu with "-cpu [check|enforce]" without explicitly prefixing a valid model name doesn't do as intuitively expected. Rather qemu exits with a CLI parse error. Unfortunately due to qemu's CLI argument parsing structure and the fact cpu models are initialized depending on build configurati

[Qemu-devel] [PATCH 3/7] cpu model bug fixes and definition corrections: Add kvm emulated x2apic flag to config defined cpu models

2011-05-23 Thread john cooper
Add kvm emulated x2apic flag to config defined cpu models and general support for such hypervisor emulated flags. In addition to checking user request flags against the host we also selectively check against kvm for emulated flags. Signed-off-by: john cooper --- diff --git a/hw/pc.c b/hw/pc.c i

[Qemu-devel] [PATCH 2/7] cpu model bug fixes and definition corrections: Allow an optional qemu_early_init_vcpu()

2011-05-23 Thread john cooper
Allow an optional qemu_early_init_vcpu() such that kvm_arch_get_supported_cpuid() can be used from cpu_x86_register(). Without this minimal setup kvm_arch_get_supported_cpuid() gags kvm_ioctl() via passing a NULL initialized KVMState *. Signed-off-by: john cooper --- diff --git a/cpus.c b/cpus.

Re: [Qemu-devel] [PATCH v2 2/9] target-mips/gdbstub: remove old CONFIG_SOFTFLOAT #ifndef

2011-05-23 Thread Peter Maydell
On 23 May 2011 22:42, Aurelien Jarno wrote: > target-mips has been switched to softfloat only long ago, but > a #ifndef CONFIG_SOFTFLOAT has been forgotten. Remove it. > > Signed-off-by: Aurelien Jarno Reviewed-by: Peter Maydell

[Qemu-devel] [PATCH 1/7] cpu model bug fixes and definition corrections: Correct archaic CPU model "model" field for Intel CPUs.

2011-05-23 Thread john cooper
Correct archaic CPU model "model" field for Intel CPUs. The old "model" values caused two known problems: - Skype crashes on a winxp guest if model < 6, due to syscall vs. sysenter confusion. - 32 bit windows doesn't enable MSI support if model < 13. After consulting with Intel the

[Qemu-devel] [PATCH 0/7] cpu model bug fixes and definition corrections

2011-05-23 Thread john cooper
This series is a resend of several pending patches which have been brought up-to-date. All address problems we have found and corrected in our codebase in the process of test and deploy of cpu model support. A few have been modified slightly to address minor whitespace issues and 4/7 reverts the

Re: [Qemu-devel] [PATCH v2 8/9] target-i386: cleanup helper_fxam_ST0()

2011-05-23 Thread Peter Maydell
On 23 May 2011 22:42, Aurelien Jarno wrote: > Rewrite helper_fxam_ST0() using only softfloat functions. > > Signed-off-by: Aurelien Jarno (Sorry I didn't get round to this one earlier; I think I did the easy patches and stalled on the ones I'd have to pull out the x86 manuals for :-)) >     /*

Re: [Qemu-devel] [PATCH 9/9] cpu-exec.c: avoid AREG0 use

2011-05-23 Thread Aurelien Jarno
On Sun, May 22, 2011 at 07:55:53PM +0300, Blue Swirl wrote: > On Sun, May 22, 2011 at 2:18 PM, Blue Swirl wrote: > > Make functions take a parameter for CPUState instead of relying > > on global env. Pass CPUState pointer to TCG prologue, which moves > > it to AREG0. > > I found the problem with

Re: [Qemu-devel] [PATCH] Add support for fd: protocol

2011-05-23 Thread Anthony Liguori
On 05/23/2011 10:56 AM, Kevin Wolf wrote: Am 23.05.2011 17:24, schrieb Markus Armbruster: Kevin Wolf writes: An fd: protocol can't easily support reopen. So fail it. This doesn't break any existing usage. It's just a restriction on the new protocol. Restrictions can render the new protocol

[Qemu-devel] [PATCH v2 9/9] target-i386: add support for FPU exceptions

2011-05-23 Thread Aurelien Jarno
This patch adds support for FPU exceptions. It keeps the exception in the softfloat status, and copy them back to env->fpus when needed by oring them. When loading a new value to env->fpus, it starts with a clean softfloat status. Signed-off-by: Aurelien Jarno --- target-i386/cpu.h | 15

[Qemu-devel] [PATCH v2 3/9] target-i386: remove old code handling float64

2011-05-23 Thread Aurelien Jarno
Now that target-i386 uses softfloat, floatx80 is always available and there is no need anymore to have code handling both float64 and floax80. Signed-off-by: Aurelien Jarno --- target-i386/cpu.h | 22 +--- target-i386/exec.h | 132 +--- target-i386/helper.c|

[Qemu-devel] [PATCH v2 8/9] target-i386: cleanup helper_fxam_ST0()

2011-05-23 Thread Aurelien Jarno
Rewrite helper_fxam_ST0() using only softfloat functions. Signed-off-by: Aurelien Jarno --- target-i386/op_helper.c | 30 -- 1 files changed, 12 insertions(+), 18 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index cec0c76..8ba2b5f 100

[Qemu-devel] [PATCH v2 7/9] softfloat: add float*_is_zero_or_denormal()

2011-05-23 Thread Aurelien Jarno
float*_is_zero_or_denormal() is available for float32, but not for float64, floatx80 and float128. Fix that. Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- fpu/softfloat.h | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/fpu/softfloat.h b/fpu

[Qemu-devel] [PATCH v2 0/9] softfloat-native removal and i386 improvement

2011-05-23 Thread Aurelien Jarno
This patch series finally removes softfloat-native as it is not used by default in any target. In then laters improves the target-i386 code as it does not need to be compatible with softfloat-native anymore. v1 -> v2: fix mips/gdbstub reorder patches to fix target-i386 bisection dropped log2

[Qemu-devel] [PATCH v2 6/9] target-i386: use floatx80 constants in helper_fld*_ST0()

2011-05-23 Thread Aurelien Jarno
Instead of using a table which doesn't correspond to anything from physical in the CPU, use directly the constants in helper_fld*_ST0(). Cc: Andreas Färber Signed-off-by: Aurelien Jarno --- target-i386/op_helper.c | 27 --- 1 files changed, 8 insertions(+), 19 deletion

[Qemu-devel] [PATCH v2 4/9] softfloat-native: remove

2011-05-23 Thread Aurelien Jarno
Remove softfloat-native support, all targets are now using softfloat instead. Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- Makefile.target|3 +- configure |2 - cpu-all.h |5 +- fpu/softfloat-native.c | 540 -

[Qemu-devel] [PATCH v2 5/9] softfloat: always enable floatx80 and float128 support

2011-05-23 Thread Aurelien Jarno
Now that softfloat-native is gone, there is no real point on not always enabling floatx80 and float128 support. Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- cpu-all.h |2 - fpu/softfloat-specialize.h |7 - fpu/softfloat.c| 62 --

[Qemu-devel] [PATCH v2 1/9] target-ppc: remove old CONFIG_SOFTFLOAT #ifdef

2011-05-23 Thread Aurelien Jarno
target-ppc has been switched to softfloat only long ago, but a few #ifdef CONFIG_SOFTFLOAT have been forgotten. Remove them. Cc: Alexander Graf Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- target-ppc/helper.h|2 -- target-ppc/op_helper.c | 11 --- target-ppc/t

[Qemu-devel] [PATCH v2 2/9] target-mips/gdbstub: remove old CONFIG_SOFTFLOAT #ifndef

2011-05-23 Thread Aurelien Jarno
target-mips has been switched to softfloat only long ago, but a #ifndef CONFIG_SOFTFLOAT has been forgotten. Remove it. Signed-off-by: Aurelien Jarno --- gdbstub.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index ae856f9..b9ae30d 100644 ---

Re: [Qemu-devel] [PATCH] configure: Document --disable-slirp option in --help

2011-05-23 Thread Aurelien Jarno
On Mon, May 23, 2011 at 10:13:47AM +0100, Peter Maydell wrote: > The --disable-slirp option was undocumented; add it to configure's > --help output. > > Signed-off-by: Peter Maydell > --- > configure |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) Thanks, applied. > diff --git a/c

Re: [Qemu-devel] [PATCH] target-arm/exec.h: Remove unused #define of M0

2011-05-23 Thread Aurelien Jarno
On Mon, May 23, 2011 at 04:04:42PM +0100, Peter Maydell wrote: > Remove a preprocessor #define which is never used. > > Signed-off-by: Peter Maydell > --- > target-arm/exec.h |2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) Thanks, applied. > diff --git a/target-arm/exec.h b/targe

Re: [Qemu-devel] [PULL 0/4] Trivial patches for May 16 to May 20

2011-05-23 Thread Aurelien Jarno
On Sun, May 22, 2011 at 11:01:13PM +0100, Stefan Hajnoczi wrote: > The following changes since commit dcfd14b3741983c466ad92fa2ae91eeafce3e5d5: > > Delete unused tb_invalidate_page_range (2011-05-22 10:47:28 +) > > are available in the git repository at: > git://repo.or.cz/qemu/stefanha.g

[Qemu-devel] [patch 0/7] live block copy (v3)

2011-05-23 Thread Marcelo Tosatti
v3: - replace commit file with mirrored writes - address comments from round 2 v2: - use reference counting to be safe against device hotplug / bdrv_truncate - add comment about usage of timer

[Qemu-devel] [patch 6/7] QEMU live block copy

2011-05-23 Thread Marcelo Tosatti
Support live image copy + switch. That is, copy an image backing a guest hard disk to a destination image (destination image must be created separately), and switch to this copy. Command syntax: block_copy device filename [-i] -- live block copy device to image -i for incremental cop

[Qemu-devel] [patch 4/7] Add blkdebug points for live block copy

2011-05-23 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti Index: qemu-block-copy/block.h === --- qemu-block-copy.orig/block.h +++ qemu-block-copy/block.h @@ -295,6 +295,14 @@ typedef enum { BLKDBG_CLUSTER_ALLOC_BYTES, BLKDBG_CLUSTER_FREE, +BLKD

[Qemu-devel] [patch 3/7] Add error messages for live block copy

2011-05-23 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti Index: qemu-block-copy/qerror.c === --- qemu-block-copy.orig/qerror.c +++ qemu-block-copy/qerror.c @@ -209,6 +209,14 @@ static const QErrorStringTable qerror_ta .error_fmt = QERR_VNC_SERVER_FAI

[Qemu-devel] [patch 2/7] Add blkmirror block driver

2011-05-23 Thread Marcelo Tosatti
Mirrored writes are used by live block copy. Signed-off-by: Marcelo Tosatti Index: qemu-block-copy/block/blkmirror.c === --- /dev/null +++ qemu-block-copy/block/blkmirror.c @@ -0,0 +1,239 @@ +/* + * Block driver for mirrored writes.

[Qemu-devel] [patch 7/7] do not allow migration if block copy in progress

2011-05-23 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti Index: qemu-block-copy/migration.c === --- qemu-block-copy.orig/migration.c +++ qemu-block-copy/migration.c @@ -19,6 +19,7 @@ #include "block.h" #include "qemu_socket.h" #include "block-migration.h"

[Qemu-devel] [patch 1/7] add migration_active function

2011-05-23 Thread Marcelo Tosatti
To query whether migration is active. Signed-off-by: Marcelo Tosatti Index: qemu-block-copy/migration.c === --- qemu-block-copy.orig/migration.c +++ qemu-block-copy/migration.c @@ -480,3 +480,13 @@ int get_migration_state(void)

[Qemu-devel] [patch 5/7] Add vmstop code for live block copy

2011-05-23 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti Index: qemu-block-copy/sysemu.h === --- qemu-block-copy.orig/sysemu.h +++ qemu-block-copy/sysemu.h @@ -33,6 +33,7 @@ void qemu_del_vm_change_state_handler(VM #define VMSTOP_SAVEVM6 #define VMSTOP_

Re: [Qemu-devel] [PATCH v2 0/6] target-arm: Fix bugs in fp exception flag setting

2011-05-23 Thread Aurelien Jarno
On Thu, May 19, 2011 at 02:46:13PM +0100, Peter Maydell wrote: > This patch series fixes a number of minor bugs in the ARM target where > we were not correctly setting the cumulative exception flags in the > FPSCR. It includes adding a new flag to softfloat indicating when a > denormal result has b

Re: [Qemu-devel] [PULL] PPC patch queue

2011-05-23 Thread Aurelien Jarno
On Fri, May 20, 2011 at 06:03:50PM +0200, Alexander Graf wrote: > Hi, > > This is my current PPC patch queue containing all the collected PPC work for > Qemu so far. Please pull. Pulled. In the future, could you please also send the patch series to the mailing list, so that people can have a look

Re: [Qemu-devel] [PULL] s390x patch queue

2011-05-23 Thread Aurelien Jarno
On Fri, May 20, 2011 at 05:44:12PM +0200, Alexander Graf wrote: > Hi, > > This is my current s390x patch queue containing > > * s390x emulation > * fixes for s390x kvm > > Please pull. Pulled. In the future, could you please also send the patch series to the mailing list, so that people can

Re: [Qemu-devel] [RFC][PATCH v0 0/8] Improve register allocator

2011-05-23 Thread Aurelien Jarno
On Mon, May 23, 2011 at 06:40:46PM +0400, Kirill Batuzov wrote: > This series improves register allocator by keeping track of temp's and > register's live ranges, doing better spill choice and spilling early unneeded > globals. > > The patches do need testing and performance evaluation before they

[Qemu-devel] [PATCH 03/26] target-alpha: Single-step properly across branches.

2011-05-23 Thread Richard Henderson
We were failing to generate EXC_DEBUG in the EXIT_PC_UPDATED path. This caused us not to stop at the instruction after a branch, but on the instruction afterward. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 35 --- 1 files changed, 20 inserti

Re: [Qemu-devel] [PATCH 2/3] softfloat: extract softfloat-target.h

2011-05-23 Thread Aurelien Jarno
On Thu, May 19, 2011 at 03:47:00PM +0200, Paolo Bonzini wrote: > Most definitions in softfloat.h are really target-independent. Split > the few that stand out as target-dependent, to allow including > softfloat.h from files that are not compiled per-target. Looks ok in principle, but I wonder if

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

2011-05-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/helper.h|1 - target-alpha/op_helper.c | 10 -- target-alpha/translate.c | 19 --- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/target-alpha/helper.h b/target-alpha/helper.h index f4f693a..de8

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

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

[Qemu-devel] [PATCH 23/26] target-alpha: Remap PIO space for 43-bit KSEG for EV6.

2011-05-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/helper.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/target-alpha/helper.c b/target-alpha/helper.c index 96b407b..bd3af38 100644 --- a/target-alpha/helper.c +++ b/target-alpha/helper.c @@ -220,14 +220,18 @@ st

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

2011-05-23 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 --- target-alpha/translate.c | 140 +++---

[Qemu-devel] [PATCH 19/26] target-alpha: All ISA checks to use TB->FLAGS.

2011-05-23 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 --- target-alpha/cpu.h | 32 - target-alpha/translate.c | 378 +

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

2011-05-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/helper.c | 121 + 1 files changed, 111 insertions(+), 10 deletions(-) diff --git a/target-alpha/helper.c b/target-alpha/helper.c index c5479fd..a49f632 100644 --- a/target-alpha/helper.c +++ b/targ

[Qemu-devel] [PATCH 10/26] target-alpha: Enable the alpha-softmmu target.

2011-05-23 Thread Richard Henderson
With all of the pre-existing code that would not compile gone, this is the earliest point at which the target can be enabled. There is no machine defined yet, so this will crash on startup. Enable the target anyway, to make sure that further compilation problems do not creep back in. Signed-off-b

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

2011-05-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- exec-all.h |2 +- exec.c | 12 ++-- target-alpha/cpu.h |6 +- target-alpha/op_helper.c | 26 ++ 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/exec-all.h b/e

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

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

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

2011-05-23 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 --- target-alpha/cpu.h| 13 + target-alpha/helper.c | 129 +++-- 2 files changed, 138 insertions(+), 4 del

[Qemu-devel] [PATCH 25/26] target-alpha: Use a fixed frequency for the RPCC in system mode.

2011-05-23 Thread Richard Henderson
Also include the PCC_OFS in the return value. For user mode we can pretend the PCC_OFS value is always zero. Signed-off-by: Richard Henderson --- target-alpha/op_helper.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/target-alpha/op_helper.c b/target-alpha/

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

2011-05-23 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 --- target-alpha/cpu.h | 56 +++-- target-alpha/trans

[Qemu-devel] [PATCH 12/26] target-alpha: Tidy up arithmetic exceptions.

2011-05-23 Thread Richard Henderson
Introduce and use arith_excp, filling in the trap_arg[01] IPRs. Signed-off-by: Richard Henderson --- target-alpha/op_helper.c | 34 +- 1 files changed, 21 insertions(+), 13 deletions(-) diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c index 73e5

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

2011-05-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- 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 b/target-alpha/cpu.h index d1ef0

[Qemu-devel] [PATCH 13/26] target-alpha: Use do_restore_state for arithmetic exceptions.

2011-05-23 Thread Richard Henderson
This gets the PC right after an arithmetic exception. Also tidies the code in the TLB fault handlers to use common code. Signed-off-by: Richard Henderson --- target-alpha/op_helper.c | 49 - 1 files changed, 30 insertions(+), 19 deletions(-) diff -

[Qemu-devel] [PATCH 20/26] target-alpha: Disable interrupts properly.

2011-05-23 Thread Richard Henderson
Interrupts are disabled in PALmode, and when the PS IL is high enough. Signed-off-by: Richard Henderson --- cpu-exec.c | 33 ++--- target-alpha/cpu.h |5 + target-alpha/exec.h | 12 +++- 3 files changed, 46 insertions(+), 4 deletions(-)

[Qemu-devel] [PATCH 09/26] target-alpha: Rationalize internal processor registers.

2011-05-23 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 --- linux-user/main.c

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

2011-05-23 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 --- target-alpha/cpu.h | 15 +++ target-alpha/machine.c | 13 ++ target-alpha/translate.c | 96

[Qemu-devel] [PATCH 11/26] target-alpha: Tidy exception constants.

2011-05-23 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 access

[Qemu-devel] [PATCH 06/26] target-alpha: Fix system store_conditional

2011-05-23 Thread Richard Henderson
This code contained typos, as it had never been compiled. Signed-off-by: Richard Henderson --- target-alpha/translate.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 73c19d9..851a045 100644 --- a/target-alp

[Qemu-devel] [PATCH 05/26] target-alpha: Fix translation of PALmode memory insns.

2011-05-23 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. Leave some co

[Qemu-devel] [PATCH 15/26] target-alpha: Use kernel mmu_idx for pal_mode.

2011-05-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/cpu.h |8 +++- target-alpha/translate.c |6 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h index 4407b32..a59b39a 100644 --- a/target-alpha/cpu.h +++ b/target-alpha/c

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

2011-05-23 Thread Richard Henderson
Don't bother including executive and supervisor modes. Signed-off-by: Richard Henderson --- target-alpha/cpu.h | 37 - target-alpha/translate.c |7 --- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/target-alpha/cpu.h b/target

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

2011-05-23 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 --- alpha-dis.c |4 dis-asm.h |3 +++ disas.c |2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/alpha-dis

[Qemu-devel] [PATCH 01/26] target-alpha: Claim ownership.

2011-05-23 Thread Richard Henderson
I've been maintaining this port for a while now. Signed-off-by: Richard Henderson --- MAINTAINERS |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e6f853d..35d4496 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -56,8 +56,8 @@ M: Paul Broo

[Qemu-devel] [PULL 00/26] Alpha system emulation, v5

2011-05-23 Thread Richard Henderson
Changes from v4 -> v5 * Claim official ownership of the Alpha port, rather than leave it as "unmaintained". * Drop all the patches in hw/ for now. While they're necessary to actually make the port work, these are the subset of the whole patchset for which I'm confident I'm doing

Re: [Qemu-devel] [PATCH] Add support for fd: protocol

2011-05-23 Thread Blue Swirl
On Mon, May 23, 2011 at 6:56 PM, Kevin Wolf wrote: > Am 23.05.2011 17:24, schrieb Markus Armbruster: >> Kevin Wolf writes: >> >>> Am 20.05.2011 21:53, schrieb Blue Swirl: On Fri, May 20, 2011 at 10:42 PM, Anthony Liguori wrote: > On 05/20/2011 02:25 PM, Blue Swirl wrote: >> >>

Re: [Qemu-devel] [PATCH v4 22/24] scsi: split command_complete callback in two

2011-05-23 Thread Blue Swirl
On Mon, May 23, 2011 at 7:09 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > Cc: Christoph Hellwig > --- >  hw/esp.c         |   60 +--- >  hw/lsi53c895a.c  |   48 +++--- >  hw/scsi-bus.c    |    4 +- >  hw/scsi.h        |    9 + >  h

Re: [Qemu-devel] [PATCH v4 04/24] scsi: introduce SCSIBusOps

2011-05-23 Thread Blue Swirl
On Mon, May 23, 2011 at 7:08 PM, Paolo Bonzini wrote: > There are more operations than a SCSI bus can handle, besides completing > commands.  The current callback in fact is overloaded and can be called > with two different meanings already.  Another example, which this series > will introduce, is

Re: [Qemu-devel] [RFC][PATCH v0 8/8] Add spill count profiling.

2011-05-23 Thread Blue Swirl
On Mon, May 23, 2011 at 5:40 PM, Kirill Batuzov wrote: > Gather generated spills statistics.  It is useful for debugging and evaluating > of new register allocator. > > Signed-off-by: Kirill Batuzov > --- >  tcg/tcg.c |   69 > + >  tcg/

Re: [Qemu-devel] [PATCH] Add support for fd: protocol

2011-05-23 Thread Corey Bryant
On 05/23/2011 11:24 AM, Markus Armbruster wrote: Kevin Wolf writes: Am 20.05.2011 21:53, schrieb Blue Swirl: On Fri, May 20, 2011 at 10:42 PM, Anthony Liguori wrote: On 05/20/2011 02:25 PM, Blue Swirl wrote: On Fri, May 20, 2011 at 9:48 PM, Corey Bryant wrote: sVirt provides SELinux

Re: [Qemu-devel] Can anybody help me figure out what has been done about floating point multiply in QEMU?

2011-05-23 Thread Nathan Froyd
On 05/23/2011 01:36 PM, Guan, Qiang wrote: > I want to figure out what is happening in emulating the floating point > calculation in QEMU. I checked the codes in target-i386/translate.c, but I > cannot find anything about floating point calculation, I can only find the > emulation about integer "mu

[Qemu-devel] Can anybody help me figure out what has been done about floating point multiply in QEMU?

2011-05-23 Thread Guan, Qiang
Hi, Everybody I am a freshman in QEMU. I want to figure out what is happening in emulating the floating point calculation in QEMU. I checked the codes in target-i386/translate.c, but I cannot find anything about floating point calculation, I can only find the emulation about integer "mul" or

Re: [Qemu-devel] [PATCH] usb: cancel async packets on unplug

2011-05-23 Thread Hans de Goede
Hi, Looks good to me, good way to fix this! Acked-by: Hans de Goede Regards, Hans On 05/23/2011 05:40 PM, Gerd Hoffmann wrote: This patch adds USBBusOps struct with (for now) only a single callback which is called when a device is about to be destroyed. The USB Host adapters are implementi

Re: [Qemu-devel] [PATCH 17/18] usb: move cancel callback to USBDeviceInfo

2011-05-23 Thread Hans de Goede
Hi, On 05/23/2011 04:53 PM, Gerd Hoffmann wrote: Hi, Good spotting, this is indeed a issue which needs fixing. It isn't introduced by this patch though, it exists even without the usb patch queue. Something like the attached patch should fix it. The diff looks incomplete (missing changes t

Re: [Qemu-devel] [PATCH 17/18] usb: move cancel callback to USBDeviceInfo

2011-05-23 Thread Hans de Goede
Hi, On 05/23/2011 04:34 PM, Gerd Hoffmann wrote: Hi, The problem is that the USBDevice lifetime may be shorter then the USBPacket lifetime, USBPackets are created by uhci.c (for example), where as the device is managed from the monitor (for example), doing a usb_del in the monitor using the gu

Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000

2011-05-23 Thread Anthony Liguori
On 05/23/2011 11:18 AM, Markus Armbruster wrote: Anthony Liguori writes: If it's left up to the application, doesn't that mean that we can't ever send 64-bit memory/disk faithfully? Because a client would be allowed to represent integers as signed 32-bit numbers. A client is allowed to repr

Re: [Qemu-devel] [PATCH v2 2/2] net: Dump client type 'info network'

2011-05-23 Thread Jan Kiszka
On 2011-05-23 17:11, Markus Armbruster wrote: >> Checked again: net_client is terminated by a NULL entry. If we put >> certain entries on fixed slots, that would created premature list >> termination if some features is missing (e.g. VDE is configured out). So >> we actually need a separate name ar

Re: [Qemu-devel] [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000

2011-05-23 Thread Markus Armbruster
Anthony Liguori writes: > On 05/23/2011 10:19 AM, Richard W.M. Jones wrote: >> On Mon, May 23, 2011 at 10:07:21AM -0500, Anthony Liguori wrote: >>> On 05/23/2011 09:29 AM, Markus Armbruster wrote: Anthony Liguori writes: JavaScript's implementation of JSON sets limits on the rang

[Qemu-devel] [PATCH v4 22/24] scsi: split command_complete callback in two

2011-05-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini Cc: Christoph Hellwig --- hw/esp.c | 60 +--- hw/lsi53c895a.c | 48 +++--- hw/scsi-bus.c|4 +- hw/scsi.h|9 + hw/spapr_vscsi.c | 101 ++--

[Qemu-devel] [PATCH v4 19/24] scsi: make write_data return void

2011-05-23 Thread Paolo Bonzini
The return value is unused anyway. Signed-off-by: Paolo Bonzini Reviewed-by: Christoph Hellwig --- hw/scsi-disk.c|6 ++ hw/scsi-generic.c |7 ++- hw/scsi.h |2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c inde

[Qemu-devel] [PATCH v4 17/24] scsi: Implement 'get_sense' callback

2011-05-23 Thread Paolo Bonzini
From: Hannes Reinecke The get_sense callback copies existing sense information into the provided buffer. This is required if sense information should be transferred together with the command response. Signed-off-by: Hannes Reinecke Signed-off-by: Paolo Bonzini Reviewed-by: Christoph Hellwig -

[Qemu-devel] [PATCH v4 24/24] scsi: ignore LUN field in the CDB

2011-05-23 Thread Paolo Bonzini
The LUN field in the CDB is a historical relic. Ignore it as reserved, which is what modern SCSI specifications actually say. Signed-off-by: Paolo Bonzini Reviewed-by: Christoph Hellwig --- hw/scsi-disk.c|6 +++--- hw/scsi-generic.c |5 ++--- 2 files changed, 5 insertions(+), 6 del

[Qemu-devel] [PATCH v4 16/24] scsi: introduce scsi_req_get_buf

2011-05-23 Thread Paolo Bonzini
... and remove some SCSIDevice variables or fields that now become unused. Signed-off-by: Paolo Bonzini Reviewed-by: Christoph Hellwig --- hw/esp.c |2 +- hw/lsi53c895a.c |2 +- hw/scsi-bus.c|5 + hw/scsi.h|1 + hw/spapr_vscsi.c |8 ++-- hw/usb-m

[Qemu-devel] [PATCH v4 12/24] scsi: Update sense code handling

2011-05-23 Thread Paolo Bonzini
From: Hannes Reinecke The SCSI spec has a quite detailed list of sense codes available. It even mandates the use of specific ones for some failure cases. The current implementation just has one type of generic error which is actually a violation of the spec in certain cases. This patch introduces

[Qemu-devel] [PATCH v4 21/24] esp: rename sense to status

2011-05-23 Thread Paolo Bonzini
This mirrors the LSI patch that was recently committed. Signed-off-by: Paolo Bonzini Cc: Christoph Hellwig --- hw/esp.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/esp.c b/hw/esp.c index 381a8fb..0b80529 100644 --- a/hw/esp.c +++ b/hw/esp.c @@ -61,7 +61,

[Qemu-devel] [PATCH v4 15/24] scsi: introduce scsi_req_continue

2011-05-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini Cc: Christoph Hellwig --- hw/esp.c | 26 ++ hw/lsi53c895a.c | 22 -- hw/scsi-bus.c| 16 +--- hw/scsi.h|1 + hw/spapr_vscsi.c | 26 ++ hw/usb-msd.c |

[Qemu-devel] [PATCH v4 20/24] scsi-generic: Handle queue full

2011-05-23 Thread Paolo Bonzini
The sg driver currently has a hardcoded limit of commands it can handle simultaneously. When this limit is reached the driver will return -EDOM. So we need to capture this to enable proper return values here. Signed-off-by: Hannes Reinecke Signed-off-by: Paolo Bonzini Reviewed-by: Christoph Hell

[Qemu-devel] [PATCH v4 07/24] scsi: Use 'SCSIRequest' directly

2011-05-23 Thread Paolo Bonzini
From: Hannes Reinecke Currently the SCSIRequest structure is abstracted away and cannot accessed directly from the driver. This requires the handler to do a lookup on an abstract 'tag' which identifies the SCSIRequest structure. With this patch the SCSIRequest structure is exposed to the driver.

[Qemu-devel] [PATCH v4 23/24] scsi: rename arguments to the new callbacks

2011-05-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini Cc: Christoph Hellwig --- hw/esp.c | 10 +- hw/lsi53c895a.c | 20 ++-- hw/spapr_vscsi.c | 29 + hw/usb-msd.c | 10 +- 4 files changed, 33 insertions(+), 36 deletions(-) diff --git a/hw/

  1   2   3   >