Commit Graph

24071 Commits

Author SHA1 Message Date
Hans de Goede 2b3de6ada5 ehci: writeback_async_complete_packet: verify qh and qtd
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-07 12:57:23 +01:00
Hans de Goede 190d849249 ehci: Move get / put_dwords upwards
No other changes.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-07 12:57:23 +01:00
Hans de Goede d066c57b1c ehci: Verify guest does not change the token of inflight qtd-s
This is not allowed, except for clearing active on cancellation, so don't
warn when the new token does not have its active bit set.

This unifies the cancellation path for modified qtd-s, and prepares
ehci_verify_qtd to be used ad an extra check inside
ehci_writeback_async_complete_packet().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-07 12:57:23 +01:00
Hans de Goede c643263409 ehci: Add ehci_verify_qh and ehci_verify_qtd helper functions
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-07 12:57:23 +01:00
Hans de Goede f881c8d36b ehci: Add a ehci_writeback_async_complete_packet helper function
Also drop the warning printf, which was there mainly because this was an
untested code path (as the previous bug fixes to it show), but that no
longer is the case now :)

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-07 12:57:23 +01:00
Amos Kong 83f58e570f rtl8139: preserve link state across device reset
A device reset does not affect the link state, only set_link does.

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-07 10:43:21 +01:00
Amos Kong 84dd212024 e1000: no need auto-negotiation if link was down
Commit b9d03e352c added link
auto-negotiation emulation, it would always set link up by
callback function. Problem exists if original link status
was down, link status should not be changed in auto-negotiation.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-07 10:43:21 +01:00
Amos Kong f30dbae63a net: clean up network at qemu process termination
We don't clean up network if fails to parse "-device" parameters without
calling net_cleanup(). I touch a problem, the tap device which is
created by qemu-ifup script could not be removed by qemu-ifdown script.
Some similar problems also exist in vl.c

In this patch, if network initialization successes, a cleanup function
will be registered to be called at qemu process termination.

Signed-off-by: Amos Kong <akong@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-07 10:43:21 +01:00
Michael Contreras 2c0331f4f7 e1000: Discard oversized packets based on SBP|LPE
Discard packets longer than 16384 when !SBP to match the hardware behavior.

Signed-off-by: Michael Contreras <michael@inetric.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-07 10:43:21 +01:00
Blue Swirl 8e4a424b30 Revert "virtio-pci: replace byte swap hack"
This reverts commit 9807caccd6.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-06 18:30:17 +00:00
Blue Swirl 9807caccd6 virtio-pci: replace byte swap hack
Remove byte swaps by declaring the config space
as native endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-06 08:24:26 +00:00
Blue Swirl 1d728c3946 tests: add gcov support
Add support for compiling for GCOV test coverage, enabled
with '--enable-gcov' during configure.

Test coverage will be reported after each test.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-06 08:15:08 +00:00
Richard Henderson 2b35e93fbf target-s390: Claim maintainership
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:46 -08:00
Richard Henderson 26cc0a3fd1 target-s390: Use noreturn for exception and load_psw
Both always exit the cpu loop.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:46 -08:00
Richard Henderson 893e1660d5 target-s390: Use TCG_CALL_NO_WG for misc helpers
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:46 -08:00
Richard Henderson c20fec4055 target-s390: Use TCG_CALL_NO_WG for integer helpers
The division routines do not read or write tcg registers,
but can raise fixed-point divide exceptions.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:46 -08:00
Richard Henderson c482ea94ea target-s390: Use TCG_CALL_NO_WG for floating-point helpers
None of them read or write tcg registers, but most can
raise fp exceptions.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:46 -08:00
Richard Henderson d918a65c69 target-s390: Use TCG_CALL_NO_WG for memory helpers
Those that do not read or write tcg registers, but can
raise exceptions via memory faults.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:46 -08:00
Richard Henderson b7886de3f3 target-s390: Perform COMPARE AND SWAP inline
Still no proper solution for CONFIG_USER_ONLY, but the system
version is significantly better.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:46 -08:00
Richard Henderson bacf43c62e target-s390: Optimize get_address
Don't load the displacement into a register first, add it second
so that tcg_gen_addi_i64 can eliminate zeros.  Don't mask the
displacement first so that we don't turn small negative numbers
into large positive numbers.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:46 -08:00
Richard Henderson c95ec459c6 target-s390: Optimize ADDC/SUBB
Giving the proper mask to disas_jcc allows us to generate an inline
comparison generating the carry/borrow with setcond.

In the very worst case, when we must use the external helper to compute
a value for CC, we generate (cc > 1) instead of (cc >> 1), which is only
very slightly slower on common cpus.

In the very best case, when the CC comes from a COMPARE insn and the
compiler is using ALCG with zero, everything folds out to become just
the setcond that the compiler wanted.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:46 -08:00
Richard Henderson a359b770c6 target-s390: Optimize ADDU/SUBU CC testing
We can easily generate some masks for logical add/subtract inline.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson de379661d5 target-s390: Tidy comparisons
After full conversion, we can audit the uses of LTGT cc ops
and see that none of the instructions can ever set CC=3.
Thus we can extend the table to treat that bit as ignored.

This fixes a regression wrt the pre-conversion translation
in which NE was used for both m=6 and m=7.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson f24c49c24a target-s390: Optmize emitting discards
While they aren't expensive, they aren't free to process.  When we
know that the three cc helper variables are dead, don't kill them.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson d074ac6d26 target-s390: Optimize XC
Notice XC with same address and convert that to store of zero.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson 90b4f8ad72 target-s390: Fix cpu_clone_regs
R2 is the syscall return register, not R0.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson 411edc22cb target-s390: Implement LOAD/SET FP AND SIGNAL
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson a12000b9ec target-s390: Implement SET ROUNDING MODE
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson d2d9feac6f target-s390: Use uint64_to_float128
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson 1d1f630135 target-s390: Implement LCDFR
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson 49f7ee802f target-s390: Check insn operand specifications
Removes all the fixmes for even register numbers, etc.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson 2db014b5a7 target-s390: Implement CPSDR
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson 99b4f24b3e target-s390: Implement POPCNT
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:45 -08:00
Richard Henderson 2112bf1bfb target-s390: Implement CONVERT FROM LOGICAL
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 6ac1b45f9b target-s390: Implement CONVERT TO LOGICAL
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson b92fa33486 target-s390: Implement STORE ON CONDITION
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 632086da28 target-s390: Implement LOAD ON CONDITION
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 1c26875182 target-s390: Implement COMPARE AND TRAP
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 403e217f40 target-s390: Implement COMPARE RELATIVE LONG
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson e0def9094e target-s390: Implement PREFETCH
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson d6c6372e18 target-s390: Implement R[NOX]SBG
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 143cbbc5eb target-s390: Implement LDGR, LGDR
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 2d6a869833 target-s390: Implement RISBG
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 5550359f07 target-s390: Implement COMPARE AND BRANCH
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 7a6c7067f0 target-s390: Tidy s->op_cc handling
There's no need to force computation of the true cc_op when taking an
exception or single stepping.  In either case we'll enter the next TB
with s->cc_op = DYNAMIC and recompute anyway.  Just make sure that
s->cc_op is stored back to env->cc_op as needed.

Delete some dead functions, avoid allocating unused TCG temps, drop
the old s->is_jmp setting.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 2cf5e350c4 target-s390: Implement BRANCH ON INDEX
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:44 -08:00
Richard Henderson 4f3adfb2a6 target-s390: Delete dead code from old translator
The use of inline restricts detection of static functions that are
no longer used.  Limit the use of inline to those functions that
are conditionally used based on CONFIG_USER_ONLY.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:43 -08:00
Richard Henderson dc458df91d target-s390: Convert SERVC
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:43 -08:00
Richard Henderson 7ab938d706 target-s390: Convert LPSWE
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:43 -08:00
Richard Henderson fc778b55a5 target-s390: Convert STFL
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-01-05 12:18:43 -08:00