summaryrefslogtreecommitdiffstats
path: root/xen-all.c
Commit message (Collapse)AuthorAgeFilesLines
* sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini2013-04-151-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move headers to include/Paolo Bonzini2013-04-081-3/+3
| | | | | | | | | Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cpu: Move halted and interrupt_request fields to CPUStateAndreas Färber2013-03-121-4/+6
| | | | | | | | | | Both fields are used in VMState, thus need to be moved together. Explicitly zero them on reset since they were located before breakpoints. Pass PowerPCCPU to kvmppc_handle_halt(). Signed-off-by: Andreas Färber <afaerber@suse.de>
* xen: Simplify halting of first CPUAndreas Färber2013-01-151-3/+1
| | | | | | | | | | Use the global first_cpu variable to halt the CPU rather than using a local first_cpu initialized from qemu_get_cpu(0). This will allow to change qemu_get_cpu() return type to CPUState despite use of the CPU_COMMON halted field in the reset handler. Signed-off-by: Andreas Färber <afaerber@suse.de>
* xen: add missing includePaolo Bonzini2012-12-221-0/+1
| | | | | | | | | xen-all needs to access CharDeviceState's filename field, so it needs to include char/char.h. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'bonzini/header-dirs' into stagingAnthony Liguori2012-12-191-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/header-dirs: (45 commits) janitor: move remaining public headers to include/ hw: move executable format header files to hw/ fpu: move public header file to include/fpu softmmu: move remaining include files to include/ subdirectories softmmu: move include files to include/sysemu/ misc: move include files to include/qemu/ qom: move include files to include/qom/ migration: move include files to include/migration/ monitor: move include files to include/monitor/ exec: move include files to include/exec/ block: move include files to include/block/ qapi: move include files to include/qobject/ janitor: add guards to headers qapi: make struct Visitor opaque qapi: remove qapi/qapi-types-core.h qapi: move inclusions of qemu-common.h from headers to .c files ui: move files to ui/ and include/ui/ qemu-ga: move qemu-ga files to qga/ net: reorganize headers net: move net.c to net/ ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * softmmu: move include files to include/sysemu/Paolo Bonzini2012-12-191-1/+1
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * misc: move include files to include/qemu/Paolo Bonzini2012-12-191-1/+1
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * exec: move include files to include/exec/Paolo Bonzini2012-12-191-1/+1
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * pci: update all users to look in pci/Michael S. Tsirkin2012-12-171-1/+1
| | | | | | | | | | | | update all users so we can remove the makefile hack. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | cpu_ioreq_pio, cpu_ioreq_move: i should be uint32_t rather than intIan Jackson2012-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The current code compare i (int) with req->count (uint32_t) in a for loop, risking an infinite loop if req->count is equal to UINT_MAX. Also i is only used in comparisons or multiplications with unsigned integers. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Dongxiao Xu <dongxiao.xu@intel.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | cpu_ioreq_pio, cpu_ioreq_move: introduce read_phys_req_item, write_phys_req_itemIan Jackson2012-12-171-30/+46
| | | | | | | | | | | | | | | | | | | | Replace a lot of formulaic multiplications (containing casts, no less) with calls to a pair of functions. This encapsulates in a single place the operations which require care relating to integer overflow. Cc: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | Fix compile errors when enabling Xen debug logging.Sander Eikelenboom2012-12-171-3/+4
|/ | | | | Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-231-18/+18
| | | | | | | | | | | | | | | target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: use AddressSpace for MemoryListener filteringAvi Kivity2012-10-221-1/+1
| | | | | | | | Using the AddressSpace type reduces confusion, as you can't accidentally supply the MemoryRegion you're interested in. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* xen: drop no-op MemoryListener callbacksAvi Kivity2012-10-151-32/+0
| | | | | | Removes quite a bit of useless code. Signed-off-by: Avi Kivity <avi@redhat.com>
* cleanup useless return sentenceAmos Kong2012-10-051-1/+0
| | | | | | | | This patch cleans up return sentences in the end of void functions. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* xen: Set the vram dirty when an error occur.Anthony PERARD2012-10-031-1/+2
| | | | | | | | If the call to xc_hvm_track_dirty_vram() fails, then we set dirtybit on all the video ram. This case happens during migration. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen: Introduce xen_modified_memory.Anthony PERARD2012-10-031-0/+21
| | | | | | | | | This function is to be used during live migration. Every write access to the guest memory should call this funcion so the Xen tools knows which pages are dirty. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* QMP, Introduce xen-set-global-dirty-log command.Anthony PERARD2012-10-031-0/+15
| | | | | | | | | This command is used during a migration of a guest under Xen. It calls memory_global_dirty_log_start or memory_global_dirty_log_stop according to the argument pass to the command. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
* xen-all.c: fix multiply issue for int and uint typesDongxiao Xu2012-08-221-8/+16
| | | | | | | | | | If the two multiply operands are int and uint types separately, the int type will be transformed to uint firstly, which is not the intent in our code piece. The fix is to add (int64_t) transform for the uint type before the multiply. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* memory: pass EventNotifier, not eventfdPaolo Bonzini2012-07-121-2/+4
| | | | | | | | | Under Win32, EventNotifiers will not have event_notifier_get_fd, so we cannot call it in common code such as hw/virtio-pci.c. Pass a pointer to the notifier, and only retrieve the file descriptor in kvm-specific code. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Introduce Xen PCI Passthrough, qdeviceAllen Kay2012-06-211-0/+12
| | | | | | | | | | A more complete history can be found here: git://xenbits.xensource.com/qemu-xen-unstable.git Signed-off-by: Allen Kay <allen.m.kay@intel.com> Signed-off-by: Guy Zana <guy@neocleus.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Call xc_domain_shutdown with the reboot flag when the guest requests a reboot.John V. Baboval2012-05-171-7/+11
| | | | | | | Signed-off-by: John V. Baboval <john.baboval@virtualcomputer.com> Signed-off-by: Tom Goetz <tom.goetz@virtualcomputer.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen: disable rtc_clockStefano Stabellini2012-05-171-0/+4
| | | | | | | rtc_clock is only used by the RTC emulator (mc146818rtc.c), however Xen has its own RTC emulator in the hypervisor so we can disable it. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen: add a dummy xc_hvm_inject_msi for Xen < 4.2Stefano Stabellini2012-04-171-1/+1
| | | | | | | | | | xc_hvm_inject_msi is only available on Xen >= 4.2: add a dummy compatibility function for Xen < 4.2. Also enable msi support only on Xen >= 4.2. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
* xen: introduce an event channel for buffered io event notificationsStefano Stabellini2012-04-131-6/+39
| | | | | | | | | | | Use the newly introduced HVM_PARAM_BUFIOREQ_EVTCHN to receive notifications for buffered io events. After the first notification is received leave the event channel masked and setup a timer to process the rest of the batch. Once we have completed processing the batch, unmask the event channel and delete the timer. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Xen: basic HVM MSI injection support.Wei Liu2012-04-131-0/+5
| | | | | Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Merge remote-tracking branch 'sstabellini/saverestore-8' into stagingAnthony Liguori2012-03-191-2/+102
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sstabellini/saverestore-8: xen: do not allocate RAM during INMIGRATE runstate xen mapcache: check if memory region has moved. xen: record physmap changes to xenstore Set runstate to INMIGRATE earlier Introduce "xen-save-devices-state" cirrus_vga: do not reset videoram Conflicts: qapi-schema.json Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * xen: do not allocate RAM during INMIGRATE runstateAnthony PERARD2012-03-191-0/+8
| | | | | | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * xen mapcache: check if memory region has moved.Anthony PERARD2012-03-191-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | This patch changes the xen_map_cache behavior. Before trying to map a guest addr, mapcache will look into the list of range of address that have been moved (physmap/set_memory). There is currently one memory space like this, the vram, "moved" from were it's allocated to were the guest will look into. This help to have a succefull migration. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * xen: record physmap changes to xenstoreStefano Stabellini2012-03-191-1/+77
| | | | | | | | | | | | | | | | Write to xenstore any physmap changes so that the hypervisor can be aware of them. Read physmap changes from xenstore on boot. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | Rename CPUState -> CPUArchStateAndreas Färber2012-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Scripted conversion: for file in *.[hc] hw/*.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do sed -i "s/CPUState/CPUArchState/g" $file done All occurrences of CPUArchState are expected to be replaced by QOM CPUState, once all targets are QOM'ified and common fields have been extracted. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge remote-tracking branch 'qemu-kvm/memory/core' into stagingAnthony Liguori2012-03-011-1/+32
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qemu-kvm/memory/core: (30 commits) memory: allow phys_map tree paths to terminate early memory: unify PhysPageEntry::node and ::leaf memory: change phys_page_set() to set multiple pages memory: switch phys_page_set() to a recursive implementation memory: replace phys_page_find_alloc() with phys_page_set() memory: simplify multipage/subpage registration memory: give phys_page_find() its own tree search loop memory: make phys_page_find() return a MemoryRegionSection memory: move tlb flush to MemoryListener commit callback memory: unify the two branches of cpu_register_physical_memory_log() memory: fix RAM subpages in newly initialized pages memory: compress phys_map node pointers to 16 bits memory: store MemoryRegionSection pointers in phys_map memory: unify phys_map last level with intermediate levels memory: remove first level of l1_phys_map memory: change memory registration to rebuild the memory map on each change memory: support stateless memory listeners memory: split memory listener for the two address spaces xen: ignore I/O memory regions memory: allow MemoryListeners to observe a specific address space ...
| * memory: support stateless memory listenersAvi Kivity2012-02-291-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Current memory listeners are incremental; that is, they are expected to maintain their own state, and receive callbacks for changes to that state. This patch adds support for stateless listeners; these work by receiving a ->begin() callback (which tells them that new state is coming), a sequence of ->region_add() and ->region_nop() callbacks, and then a ->commit() callback which signifies the end of the new state. They should ignore ->region_del() callbacks. Signed-off-by: Avi Kivity <avi@redhat.com>
| * xen: ignore I/O memory regionsAvi Kivity2012-02-291-1/+1
| | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com>
| * memory: allow MemoryListeners to observe a specific address spaceAvi Kivity2012-02-291-1/+1
| | | | | | | | | | | | Ignore any regions not belonging to a specified address space. Signed-off-by: Avi Kivity <avi@redhat.com>
| * memory: move ioeventfd ops to MemoryListenerAvi Kivity2012-02-291-0/+14
| | | | | | | | | | | | | | This way the accelerator (kvm) can handle them directly. Signed-off-by: Avi Kivity <avi@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * memory: switch memory listeners to a QTAILQAvi Kivity2012-02-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows reverse iteration, which in turns allows consistent ordering among multiple listeners: l1->add l2->add l2->del l1->del Signed-off-by: Avi Kivity <avi@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
* | suspend: switch acpi s3 to new infrastructure.Gerd Hoffmann2012-02-241-5/+6
|/ | | | | | | | | | | | | | This patch switches pc s3 suspend over to the new infrastructure. The cmos_s3 qemu_irq is killed, the new notifier is used instead. The xen hack goes away with that too, the hypercall can simply be done in a notifier function now. This patch also makes the guest actually stay suspended instead of leaving suspend instantly, so it is useful for more than just testing whenever the suspend/resume cycle actually works. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* memory: change dirty setting APIs to take a sizeBlue Swirl2012-01-251-1/+2
| | | | | | | Instead of each target knowing or guessing the guest page size, just pass the desired size of dirtied memory area. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* prepare for future GPLv2+ relicensingPaolo Bonzini2012-01-131-0/+2
| | | | | | | | | All files under GPLv2 will get GPLv2+ changes starting tomorrow. event_notifier.c and exec-obsolete.h were only ever touched by Red Hat employees and can be relicensed now. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* xen: Fix after recent change in dirty bitmap tracking.Anthony PERARD2012-01-051-20/+18
| | | | | | | | | | | | A recent patch set from Avi break the dirty bitmap support of Xen. But this is because xen_sync_dirty_bitmap will return an error for an unhandled memory range (a0000 - bffff). However this is not a fatal error, so we should just continue instead of aborting. There is now an error printed when the Xen call failed. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen: convert framebuffer dirty tracking to memory APIAvi Kivity2012-01-041-3/+2
| | | | | Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* vmstate, memory: decouple vmstate from memory APIAvi Kivity2012-01-041-1/+2
| | | | | | | | | | | | | | Currently creating a memory region automatically registers it for live migration. This differs from other state (which is enumerated in a VMStateDescription structure) and ties the live migration code into the memory core. Decouple the two by introducing a separate API, vmstate_register_ram(), for registering a RAM block for migration. Currently the same implementation is reused, but later it can be moved into a separate list, and registrations can be moved to VMStateDescription blocks. Signed-off-by: Avi Kivity <avi@redhat.com>
* xen: convert to MemoryListener APIAvi Kivity2012-01-031-58/+82
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* xen, vga: add API for registering the framebufferAvi Kivity2011-12-201-0/+6
| | | | | | | Xen currently uses the name of a memory region to determine whether it is the framebuffer. Replace with an explicit API. Signed-off-by: Avi Kivity <avi@redhat.com>
* xen: convert to memory APIAvi Kivity2011-12-191-19/+22
| | | | | | | Undo the private implementation of qemu_ram_alloc(); use the global one (which calls right back into xen_ram_alloc()). Signed-off-by: Avi Kivity <avi@redhat.com>
* memory, xen: pass MemoryRegion to xen_ram_alloc()Avi Kivity2011-12-191-1/+1
| | | | | | | Currently xen_ram_alloc() relies on ram_addr, which is going away. Give it something else to use as a cookie. Signed-off-by: Avi Kivity <avi@redhat.com>
* Drop the vm_running global variableLuiz Capitulino2011-09-151-1/+1
| | | | | | Use runstate_is_running() instead, which is introduced by this commit. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
OpenPOWER on IntegriCloud