History | View | Annotate | Download (35.2 kB)
xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional)
We are currently setting the PCI hole to start at HVM_BELOW_4G_RAM_END,that is 0xf0000000.Start the PCI hole at 0xe0000000 instead, that is the same value used bypc_init1 and qemu-xen-traditional....
xen: remove xen_vcpu_init
No need for xen_vcpu_init anymore:
- the RTC emulator doesn't have any periodic timers continuously runningeven in absence of guest interactions anymore;
- qemu_dummy_start_vcpu takes care of disabling TCG for us, so we don't...
sysemu: avoid proliferation of include/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification.Right now there are many catch-all headers in include/hw/ARCH dependingon cpu.h, and this makes it necessary to compile these files per-target.However, fixing this does not belong in these patches....
cpu: Move halted and interrupt_request fields to CPUState
Both fields are used in VMState, thus need to be moved together.Explicitly zero them on reset since they were located beforebreakpoints.
Pass PowerPCCPU to kvmppc_handle_halt().
Signed-off-by: Andreas Färber <afaerber@suse.de>
xen: Simplify halting of first CPU
Use the global first_cpu variable to halt the CPU rather than using alocal first_cpu initialized from qemu_get_cpu(0).
This will allow to change qemu_get_cpu() return type to CPUStatedespite use of the CPU_COMMON halted field in the reset handler....
xen: add missing include
xen-all needs to access CharDeviceState's filename field, soit 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 staging
softmmu: move include files to include/sysemu/
misc: move include files to include/qemu/
exec: move include files to include/exec/
cpu_ioreq_pio, cpu_ioreq_move: i should be uint32_t rather than int
The current code compare i (int) with req->count (uint32_t) in a forloop, risking an infinite loop if req->count is equal to UINT_MAX.
Also i is only used in comparisons or multiplications with unsigned...
cpu_ioreq_pio, cpu_ioreq_move: introduce read_phys_req_item, write_phys_req_item
Replace a lot of formulaic multiplications (containing casts, no less)with calls to a pair of functions. This encapsulates in a singleplace the operations which require care relating to integer overflow....
Fix compile errors when enabling Xen debug logging.
Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
pci: update all users to look in pci/
update all users so we can remove the makefile hack.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
memory: use AddressSpace for MemoryListener filtering
Using the AddressSpace type reduces confusion, as you can't accidentallysupply 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 callbacks
Removes quite a bit of useless code.
Signed-off-by: Avi Kivity <avi@redhat.com>
cleanup useless return sentence
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.
If the call to xc_hvm_track_dirty_vram() fails, then we set dirtybit on all thevideo 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.
This function is to be used during live migration. Every write access to theguest memory should call this funcion so the Xen tools knows which pages aredirty.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
QMP, Introduce xen-set-global-dirty-log command.
This command is used during a migration of a guest under Xen. It callsmemory_global_dirty_log_start or memory_global_dirty_log_stop according to theargument pass to the command.
xen-all.c: fix multiply issue for int and uint types
If the two multiply operands are int and uint types separately,the int type will be transformed to uint firstly, which is not theintent in our code piece. The fix is to add (int64_t) transformfor the uint type before the multiply....
memory: pass EventNotifier, not eventfd
Under Win32, EventNotifiers will not have event_notifier_get_fd, so wecannot call it in common code such as hw/virtio-pci.c. Pass a pointer tothe notifier, and only retrieve the file descriptor in kvm-specific code....
Introduce Xen PCI Passthrough, qdevice
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>...
Call xc_domain_shutdown with the reboot flag when the guest requests a reboot.
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>...
xen: disable rtc_clock
rtc_clock is only used by the RTC emulator (mc146818rtc.c), however Xenhas 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.2
xc_hvm_inject_msi is only available on Xen >= 4.2: add a dummycompatibility function for Xen < 4.2.
Also enable msi support only on Xen >= 4.2.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
xen: introduce an event channel for buffered io event notifications
Use the newly introduced HVM_PARAM_BUFIOREQ_EVTCHN to receivenotifications for buffered io events.After the first notification is received leave the event channel maskedand setup a timer to process the rest of the batch....
Xen: basic HVM MSI injection support.
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 staging
xen: record physmap changes to xenstore
Write to xenstore any physmap changes so that the hypervisor can beaware of them.Read physmap changes from xenstore on boot.
xen mapcache: check if memory region has moved.
This patch changes the xen_map_cache behavior. Before trying to map a guestaddr, 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,...
xen: do not allocate RAM during INMIGRATE runstate
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Rename CPUState -> CPUArchState
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...
Merge remote-tracking branch 'qemu-kvm/memory/core' into staging
memory: allow MemoryListeners to observe a specific address space
Ignore any regions not belonging to a specified address space.
xen: ignore I/O memory regions
memory: support stateless memory listeners
Current memory listeners are incremental; that is, they are expected tomaintain their own state, and receive callbacks for changes to that state.
This patch adds support for stateless listeners; these work by receiving...
memory: switch memory listeners to a QTAILQ
This allows reverse iteration, which in turns allows consistent orderingamong 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>
memory: move ioeventfd ops to MemoryListener
This way the accelerator (kvm) can handle them directly.
suspend: switch acpi s3 to new infrastructure.
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 bedone in a notifier function now....
memory: change dirty setting APIs to take a size
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+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
xen: Fix after recent change in dirty bitmap tracking.
A recent patch set from Avi break the dirty bitmap support of Xen. Butthis is because xen_sync_dirty_bitmap will return an error for anunhandled memory range (a0000 - bffff). However this is not a fatal...
xen: convert framebuffer dirty tracking to memory API
vmstate, memory: decouple vmstate from memory API
Currently creating a memory region automatically registers it forlive migration. This differs from other state (which is enumeratedin a VMStateDescription structure) and ties the live migration codeinto the memory core....
xen: convert to MemoryListener API
xen, vga: add API for registering the framebuffer
Xen currently uses the name of a memory region to determine whether itis the framebuffer. Replace with an explicit API.
xen: convert to memory API
Undo the private implementation of qemu_ram_alloc(); use the global one(which calls right back into xen_ram_alloc()).
memory, xen: pass MemoryRegion to xen_ram_alloc()
Currently xen_ram_alloc() relies on ram_addr, which is going away.Give it something else to use as a cookie.
Replace the VMSTOP macros with a proper state type
Today, when notifying a VM state change with vm_state_notify(),we pass a VMSTOP macro as the 'reason' argument. This is not idealbecause the VMSTOP macros tell why qemu stopped and not exactlywhat the current VM state is....
Drop the vm_running global variable
Use runstate_is_running() instead, which is introduced by this commit.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
xen: use uint64_t instead of target_ulong in cpu_ioreq_move
cpu_ioreq_move might move 8 bytes at a time so we must make sure thatthe temporary variable can hold 8 bytes.
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
xen: Fix the memory registration to reflect of what is done by Xen.
A Xen guest memory is allocated by libxc. But this memory is notallocated continuously, instead, it leaves the VGA IO memory space notallocated, same for the MMIO space (at HVM_BELOW_4G_MMIO_START of size...
cpu-common: Have a ram_addr_t of uint64 with Xen.
In Xen case, memory can be bigger than the host memory. that mean a32bits host (and QEMU) should be able to handle a RAM address of 64bits.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Alexander Graf <agraf@suse.de>
xen: introduce xen_change_state_handler
Remove the call to xenstore_record_dm_state from xen_main_loop_preparethat is HVM specific.Add a new vm_change_state_handler shared between xen_pv and xen_hvmmachines to record the VM state to xenstore.
notifier: Pass data argument to callback
This allows to pass additional information to the notifier callbackwhich is useful if sender and receiver do not share any other distinctdata structure.
Will be used first for the clock reset notifier.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
xen: add vkbd support for PV on HVM guests
Register the vkbd backend even when running as device emulator for HVMguests: it is useful because it doesn't need a frequent timer like usb.
Check whether the XenInput DisplayState has been set in the initialise...
xen_console: support the new extended xenstore protocol
Since CS 21994 on xen-unstable.hg and CS466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, fewchanges have been introduced to the PV console xenstore protocol, asdescribed by the document docs/misc/console.txt under xen-unstable.hg....
xen: Clean up map cache API naming
The map cache is a Xen thing, so its API should make this clear.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Alexander Graf <agraf@suse.de>
xen: enable console and disk backend in HVM mode
Initialize the Xen console backend and the Xen disk backend even whenrunning in HVM mode so that PV on HVM drivers can connect to them.
Merge remote-tracking branch 'qmp/for-anthony' into staging
xen: only track the linear framebuffer
Xen can only do dirty bit tracking for one memory region, so we shouldexplicitly avoid trying to track anything but the vga vram region.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Alexander Graf <agraf@suse.de>
xen: Introduce VGA sync dirty bitmap support
This patch introduces phys memory client for Xen.
Only sync dirty_bitmap and set_memory are actually implemented.migration_log will stay empty for the moment.
Xen can only log one range for bit change, so only the range in the...
Allow silent system resets
This allows qemu_system_reset to be issued silently for internalpurposes, ie. without sending out a monitor event. Convert the systemreset after startup to the silent mode.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
xen: Set running state in xenstore.
This tells to the xen management tool that the machine can begin run.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
xen: Add Xen hypercall for sleep state in the cmos_s3 callback.
xen: Introduce Xen Interrupt Controller
Every set_irq call makes a Xen hypercall.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Alexander Graf <agraf@suse.de>
xen: Introduce the Xen mapcache
On IA32 host or IA32 PAE host, at present, generally, we can't createan HVM guest with more than 2G memory, because generally it's almostimpossible for Qemu to find a large enough and consecutive virtualaddress space to map an HVM guest's whole physical address space....
xen: Initialize event channels and io rings
Open and bind event channels; map ioreq and buffered ioreq rings.
Signed-off-by: Arun Sharma <arun.sharma@intel.com>Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
xen: Add initialisation of Xen
The xenpv machine use the common init function.
xen: Add xenfv machine
Introduce the Xen FV (Fully Virtualized) machine to Qemu, some more Xenspecific call will be added in further patches.
piix_pci: Introduces Xen specific call for irq.
This patch introduces Xen specific call in piix_pci.
The specific part for Xen is in write_config, set_irq and get_pirq.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...