Thanks to Kevin for tracking down this problem. This is a temporary
solution until we come up with something better for ia64.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
fix ptc.ga virtualization. Uninitialized vcpu doesn't need tlb flush.
ptc_ga_remote_func() calls vmx_vcpu_ptc_l() in IPI context.
I.e. vcpu may not equal to current. On the other hand vmx_vcpu_ptc_l()
assumes vcpu = current. remove the assumption.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
This patch modifies the vmx fault handler to display a message when a
fault occurs in hypervisor.
This includes the followings:
- Break 0 handler is modified to check psr.vm bit instead of cpl.
- External interrupt handler is modified to get current using
MINSTATE_GET_CURRENT instead of r21. r21 has been used in DO_SAVE_MIN
which is called from other fault handlers. I'm not sure why the
original vmx fault handler gets the current from r21.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Tetsu Yamamoto <yamamoto.tetsu@jp.fujitsu.com>
get_page() when access a page of domain.
pages can be removed from domain and freed by another cpu.
To prevent accessing freeing page, use get_page() and put_page()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
fixed some races in ia64_do_page_fault(), vcpu_itc_i(), vcpu_itc_d() and vcpu_fc().
introduce struct p2m_entry and check it later and try it again.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
add volatile pte entry of the p2m table.
Since p2m table are shared by cpu. volatile is needed.
fix the races in pte access of __assign_domain_page() and
destroy_grant_host_mapping()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Cleanup: EFI_RESET_SYSTEM now always calls domain_shutdown.
machine_restart and machine_halt calls efi reset_system to do their job.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
Create current_psr_i_addr per cpu variables.
Inside Xen, do not use interrupt_mask_addr because it can be modified by
the guest.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
the system is started up. This prevents from getting spurious events
between hypercall to bind an event-channel and registering
appropriate event handler.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
for unprivileged domains (in any case, can fall back to swiotlb).
On non-privileged domain of Xen/IA64, this caused some trouble.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
No longer open the device as non-blocking: all reads immediately follow
a select() on the device indicating it's ready to read.
Signed-off-by: John Levon <john.levon@sun.com>
Previously, on SMP VTI-domain, Guest OS was responsible for
syncing itc by calling ia64_sync_itc, but the round trip may
be very large on VTI domain, that may cause guest itcs are
not synced well and cause guest wall clock is not accurate.
This patch intends to fix this issue, when guest wants to sync
itc( vcpus other than vcpu0 write itc), VMM directly get vcpu0
itc for other vcpus.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
can sleep, we could race save/restore and end up with stale
machine addresses stores in pgd entries. Avoid this by
remembering virtuall addresses and translating to machine
addresses all at the end and protected by the pgd_lock.
Signed-off-by: Keir Fraser <keir@xensource.com>
when reconnecting to backend driver (e.g., after save/restore or migrate).
Two main reasons for this:
1. The retransmit code is broken for fragmented packets. It would need
a rewrite to cope with the new scatter-gather format.
2. We will drop packets anyway, in both directions (e.g., takes some
time for received packets to be redirected to new virtual interface;
also further transmitted packets from the network stack are dropped
after we call netif_carrier_off(), so even if we retransmite what's
already in the ring it is likely that some subsequent packets will
already be lost).
If this causes downtimes that are too long (particularly for live
relocation) then the whole strategy for buffering packets while the
frontend-backend connection is severed needs to be considered.
Signed-off-by: Keir Fraser <keir@xensource.com>
Moving the re-allocation to low memory into pgd_alloc() has several
advantages:
1. Avoids race with save/restore where pgdir may end up above 4GB after
save/restore.
2. If pgdir cannot be re-allocated we can return failure to the caller
rather than BUG().
3. Slightly reduces diff against native Linux code.
Signed-off-by: Keir Fraser <keir@xensource.com>
1. We must ensure gnttab callbacks are disabled and all work
flushed before tearing down device state. A new gnttab interface
call is added for this purpose.
2. blkif_free() must check for a request_queue before deref'ing it.
Signed-off-by: Keir Fraser <keir@xensource.com>
Now guest vhpt table of VMX domain is searched to insert some
entry into vtlb on the fly. However previous guard on memory
attribute is only done for guest itc.d emulation. That breaks
VGA acceleration and this patch fixes it by moving check to
right place.
Signed-off-by Kevin Tian <kevin.tian@intel.com>