tcg/TODO: remove setcond
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: fix page_unprotect when host page size > target page size
When the host page size is bigger that the target one, unprotecting apage should:- mark all the target pages corresponding to the host page as writable- invalidate all tb corresponding to the host page (and not the target...
ia64 disas support
Taken from binutils SVN, using last GPLv2 version.
tcg: align static_code_gen_buffer to CODE_GEN_ALIGN
On ia64, the default memory alignement is not enough for a codealignement. To fix that, force static_code_gen_buffer alignmentto CODE_GEN_ALIGN.
tcg: initial ia64 support
S390: Add stub for cpu_get_phys_page_debug
We don't implement any virtual memory in the S390 target so far, so let'sadd a stub for this now mandatory function.
Fixes building of S390 target.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
S390: Tell user why VM creation failed
The KVM kernel module on S390 refuses to create a VM when the switch_amodekernel parameter is not used.
Since that is not exactly obvious, let's give the user a nice warning.
Signed-off-by: Alexander Graf <agraf@suse.de>...
Fix compilation with missing inotify_init1
Commit c05c7a7306a23a4b01d1606172b142c45caffc92breaks cross compilation for mips (and othercompilations without CONFIG_INOTIFY1):
make1: Entering directory `/qemu/bin/mips' CC i386-linux-user/syscall.o...
linux-user/ia64: workaround ia64 strangenesses
ia64 has some strangenesses that need to be workaround:- it has a __clone2() syscall instead of the using clone() one, with different arguments, and which is not declared in the usual headers.- ucontext.uc_sigmask is declared with type long int, while it is...
tap: add interface to get device fd
Will be used by vhost to attach/detach to backend.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm: add API to set ioeventfd
Comment on kvm usage: rather than require users to do if (kvm_enabled())and/or ifdefs, this patch adds an API that, internally, is defined tostub function on non-kvm build, and checks kvm_enabled for non-kvmrun.
While rest of qemu code still uses if (kvm_enabled()), I think this...
notifier: event notifier implementation
event notifiers are slightly generalized eventfd descriptors. Currentimplementation depends on eventfd because vhost is the only user, andvhost depends on eventfd anyway, but a stub is provided for non-eventfdcase....
virtio: notifier support + APIs for queue fields
vhost needs physical addresses for ring and other queue fields,so add APIs for these. In particular, add binding API to sethost/guest notifiers. Will be used by vhost.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
virtio: add set_status callback
vhost net backend needs to be notified whenfrontend status changes. Add a callback,similar to set_features.
virtio: move typedef to qemu-common
make it possible to use type without header include,simplifying header dependencies.
virtio-pci: fill in notifier support
Support host/guest notifiers in virtio-pci.The last one only with kvm, that's okaybecause vhost relies on kvm anyway.
Note on kvm usage: kvm ioeventfd APIis implemented on non-kvm systems as well,this is the reason we don't need if (kvm_enabled())...
vhost: vhost net support
This adds vhost net device support in qemu. Will be tied to tap deviceand virtio by following patches. Raw backend is currently missing,will be worked on/submitted separately.
tap: add vhost/vhostfd options
This adds vhost binary option to tap, to enable vhost net accelerator.Default is off for now, we'll be able to make default on long termwhen we know it's stable.
vhostfd option can be used by management, to pass in the fd. Assigning...
tap: add API to retrieve vhost net header
will be used by virtio-net for vhost net support
virtio-net: vhost net support
This connects virtio-net to vhost net backend.The code is structured in a way analogous to what we have with vnetheader capability in tap.
We start/stop backend on driver start/stop aswell as on save and vm start (for migration)....
virtio-pci: compile per-target
With vhost, virtio-pci needs to include kvm.h and kvm.h needs to be builtper-target.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix -enable-kvm
Make vl.o compiled per target and fix a thinko in hw/acpi.c. It's not trivialto make kvm.h consumable by compiled-once files.
Restore terminal monitor attributes - addition
Patch 2d753894c7553d6a05e8fdbed5f4704398919a35 was missing this check,when running monitor as /dev/tty and other serial device, i.e: qemu -monitor /dev/tty -serial /dev/pts/1
Without this patch any serial device will override the monitor stored...
usb: class specific interface requests
Mass Storage Reset and Get Max LUN are class specific requests, butthey were not marked as such in hw/usb-msd.c, moved thereforeClassInterfaceRequest and ClassInterfaceOutRequest from hw/usb-net.cto hw/usb.h.Furthermore there was a problem in hw/usb-ohci.c when using DEBUG...
Don't check for bus master for old guests
Older Linux guests don't activate the bus master enable bit. So for those wecan just try to be clever and track if they set the DEVICE_OK bit even thoughbus mastering is still disabled.
Under that condition we can disable the windows safety check. With that logic...
Add missing #include needed for madvise() on OpenBSD
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix i386-bsd-user build
Get bsd-user host page protection code working on FreeBSD hosts
Use kinfo_getvmmap(3) on FeeBSD >= 7.x and /compat/linux/proc on olderFreeBSD. (kinfo_getvmmap is preferred since /compat/linux/proc isusually only mounted on hosts also using the Linuxolator.)...
Fix bsd-user qemu_vmalloc() host page protection code
Just do the same as linux-user does.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix some compilation warnings on FreeBSD hosts
Use sysctl instead of /proc to find executable path on FreeBSD
..since /proc usually isn't mounted on FreeBSD.
Compile most PPC devices only once
Make byte swapping unconditional since PPC is big endian.
Compile prep_pci only once
Compile qemu-timer only once
Arrange various declarations so that also non-CPU code can accessthem, adjust users.
Move CPU specific code to cpus.c.
Compile openpic only once
Replace TARGET_PAGE_SIZE with 4096. Make byte swapping unconditionalsince PPC is big endian.
Compile ide/macio only once
Compile pflash_cfi01 only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.
Compile pflash_cfi02 only once
Refactor target specific handling, compile vl.c only once
Move target specific functions and RAM handling to arch_init.c.
Add a flag to QEMUOptions structure to indicate for whicharchitectures the option is allowed, check the flagin run time and remove conditional code in option handling....
Compile acpi only once
Use qemu_irqs to trigger CMOS S3 and SMI events.
Avoid using kvm.h, which uses CPUState.
Refactor a few architecture dependent pieces in vl.c
These will be moved later.
Refactor CPUState handling out of vl.c
Move KVM and Xen global flags to vl.c
Move cpu_exec_init_all() declaration to qemu-common.h
Let cpu_exec_init_all() be called from non-CPU code.
Allow various header files to be included from non-CPU code
Allow balloon.h, gdbstub.h and kvm.h to be included fromnon-CPU code.
Adjust debug handling
tcg/mips: fix branch offset during retranslation
Branch offsets should only be overwritten during relocation, to supportpartial retranslation.
exec: remove dead code
linux-user/ppc: use the Linux register layout
The dynamic linker converts the Linux layout to the AIX layout and isreentrant so it won't do it a second time if it's already beenconverted. In short it work just fine with either register layout.
OTOH, statically linked binaries expect a Linux layout....
qemu-io: fix aio help texts
Fix a few typos in the help texts for the various aio commands.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/arm: Replace qemu_ld32u (left over from previous commit)
Commit 86feb1c860dc38e9c89e787c5210e8191800385edid not change all occurrences of INDEX_op_qemu_ld32ufor tcg/arm.
Please note that I could not test this patch(I have currently no arm system available)....
Fix driftfix option
Based on patch by Zachary Amsden.
Fix BSD and win32 builds
CC net/tap-bsd.o/src/qemu/net/tap-bsd.c: In function `tap_open':/src/qemu/net/tap-bsd.c:93: warning: implicit declaration of function `error_report'
CC sparc-softmmu/../net/tap-win32.occ1: warnings being treated as errors...
Refactor numa mode setting
pflash_cfi02: fix incorrect TARGET_FMT_lx/d use
Also use target_phys_addr_t for addresses.
Compile vmware_vga only once
tcg-mips: add guest base support
tcg/mips: implement the not_i32 op the same way as gcc
tcg-mips: implement nor
be more specific in -mem-path error messages
Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Add a missing #include for FreeBSD hosts
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
error: Link qemu-img, qemu-nbd, qemu-io with qemu-error.o
The location tracking interface is used by code shared with qemi-img,qemu-nbd and qemu-io, so it needs to be available there. Commit827b0813 provides it in a rather hamfisted way: it adds a dummy...
error: Move qerror_report() from qemu-error.[ch] to qerror.[ch]
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
error: Trim includes after "Infrastructure to track locations..."
Missed in commit 827b0813.
error: Make use of error_set_progname() optional
error: Trim includes after "Move qemu_error & friends..."
Missed in commit 2f792016.
error: Trim includes in qerror.c
linux-user: Use RLIMIT_STACK for default stack size.
The current default stack limit of 512kB is far too small; a fairnumber of gcc testsuite failures (for all guests) are directlyattributable to this. Using the -s option in every invocation ofthe emulator is annoying to say the least....
target-arm: disable PAGE_EXEC for XN pages
Don't set PAGE_EXEC for XN pages, to avoid a bypass of XN protectionchecking if the page is already in the TLB.
Signed-off-by: Rabin Vincent <rabin@rab.in>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
fix race between timer firing vs. alarm_timer->pending = 0
The period for Win32 timers is very short and always the sameindependent of dynticks, so it's possible that the timer firesbefore qemu_run_all_timers has reset alarm_timer->pending to zero.Reset alarm_timer->pending before rearming....
qemu-io: Fix return value handling of bdrv_open
bdrv_open may return -errno so we have to checkif the return value is '< 0', not '== -1'.
Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qemu-nbd: Fix invalid usage of the first argument of errx
errx takes the exit status of a process as the firstargument. Passing errno to it is wrong. Instead thepatch lets errx take EXIT_FAILURE.
qemu-nbd: Fix return value handling of bdrv_open
balloon: Fix overflow when reporting actual memory size
Beginning with its introduction, the virtio balloon has had an overflow errorthat causes 'info balloon' to misreport the actual memory size when the balloonitself becomes larger than 4G. Use a cast when converting dev->actual from...
json-parser: Output the content of invalid keyword
When input some invalid word 'unknowcmd' through QMP port, qemu outputsthis error message: "parse error: invalid keyword `%s'"
This patch makes qemu output the content of invalid keyword, like:
"parse error: invalid keyword `unknowcmd'"...
raw-posix: Better error return values for hdev_create
Now that we output an error message according to the returned error code inqemu-img, let's return the real error codes. "Input/output error" foreverything isn't helpful.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
qemu-options.hx: fix a typo
Compile some MIPS devices only once
Move CPU specific declarations to a separate file.
Fix build
Actually some systems don't define PAGE_SIZE. Fixes build breakageby f7736b91c40a617e93505e32dcbd2cb56aad8a23.
Compile ide/core only once
Make win2k install hack unconditional as it is still restricted tox86 only in vl.c.
Replace TARGET_PAGE_SIZE and 4096 with PAGE_SIZE.
target-s390: Don't compile in virtio-pci
As soon as virtio-pci.c gets compiled and used on S390 the internal qdev magicgets confused and tries to give us PCI devices instead of S390 virtio devices.
Since we don't have PCI on S390, we can safely not compile virtio-pci at all....
target-ppc: generic PowerPC TBL
Time base SPRs TBL/TBU should be accessible in user/priv modes for readingas specified in POWER ISA documentation. Therefore SPRs permissions werechanged in gen_tbl function.
Signed-off-by: Dmitry Ilyevsky <ilyevsky@gmail.com>...
tcg: Disambiguate qemu_ld32u with 32-bit and 64-bit outputs.
Some targets (e.g. Alpha and MIPS64) need to keep 32-bit operandssign-extended in 64-bit registers (regardless of the "real" signof the operand). For that, we need to be able to distinguishbetween a 32-bit load with a 32-bit result and a 32-bit load with...
tcg: Allow target-specific implementation of NOR.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg: Allow target-specific implementation of NAND.
tcg: Allow target-specific implementation of EQV.
tcg: Use not_i32 to implement not_i64.
tcg: Change TCGType to an enumeration.
The TCGType name was already used consistently. Changing itto an enumeration instead of a set of defines aids debugging.
tcg: Use TCGCond where appropriate.
Use the TCGCond enumeration type in the brcond and setcondrelated prototypes in tcg-op.h and each code generator.
tcg: Name the opcode enumeration.
Give the enumeration formed from tcg-opc.h a name: TCGOpcode.Use that enumeration type instead of "int" whereever appropriate.
linux-user: Add the syscall id for pselect6 on ARM
As this is now supported in newer linux kernels.
Signed-off-by: Michael Casadevall <mcasadevall@ubuntu.com>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
remove remaining occurrences AREG[1-9] and TCG_AREG[1-9]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: add inotify_init1 syscall support
New syscall which gets actively used when you have afresh kernel.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm: Fix handling of AL condition in IT instruction
Do not try to insert a conditional jump over next instruction when thecondition code is AL as this will trigger an internal error.
Signed-off-by: Johan Bengtsson <teofrastius@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg-hppa: Fix 64-bit argument ordering
tcg-hppa: Fix const errors in hppa-dis.c
Fix bsd-user broken by commit b5ec5ce0e39d6e7ea707d5604a5f6d567dfd2f48
Fix recent pxa270 serial breakage
This fixes a copy/paste bug introduced in commit2d48377a8531de63ec1d0c4b9b1959dc4b78356c that pushed TARGET_WORDS_BIGENDIANdependency to board level.
Signed-off-by: Lars Munch <lars@segv.dk>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-error: Avoid build warning.
CC qemu-error.occ1: warnings being treated as errors/home/edgar/src/c/qemu/git/qemu/qemu-error.c: In function 'error_print_loc':/home/edgar/src/c/qemu/git/qemu/qemu-error.c:191: error: format not a string literal and no format arguments...
pci_host: fix breakage
This has been broken by commit 952760bb7bce7fbfe0afcf04fee268745f297b87