sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

16529 Commits

Author SHA1 Message Date
Michael Roth 5cd5f0d059 qapi: add test cases for generated free functions
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:00:46 -03:00
Michael Roth 75b96aca6f qapi: generate qapi_free_* functions for *List types
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:00:46 -03:00
Michael Roth 5666dd19dd qapi: dealloc visitor, fix premature free and iteration logic
Currently we do 3 things wrong:

1) The list iterator, in practice, is used in a manner where the pointer
we pass in is the same as the pointer we assign the output to from
visit_next_list(). This causes an infinite loop where we keep freeing
the same structures.

2) We attempt to free list->value rather than list. visit_type_<type>
handles this. We should only be concerned with the containing list.

3) We free prematurely: iterator function will continue accessing values
we've already freed.

This patch should fix all of these issues. QmpOutputVisitor also suffers
from 1).

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:00:46 -03:00
Anthony Liguori 15e43e64b6 qapi: fixup command generation for functions that return list types
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:00:46 -03:00
Anthony Liguori e3193601c8 qapi: use middle mode in QMP server
Use the new middle mode within the existing QMP server.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:00:46 -03:00
Anthony Liguori 776574d641 qapi: add code generation support for middle mode
To get the ball rolling merging QAPI, this patch introduces a "middle mode" to
the code generator.  In middle mode, the code generator generates marshalling
functions that are compatible with the current QMP server.  We absolutely need
to replace the current QMP server in order to support proper asynchronous
commands but using a middle mode provides a middle-ground that lets us start
converting commands in tree.

Note that all of the commands have been converted already in my glib branch.
Middle mode only exists until we finish merging them from my branch into the
main tree.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:00:46 -03:00
Anthony Liguori 2a82d936a2 qerror: add qerror_report_err()
This provides a bridge between Error (new error mechanism) and QError (old error
mechanism).  Errors can be propagated whereas QError cannot.

The minor evilness avoids layering violations.  Since QError should go away RSN,
it seems like a reasonable hack.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:00:46 -03:00
Anthony Liguori acceb4d99f error: let error_is_type take a NULL error
Reported-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:00:46 -03:00
Edgar E. Iglesias d11cf8cc80 etrax-dma: Remove bogus if statement
Reported-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-10-03 10:20:13 +02:00
Jan Kiszka 9479c57a8c memory: Print regions in ascending order
Makes reading the output more user friendly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02 16:27:14 +02:00
Jan Kiszka 066318109f memory: Do not print empty PIO root
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02 16:27:14 +02:00
Jan Kiszka 4b474ba7a1 memory: Print region priority
Useful to discover eclipses.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02 16:27:14 +02:00
Blue Swirl 314e298735 memory: simple memory tree printer
Add a monitor command 'info mtree' to show the memory hierarchy
much like /proc/iomem in Linux.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02 16:27:13 +02:00
Blue Swirl 3917149d96 Move GETPC from dyngen-exec.h to exec-all.h
GETPC() can be used even from outside of helper code. Move the macro to
a more accessible location. Avoid a compile warning from redefining it in exec.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 09:31:43 +00:00
Blue Swirl bccd9ec5f0 softmmu_header: pass CPUState to tlb_fill
Pass CPUState pointer to tlb_fill() instead of architecture local
cpu_single_env hacks.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 09:31:26 +00:00
Blue Swirl efbf29b681 Document softmmu templates
Add some comments to describe each file.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 09:31:08 +00:00
Blue Swirl bf4b9889ab ESP: convert to trace framework
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 09:28:40 +00:00
Alexander Graf b39491a83d PPC: Drop initial ESCC mapping
We are mapping ESCC to a static (incorrect) address on machine init. This
overlaps with our vram, rendering the screen barely usable.

Since openBIOS is clever enough to map ESCC to where it needs to be, we can
just drop that invalid map and everyone's happy.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:45:35 +00:00
Jan Kiszka a4773324b4 tcg-i386: Introduce limited deposit support
x86 cannot provide an optimized generic deposit implementation. But at
least for a few special cases, namely for writing bits 0..7, 8..15, and
0..15, versions using only a single instruction are feasible.
Introducing such limited support improves emulating 16-bit x86 code on
x86, but also rarer cases where 32-bit or 64-bit code accesses bytes or
words.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:42:46 +00:00
Jan Kiszka 7e17a21706 mips_fulong2e: Reorder ISA bus and i8259 creation
Missed during memory region conversion: The i8259 now depends on the ISA
bus being created first. Reorder the initialization.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:23:52 +00:00
Jan Kiszka 86ce7a5e7e target-i386: Remove redundant word mask in port out instructions
T0 was already masked to 16 bits when loading it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:21:45 +00:00
Peter Maydell 2ac8bd03c5 softfloat: Reinstate accidentally disabled target-specific NaN handling
Include config.h in softfloat.c, so that the target specific ifdefs in
softfloat-specialize.h are evaluated correctly. This was accidentally
broken in commit 789ec7ce2 when config-target.h was removed from
softfloat.h, and means that most targets will have been returning the
wrong results for calculations involving NaNs.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:19:07 +00:00
Peter Maydell df0eda9b73 tcg/arm: Remove unused tcg_out_addi()
Remove the unused function tcg_out_addi() from the ARM TCG backend;
this fixes a compilation failure on ARM hosts with newer gcc.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:15:54 +00:00
Brad f28ffed52c configure: Detect predefined compiler symbols for ARM and HPPA
To be able to detect some ARM / HPPA based architectures such as with
OpenBSD/(armish / zaurus) or OpenBSD/hppa.

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:13:04 +00:00
Stefan Weil 7f6f0ae5b9 tcg: Add some assertions
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:11:23 +00:00
Stefan Weil c0ad3001bf tcg: Add forward declarations for local functions
These functions are defined in the tcg target specific file
tcg-target.c.

The forward declarations assert that every tcg target uses
the same function prototype.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:11:17 +00:00
Stefan Weil 840f58617b tcg: Don't declare TCG_TARGET_REG_BITS in tcg-target.h
It is now declared for all tcg targets in tcg.h,
so the tcg target specific declarations are redundant.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:11:12 +00:00
Stefan Weil 817b838e3c tcg: Declare TCG_TARGET_REG_BITS in tcg.h
TCG_TARGET_REG_BITS can be determined by the compiler,
so there is no need to declare it for each individual tcg target.

This is especially important for new tcg targets
which will be supported by the tcg interpreter.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01 06:09:31 +00:00
Anthony Liguori 8f440cda08 Merge remote-tracking branch 'kiszka/queues/slirp' into staging 2011-09-29 13:33:47 -05:00
Anthony Liguori 62ec6073cd Merge remote-tracking branch 'aneesh/for-upstream-5' into staging 2011-09-29 13:32:05 -05:00
Blue Swirl 0bce98df26 Add OpenBIOS as a submodule
Update OpenBIOS images to r1047 built from submodule.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-09-28 20:39:34 +00:00
Thomas Huth 2b44043265 slirp: Fix packet expiration
The two new variables "arp_requested" and "expiration_date" in the mbuf
structure have been added after the variable-sized "m_dat_" array. The
variables have to be added before the m_dat_ array instead.
Without this patch, the expiration_date gets clobbered by code that
accesses the m_dat_ array.
I experienced this problem with the code in slirp/tftp.c: The
tftp_send_data() function created a new packet with the m_get()
function (which fills-in a default expiration_date value). Then the
TFTP code cleared the data section of the packet, which accidentially
also cleared the expiration_date. This zeroed expiration_date then
finally causes the packet to be discarded during if_start(), so that
TFTP packets were not transmitted anymore.

[Jan: added comment as suggested by Fabien ]

CC: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-09-28 13:11:30 +02:00
Jan Kiszka 8d06d69bc4 slirp: Fix use after release on tcp_input
ti points into the m buffer. But the latter may already be released
right after the dodata: label. Move the test before the potential
release.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-09-28 13:10:22 +02:00
Blue Swirl 46f3069cba PPC: use memory API to construct the PCI hole
Avoid vga.chain4 mapping by constructing a PCI hole for upper
2G of the PCI space.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-09-27 19:16:46 +00:00
Anthony Liguori 3b7653ac48 Merge remote-tracking branch 'qemu-kvm-tmp/memory/urgent' into staging 2011-09-26 08:00:47 -05:00
Anthony Liguori 4c54661feb Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging 2011-09-26 08:00:40 -05:00
Anthony Liguori 04970fd933 Merge remote-tracking branch 'qemu-kvm-tmp/memory/core' into staging 2011-09-26 08:00:29 -05:00
Anthony Liguori 2f977dd7e8 Merge remote-tracking branch 'pmaydell/omap-for-upstream' into staging 2011-09-26 08:00:00 -05:00
Anthony Liguori 11ddeea91a Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging 2011-09-26 07:59:13 -05:00
Avi Kivity 12da94ff8f ppc_prep: fix pci config space initialization
Use data_mem for the data mmio region, not conf_mem.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 17:15:43 +03:00
Richard Henderson 2f290a8c3d fdc: Convert isabus_fdc_init1 to MemoryRegion
This requires some amount of hoop-jumping, so that we don't
inadvertently claim port 0x3f6, which is used by ISA IDE.

The sysbus initialization path is as yet unconverted.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:37 +03:00
Richard Henderson a941ae4515 serial: Convert serial_isa_initfn to MemoryRegion
The serial_mm_init path is as yet unconverted.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:37 +03:00
Richard Henderson dbff76ac33 pckbd: Convert to MemoryRegion
Slightly non-obvious with mips_jazz passing in the region
structure to populate.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:37 +03:00
Richard Henderson 098d314a32 i8259: Convert to MemoryRegion
The only non-obvious part is pic_poll_read which used
"addr1 >> 7" to detect whether one referred to either
the master or slave PIC.  Instead, test this directly.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:37 +03:00
Avi Kivity bac8ad41ab ppc_prep: initialize i8259 after the ISA bus
Succeeding i8259 conversion to ISA requires this.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:37 +03:00
Avi Kivity a4ac5e64de mips_r4k: initialize i8259 after the ISA bus
Succeeding i8259 conversion to ISA requires this.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:37 +03:00
Avi Kivity e155c99be9 mips_jazz: initialize i8259 after the ISA bus
Succeeding i8259 conversion to ISA requires this.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:36 +03:00
Avi Kivity 5632ae46d5 mips_malta: move i8259 initialization after piix4 initialization
i8259 is an ISA device (or at least, depends on the ISA infrastructure to
register its ioport); and the ISA bus is supplied by piix4.  Later patches
make this dependency explicit.

Use qemu_irq_proxy() to stop the cycle by adding an extra layer of
indirection.

Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:36 +03:00
Richard Henderson 60ea6aa8fc i8254: Convert to MemoryRegion
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:36 +03:00
Richard Henderson beae397945 cs4231a: Convert to MemoryRegion
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25 14:58:36 +03:00