Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 153947 Details for
Bug 214719
app-emulation/parallels-workstation-2.2.2112-r2 failed patch ($Id: $ in file)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
original parallels-workstation-2.2.2112-2.6.23.patch
parallels-workstation-2.2.2112-2.6.23.patch (text/plain), 10.83 KB, created by
Andrey V. Romanchev
on 2008-05-22 14:57:04 UTC
(
hide
)
Description:
original parallels-workstation-2.2.2112-2.6.23.patch
Filename:
MIME Type:
Creator:
Andrey V. Romanchev
Created:
2008-05-22 14:57:04 UTC
Size:
10.83 KB
patch
obsolete
>--- data/drivers/drv_main/compat/compat_memory.h >+++ data/drivers/drv_main/compat/compat_memory.h >123a124,136 >> /* change kmem_cache_t to kmem_cache */ >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) >> # define kmem_cache_compat struct kmem_cache >> # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) >> # define compat_kmem_cache_create(a, b, c, d, e, f) (kmem_cache_create(a, b, c, d, e)) >> # else >> # define compat_kmem_cache_create(a, b, c, d, e, f) (kmem_cache_create(a, b, c, d, e, f)) >> # endif >> #else >> # define kmem_cache_compat kmem_cache_t >> # define compat_kmem_cache_create(a, b, c, d, e, f) (kmem_cache_create(a, b, c, d, e, f)) >> #endif >> >--- data/drivers/drv_main/Makefile >+++ data/drivers/drv_main/Makefile >2c2 >< KSRC=/lib/modules/$(shell uname -r)/build >--- >> KSRC ?= /lib/modules/$(shell uname -r)/build >--- data/drivers/drv_main/mm/manager.c >+++ data/drivers/drv_main/mm/manager.c >22a23 >> #include <linux/sched.h> >268c269 >< vmGlobal.vmPmms.pmmRegionsSlab = kmem_cache_create("vmRegions", sizeof(struct pmm_region_t), 0, >--- >> vmGlobal.vmPmms.pmmRegionsSlab = compat_kmem_cache_create("vmRegions", sizeof(struct pmm_region_t), 0, >--- data/drivers/drv_main/mm/pages.c >+++ data/drivers/drv_main/mm/pages.c >20a21 >> #include <linux/sched.h> >--- data/drivers/drv_main/vmmain.h >+++ data/drivers/drv_main/vmmain.h >23a24 >> #include "compat/compat_memory.h" >196c197 >< kmem_cache_t *pmmRegionsSlab; >--- >> kmem_cache_compat *pmmRegionsSlab; >--- data/drivers/drv_net/linux/prlnet.c >+++ data/drivers/drv_net/linux/prlnet.c >17a18 >> #include <linux/mm.h> >33a35,38 >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) >> #include <net/ip.h> >> #endif >> >725a731,735 >> >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) >> skb_reset_mac_header(skb); >> skb_set_network_header(skb, sizeof(skb->mac_header)); >> #else >727a738 >> #endif >783a795,797 >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) >> eth = (eth_header_t *)skb_mac_header(skbout); >> #else >784a799 >> #endif >875c890,895 >< prlnet_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) >--- >> prlnet_recv( >> struct sk_buff *skb, struct net_device *dev, struct packet_type *pt >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) >> , struct net_device *origdev >> #endif >> ) >884c904,909 >< && skb->ip_summed == CHECKSUM_HW; >--- >> && skb->ip_summed == >> #ifdef CHECKSUM_HW >> CHECKSUM_HW; >> #else >> CHECKSUM_PARTIAL; >> #endif >887a913,915 >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) >> int len = skb->data - skb_mac_header(skb) + skb->len; >> #else >888a917 >> #endif >891a921,936 >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) >> // can't use skb_copy_and_csum_dev(skb, buf + 2) here >> // because skb->h == skb->nh. opensource rules! >> int hoff = sizeof(struct ethhdr) + ip_hdrlen(skb); >> // IP header checksum is done by the kernel >> skb_copy_bits(skb, >> skb_mac_header(skb) - skb->data, buf + 2, hoff); >> >> // skb->csum is an offset from true skb->h.raw >> *(unsigned short *)(buf + 2 + hoff + skb->csum) = >> csum_fold( >> // kernel does conceptual header too >> skb_copy_and_csum_bits(skb, >> skb_mac_header(skb) + hoff - skb->data, >> buf + 2 + hoff, len - hoff, 0)); >> #else >897a943 >> >904a951 >> #endif >906a954,957 >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) >> skb_copy_bits(skb, >> skb_mac_header(skb) - skb->data, buf + 2, len); >> #else >908a960 >> #endif >910a963 >> kfree(buf); >912d964 >< kfree(buf); >922a975,977 >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) >> hw_recv(hw, skb_mac_header(skb), skb->data - skb_mac_header(skb) + skb->len); >> #else >923a979 >> #endif >1010a1067 >> #if WIRELESS_EXT < 19 >1012a1070 >> #endif >ТолÑко в data/drivers/drv_net/linux: vm-bridge.mod.c >--- data/drivers/drv_virtualnic/vmvirtualnic.c >+++ data/drivers/drv_virtualnic/vmvirtualnic.c >72c72 >< MODULE_DESCRIPTION("Transparen ethernet bridge"); >--- >> MODULE_DESCRIPTION("Virtual ethernet card"); >75,77d74 >< // Version >< //static const char *version = "VMVirtualNIC.c:v1.01 VirtualNIC driver from Parallels Inc. http://www.parallelssoft.com/"; >< >79c76 >< struct net_device* dev; >--- >> struct net_device* devs[5]; >99d95 >< >101c97 >< }; >--- >> } >121d116 >< >123c118 >< }; >--- >> } >201a197,203 >> int maxdev = 1; >> #if defined(module_param) >> module_param(maxdev, int, 0); >> #elif defined(MODULE_PARM) >> MODULE_PARM(maxdev, "i"); >> #endif >> >217,222c219,233 >< // MAC address is hardwired to that value as in windows version >< unsigned char station_addr[6] = { 0x00, 0x01, 0x23, 0x45, 0xBE, 0xEF }; >< #if 0 >< hypervisorPresentInSystem(); /* fake call to hypervisor -- ms */ >< #endif >< >--- >> // MAC address is hardwired to that value as in windows version >> static const unsigned char station_addr[5][6] = { >> { 0x00, 0x01, 0x23, 0x45, 0xBE, 0xEF }, >> { 0x00, 0x01, 0x23, 0x45, 0xCA, 0xFE }, >> { 0x00, 0x01, 0x23, 0x45, 0xDA, 0xCE }, >> { 0x00, 0x01, 0x23, 0x45, 0xEC, 0xAE }, >> { 0x00, 0x01, 0x23, 0x45, 0xFA, 0xDE } >> }; >> int i; >> >> if (maxdev < 0) >> maxdev = 1; >> if (maxdev > 5) >> maxdev = 5; >> for (i = 0; i < maxdev; ++i) { >224c235 >< dev = alloc_etherdev(sizeof(struct net_device_stats)); >--- >> devs[i] = alloc_etherdev(sizeof(struct net_device_stats)); >226,229c237,239 >< dev = init_etherdev(0, 0); >< // May be it needed ? >< ether_setup(dev); >< dev->priv = kmalloc(sizeof(struct net_device_stats), GFP_KERNEL); >--- >> devs[i] = init_etherdev(0, 0); >> ether_setup(devs[i]); >> devs[i]->priv = kmalloc(sizeof(struct net_device_stats), GFP_KERNEL); >232,242c242,252 >< dev_alloc_name(dev, "vnic%d"); >< // Set MAC address >< memcpy(dev->dev_addr, station_addr, ETH_ALEN); >< memset(dev->priv, 0, sizeof(struct net_device_stats)); >< >< // Set functions >< dev->hard_start_xmit = &VNICXmit; >< dev->get_stats = &VNICGetStats; >< dev->open = &VNICOpen; >< dev->stop = &VNICClose; >< dev->set_mac_address = &VNICSetMAC; >--- >> dev_alloc_name(devs[i], "vnic%d"); >> // Set MAC address >> memcpy(devs[i]->dev_addr, station_addr[i], ETH_ALEN); >> memset(devs[i]->priv, 0, sizeof(struct net_device_stats)); >> >> // Set functions >> devs[i]->hard_start_xmit = VNICXmit; >> devs[i]->get_stats = VNICGetStats; >> devs[i]->open = VNICOpen; >> devs[i]->stop = VNICClose; >> devs[i]->set_mac_address = VNICSetMAC; >244c254 >< SET_MODULE_OWNER(dev); >--- >> SET_MODULE_OWNER(devs[i]); >248c258 >< register_netdev(dev); >--- >> register_netdev(devs[i]); >250,252c260,262 >< >< return(0); >< }; >--- >> } >> return 0; >> } >268a279 >> int i; >270,272c281,283 >< if (dev) >< { >< ndstat = dev->priv; >--- >> for (i = 0; i < 5; ++i) { >> if (devs[i]) { >> ndstat = devs[i]->priv; >274c285 >< unregister_netdev(dev); >--- >> unregister_netdev(devs[i]); >276c287 >< free_netdev(dev); >--- >> free_netdev(devs[i]); >278,280c289,291 >< kfree(ndstat); >< dev->priv = NULL; >< kfree(dev); >--- >> kfree(ndstat); >> devs[i]->priv = NULL; >> kfree(devs[i]); >281a293,294 >> devs[i] = NULL; >> } >--- data/drivers/hypervisor/hypercall.h >+++ data/drivers/hypervisor/hypercall.h >19,20c19,22 >< #ifndef __HYPERCALL_H__ >< #define __HYPERCALL_H__ >--- >> >> >> #ifndef __PRL_HYPERCALL_H__ >> #define __PRL_HYPERCALL_H__ >115,116c117 >< >< #endif /* __HYPERCALL_H__ */ >--- >> #endif /* __PRL_HYPERCALL_H__ */ >--- data/drivers/hypervisor/hypervisor.h >+++ data/drivers/hypervisor/hypervisor.h >19,20c19,20 >< #ifndef __HYPERVISOR_H__ >< #define __HYPERVISOR_H__ >--- >> #ifndef __PRL_HYPERVISOR_H__ >> #define __PRL_HYPERVISOR_H__ >33a34 >> # include "compat_memory.h" >130c131 >< kmem_cache_t *vmStateCache; >--- >> kmem_cache_compat *vmStateCache; >177c178 >< #endif /* __HYPERVISOR_H__ */ >--- >> #endif /* __PRL_HYPERVISOR_H__ */ >--- data/drivers/hypervisor/hypvmstate.c >+++ data/drivers/hypervisor/hypvmstate.c >24a25 >> #include "compat_memory.h" >169c170 >< if (!(hypState.vmStateCache = kmem_cache_create(VMSTATE_SLABNAME, sizeof(struct hyp_vmstate_t), 0, >--- >> if (!(hypState.vmStateCache = compat_kmem_cache_create(VMSTATE_SLABNAME, sizeof(struct hyp_vmstate_t), 0, >--- data/drivers/hypervisor/svm_init.h >+++ data/drivers/hypervisor/svm_init.h >34a35,38 >> /// Definitions of AMD CPUID function to get SVM revision and feature identification >> #define CPUID_SVM_REV 0x8000000a >> >> >37a42,48 >> /// Definition of bit SVM_LOCK in edx after CPUID_SVM_REV fn >> #define SVM_LOCK (1 << 2) >> >> /// Definition of bit SVM Disabled in VM_CR SMR >> #define VM_CR_SVMDIS (1 << 4) >> >> >45a57,83 >> /// Definition of address of VM_CR SMR >> #define SMR_VM_CR 0xc0010114 >> >> >> >> /** >> * Check CPU provider. >> */ >> static __inline__ int is_amd() >> { >> unsigned int _ebx, _ecx, _edx; >> >> __asm__ __volatile__( >> "cpuid \n\t" >> : /* out */ "=b" (_ebx), "=c" (_ecx), "=d" (_edx) >> : /* in */ "a" (0) >> : /* clo */ "memory" >> ); >> >> // "AuthenticAMD" >> if ((_ebx == 0x68747541) && >> (_ecx == 0x444D4163) && >> (_edx == 0x69746E65)) >> return 1; >> >> return 0; >> } >66,67c104,147 >< /* Check SVM bit in CPUID extended features */ >< return cpuid_ecx(CPUID_PROCESSOR_SIGNATURE) & CPUID_SVM; >--- >> // Don't initialize this variables !!! >> // because gcc on OSx remove all checks with this variables >> // and we can get wrmsr on locked msr register (which cause GP#) -- ms >> unsigned long msr_edx, msr_eax; >> unsigned int cpuid_1_ecx; >> unsigned int cpuid_2_edx; >> >> >> if (!is_amd()) >> return 0; >> >> msr_edx = 0; >> msr_eax = 0; >> >> // Check SVM bit in CPUID extended features >> cpuid_1_ecx = cpuid_ecx(CPUID_PROCESSOR_SIGNATURE); >> >> cpuid_2_edx = 0; >> >> // Check SVM bit in CPUID feature indentifiers >> if ((cpuid_1_ecx & CPUID_SVM) == 0) >> return 0; // SVM not available >> >> >> // Get VM_CR MSR value >> rdmsr(SMR_VM_CR, msr_eax, msr_edx); >> >> if((msr_eax & VM_CR_SVMDIS) == 0) >> { >> // set EFER.SVME >> rdmsr(MSR_IA32_EFER, msr_eax, msr_edx); >> wrmsr(MSR_IA32_EFER, msr_eax | EFER_SVME, msr_edx); >> return 1; // SVM allowed >> } >> >> // CPUID SVM Revision and Feature Identification EDX >> cpuid_2_edx = cpuid_edx(CPUID_SVM_REV); >> >> if((cpuid_2_edx & SVM_LOCK) == 0) >> { >> return 0; // SVM disabled at bios not unlockable >> } >> >> return 0; // SVM disabled with key >70a151 >> >--- data/drivers/hypervisor/vtx_init.h >+++ data/drivers/hypervisor/vtx_init.h >75a76,97 >> /** >> * Check CPU provider. >> */ >> static __inline__ int is_intelPW22() >> { >> unsigned int _ebx, _ecx, _edx; >> >> __asm__ __volatile__( >> "cpuid \n\t" >> : /* out */ "=b" (_ebx), "=c" (_ecx), "=d" (_edx) >> : /* in */ "a" (0) >> : /* clo */ "memory" >> ); >> >> // "GenuineIntel" >> if ((_ebx == 0x756e6547) && >> (_ecx == 0x6c65746e) && >> (_edx == 0x49656e69)) >> return 1; >> >> return 0; >> } >96a119,121 >> if (!is_intelPW22()) >> return 0; >> >--- data/drivers/Makefile >+++ data/drivers/Makefile >0a1 >> KSRC ?= /lib/modules/$(shell uname -r)/build >5c6 >< cd drv_main/ && $(MAKE) && cd .. >--- >> cd drv_main/ && $(MAKE) KSRC=${KSRC} && cd ..
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 214719
:
147277
|
147279
| 153947