since our seek times are virtually 0. Although this flag is
deprecated by newer ATA standards, Linux at least checks it for CD
drives, and would timeout in some cases if we do not set it.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
When creating an HVM domain, if e.g. another domain is created before
qemu allocates video memory, the extra 8MB memory ballooning is not
available any more, because it got consumed by the other domain.
This fixes it by taking video memory from the main memory:
- make hvmloader use e820_malloc to reserve some of the main memory
and notify ioemu of its address through the Xen platform PCI card.
- add XENMAPSPACE_mfn to the xen_add_to_physmap memory op, to allow
ioemu to move the MFNs between the original position and the PCI
mapping, when LFB acceleration is disabled/enabled
- add a remove_from_physmap memory op, to allow ioemu to unmap it
completely for the case of old guests with acceleration disabled.
- add xc_domain_memory_translate_gpfn_list to libxc to allow ioemu to
get the MFNs of the video memory.
- have xend save the PCI memory space instead of ioemu: if a memory
page is there, the guest can access it like usual memory, so xend
can safely be responsible to save it. The extra benefit is that
live migration will apply the logdirty optimization there too.
- handle old saved images, populating the video memory from ioemu if
really needed.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
softirq handle rather than kludging it with set_timer().
Should be faster and is definitely clearer. Also avoids us using
set_timer() in IRQ context (which is currently broken but soon won't
be).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Actually a fair amount of infrastructure is onvolved these days, and
we'd like subsystems we call into know that we're in IRQ context so
they can handle that or BUG/ASSERT if appropriate.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
To avoid flickers, PyGRUB has to avoid spurious ncurses refresh as
much as possible, in particular before the complete screen is drawn,
and eventually call doupdate last.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
When we "xm destroy" a guest with assigned devices, in
xen/common/domain.c:domain_kill(), we relinquish guest's memory first,
then invoke domain_destroy() -> complete_domain_destroy() ->
arch_domain_destroy() -> pci_release_devices()/iommu_domain_destroy().
Between relinquish_memory() and domain_destroy(), a device may be
issuing DMA request and access guest's relinquished memory.
We can do_FLR() to quiesce devices before xc.domain_destroy().
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Besides io_apic_write(), io_apic_modify() also writes to io apic RTE.
This patch adds an intercept to remap interrupt in io_apic_modify().
In io_apic_read_remap_rte(), 'mask' value of RTE should not affect the
return value, so remove its checking.
Finally, remove panic() when index overflows. Instead, print error
messages and report back the failure to upper level.
Signed-off-by: Weidong Han <weidong.han@intel.com>
pass for the HVM guest to successfully boot.
Currently only one test (REP INS across page boundaries) but more will
be added in future.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
PAGE_SIZE - (x & ~PAGE_MASK) is not equivalent to -x & ~PAGE_MASK
Also the early goto could be removed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
The ssidref in getdomaininfo() is not initialized when XSM_ENABLE is
not defined. So, xentop might display a wrong value of ssid.
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
point at which the index register (SI/DI) wraps. This can cause a
discontinuity in the address range accessed by the repeated
instruction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
VT-d hot-plug is done in such a way: 1) xend sends 'pci-ins' command
to ioemu via xenstore; 2) ioemu creates pass-through device and raises
SCI to guest OS; guest OS loads device driver, and device driver
initializes the hot-plugged device; 3) xend does FLR. There is a race
condition about 2) and 3). If 3) runs slow, we have troubles. Thanks
for Yuji Shimada's locating the issues.
We can work around the issues by not doing FLR when we create domain
or hotplug device into guest, namely, we only do FLR when we destroy
domain or hotplug device from guest.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>