mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
	Chris Wright <chrisw@sous-sol.org>,
	Joerg Roedel <joerg.roedel@amd.com>
Subject: [072/139] x86/amd-iommu: Pt mode fix for domain_destroy
Date: Thu, 22 Apr 2010 12:54:09 -0700	[thread overview]
Message-ID: <20100422195412.048276476@kvm.kroah.org> (raw)
In-Reply-To: <20100422195715.GA25490@kroah.com>

2.6.33-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Chris Wright <chrisw@sous-sol.org>

commit 04e856c072b84042bb56c487c2868638bb3f78db upstream.

After a guest is shutdown, assigned devices are not properly
returned to the pt domain.  This can leave the device using
stale cached IOMMU data, and result in a non-functional
device after it's re-bound to the host driver.  For example,
I see this upon rebinding:

 AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x0000 address=0x000000007e2a8000 flags=0x0050]
 AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x0000 address=0x000000007e2a8040 flags=0x0050]
 AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x0000 address=0x000000007e2a8080 flags=0x0050]
 AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x0000 address=0x000000007e2a80c0 flags=0x0050]
 0000:02:00.0: eth2: Detected Hardware Unit Hang:
 ...

The amd_iommu_destroy_domain() function calls do_detach()
which doesn't reattach the pt domain to the device.
Use __detach_device() instead.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/amd_iommu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -2298,7 +2298,7 @@ static void cleanup_domain(struct protec
 	list_for_each_entry_safe(dev_data, next, &domain->dev_list, list) {
 		struct device *dev = dev_data->dev;
 
-		do_detach(dev);
+		__detach_device(dev);
 		atomic_set(&dev_data->bind, 0);
 	}
 



  parent reply	other threads:[~2010-04-22 20:17 UTC|newest]

Thread overview: 142+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 19:57 [000/139] 2.6.33.3-stable review Greg KH
2010-04-22 19:52 ` [001/139] drm/edid: allow certain bogus edids to hit a fixup path rather than fail Greg KH
2010-04-22 19:52 ` [002/139] drm/radeon: add new RS880 pci id Greg KH
2010-04-22 19:53 ` [003/139] drm: remove the EDID blob stored in the EDID property when it is disconnected Greg KH
2010-04-22 19:53 ` [004/139] fat: fix buffer overflow in vfat_create_shortname() Greg KH
2010-04-22 19:53 ` [005/139] oom: fix the unsafe usage of badness() in proc_oom_score() Greg KH
2010-04-22 19:53 ` [006/139] drm/radeon/kms: never treat rs4xx as AGP Greg KH
2010-04-22 19:53 ` [007/139] drm/radeon/kms: Fix NULL pointer dereference if memory allocation failed in a simple way Greg KH
2010-04-22 19:53 ` [008/139] drm/radeon/kms: dont print error on -ERESTARTSYS Greg KH
2010-04-22 19:53 ` [009/139] drm/radeon/kms: fix pal tv-out support on legacy IGP chips Greg KH
2010-04-22 19:53 ` [010/139] drm: Return ENODEV if the inode mapping changes Greg KH
2010-04-22 19:53 ` [011/139] sh: Fix FDPIC binary loader Greg KH
2010-04-22 19:53 ` [012/139] sh: Enable the mmu in start_secondary() Greg KH
2010-04-22 19:53 ` [013/139] reiserfs: Fix locking BUG during mount failure Greg KH
2010-04-22 19:53 ` [014/139] [SCSI] libiscsi: Fix recovery slowdown regression Greg KH
2010-04-22 19:53 ` [015/139] x86,kgdb: Always initialize the hw breakpoint attribute Greg KH
2010-04-22 19:53 ` [016/139] Freezer: Fix buggy resume test for tasks frozen with cgroup freezer Greg KH
2010-04-22 19:53 ` [017/139] iwlwifi: fix regulatory Greg KH
2010-04-22 19:53 ` [018/139] iwlwifi: counting number of tfds can be free for 4965 Greg KH
2010-04-22 19:53 ` [019/139] iwlwifi: range checking issue Greg KH
2010-04-22 19:53 ` [020/139] setup correct int pipe type in ar9170_usb_exec_cmd Greg KH
2010-04-22 19:53 ` [021/139] mac80211: fix PREQ processing and one small bug Greg KH
2010-04-22 19:53 ` [022/139] mac80211: move netdev queue enabling to correct spot Greg KH
2010-04-22 19:53 ` [023/139] mac80211: tear down all agg queues when restart/reconfig hw Greg KH
2010-04-22 19:53 ` [024/139] sparc: Fix regset register window handling Greg KH
2010-04-22 19:53 ` [025/139] sunxvr500: Ignore secondary output PCI devices Greg KH
2010-04-22 19:53 ` [026/139] WATCHDOG: hpwdt - fix lower timeout limit Greg KH
2010-04-22 19:53 ` [027/139] WATCHDOG: iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point DeviceIDs Greg KH
2010-04-22 19:53 ` [028/139] genirq: Force MSI irq handlers to run with interrupts disabled Greg KH
2010-04-22 19:53 ` [029/139] tty: release_one_tty() forgets to put pids Greg KH
2010-04-22 19:53 ` [030/139] HID: fix oops in gyration_event() Greg KH
2010-04-22 19:53 ` [031/139] raw: fsync method is now required Greg KH
2010-04-22 19:53 ` [032/139] readahead: fix NULL filp dereference Greg KH
2010-04-22 19:53 ` [033/139] include/linux/kfifo.h: fix INIT_KFIFO() Greg KH
2010-04-22 19:53 ` [034/139] ALSA: mixart: range checking proc file Greg KH
2010-04-22 19:53 ` [035/139] ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981 Greg KH
2010-04-22 19:53 ` [036/139] ALSA: hda - Add ASRock mobo to MSI blacklist Greg KH
2010-04-22 19:53 ` [037/139] ALSA: hda - Add MSI blacklist for Aopen MZ915-M Greg KH
2010-04-22 19:53 ` [038/139] backlight: mbp_nvidia_bl - add five more MacBook variants Greg KH
2010-04-22 19:53 ` [039/139] pata_via: Add VIA VX900 support Greg KH
2010-04-22 19:53 ` [040/139] libata: disable NCQ on Crucial C300 SSD Greg KH
2010-04-22 19:53 ` [041/139] [S390] s390: disable change bit override Greg KH
2010-04-22 19:53 ` [042/139] cifs: Fix a kernel BUG with remote OS/2 server (try #3) Greg KH
2010-04-22 19:53 ` [043/139] CIFS: initialize nbytes at the beginning of CIFSSMBWrite() Greg KH
2010-04-22 19:53 ` [044/139] ath9k: fix double calls to ath_radio_enable Greg KH
2010-04-22 19:53 ` [045/139] iwlwifi: need check for valid qos packet before free Greg KH
2010-04-22 19:53 ` [046/139] mac80211: Handle mesh action frames in ieee80211_rx_h_action Greg KH
2010-04-22 19:53 ` [047/139] ARM: 6031/1: fix Thumb-2 decompressor Greg KH
2010-04-22 19:53 ` [048/139] drm/edid/quirks: Envision EN2028 Greg KH
2010-04-22 19:53 ` [049/139] drm/radeon: R300 AD only has one quad pipe Greg KH
2010-04-22 19:53 ` [050/139] drm/radeon/kms: fix washed out image on legacy tv dac Greg KH
2010-04-22 19:53 ` [051/139] drm/radeon/kms/combios: verify dac_adj values are valid Greg KH
2010-04-22 19:53 ` [052/139] x86-32, resume: do a global tlb flush in S4 resume Greg KH
2010-04-22 19:53 ` [053/139] x86: Handle overlapping mptables Greg KH
2010-04-22 19:53 ` [054/139] x86, hpet: Erratum workaround for read after write of HPET comparator Greg KH
2010-04-22 19:53 ` [055/139] x86: Fix double enable_IR_x2apic() call on SMP kernel on !SMP boards Greg KH
2010-04-22 19:53 ` [056/139] sched: sched_getaffinity(): Allow less than NR_CPUS length Greg KH
2010-04-22 19:53 ` [057/139] sched: Fix sched_getaffinity() Greg KH
2010-04-22 19:53 ` [058/139] NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR Greg KH
2010-04-22 19:53 ` [059/139] NFSv4: fix delegated locking Greg KH
2010-04-22 19:53 ` [060/139] Input: wacom - switch mode upon system resume Greg KH
2010-04-22 19:53 ` [061/139] Input: sparse-keymap - free the right keymap on error Greg KH
2010-04-22 19:53 ` [062/139] ALSA: hda - add a quirk for Clevo M570U laptop Greg KH
2010-04-22 19:54 ` [063/139] ALSA: usb - Fix Oops after usb-midi disconnection Greg KH
2010-04-22 19:54 ` [064/139] hwmon: (sht15) Fix sht15_calc_temp interpolation function Greg KH
2010-04-22 19:54 ` [065/139] hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=n Greg KH
2010-04-22 19:54 ` [066/139] drm/i915: Add no_lvds entry for the Clientron U800 Greg KH
2010-04-22 19:54 ` [067/139] drm/radeon/kms: more atom parser fixes (v2) Greg KH
2010-04-22 19:54 ` [068/139] drm/radeon/kms: disable the tv encoder when tv/cv is not in use Greg KH
2010-04-22 19:54 ` [069/139] drm/radeon/kms: fix tv dac conflict resolver Greg KH
2010-04-22 19:54 ` [070/139] drm/radeon/kms: fix rs600 tlb flush Greg KH
2010-04-22 19:54 ` [071/139] drm/radeon/kms: add FireMV 2400 PCI ID Greg KH
2010-04-22 19:54 ` Greg KH [this message]
2010-04-22 19:54 ` [073/139] x86/amd-iommu: Use helper function to destroy domain Greg KH
2010-04-22 19:54 ` [074/139] x86/amd-iommu: enable iommu before attaching devices Greg KH
2010-04-22 19:54 ` [075/139] Revert "x86: disable IOMMUs on kernel crash" Greg KH
2010-04-22 19:54 ` [076/139] x86, lib: Add wbinvd smp helpers Greg KH
2010-04-22 19:54 ` [077/139] x86, cacheinfo: Fix disabling of L3 cache indices Greg KH
2010-04-22 19:54 ` [078/139] intel-agp: Switch to wbinvd_on_all_cpus Greg KH
2010-04-22 19:54 ` [079/139] x86, cacheinfo: Add cache index disable sysfs attrs only to L3 caches Greg KH
2010-04-22 19:54 ` [080/139] x86, cacheinfo: Calculate L3 indices Greg KH
2010-04-22 19:54 ` [081/139] x86, cacheinfo: Remove NUMA dependency, fix for AMD Fam10h rev D1 Greg KH
2010-04-22 19:54 ` [082/139] x86, cacheinfo: Enable L3 CID only on AMD Greg KH
2010-04-22 19:54 ` [083/139] dm ioctl: introduce flag indicating uevent was generated Greg KH
2010-04-22 19:54 ` [084/139] x86-32: clean up rwsem inline asm statements Greg KH
2010-04-22 19:54 ` [085/139] x86: clean up rwsem type system Greg KH
2010-04-22 19:54 ` [086/139] x86-64, rwsem: 64-bit xadd rwsem implementation Greg KH
2010-04-22 19:54 ` [087/139] x86-64: support native " Greg KH
2010-04-22 19:54 ` [088/139] x86: Fix breakage of UML from the changes in the rwsem system Greg KH
2010-04-22 19:54 ` [089/139] x86-64, rwsem: Avoid store forwarding hazard in __downgrade_write Greg KH
2010-04-22 19:54 ` [090/139] fix NFS4 handling of mountpoint stat Greg KH
2010-04-22 19:54 ` [091/139] quota: Fix possible dq_flags corruption Greg KH
2010-04-22 19:54 ` [092/139] ocfs2: set i_mode on disk during acl operations Greg KH
2010-04-22 19:54 ` [093/139] ocfs2: Change bg_chain check for ocfs2_validate_gd_parent Greg KH
2010-04-22 19:54 ` [094/139] 9p: Skip check for mandatory locks when unlocking Greg KH
2010-04-22 19:54 ` [095/139] pci: Update pci_set_vga_state() to call arch functions Greg KH
2010-04-22 19:54 ` [096/139] PCI: kill off pci_register_set_vga_state() symbol export Greg KH
2010-04-22 19:54 ` [097/139] IPoIB: Fix TX queue lockup with mixed UD/CM traffic Greg KH
2010-04-22 19:54 ` [098/139] x86/PCI: irq and pci_ids patch for Intel Cougar Point DeviceIDs Greg KH
2010-04-22 19:54 ` [099/139] ALSA: hda_intel: ALSA HD Audio " Greg KH
2010-04-22 19:54 ` [100/139] ALSA: hda - enable snoop for Intel Cougar Point Greg KH
2010-04-22 19:54 ` [101/139] ata_piix: IDE Mode SATA patch for Intel Cougar Point DeviceIDs Greg KH
2010-04-22 19:54 ` [102/139] ahci: AHCI and RAID mode " Greg KH
2010-04-22 19:54 ` [103/139] i2c-i801: Add Intel Cougar Point device IDs Greg KH
2010-04-22 19:54 ` [104/139] b43: Allow PIO mode to be selected at module load Greg KH
2010-04-22 19:54 ` [105/139] b43: fall back gracefully to PIO mode after fatal DMA errors Greg KH
2010-04-22 19:54 ` [106/139] ALSA: hda - Add position_fix quirk for Biostar mobo Greg KH
2010-04-22 19:54 ` [107/139] ecryptfs: fix use with tmpfs by removing d_drop from ecryptfs_destroy_inode Greg KH
2010-04-22 19:54 ` [108/139] eCryptfs: Decrypt symlink target for stat size Greg KH
2010-04-22 19:54 ` [109/139] ecryptfs: fix error code for missing xattrs in lower fs Greg KH
2010-04-22 19:54 ` [110/139] USB: cdc-acm: Update to new autopm API Greg KH
2010-04-22 19:54 ` [111/139] USB: cdc-acm: Fix stupid NULL pointer in resume() Greg KH
2010-04-22 19:54 ` [112/139] iwlwifi: clear all tx queues when firmware ready Greg KH
2010-04-22 19:54 ` [113/139] iwlwifi: fix scan race Greg KH
2010-04-22 19:54 ` [114/139] e1000e: stop cleaning when we reach tx_ring->next_to_use Greg KH
2010-04-22 19:54 ` [115/139] perf_events, x86: Implement Intel Westmere/Nehalem-EX support Greg KH
2010-04-22 19:54 ` [116/139] xfs: Non-blocking inode locking in IO completion Greg KH
2010-04-22 19:54 ` [117/139] xfs: fix locking for inode cache radix tree tag updates Greg KH
2010-04-22 19:54 ` [118/139] xfs: check for more work before sleeping in xfssyncd Greg KH
2010-04-22 19:54 ` [119/139] ACPI: EC: Allow multibyte access to EC Greg KH
2010-04-22 19:54 ` [120/139] md/raid5: allow for more than 2^31 chunks Greg KH
2010-04-22 19:54 ` [121/139] ACPI: EC: Limit burst to 64 bits Greg KH
2010-04-22 19:54 ` [122/139] modules: fix incorrect percpu usage Greg KH
2010-04-22 19:55 ` [123/139] lockdep: " Greg KH
2010-04-22 19:55 ` [124/139] module: fix __module_ref_addr() Greg KH
2010-04-22 19:55 ` [125/139] md: deal with merge_bvec_fn in component devices better Greg KH
2010-04-22 19:55 ` [126/139] powerpc: Fix SMP build with disabled CPU hotplugging Greg KH
2010-04-22 19:55 ` [127/139] ext4: fix async i/o writes beyond 4GB to a sparse file Greg KH
2010-04-22 19:55 ` [128/139] sched: Use proper type in sched_getaffinity() Greg KH
2010-04-22 19:55 ` [129/139] KVM: VMX: Update instruction length on intercepted BP Greg KH
2010-04-22 19:55 ` [130/139] KVM: SVM: Fix memory leaks that happen when svm_create_vcpu() fails Greg KH
2010-04-22 19:55 ` [131/139] KVM: Dont spam kernel log when injecting exceptions due to bad cr writes Greg KH
2010-04-22 19:55 ` [132/139] KVM: allow bit 10 to be cleared in MSR_IA32_MC4_CTL Greg KH
2010-04-22 19:55 ` [133/139] KVM: VMX: Save/restore rflags.vm correctly in real mode Greg KH
2010-04-22 19:55 ` [134/139] KVM: MMU: fix kvm_mmu_zap_page() and its calling path Greg KH
2010-04-22 19:55 ` [135/139] KVM: fix the handling of dirty bitmaps to avoid overflows Greg KH
2010-04-22 19:55 ` [136/139] KVM: Increase NR_IOBUS_DEVS limit to 200 Greg KH
2010-04-22 19:55 ` [137/139] KVM: x86: Fix TSS size check for 16-bit tasks Greg KH
2010-04-22 19:55 ` [138/139] x86/gart: Disable GART explicitly before initialization Greg KH
2010-04-22 19:55 ` [139/139] MIPS: Sibyte: Fix M3 TLB exception handler workaround Greg KH
2010-04-22 20:52   ` Sebastian Andrzej Siewior
2010-04-23 16:23 ` [stable] [000/139] 2.6.33.3-stable review Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100422195412.048276476@kvm.kroah.org \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=chrisw@sous-sol.org \
    --cc=joerg.roedel@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable-review@kernel.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome