xen/23538-hvm-pio-emul-no-host-crash.patch
Charles Arnold 1b78387def - fate#309893: Add Xen support for AMD family 15h processors
- fate#309901: Add Xen support for SVM TSC scaling in AMD family 
  15h
- fate#311951: Ivy Bridge: XEN support for Supervisor Mode 
  Execution Protection (SMEP) 
  23437-amd-fam15-TSC-scaling.patch
  23462-libxc-cpu-feature.patch
  23481-x86-SMEP.patch
  23504-x86-SMEP-hvm.patch
  23505-x86-cpu-add-arg-check.patch
  23508-vmx-proc-based-ctls-probe.patch
  23510-hvm-cpuid-DRNG.patch
  23511-amd-fam15-no-flush-for-C3.patch
  23516-cpuid-ERMS.patch
  23538-hvm-pio-emul-no-host-crash.patch
  23539-hvm-cpuid-FSGSBASE.patch
  23543-x86_64-maddr_to_virt-assertion.patch
  23546-fucomip.patch

- Fix libxc reentrancy issues
  23383-libxc-rm-static-vars.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=128
2011-06-17 16:45:46 +00:00

34 lines
1.1 KiB
Diff

# HG changeset patch
# User George Dunlap <george.dunlap@eu.citrix.com>
# Date 1308150314 -3600
# Node ID 35b4220c98bc89b7162d19ed6c858e027fabff69
# Parent cac82bc1ea23bc213ece4c84db2703dd46df7f25
x86/hvm: Crash domain rather than guest on unexpected PIO IO state
Under certain conditions, if an IO gets into an unexpected state,
hvmemul_do_io can return X86EMUL_UNHANDLEABLE. Unfortunately,
handle_pio() does not expect this state, and calls BUG() if it sees
it, crashing the host.
Other HVM io-related code crashes the guest in this case. This patch
makes handle_pio() do the same.
The crash was seen when executing crash_guest in dom0 to forcibly
crash the guest.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
--- a/xen/arch/x86/hvm/io.c
+++ b/xen/arch/x86/hvm/io.c
@@ -239,7 +239,9 @@ int handle_pio(uint16_t port, int size,
curr->arch.hvm_vcpu.io_state = HVMIO_handle_pio_awaiting_completion;
break;
default:
- BUG();
+ gdprintk(XENLOG_ERR, "Weird HVM ioemulation status %d.\n", rc);
+ domain_crash(curr->domain);
+ break;
}
return 1;