xen/24883-x86-guest-walk-not-present.patch
Charles Arnold 7f6bd728fd - bnc#745880 - cpuid setting is not preserved across xend restarts
xend-cpuid.patch

- Rename 2XXXX-vif-bridge.patch -> vif-bridge-tap-fix.patch

- bnc#747331 - XEN: standard "newburn" kernel QA stress test on guest
  (+ smartd on Dom0?) freezes the guest
  24883-x86-guest-walk-not-present.patch
- bnc#745367 - MCE bank handling during migration
  24781-x86-vmce-mcg_ctl.patch
  24886-x86-vmce-mcg_ctl-default.patch
  24887-x86-vmce-sr.patch
- bnc#744771 - L3: VM with passed through PCI card fails to reboot
  under dom0 load
  24888-pci-release-devices.patch
- Upstream patches from Jan
  24517-VT-d-fault-softirq.patch
  24527-AMD-Vi-fault-softirq.patch
  24535-x86-vMSI-misc.patch
  24615-VESA-lfb-flush.patch
  24690-x86-PCI-SERR-no-deadlock.patch
  24701-gnttab-map-grant-ref-recovery.patch
  24742-gnttab-misc.patch
  24780-x86-paging-use-clear_guest.patch
  24805-x86-MSI-X-dom0-ro.patch
  ioemu-9869-MSI-X-init.patch
  ioemu-9873-MSI-X-fix-unregister_iomem.patch

- bnc#745005 - Update vif configuration examples in xmexample*
  Updated xen-xmexample.diff

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=172
2012-03-05 20:59:08 +00:00

71 lines
2.2 KiB
Diff

References: bnc#747331
# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1329992967 0
# Node ID adcd6ab160fae996d53c6843da0c5728ca8a8bd3
# Parent 3d4955cbcb67a1c41e6b71af783b0921a3f7b081
x86/mm: Don't check for invalid bits in non-present PTEs.
If _PAGE_PRESENT is clean in a pagetable entry, any pattern of bits
is valid in the rest of the entry. OSes that special-case
PFEC_invalid_bits (since it should never happen) will be confused
by our setting it in this way.
Signed-off-by: Tim Deegan <tim@xen.org>
--- a/xen/arch/x86/mm/guest_walk.c
+++ b/xen/arch/x86/mm/guest_walk.c
@@ -162,8 +162,11 @@ guest_walk_tables(struct vcpu *v, struct
l4p = (guest_l4e_t *) top_map;
gw->l4e = l4p[guest_l4_table_offset(va)];
gflags = guest_l4e_get_flags(gw->l4e) ^ iflags;
+ if ( !(gflags & _PAGE_PRESENT) ) {
+ rc |= _PAGE_PRESENT;
+ goto out;
+ }
rc |= ((gflags & mflags) ^ mflags);
- if ( rc & _PAGE_PRESENT ) goto out;
/* Map the l3 table */
l3p = map_domain_gfn(p2m,
@@ -176,9 +179,11 @@ guest_walk_tables(struct vcpu *v, struct
/* Get the l3e and check its flags*/
gw->l3e = l3p[guest_l3_table_offset(va)];
gflags = guest_l3e_get_flags(gw->l3e) ^ iflags;
- rc |= ((gflags & mflags) ^ mflags);
- if ( rc & _PAGE_PRESENT )
+ if ( !(gflags & _PAGE_PRESENT) ) {
+ rc |= _PAGE_PRESENT;
goto out;
+ }
+ rc |= ((gflags & mflags) ^ mflags);
#else /* PAE only... */
@@ -213,9 +218,11 @@ guest_walk_tables(struct vcpu *v, struct
#endif /* All levels... */
gflags = guest_l2e_get_flags(gw->l2e) ^ iflags;
- rc |= ((gflags & mflags) ^ mflags);
- if ( rc & _PAGE_PRESENT )
+ if ( !(gflags & _PAGE_PRESENT) ) {
+ rc |= _PAGE_PRESENT;
goto out;
+ }
+ rc |= ((gflags & mflags) ^ mflags);
pse = (guest_supports_superpages(v) &&
(guest_l2e_get_flags(gw->l2e) & _PAGE_PSE));
@@ -277,6 +284,10 @@ guest_walk_tables(struct vcpu *v, struct
goto out;
gw->l1e = l1p[guest_l1_table_offset(va)];
gflags = guest_l1e_get_flags(gw->l1e) ^ iflags;
+ if ( !(gflags & _PAGE_PRESENT) ) {
+ rc |= _PAGE_PRESENT;
+ goto out;
+ }
rc |= ((gflags & mflags) ^ mflags);
}