This patch fixes an issue where a guest could get stuck if a write to
memory marked p2m_ram_ro happened from user mode. It would get
misinterpreted as a user-mode page-table write, and the "dummy write"
emulation necessary to skip over the instruction never got done. In
looking into this, I also discovered that the user-mode page-table
check is done in two places, the second (in emulate_map_dest) of which
can never be reached and is just a waste of cycles. Tim Deegan
requested that rather than completely removing that code, I'd leave it
in for debug-builds with an added warning-print.
Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
really *is* writable in that region. This is almost enough to get S3
working again (read-only firmware-waking-vector is still a problem).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
In acpi_parse_one_drhd(), remove return directly when only one
INCLUDE_ALL check fails, so that avoid memory leak. In addition,
remove "dmaru->scope.devices_cnt == 0 && !dmaru->include_all" check,
due to PCI-PCI bridges are not counted.
This patch fixes bug #1307.
Signed-off-by: Weidong Han <weidong.han@intel.com>
- adjust_guest_l?e() shouldn't be called on non-guest entries
- unadjust_guest_l3e() should be called in the back-out loop of
alloc_l3_table()
- create_pae_xen_mappings() and pae_flush_pgd() shouldn't be called in
the failure case of mod_l3_entry()
Signed-off-by: Jan Beulich <jbeulich@novell.com>
1. Only useful for NUMA systems, so turn it off on non-NUMA systems by
default.
2. On NUMA systems, by default relate the DMA heap size to NUMA node 0
memory size (so that not all of node 0's memory ends up being 'DMA
heap').
3. Remove the 'dma emergency pool'. It's less useful now that running
out of low memory isn;t as fatal as it used to be (e.g., when we
needed to be able to allocate low-memory PAE page directories).
Based on patches by Andre Przywara and Xiaowei Yang.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Thus to avoid xen-pm being manually enforced by end user in dom0
cmdline but without enabling them in xen.
signed-off-by: Wei Gang <gang.wei@intel.com>
By repeating "xm debug-key t; xm dmesg | tail -N" in
dom0 (e.g. with the "watch" command), useful skew info
about the machine can be collected, which will be very
helpful for diagnosing customer problems on misbehaving
machines.
Patch details:
1) Min and max readings from the current sample are useless
so get rid of those but retain the current maxdif (stime skew).
2) Remember max of skew, sum of skews, and a count
so average skew can be displayed.
3) Also record info for cycles (tsc on x86, itc on ia64).
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
This results in reduced skew; both max and average skew are reduced by
between a factor of 2 and 3. Note that timers still fire at slightly
different times because the next "round epoch" is still relative to
local stime which still has some inter-processor skew.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
devices without proper FLR capability.
Currently integrated devices without proper FLR capability are not
assignable. This is not nice since actually they may be assignable,
but due to old BIOS the proper FLR capability is not exposed. We can
use the previously-used Dstate transition method to do FLR for them.
This works well and looks few issues are reported AFAIK. Maybe we can
make a black list for the (rare) integrated devices that don't work
with this method.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Certain PCI or PCIe devices needs to be co-assigned. Currently we
require all the related devices be assigned to the same guest. This
can be relaxed to: part of them can be assgined to the same guest, and
after that, the left ones can't be assigned.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
This patch fixes an issue when x86_emulate is called with
force_writeback=1 set. It resulted in cmp and test instructions with
memory operands to have the mem value written back after instruction
emulation finished. This caused false alarms on writes to RO mem, and
might have caused other issues if unintended writes occured to device
registers in mmio space.
Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
With this patch you can set QEMU_TAG to check out a specific version.
When we set it, QEMU_TAG ought to be in Config.mk, I think.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
After changeset 18030 and 18064 were checked in, I found some issues
when creating HVM domains with devices assigned.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
The creation operation also opens a file, we need to allocate a
virtual fd for that too.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Uninitialized dev_bus_addr argument to GNTTABOP_unmap_grant_ref
results in an angry hypervisor.
* Set errno in libxc and return -1 on error.
* op.status is a int16_t, so it should be printed with PRId16.
* Don't print domids[0] or refs[0] if the ptr is NULL. It's more
polite to crash later, after the message has been printed.
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
Only handle information passed up from dom0 when actually controlling
the respective functionality. Only count up CPUs once for each CPU.
Allow dom0 to provide information incrementally.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
I've implemented a grant map for mini-os to support the xc_gnttab_*()
functions, the equivalent of gntdev in linux. This is useful for my
work in putting xenstored in a stub domain.
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
The current implementation in minios of xc_evtchn_pending doesn't set
read=0 when there is exactly one port pending. This resulted in
select() incorrectly reporting the file descriptor as ready.
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Also get rid of va and npages members of privcmd_mmap_entry since we
do not need them any more.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
The current stdvga code never checks if the copy_from/to_guest calls
fail, and thus silenty fails if both sides of an IOREQ_COPY points
into mmio space. This patch fixes this and makes the code correctly
handle intra-vga-mem copies, as well as log & turn off caching if some
more "exotic" type of mmio (say, copy from vga mem to some other
device's iomem), so that such mmio reqs will fall through to regular
ioemu where they can hopefully be handled correctly.
In practice, this patch fixes a number of graphical glitches for
guests running in standard vga mode, including a corrupted OS/2 boot
graphic.
Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>