[qemu] Fix reads on unreported memory addresses.
The function cpu_physical_memory_rw() thinks that if an address is
not mmio-related, it is assumed to be a RAM case. This is improper.
When making the assumption, we should make sure the address is less
than the guest physical memory size ram_size.
From: Cui, Dexuan <dexuan.cui@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
[NET] back: Replace netif->active with netif_carrier_ok
The connection status to the frontend can be represented using
netif_carrier_ok instead of netif->active. As a result, we delay
the construction of the dev qdisc until the carrier comes on. This
is a prerequisite for adding a tx queue.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[NET] back: Make use of the simplicity of tasklets in net_rx_action
Tasklets have the property that each one is running on only one CPU at
any time. This means that you don't have to worry about the tasklet
racing against itself. Therefore any resources used by just a single
tasklet does not need to be guarded by locks.
Since net_rx_action is the only user of alloc_mfn, we can remove the
mfn_lock that guard it.
The notify_list array is huge by Linux standards so placing it on the
stack is unsafe. Since net_rx_action is not re-entrant, we can simply
make it static.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Clear MPT l2 entries when allocating monitor pagetable
Changeset 10734 removed the code clearing MPT l2 entries, however
these entries are stained when copying from idle_pg_table_l2.
[IA64] Fix of C/S 10529:4260eb8c08740de0000081c61a6237ffcb95b2d5 for IA64.
When page is zapped from a domain, the page referenced counter
is checked. But it results in false positive alert on Xen/IA64
because a page 'in use' has reference count 2 on Xen/IA64.
- a page is assigned to guest domain's psudo physical address space.
This is decremented by guest_physmap_remove_page()
- a page is allocated for a domain.
This is decremented by the following put_page()
[qemu] Fix -net tap option when no ifname is specified.
Uninitialized ifname can cause qemu to quit. If the first character of the
ifname is not \0, qemu will think it's a valid ifname and configure
/dev/net/tun to use it. The configuration fails and qemu exits.
Based on a patch from: Steve Dobbelstein <steved@us.ibm.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
[powerpc] domain building fixes for linux kexec model
The following updates are included:
- No stack allocation is necessary
- Some buggy kernels require r13 to be zeroed
- the DTB must be loaded from a fixed address, we are using
"/root/DomU.dtb" until we have the tools build the DTB on their
own.
- Though we give the PFN of the store and console pages to the new
domain we must make sure the MFN is given to the tools.
[qemu] Initialize vga from within qemu for when the bios doesn't do so.
On xen/x86, vga bios is copied to 0xC0000 by guest firmware.
However on ia64 platform, native firmware depends on some
initialization vga state at power on and so does guest firmware.
That's why that vga bios initialization stub is required for vti
domain, to match platform requirement.
Signed-off-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
[qemu] Re-calculate color_table after color depth reset.
VNC client may reset color depth after connection, so if we don't
re-calculate color_table, monitor/console's background is abnormal.
Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Fix cirrus and rt8139 co-exist issue in new qemu-dm.
The root cause is that if two MMIO spaces are continuous, qemu may misuse
last MMIO space's read/write to handle current request.
Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
[HVM] Sync p2m table across all vcpus on x86_32p xen.
We found VGA acceleration can not work on SMP VMX guests on x86_32p
xen, this is caused by the way we construct p2m table today: only the 1st
l2 page table slot that maps p2m table pages is copied to none-vcpu0 vcpu
monitor page table when VMX is created. But VGA acceleration will
create some p2m table entries beyond the 1st l2 page table slot after HVM is
created, so only vcpu0 can get these p2m entries, and other vcpu can
not do VGA acceleration.
[SVM] Correct compile time compare of CONFIG_PAGING_LEVELS for 64bit and
32bit PAE guests. This code affects accesses to the CR4 register by the SVM guest.
Fix Linux so that it does not set a timeout if there are no pending
timers. Fix Xen so that it does not immediately fire a timer event if
it sees a very long timeout -- sometimes this means that there are
no pending timers.
This patch supports domU coredump on ia64. xen_panic_event() is
registered to panic_notifier_list, and xen_panic_event() calls
HYPERVISOR_shutdown(SHUTDOWN_crash) at panic time.
If xend is notified of crash status, xend calls dumpCore()
and create domU's core in /var/xen/dump.
paravirtualize vdso areabased on Kevin's pointout and Dan's Idea.
introduce hyperprivop HYPERPRIVOP_RSM_BE and HYPERPRIVOP_GET_PSR.
and paravirtualize vdso area using them.
Spawn vncviewer from qemu-dm.
- add vncviewer option to qemu-dm to spawn a vncviewer process.
- add the `vncconsole' config parameter which enables qemu-dm's vncviewer
option.
Based on a patch from: Don Dugger <donald.d.dugger@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
VMM save/restore r4~r7 and unat to handle virtualization fault
and mmio access, but it is not necessary for other faults to
save/restore these registers. This patch is to save/restore
these registers only when dtlb and virtualization fault happen.
vpsr can't keep track flowing bits of guest psr
be,up,ac,mfl,mfh,cpl,ri.
Previously every time xen gets control, xen will sync
vpsr with cr.ipsr, it's not neccessary.
Xen sync with cr.ipsr when needed.
[HVM] Currently in xentrace, MMIO is handled just like other page faults. The
tracing parameters are error code and the guest virtual address.
However, if we are to analyze MMIO, tracing gpa makes more sense.
This small pactch replaces the va with gpa when tracing MMIO.
[HVM] fix system crash when vmx guest startx or restore
Add this safety check like alloc_l4_table Signed-off-by: Edwin Zhai <edwin.zhai@intel.com> Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
[HVM] Create I/O context for MMIO/PIO processing in an
off-stack structure. Signed-off-by: Keir Fraser <keir@xensource.com> Signed-off-by: Xin B Li <xin.b.li@intel.com>
[XM-TEST] Increase timeout on hotplug-cpus-down test to 30 seconds.
This is needed when dom0 has 32 CPUs. Signed-off-by: Susan Krysan <krysans@unisys.com>
[IA64] Re-enable tools/xcutils build on ia64. We now have
save/restore working in the xen-ia64-unstable.hg thanks to some
excellent work by Tristan. This simply splits the xcutils components
from the x86-ish linux_save/restore files in a way that should be
friendly to powerpc.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Xm-test HVM network testing is broken. The new qemu code doesn't support
pcnet32, which is the current default driver loaded onto the disk.img.
This patch changes teh default to the rtl8139, which is xend's default.
This patch also adds a new "--with-network-drv" configuration option so
people can configure different drivers than the default.
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
[TPM] Discard a future response packet after a timeout has occurred instead of
removing the request right away. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>