[Qemu-devel] net-sched/vhost-net: Besides Qdisc on host, is it worth to have a try for tranfic control on vhost-net device?

2012-04-15 Thread Liu ping fan
Hi guys, Nowadays, in order to limit the guest's TX bandwidth, we can apply tc on tap device's ingress Qdisc on host. But I think it is based on dropping packets in the host's Qdisc layer(Right?). If my assumption is right, then on guest, whether the sender process will lower its output or not, wi

Re: [Qemu-devel] Fiber switching and stack protection

2012-04-15 Thread Roy Tam
2012/4/16 Pavel Dovgaluk : > >[snipped] > >  By the way, I also created implementation of coroutine-win32.c, which > uses WinAPI TLS functions directly (without using __thread specifiers). > It works fine too. > Patch is welcome. :D > > Pavel Dovgaluk > >

Re: [Qemu-devel] Fiber switching and stack protection

2012-04-15 Thread Pavel Dovgaluk
> > Paolo, wasn't there a compiler option that works around the problem? > > > I asked to test it (-D_MT) but never got any answer. > >>> > >>> I'd be surprised if defining _MT helped against compiler bugs. > >> > >> Well, -mthreads fixed it, and it should be the same as -D_MT > >> -l

Re: [Qemu-devel] [PATCH 2/3] pseries: Use more conventional PCI interrupt swizzling

2012-04-15 Thread Benjamin Herrenschmidt
On Sun, 2012-04-15 at 15:26 +0300, Michael S. Tsirkin wrote: > > > Plus this scheme is basically just better - it won't force > > all the functions of a multi-function device to share an interrupt. > > Only if some functions use pin != INTA. Maybe it's true for > pseries? On the pc most of them

[Qemu-devel] [PATCH v4] Replace bdrv_* to bdrv_aio_* functions in DMA mode in fdc.c.

2012-04-15 Thread Li Zhi Hui
Replace bdrv_* to bdrv_aio_* functions in DMA mode in fdc.c. Signed-off-by: Li Zhi Hui --- hw/fdc.c | 266 +- 1 files changed, 195 insertions(+), 71 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index a0236b7..f7c36f3 100644 --- a/hw/

[Qemu-devel] [PATCH] add function DMA_set_return and delete bh_schedule in dma.c

2012-04-15 Thread Li Zhi Hui
add function DMA_set_return and delete bh_schedule in dma.c Signed-off-by: Li Zhi Hui --- hw/dma.c | 21 ++--- hw/isa.h |1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/dma.c b/hw/dma.c index 0a9322d..48e153a 100644 --- a/hw/dma.c +++ b/hw/dma.c @@ -

[Qemu-devel] [PATCH] pci: Remove partial overrun checking from pci_host_config_{read, write} common

2012-04-15 Thread David Gibson
Currently the pci_host_config_{read,write}_common() functions clamp the given access size to prevent it from overruning the size of config space. This does not protect against "total" overruns (that is where the start address is outside config space), but given some correct but rather subtle assump

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/5] pseries: cleanups and reset fixes

2012-04-15 Thread David Gibson
On Sun, Apr 15, 2012 at 08:10:09PM +0200, Andreas Färber wrote: > Am 12.04.2012 04:44, schrieb David Gibson: > > This series contains a couple of cleanups of old dead code, and > > several fixes for reset of pseries VIO devices. > > Thanks, applied to ppc-next: > http://repo.or.cz/w/qemu/agraf.git

[Qemu-devel] [PATCH 2/2] pseries: Use the same interrupt swizzling for host bridges as p2p bridges

2012-04-15 Thread David Gibson
Currently the pseries PCI code uses a somewhat strange scheme of PCI irq allocation - one per slot up to a maximum that's greater than the usual 4. This scheme more or less worked, because we were able to tell the guest the irq mapping in the device tree, however it's a bit odd and may break assump

[Qemu-devel] [PATCH 1/2] pseries: Implement automatic PAPR VIO address allocation

2012-04-15 Thread David Gibson
PAPR virtual IO (VIO) devices require a unique, but otherwise arbitrary, "address" used as a token to the hypercalls which manipulate them. Currently the pseries machine code does an ok job of allocating these addresses when the legacy -net nic / -serial and so forth options are used but will fail

Re: [Qemu-devel] [Qemu-ppc] [PATCH 4/4] pseries: Implement automatic PAPR VIO address allocation

2012-04-15 Thread David Gibson
On Sun, Apr 15, 2012 at 07:42:58PM +0200, Andreas Färber wrote: > Am 04.04.2012 07:02, schrieb David Gibson: > > PAPR virtual IO (VIO) devices require a unique, but otherwise arbitrary, > > "address" used as a token to the hypercalls which manipulate them. > > > > Currently the pseries machine cod

[Qemu-devel] [PATCH 0/2] Outstanding pseries patches

2012-04-15 Thread David Gibson
Hi Andreas, This is as much for reference as anything, a consolidation of my two remaining pseries patches which are outstanding after the pull request which just happened. The first indicated you'd prefer another reviewer, although I'm not sure quite who's qualified to give it. The second has h

[Qemu-devel] [FYI] Makefile: Simplify compilation of target-*/cpu.c

2012-04-15 Thread Andreas Färber
All targets except for ppc now have a standalone cpu.c file. Signed-off-by: Andreas Färber --- Makefile.target | 16 +--- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/Makefile.target b/Makefile.target index 6e3c515..f6711ce 100644 --- a/Makefile.target +++ b/Make

[Qemu-devel] [FYI] Finishing CPU QOM'ification

2012-04-15 Thread Andreas Färber
Hello, More of a reminder that there's follow-up work once all targets are converted. A few more patches have been flying around my branches, most notably icount. However, I'm still playing around with some of them to avoid a 1:1 conversion from CPUArchState to an ArchCPU alias; that is, I want t

[Qemu-devel] A error when gdb the newest branch, can you help me? Thank you very much!

2012-04-15 Thread Zhi Hui Li
when I git pull to the newest branch, then gdb ./x86_64-softmmu/qemu-system-x86_64 set args, then run the gdb, but have the error: Warning: Cannot insert breakpoint -1. Error accessing memory address 0x2b6688: Input/output error. I don't know why, can you have me? Thank you very much !

[Qemu-devel] [PATCH v2 1/2] target-mips: QOM'ify CPU

2012-04-15 Thread Andreas Färber
Embed CPUMIPSState as first member of QOM MIPSCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber --- Makefile.target |3 ++ target-mips/cpu-qom.h | 74 +++ target-mips/cpu.c | 60 ++

[Qemu-devel] [PATCH v2 0/2] QOM'ify MIPS CPU

2012-04-15 Thread Andreas Färber
Hello, This series strips down my MIPS QOM'ification patch from the qom-cpu-others RFC series. Subclasses are postponed. I've also left out code movement from cpu_state_reset() into the CPU reset function since the reset code accesses mips_def_t members and that is only declared in translate_init

[Qemu-devel] [PATCH v2 2/2] target-mips: Start QOM'ifying CPU init

2012-04-15 Thread Andreas Färber
Move code not dependent on mips_def_t from cpu_mips_init() into a QOM initfn, as a start. Signed-off-by: Andreas Färber --- target-mips/cpu.c |9 + target-mips/translate.c |1 - 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/target-mips/cpu.c b/target-mips/c

Re: [Qemu-devel] [PATCH 1/3] qtest: add register fuzzing to RTC test

2012-04-15 Thread Andreas Färber
Am 15.04.2012 18:32, schrieb Blue Swirl: > Signed-off-by: Blue Swirl > --- > tests/rtc-test.c | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/tests/rtc-test.c b/tests/rtc-test.c > index 983a980..f23ac3a 100644 > --- a/tests/rtc-test.c > +++ b/tests/rtc-test.c > @@ -

Re: [Qemu-devel] [PATCH] qtest: add register fuzzing to RTC test

2012-04-15 Thread Anthony Liguori
On 04/15/2012 02:40 AM, Blue Swirl wrote: Signed-off-by: Blue Swirl Good idea. Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- tests/rtc-test.c | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/rtc-test.c b/tests/rtc-test.c index 983a980..f23ac3a

Re: [Qemu-devel] SeaVGABIOS and winxp

2012-04-15 Thread Kevin O'Connor
On Mon, Apr 16, 2012 at 02:44:28AM +0400, Michael Tokarev wrote: > On 16.04.2012 02:22, Kevin O'Connor wrote: > > Select VGA_BOCHS in Kconfig for the qemu "standard" vga. The > > "standard vga" option in seabios kconfig is for emulating old IBM 128K > > vga cards (ie, not super vga) - I suppose th

Re: [Qemu-devel] SeaVGABIOS and winxp

2012-04-15 Thread Michael Tokarev
On 16.04.2012 02:22, Kevin O'Connor wrote: > Select VGA_BOCHS in Kconfig for the qemu "standard" vga. The > "standard vga" option in seabios kconfig is for emulating old IBM 128K > vga cards (ie, not super vga) - I suppose this is a bit misleading. Oh. Indeed, VGA_BOCHS works, and it is _very_ s

Re: [Qemu-devel] SeaVGABIOS and winxp

2012-04-15 Thread Kevin O'Connor
On Mon, Apr 16, 2012 at 01:58:47AM +0400, Michael Tokarev wrote: > On 16.04.2012 01:07, Kevin O'Connor wrote: > > On Mon, Apr 16, 2012 at 12:17:09AM +0400, Michael Tokarev wrote: > >> On 15.04.2012 06:48, Kevin O'Connor wrote: > >>> * Many enhancements to VGA BIOS code - it should now be feature co

Re: [Qemu-devel] SeaVGABIOS and winxp

2012-04-15 Thread Michael Tokarev
On 16.04.2012 01:58, Michael Tokarev wrote: > On 16.04.2012 01:07, Kevin O'Connor wrote: >> On Mon, Apr 16, 2012 at 12:17:09AM +0400, Michael Tokarev wrote: >>> On 15.04.2012 06:48, Kevin O'Connor wrote: * Many enhancements to VGA BIOS code - it should now be feature complete with LGPL v

Re: [Qemu-devel] SeaVGABIOS and winxp

2012-04-15 Thread Michael Tokarev
On 16.04.2012 01:07, Kevin O'Connor wrote: > On Mon, Apr 16, 2012 at 12:17:09AM +0400, Michael Tokarev wrote: >> On 15.04.2012 06:48, Kevin O'Connor wrote: >>> * Many enhancements to VGA BIOS code - it should now be feature complete >>> with LGPL vgabios. >> >> This is something which prompted me

[Qemu-devel] [PATCH 2/2] target-xtensa: add tests for LOOPNEZ and LOOPGTZ

2012-04-15 Thread Max Filippov
Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_loop.S | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/tests/tcg/xtensa/test_loop.S b/tests/tcg/xtensa/test_loop.S index 5cead47..1c240e8 100644 --- a/tests/tcg/xtensa/test_loop.S ++

[Qemu-devel] [PATCH 1/2] target-xtensa: fix LOOPNEZ/LOOPGTZ translation

2012-04-15 Thread Max Filippov
Translation of LOOP instructions used to call LEND SR write handler to update LEND and invalidate relevant TBs. Now that LEND SR write handler ends TB, LOOPNEZ and LOOPGTZ generate wrong code (same as for simple LOOP). Fix it by calling wsr_lend helper directly. Signed-off-by: Max Filippov --- t

[Qemu-devel] [PATCH 0/2] target-xtensa: fix LOOPNEZ/LOOPGTZ broken by 3d0be8a5c135dadcfbd68ed354007a8cece98849

2012-04-15 Thread Max Filippov
Fix accidently broken translation of two looping instructions by decoupling it from SR write handler. Add unit tests. Max Filippov (2): target-xtensa: fix LOOPNEZ/LOOPGTZ translation target-xtensa: add tests for LOOPNEZ and LOOPGTZ target-xtensa/translate.c|2 +- tests/tcg/xtensa/tes

Re: [Qemu-devel] SeaVGABIOS and winxp

2012-04-15 Thread Kevin O'Connor
On Mon, Apr 16, 2012 at 12:17:09AM +0400, Michael Tokarev wrote: > On 15.04.2012 06:48, Kevin O'Connor wrote: > > * Many enhancements to VGA BIOS code - it should now be feature complete > > with LGPL vgabios. > > This is something which prompted me to test the new release, > but it gives... inte

Re: [Qemu-devel] [PATCH v2 00/17] w64: Add support for new host

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 19:55, Stefan Weil wrote: > This is an updated version. > > v2 removed two patches which only fixed compiler warnings and which will be > handled separately. I added Acked-by / Reviewed-by to the first two patches. > Patch 09 was fixed and also renames physaddr as suggested

[Qemu-devel] [PATCH 18/20] pseries: Correctly use the device model reset hooks

2012-04-15 Thread Andreas Färber
From: David Gibson Recently we added code to properly clean away VIO CRQs on reset However, this directly uses qemu_register, rather than the existing device model reset callbacks. This patch cleans this up by adding proper use of the reset hook to the VIO bus model. The existing CRQ reset cod

[Qemu-devel] [PATCH 02/17] tcg/i386: Add support for w64 ABI

2012-04-15 Thread Stefan Weil
w64 uses the registers rcx, rdx, r8 and r9 for function arguments, so it needs a different declaration of tcg_target_call_iarg_regs. rax, rcx, rdx, r8, r9, r10 and r11 may be changed by function calls. rbx, rbp, rdi, rsi, r12, r13, r14 and r15 remain unchanged by function calls. Reviewed-by: Ric

[Qemu-devel] [PATCH 16/17] nbd: Fix compiler warning (w64)

2012-04-15 Thread Stefan Weil
Portable printing of dev_offset (data type off_t) needs a type cast. Signed-off-by: Stefan Weil --- nbd.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/nbd.c b/nbd.c index 567e94e..406e555 100644 --- a/nbd.c +++ b/nbd.c @@ -813,7 +813,7 @@ static void nbd_trip(void *o

[Qemu-devel] [PATCH 06/17] w32: Move defines for socket specific errors to qemu-os-win32.h

2012-04-15 Thread Stefan Weil
As those defines are only used for w32, they should be in the header file for w32. All files which include slirp.h or qemu_socket.h also include qemu-os-win32.h. Signed-off-by: Stefan Weil --- qemu-os-win32.h | 26 ++ qemu_socket.h |6 -- slirp/slirp.h |

[Qemu-devel] [PATCH 07/17] w64: Fix definition of setjmp

2012-04-15 Thread Stefan Weil
The default definition of setjmp which is implemented in MinGW-w64 cannot be used with programs like QEMU which call longjmp from code without structured exception handling (SEH). This code therefore disables stack unwinding. We could also implement SEH for QEMU's generated JIT code, but that is

[Qemu-devel] [PATCH 03/17] w64: Fix type casts used in some macros in cpu-all.h

2012-04-15 Thread Stefan Weil
Instead of type casts to long, w64 needs type casts to intptr_t. For other hosts, this changes nothing. Signed-off-by: Stefan Weil --- cpu-all.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index 4512518..58420be 100644 --- a/cpu-all.h +++ b/c

[Qemu-devel] [PATCH 05/17] w64: Use larger alignment for section with generated code

2012-04-15 Thread Stefan Weil
The MinGW-w64 compiler allows __attribute__((aligned (32)). Signed-off-by: Stefan Weil --- exec.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 3dda2ca..6d10595 100644 --- a/exec.c +++ b/exec.c @@ -93,8 +93,7 @@ spinlock_t tb_lock = SPIN_LOCK_UN

[Qemu-devel] [PATCH 12/20] target-ppc: Fix type casts for w64 (uintptr_t)

2012-04-15 Thread Andreas Färber
From: Stefan Weil This changes nothing for other hosts. Signed-off-by: Stefan Weil Signed-off-by: Andreas Färber --- target-ppc/translate_init.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 025122

[Qemu-devel] [PATCH 05/20] pseries: Remove unused fields from VIOsPAPRBus structure

2012-04-15 Thread Andreas Färber
From: David Gibson The VIOsPAPRBus structure, used on the pseries machine contains some old fields which are no longer used anywhere. This patch removes them. Signed-off-by: David Gibson Signed-off-by: Andreas Färber --- hw/spapr_vio.h |2 -- 1 files changed, 0 insertions(+), 2 deletions

[Qemu-devel] [PATCH 15/17] disas: Replace 'unsigned long' by 'uintptr_t'

2012-04-15 Thread Stefan Weil
This is needed for w64. It changes nothing for other hosts. Signed-off-by: Stefan Weil --- disas.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/disas.c b/disas.c index 4f2c4e4..27071c3 100644 --- a/disas.c +++ b/disas.c @@ -268,7 +268,7 @@ void target_disas(FIL

[Qemu-devel] [PATCH 01/17] tcg/i386: Use GDB JIT debugging interface only for hosts with ELF

2012-04-15 Thread Stefan Weil
Not all i386 / x86_64 hosts use ELF. Ask the compiler whether ELF is used. On w64, gdb crashes when ELF_HOST_MACHINE is defined. Cc: Blue Swirl Acked-by: Richard Henderson Signed-off-by: Stefan Weil --- tcg/i386/tcg-target.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) dif

Re: [Qemu-devel] [ANNOUNCE] SeaBIOS 1.7.0

2012-04-15 Thread Michael Tokarev
On 15.04.2012 06:48, Kevin O'Connor wrote: > The 1.7.0 version of SeaBIOS has now been released. For more > information on the release, please see: > > http://seabios.org/Releases > > > New in this release: > > * Many enhancements to VGA BIOS code - it should now be feature complete with > LG

[Qemu-devel] [PATCH 16/20] pseries: Remove old debug leftovers from spapr_vscsi

2012-04-15 Thread Andreas Färber
From: David Gibson The PAPR VSCSI emulation contains a few lines of code which were once used for debug but now do nothing at all. This patch removes them. Signed-off-by: David Gibson Signed-off-by: Andreas Färber --- hw/spapr_vscsi.c |6 -- 1 files changed, 0 insertions(+), 6 deleti

[Qemu-devel] [PATCH 09/17] softmmu: Use uintptr_t for physaddr and rename it

2012-04-15 Thread Stefan Weil
Variable physaddr is a host address which should be represented by data type 'uintptr_t'. This is needed for w64 and changes nothing for other hosts. v2: Rename physaddr -> hostaddr (suggested by Blue Swirl). Signed-off-by: Stefan Weil --- softmmu_header.h | 15 ++- 1 files chang

[Qemu-devel] [PATCH 17/17] w64: Fix time conversion for some versions of MinGW-w64

2012-04-15 Thread Stefan Weil
tb.time is a time value, but not necessarily of the same size as time_t: while time_t is 64 bit for w64, tb.time still is 32 bit only. Therefore we need en explicit conversion. Signed-off-by: Stefan Weil --- savevm.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/sav

[Qemu-devel] [PATCH 14/17] cpu-exec: Remove non-portable type cast and fix format string

2012-04-15 Thread Stefan Weil
This change is needed for w64, but also changes the code for other hosts. Signed-off-by: Stefan Weil --- cpu-exec.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index d153f97..0344cd5 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -541,8 +541,8

[Qemu-devel] [PATCH 04/20] pseries: Implement RTAS system-reboot call

2012-04-15 Thread Andreas Färber
From: David Gibson This patch adds the PAPR defined RTAS system-reboot call to the pseries machine emulation, providing the guest with a way to trigger a reboot. Signed-off-by: David Gibson Signed-off-by: Andreas Färber --- hw/spapr_rtas.c | 14 ++ 1 files changed, 14 insertions

[Qemu-devel] [PATCH 08/17] w64: Fix struct CPUTLBEntry

2012-04-15 Thread Stefan Weil
For w64, some entries need 'uintptr_t' instead of 'unsigned long'. For other host systems, both data types are identical, so nothing changes. Signed-off-by: Stefan Weil --- cpu-defs.h | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index

Re: [Qemu-devel] [ANNOUNCE] SeaBIOS 1.7.0

2012-04-15 Thread Michael Tokarev
On 15.04.2012 06:48, Kevin O'Connor wrote: > The 1.7.0 version of SeaBIOS has now been released. For more > information on the release, please see: > > http://seabios.org/Releases Um. I can't compile it here, due to an error in ./tools/buildversion.sh. $ sh -x ./tools/buildversion.sh out/vgave

[Qemu-devel] [PATCH 10/17] w64: Use uintptr_t in exec.c

2012-04-15 Thread Stefan Weil
Replace all type casts to 'long' or 'unsigned long' by 'intptr_t' or 'uintptr_t'. For type casts which are only used to extract the lower bits of an address or to modify those bits, signedness does not matter. There I always use 'uintptr_t'. Signed-off-by: Stefan Weil --- exec.c | 77 ++

[Qemu-devel] [PATCH 11/17] w64: Fix data types in softmmu*.h

2012-04-15 Thread Stefan Weil
w64 requires uintptr_t. Signed-off-by: Stefan Weil --- softmmu_header.h |6 +++--- softmmu_template.h | 22 -- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/softmmu_header.h b/softmmu_header.h index 289dae2..cf1aa38 100644 --- a/softmmu_header.h +++

[Qemu-devel] [PATCH 12/17] w64: Fix type cast in os_host_main_loop_wait

2012-04-15 Thread Stefan Weil
Casting a pointer to an integer must use (DWORD_PTR) instead of (DWORD). This also matches the definition of 'fd' (gint for w32, gint64 for w64). Signed-off-by: Stefan Weil --- main-loop.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/main-loop.c b/main-loop.c index 1

[Qemu-devel] [PATCH 13/17] target-mips: Fix type cast for w64 (uintptr_t)

2012-04-15 Thread Stefan Weil
This changes nothing for other hosts. Signed-off-by: Stefan Weil --- target-mips/op_helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index bca1d70..5627447 100644 --- a/target-mips/op_helper.c +++ b/target-mips/o

[Qemu-devel] [PATCH 04/17] w64: Fix data types in cpu-all.h, exec.c

2012-04-15 Thread Stefan Weil
w64 needs uintptr_t instead of unsigned long. For other hosts, nothing changes. Signed-off-by: Stefan Weil --- cpu-all.h |8 exec.c|6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index 58420be..f7d6867 100644 --- a/cpu-all.h ++

Re: [Qemu-devel] [PULL] QOM CPUState for alpha

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 19:38, Andreas Färber wrote: > Hello Blue, > > Please pull the alpha QOM CPU conversion. Thanks, pulled. > Cc: Blue Swirl > > Cc: Richard Henderson > > The following changes since commit 4d0365165dd831b9f5d305a1480447dd83810a55: > >  Merge branch 'ppc-for-upstream' of g

[Qemu-devel] [PATCH v2 00/17] w64: Add support for new host

2012-04-15 Thread Stefan Weil
This is an updated version. v2 removed two patches which only fixed compiler warnings and which will be handled separately. I added Acked-by / Reviewed-by to the first two patches. Patch 09 was fixed and also renames physaddr as suggested by Blue Swirl. These updated patches can also be pulled fr

[Qemu-devel] [PATCH 08/20] target-ppc: Add hooks for handling tcg and kvm limitations

2012-04-15 Thread Andreas Färber
From: David Gibson On target-ppc, our table of CPU types and features encodes the features as found on the hardware, regardless of whether these features are actually usable under TCG or KVM. We already have cases where the information from the cpu table must be fixed up to account for limitatio

[Qemu-devel] [PATCH 19/20] pseries: Reset vscsi properly

2012-04-15 Thread Andreas Färber
From: David Gibson Currently the PAPR vscsi implementation does not properly clear its table of request tags when the system is reset. This patch adds a reset hook to do so. Signed-off-by: David Gibson Signed-off-by: Andreas Färber --- hw/spapr_vscsi.c |9 +++-- 1 files changed, 7 in

[Qemu-devel] [PATCH 09/20] target-ppc: QOM'ify CPU

2012-04-15 Thread Andreas Färber
Embed CPUPPCState as first member of PowerPCCPU. Distinguish between "powerpc-cpu", "powerpc64-cpu" and "embedded-powerpc-cpu". Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber Acked-by: David Gibson --- target-ppc/cpu-qom.h| 77

[Qemu-devel] [PATCH 02/20] pseries: Clean up hcall_dprintf() debugging messages

2012-04-15 Thread Andreas Färber
From: David Gibson The pseries machine code has a number of debug messages for debugging PAPR hypercalls, dependent on DEBUG_SPAPR_HCALLS. This patch cleans these messages up a bit, by adding __func__ to the hcall_dprintf() macro and simplifying up a number of the individual messages accordingly

[Qemu-devel] [PATCH v3 2/2] target-alpha: QOM'ify CPU init

2012-04-15 Thread Andreas Färber
Move code from cpu_alpha_init() into a CPU initializer. Signed-off-by: Andreas Färber Acked-by: Richard Henderson --- target-alpha/cpu.c | 20 target-alpha/translate.c | 12 +--- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/target-alpha

[Qemu-devel] [PATCH v3 1/2] target-alpha: QOM'ify CPU

2012-04-15 Thread Andreas Färber
Embed CPUAlphaState as first member of AlphaCPU. Signed-off-by: Andreas Färber Acked-by: Richard Henderson --- Makefile.target |1 + target-alpha/cpu-qom.h | 71 ++ target-alpha/cpu.c | 38 target-alph

[Qemu-devel] [PULL] QOM CPUState for alpha

2012-04-15 Thread Andreas Färber
Hello Blue, Please pull the alpha QOM CPU conversion. Cc: Blue Swirl Cc: Richard Henderson The following changes since commit 4d0365165dd831b9f5d305a1480447dd83810a55: Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf (2012-04-15 18:39:55 +) are available in the git repo

[Qemu-devel] [PATCH 06/20] pseries: Consolidate hack for RTAS display-character usage

2012-04-15 Thread Andreas Färber
From: David Gibson Currently the pseries machine contains not one but two somewhat ugly hacks to allow printing of early debug messages before the guest has properly read the device tree. First, we special case H_PUT_TERM_CHAR so that a vtermno of 0 (usually invalid) will look for a suitable vty

[Qemu-devel] [PATCH 17/20] pseries: Remove old hcalls hook stub

2012-04-15 Thread Andreas Färber
From: David Gibson Some time ago we removed all use of the 'hcalls' callback in the pseries VIO code, which was used to workaround an ordering problem which has since been solved properly. However, the function pointer for the hook remains. This patch cleans it away. Signed-off-by: David Gibson

[Qemu-devel] [PATCH 10/20] target-ppc: Start QOM'ifying CPU init

2012-04-15 Thread Andreas Färber
Move code not dependent on ppc_def_t from cpu_ppc_init() into an initfn. Signed-off-by: Andreas Färber Acked-by: David Gibson --- target-ppc/helper.c |3 ++- target-ppc/translate_init.c |9 + 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/target-ppc/help

[Qemu-devel] [PATCH 07/20] target-ppc: Drop cpu_ppc_close()

2012-04-15 Thread Andreas Färber
It is unused, so avoid QOM'ifying it unneededly. Signed-off-by: Andreas Färber Acked-by: David Gibson --- target-ppc/cpu.h|1 - target-ppc/helper.c |6 -- 2 files changed, 0 insertions(+), 7 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index e7fb364..1d5c602 10

[Qemu-devel] [PATCH 11/20] target-ppc: QOM'ify CPU reset

2012-04-15 Thread Andreas Färber
Move code from cpu_state_reset() into ppc_cpu_reset(). Reorder #include of helper_regs.h to use it in translate_init.c. Adjust whitespace and add braces. Signed-off-by: Andreas Färber Acked-by: David Gibson --- target-ppc/helper.c | 45 +- targ

[Qemu-devel] [PATCH 03/20] pseries: Fix bug with reset of VIO CRQs

2012-04-15 Thread Andreas Färber
From: David Gibson PAPR specifies a Command Response Queue (CRQ) mechanism used for virtual IO, which we implement. However, we don't correctly clean up registered CRQs when we reset the system. This patch adds a reset handler to fix this bug. While we're at it, add in some of the extra debug

[Qemu-devel] [PATCH 15/20] pseries: Fix RTAS based config access

2012-04-15 Thread Andreas Färber
From: David Gibson On the pseries platform, access to PCI config space is via RTAS calls( which go to the hypervisor) rather than MMIO. This means we don't use the same code path as nearly everyone else which goes through pci_host.c and we're missing some of the parameter checking along the way.

[Qemu-devel] [PATCH 13/20] target-ppc: Init dcache and icache size for e500 user mode

2012-04-15 Thread Andreas Färber
From: Meador Inge commit f7aa558396dd0f6b7a2b22c05cb503c655854102 pulled the dcache and icache line size initialization inside of a '#if !defined(CONFIG_USER_ONLY)' block. This is not correct because instructions like 'dcbz' need the dcache size initialized even for user mode. Signed-off-by: Mea

Re: [Qemu-devel] [PATCH v2 0/2] QOM'ify Alpha CPU

2012-04-15 Thread Andreas Färber
Am 15.04.2012 21:08, schrieb Blue Swirl: > On Tue, Apr 10, 2012 at 22:40, Andreas Färber wrote: >> Hello Richard, >> >> This series strips down my Alpha QOM'ification patch from the >> qom-cpu-others.v1 >> RFC series. Subclasses are postponed for now. >> >> Can you please retest and either provid

[Qemu-devel] [PATCH 14/20] target-ppc/machine.c: Drop unnecessary ifdefs

2012-04-15 Thread Andreas Färber
From: Juan Quintela machine.c is only compiled for softmmu targets, so checks for !defined(CONFIG_USER_ONLY) are unnecessary and can be dropped. Signed-off-by: Juan Quintela [AF: Use more verbose commit message suggested by PMM] Reviewed-by: Peter Maydell Signed-off-by: Andreas Färber --- ta

[Qemu-devel] [Bug 982321] Re: User mode arm qemu segfault

2012-04-15 Thread Andreas Färber
** Changed in: qemu Status: In Progress => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/982321 Title: User mode arm qemu segfault Status in QEMU: Fix Committed Bug descrip

Re: [Qemu-devel] [PATCH 02/20] tcg/i386: Add support for w64 ABI

2012-04-15 Thread Richard Henderson
On 04/15/2012 10:13 AM, Stefan Weil wrote: > w64 uses the registers rcx, rdx, r8 and r9 for function arguments, > so it needs a different declaration of tcg_target_call_iarg_regs. > > rax, rcx, rdx, r8, r9, r10 and r11 may be changed by function calls. > > rbx, rbp, rdi, rsi, r12, r13, r14 and r1

Re: [Qemu-devel] [PATCH v2 0/2] QOM'ify Alpha CPU

2012-04-15 Thread Blue Swirl
On Tue, Apr 10, 2012 at 22:40, Andreas Färber wrote: > Hello Richard, > > This series strips down my Alpha QOM'ification patch from the > qom-cpu-others.v1 > RFC series. Subclasses are postponed for now. > > Can you please retest and either provide Acked-bys again or send an instant > PULL? > >

Re: [Qemu-devel] [PULL] ppc patch queue 2012-04-15

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 18:38, Andreas Färber wrote: > Hello Blue, > > This is the current patch queue for ppc. > Please pull, preferably after applying the linux-user bugfix. Thanks, pulled. > > I hereby hand back ppc-next to Alex. :-) > > The following changes since commit da12872a0973718997c0

Re: [Qemu-devel] DOS VM problem with QEMU-KVM and newer kernels

2012-04-15 Thread Gerhard Wiesinger
On 15.04.2012 11:44, Avi Kivity wrote: On 04/12/2012 09:32 PM, Gerhard Wiesinger wrote: Hello, I'm having problems with recents kernels and qemu-kvm with a DOS VM: TD286 System: Bad selector: 0007 System: Bad selector: 0D87 System: Bad selector: 001F System: Bad selector: 0007 GP at 0020 21D4 E

Re: [Qemu-devel] [PULL] ppc patch queue 2012-04-15

2012-04-15 Thread Andreas Färber
Am 15.04.2012 20:38, schrieb Andreas Färber: > This is the current patch queue for ppc. > Please pull, preferably after applying the linux-user bugfix. Apparently I forgot --nogit-fallback. Sorry for the inconvenience. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany

Re: [Qemu-devel] [PATCH 1/3] cputlb: move TLB handling to a separate file

2012-04-15 Thread Richard Henderson
On 04/14/2012 11:23 AM, Blue Swirl wrote: > Move TLB handling and softmmu code load helpers to cputlb.c, > compile only for softmmu targets. > > Remove unused cpu_tlb_update_dirty(). > > Signed-off-by: Blue Swirl > --- > Makefile.target |2 +- > cpu-all.h |2 - > cputlb.c|

[Qemu-devel] [PATCH 20/20] pseries: Fix reset of VIO network device

2012-04-15 Thread Andreas Färber
From: David Gibson Currently, the PAPR VIO network device does not have a reset handler. This means that after a hard reset, H_REGISTER_LOGICAL_LAN will return an error when the new guest boot attempts to initialize the device. This patch corrects this, adding a suitable reset hook. Signed-off

[Qemu-devel] [PATCH 01/20] PPC: Fix TLB invalidation bug within the PPC interrupt handler.

2012-04-15 Thread Andreas Färber
From: Mark Cave-Ayland Commit 41557447d30eeb944e42069513df13585f5e6c7f also introduced a subtle TLB flush bug. By applying a mask to the interrupt MSR which cleared the IR/DR bits at the start of the interrupt handler, the logic towards the end of the handler to force a TLB flush if either one of

[Qemu-devel] [PULL] ppc patch queue 2012-04-15

2012-04-15 Thread Andreas Färber
Hello Blue, This is the current patch queue for ppc. Please pull, preferably after applying the linux-user bugfix. I hereby hand back ppc-next to Alex. :-) The following changes since commit da12872a0973718997c00f1c1e8e5b91ee4c713a: pcspk: initialize PC speaker if compiled in (2012-04-15 08:5

Re: [Qemu-devel] [PATCH v2 1/3] target-xtensa: add dc233c core

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 15:16, Andreas Färber wrote: > Am 15.04.2012 17:12, schrieb Max Filippov: >> This is Diamond 233L Standard Core Rev.C (LE), implemented through >> linux/gdb overlay. >> >> Signed-off-by: Max Filippov >> --- >>  Makefile.target                        |    1 + >>  target-xte

Re: [Qemu-devel] [PATCH semi-urgent v2] linux-user: Fix exit syscall with QOM CPU

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 16:51, Andreas Färber wrote: > For QOM'ified CPUs we cannot g_free() CPUArchState, we must > object_delete() the object it is embedded into. > > Fixes LP#982321 (invalid free() while executing pacman with qemu-arm). > > Reported-by: Serge Schneider > Reported-by: Russell K

Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp

2012-04-15 Thread Stefan Weil
Am 15.04.2012 20:02, schrieb Blue Swirl: On Sun, Apr 15, 2012 at 17:47, Stefan Weil wrote: Am 15.04.2012 19:18, schrieb Blue Swirl: On Sun, Apr 15, 2012 at 17:09, Stefan Weil wrote: Am 15.04.2012 19:02, schrieb Blue Swirl: On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: The default

Re: [Qemu-devel] [PATCH v2 0/2] QOM'ify Alpha CPU

2012-04-15 Thread Richard Henderson
On 04/10/2012 06:40 PM, Andreas Färber wrote: > Hello Richard, > > This series strips down my Alpha QOM'ification patch from the > qom-cpu-others.v1 > RFC series. Subclasses are postponed for now. > > Can you please retest and either provide Acked-bys again or send an instant > PULL? > > Avail

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/5] pseries: cleanups and reset fixes

2012-04-15 Thread Andreas Färber
Am 12.04.2012 04:44, schrieb David Gibson: > This series contains a couple of cleanups of old dead code, and > several fixes for reset of pseries VIO devices. Thanks, applied to ppc-next: http://repo.or.cz/w/qemu/agraf.git/shortlog/refs/heads/ppc-next Patch 3 didn't apply; I patch'ed it manually

Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 17:47, Stefan Weil wrote: > Am 15.04.2012 19:18, schrieb Blue Swirl: > >> On Sun, Apr 15, 2012 at 17:09, Stefan Weil wrote: >>> >>> Am 15.04.2012 19:02, schrieb Blue Swirl: >>> On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: > > > The default definition

Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp

2012-04-15 Thread Stefan Weil
Am 15.04.2012 19:18, schrieb Blue Swirl: On Sun, Apr 15, 2012 at 17:09, Stefan Weil wrote: Am 15.04.2012 19:02, schrieb Blue Swirl: On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: The default definition of setjmp which is implemented in MinGW-w64 cannot be used with programs like QEMU wh

Re: [Qemu-devel] [Qemu-ppc] [PATCH 4/4] pseries: Implement automatic PAPR VIO address allocation

2012-04-15 Thread Andreas Färber
Am 04.04.2012 07:02, schrieb David Gibson: > PAPR virtual IO (VIO) devices require a unique, but otherwise arbitrary, > "address" used as a token to the hypercalls which manipulate them. > > Currently the pseries machine code does an ok job of allocating these > addresses when the legacy -net nic

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/3] pseries: Fix RTAS based config access

2012-04-15 Thread Andreas Färber
Am 15.04.2012 12:16, schrieb Michael S. Tsirkin: > On Mon, Apr 02, 2012 at 02:17:35PM +1000, David Gibson wrote: >> On the pseries platform, access to PCI config space is via RTAS calls( >> which go to the hypervisor) rather than MMIO. This means we don't use >> the same code path as nearly everyo

Re: [Qemu-devel] [PATCH 20/20] block: Avoid compiler warning for w64

2012-04-15 Thread Stefan Weil
Am 15.04.2012 19:13, schrieb Blue Swirl: On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: The MinGW-w64 compiler complains about a non-void function which does not return a value. This is not true, but we can help the compiler to see that by rewriting the code. Signed-off-by: Stefan Weil ---

Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 17:09, Stefan Weil wrote: > Am 15.04.2012 19:02, schrieb Blue Swirl: > >> On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: >>> >>> The default definition of setjmp which is implemented in MinGW-w64 >>> cannot be used with programs like QEMU which call longjmp from >>> cod

Re: [Qemu-devel] [PATCH 08/20] w64: Undefine macro SYS_OPEN (fixes a compiler warning)

2012-04-15 Thread Stefan Weil
Am 15.04.2012 19:00, schrieb Blue Swirl: On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: This could also be done in arm-semi.c, but doing it here keeps more w64 related code in one place. This is just papering over the bug, it could show up with a different OS. The right fix is to change arm

Re: [Qemu-devel] [PATCH 20/20] block: Avoid compiler warning for w64

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: > The MinGW-w64 compiler complains about a non-void function > which does not return a value. > > This is not true, but we can help the compiler to > see that by rewriting the code. > > Signed-off-by: Stefan Weil > --- >  block/raw-win32.c |    6

Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp

2012-04-15 Thread Stefan Weil
Am 15.04.2012 19:02, schrieb Blue Swirl: On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: The default definition of setjmp which is implemented in MinGW-w64 cannot be used with programs like QEMU which call longjmp from code without structured exception handling (SEH). We're currently compil

Re: [Qemu-devel] [PATCH 10/20] softmmu: Use uintptr_t for physaddr

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: > Variable physaddr is a host address which should be represented by > data type 'uintptr_t'. As you note, the name is wrong and should be fixed, for example 'hostaddr' or 'raw_ptr' would be better. If you need to revisit the series, please consid

Re: [Qemu-devel] [PATCH 07/20] w64: Fix definition of setjmp

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: > The default definition of setjmp which is implemented in MinGW-w64 > cannot be used with programs like QEMU which call longjmp from > code without structured exception handling (SEH). We're currently compiling QEMU with -no-seh, is that correct

Re: [Qemu-devel] [PATCH 08/20] w64: Undefine macro SYS_OPEN (fixes a compiler warning)

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 14:13, Stefan Weil wrote: > This could also be done in arm-semi.c, but doing it here keeps more > w64 related code in one place. This is just papering over the bug, it could show up with a different OS. The right fix is to change arm-semi.c to prefix the #defines with TARG

  1   2   >