summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-04qapi: Convert query-versionLuiz Capitulino6-43/+76
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: convert query-nameAnthony Liguori7-28/+108
A simple example conversion 'info name'. This also adds the new files for QMP and HMP. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: Automatically generate a _MAX value for enumsLuiz Capitulino1-1/+4
It's the last value in the enum and is very useful for the C implementation. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: Don't use c_var() on enum stringsLuiz Capitulino1-1/+1
Otherwise if we have something like 'foo-bar' in the schema, it will be generated as 'foo_bar' in the string lookup table. c_var() is good for C variables, but not for enum strings. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: modify visitor code generation for list iterationMichael Roth4-16/+60
Modify logic such that we never assign values to the list head argument to progress through the list on subsequent iterations, instead rely only on having our return value passed back in as an argument on the next call. Also update QMP I/O visitors and test cases accordingly, and add a missing test case for QmpOutputVisitor. 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-04qapi: dealloc visitor, support freeing of nested listsMichael Roth1-7/+21
Previously our logic for keeping track of when we're visiting the head of a list was done via a global bool. This can be overwritten if dealing with nested lists, so use stack entries to track this instead. 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-04qapi: add test cases for generated free functionsMichael Roth1-0/+29
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: generate qapi_free_* functions for *List typesMichael Roth1-0/+2
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-04qapi: dealloc visitor, fix premature free and iteration logicMichael Roth1-5/+15
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-04qapi: fixup command generation for functions that return list typesAnthony Liguori1-8/+15
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: use middle mode in QMP serverAnthony Liguori5-8/+24
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-04qapi: add code generation support for middle modeAnthony Liguori4-15/+74
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-04qerror: add qerror_report_err()Anthony Liguori2-0/+35
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-04error: let error_is_type take a NULL errorAnthony Liguori1-0/+4
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-03etrax-dma: Remove bogus if statementEdgar E. Iglesias1-6/+4
Reported-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-10-02memory: Print regions in ascending orderJan Kiszka1-6/+31
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-02memory: Do not print empty PIO rootJan Kiszka1-3/+6
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02memory: Print region priorityJan Kiszka1-2/+4
Useful to discover eclipses. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-02memory: simple memory tree printerBlue Swirl3-0/+106
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-01Move GETPC from dyngen-exec.h to exec-all.hBlue Swirl3-12/+13
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-01softmmu_header: pass CPUState to tlb_fillBlue Swirl15-55/+43
Pass CPUState pointer to tlb_fill() instead of architecture local cpu_single_env hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01Document softmmu templatesBlue Swirl4-1/+33
Add some comments to describe each file. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01ESP: convert to trace frameworkBlue Swirl2-40/+61
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01PPC: Drop initial ESCC mappingAlexander Graf2-2/+2
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-01tcg-i386: Introduce limited deposit supportJan Kiszka4-4/+40
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-01mips_fulong2e: Reorder ISA bus and i8259 creationJan Kiszka1-4/+4
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-01target-i386: Remove redundant word mask in port out instructionsJan Kiszka1-2/+0
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-01softfloat: Reinstate accidentally disabled target-specific NaN handlingPeter Maydell1-0/+5
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-01tcg/arm: Remove unused tcg_out_addi()Peter Maydell1-15/+0
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-01configure: Detect predefined compiler symbols for ARM and HPPABrad1-1/+7
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-01tcg: Add some assertionsStefan Weil1-0/+2
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-01tcg: Add forward declarations for local functionsStefan Weil1-0/+16
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-01tcg: Don't declare TCG_TARGET_REG_BITS in tcg-target.hStefan Weil8-21/+1
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-01tcg: Declare TCG_TARGET_REG_BITS in tcg.hStefan Weil1-0/+10
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-09-29Merge remote-tracking branch 'kiszka/queues/slirp' into stagingAnthony Liguori2-14/+13
2011-09-29Merge remote-tracking branch 'aneesh/for-upstream-5' into stagingAnthony Liguori14-538/+1712
2011-09-28Add OpenBIOS as a submoduleBlue Swirl6-3/+6
Update OpenBIOS images to r1047 built from submodule. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-09-28slirp: Fix packet expirationThomas Huth1-2/+3
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-28slirp: Fix use after release on tcp_inputJan Kiszka1-12/+10
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-27PPC: use memory API to construct the PCI holeBlue Swirl4-7/+26
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-26Merge remote-tracking branch 'qemu-kvm-tmp/memory/urgent' into stagingAnthony Liguori1-1/+1
2011-09-26Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into stagingAnthony Liguori20-122/+232
2011-09-26Merge remote-tracking branch 'qemu-kvm-tmp/memory/core' into stagingAnthony Liguori2-7/+23
2011-09-26Merge remote-tracking branch 'pmaydell/omap-for-upstream' into stagingAnthony Liguori6-190/+249
2011-09-26Merge remote-tracking branch 'riku/linux-user-for-upstream' into stagingAnthony Liguori4-220/+579
2011-09-25ppc_prep: fix pci config space initializationAvi Kivity1-1/+1
Use data_mem for the data mmio region, not conf_mem. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-25fdc: Convert isabus_fdc_init1 to MemoryRegionRichard Henderson1-20/+33
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-25serial: Convert serial_isa_initfn to MemoryRegionRichard Henderson1-3/+12
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-25pckbd: Convert to MemoryRegionRichard Henderson3-25/+40
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-25i8259: Convert to MemoryRegionRichard Henderson1-19/+46
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>