Commit Graph

36810 Commits

Author SHA1 Message Date
Gonglei ddcd55316f bootdevice: add Error **errp argument for QEMUBootSetHandler
It will be useful for checking when we change traditional
boot order dynamically and propagate error message
to the monitor.
For x86 architecture, we pass &local_err to set_boot_dev()
when vm startup in pc_coms_init().

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
2014-12-22 14:39:21 +08:00
Gonglei 3b08098b40 bootdevice: add validate check for qemu_boot_set()
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
2014-12-22 14:39:21 +08:00
Gonglei f1839938b0 bootdevice: add Error **errp argument for qemu_boot_set()
It will be useful for checking when we change traditional
boot order dynamically and propagate error message
to the monitor.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
2014-12-22 14:39:20 +08:00
Gonglei 703008e81a bootdevice: add Error **errp argument for validate_bootdevices()
It will be useful for checking when we change traditional
boot order dynamically and propagate error message
to the monitor.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
2014-12-22 14:39:20 +08:00
Gonglei 9816833d3b bootdevice: move code about bootorder from vl.c to bootdevice.c
First, we can downsize vl.c, make it simpler by
little and little. Second, I can maintain those code
and make some improvement.

Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
2014-12-22 14:39:20 +08:00
Peter Maydell c95f3901b4 sdl2: fixes, cleanups and opengl preparation.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIbBAABAgAGBQJUk+p/AAoJEEy22O7T6HE4IRwP92ngsJ3qN4ZLk13KyEZGkMWR
 /JYZE6x3Mr5KMOyZkWsajcqMYCmpO7fVRRpDHGyLPu80M2bvI0djkU3TF7AaiD35
 ZhutT17R7KWl2eOpewncpEiyf+UWqqnkcX01XyUQ7HzmZEqO5Ypdd0cOtVxv5lBW
 RfaIewvL1m7ZNV/ZYaLLNbug7B9tw9rzI34HRFfh7yUI9pOrpa2tf3lZADSeYMnz
 NAfqBB/tYUR9Rgl8DWu3d0O7SNev4qUPFY+sVsMwt8Z/M6URooAk2fQ7shMgES4o
 BHAUuSOnC/AwnKCqo7h6AtTTigCmbWFIKJJbSPGrE8x8+NG5YrR+wdKSOctsMxgY
 vPgeTFFQEIuQeMb4grzTDZoTsIhh8uSXIVpgn0Wb4evaYpLGuhv0YsjsG0NKZ1aR
 q8VlY81fyNND4kvjZdv82bOoAlOXvojm7gsctprlnbar7ggFsrgvXmrvZ9s9EXAL
 VPTb+EQwQ0Zjt2psl/jCaaOPZ1Bd0ytPK2DIM8aCkEcqYbSLp1Evc+dhZcoFbqJA
 CdfbIBj+BI1trOBRsgd5KZPOnQbTYyYYhJlTbSFMGhj3Dg82xL6UwVBIaVMJpCMa
 +ZP8zs5qBY/ipQKtQGx+AeVuL4j2VHPXmiJ7/MV3ORIF1zNWcC26BHBinLL+P+mY
 byu8Y7OFAmcMbHInFQw=
 =SxmF
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-sdl-20141219-1' into staging

sdl2: fixes, cleanups and opengl preparation.

# gpg: Signature made Fri 19 Dec 2014 09:06:07 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-sdl-20141219-1:
  sdl2: Work around SDL2 SDL_ShowWindow() bug
  sdl2: Use correct sdl2_console for window events
  sdl2: move sdl2_2d_refresh to sdl2-2d.c
  sdl2: factor out sdl2_poll_events
  sdl2: add+use sdl2_2d_redraw function.
  sdl2: move sdl_switch to sdl2-2d.c
  sdl2: overhaul window size handling
  sdl2: move sdl_update to new sdl2-2d.c
  sdl2: turn on keyboard grabs
  sdl2: move keyboard input code to new sdl2-input.c
  sdl2: rename sdl2_state to sdl2_console, move to header file
  sdl: move version logic from source code to makefile

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-21 23:17:00 +00:00
Bastian Koppelmann 9655b9328a target-tricore: Add instructions of RR1 opcode format, that have 0xb3 as first opcode
Add instructions of RR1 opcode format, that have 0xb3 as first opcode.
Add helper functions mulh, mulmh and mulrh, that compute multiplication,
with multiprecision (mulmh) or rounding (mulrh) of 4 halfwords, being either low or high parts
of two 32 bit regs.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-21 18:35:49 +00:00
Bastian Koppelmann 436d63ff3e target-tricore: Fix MFCR/MTCR insn and B format offset.
Fix gen_mtcr using wrong register.
Fix gen_mtcr/mfcr using sign extended offsets.
Fix B format insn using not sign extendend offsets.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-21 18:35:38 +00:00
Bastian Koppelmann b5fd8fa345 target-tricore: Add missing 1.6 insn of BOL opcode format
Some of the 1.6 ISA instructions were still missing. So let's add them.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-21 18:35:28 +00:00
Bastian Koppelmann e2bed107c6 target-tricore: Add instructions of RR opcode format, that have 0x4b as the first opcode
Add instructions of RR opcode format, that have 0x4b as the first opcode.
Add helper functions:
    * parity: Calculates the parity bits for every byte of a 32 int.
    * bmerge/bsplit: Merges two regs into one bitwise/Splits one reg into two bitwise.
    * unpack: unpack a IEEE 754 single precision floating point number as exponent and mantissa.
    * dvinit_b_13/131: (ISA v1.3/v1.31)Prepare operands for a divide operation,
                       where the quotient result is guaranteed to fit into 8 bit.
    * dvinit_h_13/131: (ISA v1.3/v1.31)Prepare operands for a divide operation,
                       where the quotient result is guaranteed to fit into 16 bit.
OPCM_32_RR_FLOAT -> OPCM_32_RR_DIVIDE.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-21 18:35:16 +00:00
Bastian Koppelmann f2f1585f60 target-tricore: Add instructions of RR opcode format, that have 0x1 as the first opcode
Add instructions of RR opcode format, that have 0x1 as the first opcode.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-21 18:35:00 +00:00
Bastian Koppelmann 0b79a78169 target-tricore: Add instructions of RR opcode format, that have 0xf as the first opcode
Add instructions of RR opcode format, that have 0xf as the first opcode.
Add helper functions:
    * clo/z/s: Counts leading ones/zeros/signs.
    * clo/z/s_h: Count leading ones/zeros/signs in two haflwords.
    * sh/_h: Shifts one/two word/hwords.
    * sha/_h: Shifts one/two word/hwords arithmeticly.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-21 18:34:48 +00:00
Bastian Koppelmann d5de7839d7 target-tricore: Add instructions of RR opcode format, that have 0xb as the first opcode
Add instructions of RR opcode format, that have 0xb as the first opcode.
Add helper functions, for hword and byte arithmetics:
    * add_h_ssov/suov: Add two halfword and saturate on overflow.
    * sub_h_ssov/suov: Sub two halfword and saturate on overflow.
    * absdif_h_ssov: Compute absolute difference for halfwords and saturate on overflow.
    * abs_h_ssov/suov: Compute absolute value for two halfwords and saturate on overflow.
    * abs_b/h: Compute absolute value for four/two bytes/halfwords
    * absdif_b/h: Compute absolute difference for four/two bytes/halfwords
    * add_b/h: Add four/two bytes/halfwords.
    * sub_b/h: Sub four/two bytes/halfwords.
    * eq_b/h: Compare four/two bytes/halfwords with four/two bytes/halfwords on
              equality and set all bits of to either one ore zero.
    * eqany_b/h: Compare four/two bytes/halfwords with four/two bytes/halfwords on equality.
    * lt_b/bu/h/hu: Compare four/two bytes/halfwords with four/two bytes/halfwords
                    on less than signed and unsigned.
    * max_b/bu/h/hu: Calculate max for four/two bytes/halfwords signed and unsigned.
    * min_b/bu/h/hu: Calculate min for four/two bytes/halfwords signed and unsigned.
Add helper function abs_ssov, that computes the absolute value for a 32 bit integer and saturates on overflow.
Add microcode generator functions:
    * gen_sub_CC: Caluclates sub and sets the carry bit.
    * gen_subc_CC: Caluclates sub and carry and sets the carry bit
    * gen_abs: Compute absolute value for a 32 bit integer.
    * gen_cond_w: Compares two 32 bit values on cond and sets result either zero or all bits one.

OPC2_32_RR_MIN switched with OPC2_32_RR_MIN_U.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-21 18:34:34 +00:00
Bastian Koppelmann e4e3917630 target-tricore: Change SSOV/SUOV makro name to SSOV32/SUOV32
Those makros are exclusively used for 32 bit arithmetics and won't work for
16 bit with two halfwords. So lets get rid of the len parameter and make them
always use 32 bit. Now no token pasting is needed anymore and they can be
regular functions.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-21 18:34:22 +00:00
Bastian Koppelmann 7f13420ec0 target-tricore: Fix mask handling JNZ.T being 7 bit long
The mask is actually 7 bit long, instead of 6, so the expression checking
for JNZ.T is always false. Let's make the mask 1 bit wider.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2014-12-21 18:34:05 +00:00
Alex Zuepke 45820fccaf target-tricore: pretty-print register dump and show more status registers
Now using psw_read() to retrieve the status bits correctly.

Signed-off-by: Alex Zuepke <alexander.zuepke@hs-rm.de>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2014-12-21 18:33:29 +00:00
Alex Zuepke 4b5b443576 target-tricore: add missing 64-bit MOV in RLC format
Signed-off-by: Alex Zuepke <alexander.zuepke@hs-rm.de>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2014-12-21 18:32:27 +00:00
Alex Zuepke af715d9802 target-tricore: typo in BOL format
Signed-off-by: Alex Zuepke <alexander.zuepke@hs-rm.de>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2014-12-21 18:32:16 +00:00
Alex Zuepke 781b717c50 target-tricore: fix offset masking in BOL format
Signed-off-by: Alex Zuepke <alexander.zuepke@hs-rm.de>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2014-12-21 18:32:03 +00:00
Peter Maydell 328b3b6c44 -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
 
 iQEcBAABAgAGBQJUlCWaAAoJEJykq7OBq3PImO0IAMngtyIaBYOeb4qQU1X5+C2f
 8HTp3usHj8qdl3W2iak0jo88cUiX2HTdliHnnGbmShKNyjrAOJuk/4OdGKc5W0UC
 lBabUsyJeOh0RWG9i33/6jru061RbRewJcohXikFeRLP6h5ed5GZtK7OjtcMYcDB
 j+VyfCPgf1l8upDmJrBAJdduRYjWgvl1jh0Y780rURE0YGHTiYzzki/wcvgBOm5K
 n5UVkp9qOpQVLd6TdyS3YpJrAPnpkxfQtfqrZ2AIxZX0OL+PPzDX6amTp83cN8zf
 2FB4dLy3c/l/Hf7vEoMQlU+XP9B0I87MmzGLFYcMAu79a2EOGyXPtpa+bKlCknw=
 =qMs3
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging

# gpg: Signature made Fri 19 Dec 2014 13:18:18 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/net-pull-request:
  e1000: defer packets until BM enabled
  net: Use g_new() & friends where that makes obvious sense
  net: Fuse g_malloc(); memset() into g_new0()
  net: don't use set/get_pointer() in set/get_netdev()
  tap: fix vcpu long time io blocking on tap

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-20 22:04:13 +00:00
Peter Maydell c4e7c17a8e update ipxe from 69313ed to 35c5379
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJUkZbwAAoJEEy22O7T6HE4bOwQAJNs/vviQVOzWf6DUdlpl4vu
 py1/VX+0JE43rsKaFGkOFKQ1meoG6Ee/pzESvXdivyp36O10qmweoPry2YqnEFjm
 v1P1IWs4G3cQaNFgRQkJnzrsr3d0KtjtzIwGMLHEphfO+LNDHXdsiAJtzMhtVTDX
 xbI/4AYWGC3bMevD0LrGcs6FD1CavtTZpds5MqkLYQ5bXhxhWfqtcAWjWKNHXBFA
 pdskwV18g3xy5zXuIDTbDMIBM6fjMAlRR/8Qafabph1dKbu4QcLI7wmJqW/NK0ny
 vMEmtpai9IQrGz1L67gjZjbHD1s2qCX9R7To7zyESGYqPzUcJ1oBRUlNIF47tOTB
 12pKqqn09EEXxIcaJy7NQTiySx0NV8rCqK/XFEZ5ZFKJ+4yeJKFGdSRNOtxfoNcT
 3uSi8tdGgXeEAvAC4nuwAIql9h2nAsT4QxIjsebguFjrShssSCly4AJgEKeGQTFP
 pMREn7gvTPUuW99UwFF253MnplLJd2JySL1xR/71E8Mbc4EIrlkAKUEDAqv2iKsV
 ahgGJpbXdLPD1baEQZATWPTr6gxz7jPjnydDmaDbVZHjwENF8+X/47sPL97h/zch
 GfmPaIovs1UJtVamMiIOKJFrPrR5Q0DcYztfpuNV5MIKvvTMdmRIe8gkhKyRRDxL
 YRY0AIPIrmt4xf54YXaC
 =brQo
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-roms-20141217-1' into staging

update ipxe from 69313ed to 35c5379

# gpg: Signature made Wed 17 Dec 2014 14:45:04 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-roms-20141217-1:
  update ipxe from 69313ed to 35c5379

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-20 21:28:53 +00:00
Paolo Bonzini adee64249e exec: change default exception_index value for migration to -1
In QEMU 2.2 the exception_index value was added to the migration stream
through a subsection.  The default was set to 0, which is wrong and
should have been -1.

However, 2.2 does not have commit e511b4d (cpu-exec: reset exception_index
correctly, 2014-11-26), hence in 2.2 the exception_index is never used
and is set to -1 on the next call to cpu_exec.  So we can change the
migration stream to make the default -1.  The effects are:

- 2.2.1 -> 2.2.0: cpu->exception_index set incorrectly to 0 if it
were -1 on the source; then reset to -1 in cpu_exec.  This is TCG
only; KVM does not use exception_index.

- 2.2.0 -> 2.2.1: cpu->exception_index set incorrectly to -1 if it
were 0 on the source; but it would be reset to -1 in cpu_exec anyway.
This is TCG only; KVM does not use exception_index.

- 2.2.1 -> 2.1: two bugs fixed: 1) can migrate backwards if
cpu->exception_index is set to -1; 2) should not migrate backwards
(but 2.2.0 allows it) if cpu->exception_index is set to 0

- 2.2.0 -> 2.3.0: 2.2.0 will send the subsection unnecessarily if
exception_index is -1, but that is not a problem.  2.3.0 will set
cpu->exception_index to -1 if it is 0 on the source, but this would
be anyway a problem for 2.2.0 -> 2.2.x migration (due to lack of
commit e511b4d in 2.2.x) so we can ignore it

- 2.2.1 -> 2.3.0: everything works.

In addition, play it safe and never send the subsection unless TCG
is in use.  KVM does not use exception_index (PPC KVM stores values
in it for use in the subsequent call to ppc_cpu_do_interrupt, but
does not need it as soon as kvm_handle_debug returns).  Xen and
qtest do not run any code for the CPU at all.

Reported-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Tested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1418989994-17244-3-git-send-email-pbonzini@redhat.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-20 20:38:07 +00:00
Paolo Bonzini f9d8f66735 cpu: initialize cpu->exception_index on reset
This unbreaks linux-user (broken by e511b4d, cpu-exec: reset exception_index
correctly, 2014-11-26).

Reported-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Tested-by: Eduardo Habkost <ehabkost@redhat.com>
Message-id: 1418989994-17244-2-git-send-email-pbonzini@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-20 20:38:07 +00:00
Eric Auger 5546a621a8 hw/vfio/pci: introduce minimalist VFIODevice with fd
Introduce a new base VFIODevice strcut that will be used by both PCI
and Platform VFIO device. Move VFIOPCIDevice fd field there. Obviously
other fields from VFIOPCIDevice will be moved there but this patch
file is introduced to ease the review.

Also vfio_mask_single_irqindex, vfio_unmask_single_irqindex,
vfio_disable_irqindex now take a VFIODevice handle as argument.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2014-12-19 15:24:31 -07:00
Eric Auger 079eb19cbb hw/vfio/pci: generalize mask/unmask to any IRQ index
To prepare for platform device introduction, rename vfio_mask_intx
and vfio_unmask_intx into vfio_mask_single_irqindex and respectively
unmask_single_irqindex. Also use a nex index parameter.

With that name and prototype the function will be usable for other
indexes than VFIO_PCI_INTX_IRQ_INDEX.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2014-12-19 15:24:24 -07:00
Eric Auger 9ee27d7381 hw/vfio/pci: Rename VFIODevice into VFIOPCIDevice
This prepares for the introduction of VFIOPlatformDevice

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2014-12-19 15:24:15 -07:00
Kim Phillips cf7087db10 vfio: move hw/misc/vfio.c to hw/vfio/pci.c Move vfio.h into include/hw/vfio
This is done in preparation for the addition of VFIO platform
device support.

Signed-off-by: Kim Phillips <kim.phillips@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2014-12-19 15:24:06 -07:00
Frank Blaschka c67676711c vfio: fix adding memory listener to the right address space
Depending on the device, container->space->as contains the valid AddressSpace.
Using address_space_memory breaks devices sitting behind an iommu (and using
a separate address space).

Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2014-12-19 14:40:06 -07:00
Eric Auger 385f57cf9a vfio: migration to trace points
This patch removes all DPRINTF and replace them by trace points.
A few DPRINTF used in error cases were transformed into error_report.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2014-12-19 14:40:06 -07:00
Michael S. Tsirkin 20302e71a5 e1000: defer packets until BM enabled
Some guests seem to set BM for e1000 after
enabling RX.
If packets arrive in the window, device is wedged.
Probably works by luck on real hardware, work around
this by making can_receive depend on BM.

Tested-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-19 13:17:06 +00:00
Markus Armbruster 58889fe50a net: Use g_new() & friends where that makes obvious sense
g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
for two reasons.  One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.

This commit only touches allocations with size arguments of the form
sizeof(T).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-19 13:17:02 +00:00
Markus Armbruster 71e28e3cc2 net: Fuse g_malloc(); memset() into g_new0()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-19 13:17:02 +00:00
Jason Wang 23120b13c6 net: don't use set/get_pointer() in set/get_netdev()
Commit 1ceef9f273 (net: multiqueue
support) tries to use set_pointer() and get_pointer() to set and get
NICPeers which is not a pointer defined in DEFINE_PROP_NETDEV. This
trick works but result a unclean and fragile implementation (e.g
print_netdev and parse_netdev).

This patch solves this issue by not using set/get_pinter() and set and
get netdev directly in set_netdev() and get_netdev(). After this the
parse_netdev() and print_netdev() were no longer used and dropped from
the source.

[Renamed 'err' label to 'out' as suggested by Markus Armbruster.
--Stefan]

Cc: Markus Armbruster <armbru@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-19 13:17:02 +00:00
Wangkai (Kevin,C) 756ae78b27 tap: fix vcpu long time io blocking on tap
[Adjusted doc comment for grammar.
--Stefan]

Signed-off-by: Wangkai <wangkai86@huawei.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-19 11:19:22 +00:00
Peter Maydell b574f60268 cirrus hwcursor fixes.
set secondary-vga category.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJUkEU5AAoJEEy22O7T6HE4zzYQAMcwGnfwzLzWRXtSqPAkwJpP
 2SWLZfrSJE2x4Jh19sVX1T8vQa2bPm5Rye2C3/LpqsK5lcBozXkzXBxr9b7Ps/lc
 1E4SJxekNmKpqSN6xwboXwrXo1du0ekOyOLDlMOTAIcUmUPTTn4qLhlCEdMaXwyB
 IAU9+3ZkjciPZ4bZLC9nz3kyZrRAXOkQ7XE3QcXIEAIxC6xVtkEu6ktEBiAEE09o
 +NLIgyZ0dwZeRQCueIhrvpaDfQXAFfR8HbvNNE3QQGZm+4424snt4JNFSOwuQ3Ny
 0cVQ02VaAmrUGO3l7GukKZwkXV9JCZBQL0cLUG74bOxQCnt/QAI+MyjZbtjF0FAR
 YzTgE05yIFRa6KNRujjrfBheq9xfz6BBQQaZPECy6XNd//NDGbm/nqk2JXGHxiYr
 Z2oSsxhXLVgV2Wznl95OasxrPzgTfSTMSYHsGAZEPCpJhfHIWqGTZnqpVcpyvsU7
 yHJtbzbv3n7EpD13LHPXkXBtH/ls23I+OQOfQWOLNDQ3OUOGxCMjuxIQbkNwnjVc
 RTI/qOKHuGvAIzZgZHNsBS6+5VMu20nhcbo6xT8OxFhEPb+hNfJEgOXppcU2baYA
 mpYvibnADjiWrR+/8Pf6Zn4PMRe6lV3wWRbBwzyK0DpnTFdQ2d/vqHaCz1f9YHME
 PsekZP7WAQxSg/pK9d9a
 =/o3d
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20141216-1' into staging

cirrus hwcursor fixes.
set secondary-vga category.

# gpg: Signature made Tue 16 Dec 2014 14:44:09 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-vga-20141216-1:
  vga: set catagory bit for secondary vga device
  move hw cursor pos from cirrus to vga
  cirrus: Force use of shadow pixmap when HW cursor is enabled
  vga: Add mechanism to force the use of a shadow surface

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-17 19:22:42 +00:00
Peter Maydell 86b182ac0e Xtensa updates for 2.3:
- fix cross-page opcode handling;
 - move window overflow exception generation decision to translation phase;
 - don't generate dead code after privilege, window overflow or coprocessor
   exception;
 - add monitor command 'info opcount' for dumping TCG opcode counters.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUkPD9AAoJEFH5zJH4P6BE7BQP/jYFMY1+52A99Iwwwf+RpCjA
 Bt5sH6csHlZS+95xI5uuSzaNDjwtzgsJlKdB43e4FtHqRdkPH7p/iFvqAMZW/hJM
 nsx5Hm7LeUM3Ox16o01EZE8HUEMo045RU8Gdt1V6qWRGhskaXgZ756p7zI8R9CrQ
 zKuvie0HMIGa6W126hodvu4paQ9yu49dZt2qrO5DlLujZeYH5OpQeoGs06gV4yb7
 G/A1hQSDSWOl0vyFH9P+zPyB7GLQOvCvokSPbDLoYlnKassYPCELtYILdV1fkgXn
 Nb0Xuv/SktEuEmJf8s6lFa8UOZPOWNsjAO4SY74Z7rR8EGLyCJj+damUdmtlpKDc
 ihysj048UCpWZDU952xWeQisrsoyBQ0Cbste7364Hdm+P0zhslEAX2mKEDzqTIff
 nfHBMvMjqdsmSsgMBGLkcY5Fdrgz0HP1J2JFtFZI0Wh9X8HvQcEuDtwpjZN5WRlu
 LEIp2bI0S1Lyy5I7Okr12m7g4tpFKyzNmw42wPyl6YVpSfT20ErCDFfZL4Wnu88B
 +Be/QlX4AAPpD1paRYyI0yyJvO+bFmcv5bejH3GrGXm1MGo9DSumGIxiHmCYCo4l
 z55/RLdujRxlwnDhOTruIei9gF+BnsQK6WR3f0yIjVZwtzKIe4BaLjqKOad/9INA
 VhrOyDE33GibpFYUygCI
 =quXp
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/xtensa/tags/20141217-xtensa' into staging

Xtensa updates for 2.3:

- fix cross-page opcode handling;
- move window overflow exception generation decision to translation phase;
- don't generate dead code after privilege, window overflow or coprocessor
  exception;
- add monitor command 'info opcount' for dumping TCG opcode counters.

# gpg: Signature made Wed 17 Dec 2014 02:57:01 GMT using RSA key ID F83FA044
# gpg: Good signature from "Max Filippov <max.filippov@cogentembedded.com>"
# gpg:                 aka "Max Filippov <jcmvbkbc@gmail.com>"

* remotes/xtensa/tags/20141217-xtensa:
  target-xtensa: don't generate dead code
  target-xtensa: record available window in TB flags
  target-xtensa: test cross-page opcode
  target-xtensa: fix translation for opcodes crossing page boundary
  tcg: add separate monitor command to dump opcode counters

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-17 17:31:26 +00:00
Peter Maydell 84afc4dd56 Merge remote-tracking branch 'remotes/lalrae/tags/mips-20141216' into staging
* remotes/lalrae/tags/mips-20141216: (30 commits)
  target-mips: remove excp_names[] from linux-user as it is unused
  disas/mips: disable unused mips16_to_32_reg_map[]
  disas/mips: remove unused mips_msa_control_names_numeric[32]
  target-mips: convert single case switch into if statement
  target-mips: Fix DisasContext's ulri member initialization
  target-mips: Use local float status pointer across MSA macros
  target-mips: Add missing calls to synchronise SoftFloat status
  linux-user: Use the 5KEf processor for 64-bit emulation
  target-mips: Also apply the CP0.Status mask to MTTC0
  target-mips: gdbstub: Clean up FPU register handling
  target-mips: Correct 32-bit address space wrapping
  target-mips: Tighten ISA level checks
  target-mips: Fix CP0.Config3.ISAOnExc write accesses
  target-mips: Output CP0.Config2-5 in the register dump
  target-mips: Fix the 64-bit case for microMIPS MOVE16 and MOVEP
  target-mips: Correct the writes to Status and Cause registers via gdbstub
  target-mips: Correct the handling of writes to CP0.Status for MIPSr6
  target-mips: Correct MIPS16/microMIPS branch size calculation
  target-mips: Restore the order of helpers
  target-mips: Remove unused `FLOAT_OP' macro
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-17 16:25:21 +00:00
Gerd Hoffmann c246cee4ee update ipxe from 69313ed to 35c5379
Anton D. Kachalov (1):
      [intel] Add 8086:1557 card (Intel 82599 10G ethernet mezz)

Christian Hesse (1):
      [build] Merge util/geniso and util/genliso

Curtis Larsen (3):
      [efi] Use EFI_CONSOLE_CONTROL_PROTOCOL to set text mode if available
      [efi] Report errors from attempting to disconnect existing drivers
      [efi] Try various possible SNP receive filters

Dale Hamel (1):
      [smbios] Expose board serial number as ${board-serial}

Florian Schmaus (1):
      [build] Set GITVERSION only if there is a git repository

Hannes Reinecke (3):
      [ethernet] Provide eth_random_addr() to generate random Ethernet addresses
      [igbvf] Assign random MAC address if none is set
      [igbvf] Allow changing of MAC address

Jan Kiszka (1):
      [intel] Add I217-LM PCI ID

Marin Hannache (4):
      [nfs] Fix an invalid free() when loading a symlink
      [nfs] Fix an invalid free() when loading a regular (non-symlink) file
      [nfs] Rewrite NFS URI handling
      [readline] Add CTRL-W shortcut to remove a word

Michael Brown (144):
      [profile] Allow interrupts to be excluded from profiling results
      [intel] Exclude time spent in hypervisor from profiling
      [build] Fix version.o dependency upon git index
      [tcp] Defer sending ACKs until all received packets have been processed
      [lkrnprefix] Function as a bzImage kernel
      [build] Avoid errors when build directory is mounted via NFS
      [undi] Apply quota only to number of complete received packets
      [lkrnprefix] Make real-mode setup code relocatable
      [intel] Increase receive ring fill level
      [syslog] Strip invalid characters from hostname
      [test] Add self-tests for strdup()
      [libc] Prevent strndup() from reading beyond the end of the string
      [efi] Allow for optional protocols
      [efi] Make EFI_DEVICE_PATH_TO_TEXT_PROTOCOL optional
      [efi] Make EFI_HII_DATABASE_PROTOCOL optional
      [efi] Do not try to fetch loaded image device path protocol
      [ipv6] Fix definition of IN6_IS_ADDR_LINKLOCAL()
      [dhcpv6] Do not set sin6_scope_id on the unspecified client socket address
      [ipv6] Do not set sin6_scope_id on source address
      [ipv6] Include network device when transcribing multicast addresses
      [ipv6] Avoid potentially copying from a NULL pointer in ipv6_tx()
      [librm] Allow for the PIC interrupt vector offset to be changed
      [ifmgmt] Do not sleep CPU while configuring network devices
      [scsi] Improve sense code parsing
      [iscsi] Read IPv4 settings only from the relevant network device
      [iscsi] Include IP address origin in iBFT
      [debug] Allow debug message colours to be customised via DBGCOL=...
      [build] Expose build timestamp, build name, and product names
      [efi] Allow device paths to be easily included in debug messages
      [efi] Provide a meaningful EFI SNP device name
      [efi] Restructure EFI driver model
      [build] Fix erroneous object name in version object
      [build] Add yet another potential location for isolinux.bin
      [efi] Allow network devices to be created on top of arbitrary SNP devices
      [autoboot] Allow autoboot device to be identified by link-layer address
      [efi] Identify autoboot device by MAC address when chainloading
      [efi] Attempt to start only drivers claiming support for a device
      [efi] Rewrite SNP NIC driver
      [efi] Include SNP NIC driver within the all-drivers target
      [crypto] Add support for iPAddress subject alternative names
      [crypto] Fix debug message
      [netdevice] Reset network device index when last device is unregistered
      [efi] Update EDK2 headers
      [efi] Install our own disk I/O protocol and claim exclusive use of it
      [efi] Allow for interception of boot services calls by loaded image
      [efi] Print well-known GUIDs by name in debug messages
      [efi] Include EFI_CONSOLE_CONTROL_PROTOCOL header
      [ioapi] Fail ioremap() when attempting to map a zero bus address
      [intel] Check for ioremap() failures
      [realtek] Check for ioremap() failures
      [vmxnet3] Check for ioremap() failures
      [skel] Check for ioremap() failures
      [myson] Check for ioremap() failures
      [natsemi] Check for ioremap() failures
      [i386] Add functions to read and write model-specific registers
      [x86_64] Add functions to read and write model-specific registers
      [efi] Show more diagnostic information when building with DEBUG=efi_wrap
      [ioapi] Centralise notion of PAGE_SIZE
      [lotest] Discard packets arriving on the incorrect network device
      [xen] Import selected public headers
      [xen] Add basic support for PV-HVM domains
      [xen] Add support for Xen netfront virtual NICs
      [efi] Default to releasing network devices for use via SNP
      [efi] Unload started images only on failure
      [efi] Fill in loaded image's DeviceHandle if firmware fails to do so
      [efi] Fix incorrect debug message level when device has no device path
      [efi] Report exact failure when unable to open the device path
      [netdevice] Avoid registering duplicate network devices
      [efi] Ignore failures when attempting to install SNP HII protocol
      [efi] Expand the range of well-known EFI GUIDs in debug messages
      [efi] Provide efi_handle_name() for debugging
      [efi] Add ability to dump all openers of a given protocol on a handle
      [efi] Use efi_handle_name() instead of efi_handle_devpath_text()
      [efi] Use efi_handle_name() instead of efi_devpath_text() where applicable
      [efi] Allow compiler to perform type checks on EFI_HANDLE
      [efi] Avoid unnecessarily passing pointers to EFI_HANDLEs
      [efi] Dump existing openers when we are unable to open a protocol
      [efi] Dump handle information around connect/disconnect attempts
      [efi] Improve debugging of the debugging facilities
      [efi] Add excessive sanity checks into efi_debug functions
      [efi] Also try original ComponentName protocol for retrieving driver names
      [efi] Print raw device path when we have no DevicePathToTextProtocol
      [efi] Add ability to dump SNP device mode information
      [efi] Reset multicast filter list when setting SNP receive filters
      [efi] Provide centralised definitions of commonly-used GUIDs
      [efi] Open device path protocol only at point of use
      [efi] Move abstract device path and handle functions to efi_utils.c
      [efi] Generalise snpnet_pci_info() to efi_locate_device()
      [bios] Support displaying and hiding cursor
      [efi] Support displaying and hiding cursor
      [readline] Ensure cursor is visible when prompting for input
      [xen] Accept alternative Xen platform PCI device ID 5853:0002
      [xen] Use version 1 grant tables by default
      [xen] Cope with unexpected initial backend states
      [smc9000] Avoid using CONFIG as a preprocessor macro
      [build] Allow for named configurations at build time
      [intel] Display PBS value when applying ICH errata workaround
      [intel] Display before and after values for both PBS and PBA
      [intel] Apply PBS/PBA errata workaround only to ICH8 PCI device IDs
      [efi] Add definitions of GUIDs observed during Windows boot
      [efi] Dump details of any calls to our dummy block and disk I/O protocols
      [romprefix] Do not preserve unused register %di
      [build] Remove obsolete references to .zrom build targets
      [build] Allow ISA ROMs to be built
      [build] Avoid deleting config header files if build is interrupted
      [prefix] Halt system without burning CPU if we cannot access the payload
      [prefix] Report both %esi and %ecx when opening payload fails
      [util] Use PCI length field to obtain length of individual images
      [mromprefix] Use PCI length field to obtain length of individual images
      [mromprefix] Allow for .mrom images larger than 128kB
      [efi] Show details of intercepted LoadImage() calls
      [efi] Make our virtual file system case insensitive
      [efi] Wrap any images loaded by our wrapped image
      [efi] Use the SNP protocol instance to match the SNP chainloading device
      [efi] Avoid returning uninitialised data from PCI configuration space reads
      [efi] Make EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL optional
      [efi] Allow for non-PCI snpnet devices
      [build] Clean up all binary directories on "make [very]clean"
      [efi] Add efifatbin utility
      [efi] Provide dummy device path in efi_image_probe()
      [dhcp] Check for matching chaddr in received DHCP packets
      [dhcp] Remove obsolete dhcp_chaddr() function
      [build] Use -malign-double to build 32-bit UEFI binaries
      [efi] Centralise definitions of more protocol GUIDs
      [efi] Add definitions of GUIDs observed when chainloading from Intel driver
      [efi] Free transmit ring entry before calling netdev_tx_complete()
      [efi] Generalise snpnet_dev_info() to efi_device_info()
      [efi] Update to current EDK2 headers
      [efi] Add NII / UNDI driver
      [efi] Check for presence of UNDI in NII protocol
      [efi] Include NII driver within "snp" and "snponly" build targets
      [ping] Report timed-out pings via the callback function
      [ping] Allow termination after a specified number of packets
      [ping] Allow "ping" command output to be inhibited
      [intel] Use autoloaded MAC address instead of EEPROM MAC address
      [crypto] Fix parsing of OCSP responder ID key hash
      [vmxnet3] Add profiling code to exclude time spent in the hypervisor
      [netdevice] Fix erroneous use of free(iobuf) instead of free_iob(iobuf)
      [libc] Add ASSERTED macro to test if any assertion has triggered
      [list] Add sanity checks after list-adding functions
      [malloc] Tidy up debug output
      [malloc] Sanity check parameters to alloc_memblock() and free_memblock()
      [malloc] Check integrity of free list
      [malloc] Report caller address as soon as memory corruption is detected

Peter Lemenkov (1):
      [build] Check if git index actually exists

Robin Smidsrød (2):
      [build] Add named configuration for VirtualBox
      [build] Avoid using embedded script in VirtualBox named configuration

Sven Ulland (1):
      [lacp] Set "aggregatable" flag in response LACPDU

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-17 14:11:39 +01:00
Max Reitz d3f3a0f453 sdl2: Work around SDL2 SDL_ShowWindow() bug
Apparently it is possible for X to send an event to a hidden SDL2
window, leading to SDL2 believing it is now shown. SDL2 will pass the
SDL_WINDOWEVENT_SHOWN message to the application without actually
showing the window; the problem is that the next SDL_ShowWindow() will
be a no-op because SDL2 assumes the window is already shown.

The correct way to react to SDL_WINDOWEVENT_SHOWN would be to clear
scon->hidden (analogous for SDL_WINDOWEVENT_HIDDEN). However, due to the
window not actually being shown, this will somehow not be correct after
all.

Therefore, just hide the window on SDL_WINDOWEVENT_SHOWN if it is
supposed to be hidden (and analogous for SDL_WINDOWEVENT_HIDDEN).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-17 12:44:01 +01:00
Max Reitz 1dfc5c8808 sdl2: Use correct sdl2_console for window events
SDL_PollEvent() polls events for all windows; therefore,
sdl2_poll_events() will poll the events for all windows and not only for
the one identified by the given sdl2_console.

This should be considered in handle_windowevent(): The window affected
by the event is not necessarily the one identified by the sdl2_console
object given to sdl2_poll_events(), but the one identified by
ev->window.windowID.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-17 12:44:01 +01:00
Gerd Hoffmann 62959ffe45 sdl2: move sdl2_2d_refresh to sdl2-2d.c
Now that common event handling code is split off, we can move
over sdl_refresh to sdl2-2d.c, and rename it to sdl2_2d_refresh.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-12-17 12:44:01 +01:00
Gerd Hoffmann 63ed4907cb sdl2: factor out sdl2_poll_events
Create a new function to poll and handle sdl2 events,
which is then just called from the refresh timer.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-12-17 12:44:01 +01:00
Gerd Hoffmann 0d01b7ce61 sdl2: add+use sdl2_2d_redraw function.
Add a new sdl2_2d_redraw function for a complete screen refresh,
so we can stop using graphic_hw_invalidate for that.  There is
no need to bother console / gfx emulation code if we are just
going to re-blit the screen after window resizes.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-12-17 12:44:01 +01:00
Gerd Hoffmann 2c3056f182 sdl2: move sdl_switch to sdl2-2d.c
Move sdl_switch to sdl2-2d.c file, rename to sdl2_2d_switch.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-12-17 12:44:01 +01:00
Gerd Hoffmann 46522a8223 sdl2: overhaul window size handling
Split do_sdl_resize function (which does alot more than just resizing)
into three: sdl2_window_{create,destroy,resize}.

Fix SDL_Renderer handling: must be guest display size not host window
size, and SDL2 will magically handle all scaling for us.

Make fullscreen actually enter fullscreen mode and simplify the code.
There is no need to store the original window size, the window manager
will do that for us.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-12-17 12:44:01 +01:00
Gerd Hoffmann f1ddebd865 sdl2: move sdl_update to new sdl2-2d.c
Create new sdl2-2d file for 2d display rendering.
Move over sdl_update code, and rename to sdl2_2d_update.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-12-17 12:44:01 +01:00
Gerd Hoffmann 44f017d03e sdl2: turn on keyboard grabs
Makes quite some keys actually go to the guest instead of
being captured by the host window manager.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-12-17 12:43:55 +01:00
Gerd Hoffmann 8fc1a3f58f sdl2: move keyboard input code to new sdl2-input.c
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-12-17 12:43:27 +01:00
Gerd Hoffmann 5d0fe65078 sdl2: rename sdl2_state to sdl2_console, move to header file
Create sdl2.h header file, in preparation for sdl2 code splitup.
Populate it with sdl2_console struct (renamed from sdl2_state).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-12-17 12:43:00 +01:00
Max Filippov 97e89ee914 target-xtensa: don't generate dead code
Don't generate TCG operations when privilege, register window or
coprocessor checks fail.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-17 05:49:32 +03:00