Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 281261 Details for
Bug 245574
[RHEL5.1][BUG][XEN] Windows guest hangs when using USB tablet device.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix for the USB tablet from upstream
xen-3.1.2-usb-tablet-fix.patch (text/plain), 3.33 KB, created by
Chris Lalancette
on 2007-12-07 14:58:45 UTC
(
hide
)
Description:
Fix for the USB tablet from upstream
Filename:
MIME Type:
Creator:
Chris Lalancette
Created:
2007-12-07 14:58:45 UTC
Size:
3.33 KB
patch
obsolete
>diff -urp xen-3.1.0-src.orig/tools/ioemu/target-i386-dm/exec-dm.c xen-3.1.0-src/tools/ioemu/target-i386-dm/exec-dm.c >--- xen-3.1.0-src.orig/tools/ioemu/target-i386-dm/exec-dm.c 2007-05-18 10:45:21.000000000 -0400 >+++ xen-3.1.0-src/tools/ioemu/target-i386-dm/exec-dm.c 2007-12-07 09:36:39.000000000 -0500 >@@ -434,6 +434,68 @@ int iomem_index(target_phys_addr_t addr) > extern unsigned long *logdirty_bitmap; > extern unsigned long logdirty_bitmap_size; > >+/* >+ * Replace the standard byte memcpy with a word memcpy for appropriately sized >+ * memory copy operations. Some users (USB-UHCI) can not tolerate the possible >+ * word tearing that can result from a guest concurrently writing a memory >+ * structure while the qemu device model is modifying the same location. >+ * Forcing a word-sized read/write prevents the guest from seeing a partially >+ * written word-sized atom. >+ */ >+#if defined(__x86_64__) || defined(__i386__) >+static void memcpy_words(void *dst, void *src, size_t n) >+{ >+ asm volatile ( >+ " movl %%edx,%%ecx \n" >+#ifdef __x86_64__ >+ " shrl $3,%%ecx \n" >+ " rep movsq \n" >+ " test $4,%%edx \n" >+ " jz 1f \n" >+ " movsl \n" >+#else /* __i386__ */ >+ " shrl $2,%%ecx \n" >+ " rep movsl \n" >+#endif >+ "1: test $2,%%edx \n" >+ " jz 1f \n" >+ " movsw \n" >+ "1: test $1,%%edx \n" >+ " jz 1f \n" >+ " movsb \n" >+ "1: \n" >+ : "+S" (src), "+D" (dst) : "d" (n) : "ecx", "memory" ); >+} >+#else >+static void memcpy_words(void *dst, void *src, size_t n) >+{ >+ /* Some architectures do not like unaligned accesses. */ >+ if (((unsigned long)dst | (unsigned long)src) & 3) { >+ memcpy(dst, src, n); >+ return; >+ } >+ >+ while (n >= sizeof(uint32_t)) { >+ *((uint32_t *)dst) = *((uint32_t *)src); >+ dst = ((uint32_t *)dst) + 1; >+ src = ((uint32_t *)src) + 1; >+ n -= sizeof(uint32_t); >+ } >+ >+ if (n & 2) { >+ *((uint16_t *)dst) = *((uint16_t *)src); >+ dst = ((uint16_t *)dst) + 1; >+ src = ((uint16_t *)src) + 1; >+ } >+ >+ if (n & 1) { >+ *((uint8_t *)dst) = *((uint8_t *)src); >+ dst = ((uint8_t *)dst) + 1; >+ src = ((uint8_t *)src) + 1; >+ } >+} >+#endif >+ > void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, > int len, int is_write) > { >@@ -470,7 +532,7 @@ void cpu_physical_memory_rw(target_phys_ > } > } else if ((ptr = phys_ram_addr(addr)) != NULL) { > /* Writing to RAM */ >- memcpy(ptr, buf, l); >+ memcpy_words(ptr, buf, l); > if (logdirty_bitmap != NULL) { > /* Record that we have dirtied this frame */ > unsigned long pfn = addr >> TARGET_PAGE_BITS; >@@ -506,7 +568,7 @@ void cpu_physical_memory_rw(target_phys_ > } > } else if ((ptr = phys_ram_addr(addr)) != NULL) { > /* Reading from RAM */ >- memcpy(buf, ptr, l); >+ memcpy_words(buf, ptr, l); > } else { > /* Neither RAM nor known MMIO space */ > memset(buf, 0xff, len); >Only in xen-3.1.0-src/tools/ioemu/target-i386-dm: exec-dm.c.orig
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 245574
: 281261