Change:
<ins> diff -puNr prl-tools-build/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c prl-tools-build/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c --- prl-tools-build/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c +++ prl-tools-build/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c @@ -382,7 +382,7 @@ static int prl_tg_initialize(struct tg_d } #endif /* Set DMA ability. Only lower 4G is possible to address */ -	rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); +	rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); if (rc) { printk(KERN_ERR "no usable DMA configurationn"); goto err_out; diff -puNr prl-tools-build/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_call.c prl-tools-build/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_call.c --- prl-tools-build/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_call.c +++ prl-tools-build/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_call.c @@ -76,7 +76,7 @@ static int tg_req_map_internal(struct TG uple->p[i] = vmalloc_to_page(mem); page_cache_get(uple->p[i]); -		dst->RequestPages[i] = pci_map_page(pdev, uple->p[i], 0, PAGE_SIZE, DMA_BIDIRECTIONAL) >> PAGE_SHIFT; +		dst->RequestPages[i] = dma_map_page(&pdev->dev, uple->p[i], 0, PAGE_SIZE, DMA_BIDIRECTIONAL) >> PAGE_SHIFT; if (!dst->RequestPages[i]) { page_cache_release(uple->p[i]); goto err; @@ -88,7 +88,7 @@ static int tg_req_map_internal(struct TG err: for (i = 0; i < uple->count; i++) { -		pci_unmap_page(pdev, dst->RequestPages[i] << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); +		dma_unmap_page(&pdev->dev, dst->RequestPages[i] << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); page_cache_release(uple->p[i]); } kfree(uple); @@ -129,7 +129,7 @@ static TG_PAGED_BUFFER *tg_req_map_user_ pfn = (u64 *)dbuf - 1; for (; npages > 0; npages--, mapped++) { -		dma_addr_t addr = pci_map_page(pdev, uple->p[npages-1], 0, PAGE_SIZE, DMA_BIDIRECTIONAL); +		dma_addr_t addr = dma_map_page(&pdev->dev, uple->p[npages-1], 0, PAGE_SIZE, DMA_BIDIRECTIONAL); if (!addr) { DPRINTK("[3] %d < %d	n", got, npages); @@ -144,7 +144,7 @@ static TG_PAGED_BUFFER *tg_req_map_user_ err_unmap: for (i = 0; i < mapped; i++, pfn++) -		pci_unmap_page(pdev, *pfn << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); +		dma_unmap_page(&pdev->dev, *pfn << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); err_put: for(i = 0; i < got; i++) @@ -176,7 +176,7 @@ static TG_PAGED_BUFFER *tg_req_map_kerne goto err; } -		addr = pci_map_page(pdev, page, 0, PAGE_SIZE, DMA_BIDIRECTIONAL); +		addr = dma_map_page(&pdev->dev, page, 0, PAGE_SIZE, DMA_BIDIRECTIONAL); if (!addr) { DPRINTK("[2] va:%p can't mapn", buffer); goto err; @@ -189,7 +189,7 @@ static TG_PAGED_BUFFER *tg_req_map_kerne err: for (; i > 0; i--, pfn--) -		pci_unmap_page(pdev, *pfn << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); +		dma_unmap_page(&pdev->dev, *pfn << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); return ERR_PTR(-ENOMEM); } @@ -203,7 +203,7 @@ static inline int tg_req_unmap_internal( dst->RequestSize + ~PAGE_MASK) >> PAGE_SHIFT; for (i = 0; i < count; i++) -		pci_unmap_page(req->dev->pci_dev, dst->RequestPages[i] << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); +		dma_unmap_page(&req->dev->pci_dev->dev, dst->RequestPages[i] << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); return count; } @@ -264,7 +264,7 @@ static void tg_req_unmap_pages(struct TG pfn = (u64 *)(dbuf + 1); for (; npages > 0; npages--, pfn++) -			pci_unmap_page(pdev, (*pfn) << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); +			dma_unmap_page(&pdev->dev, (*pfn) << PAGE_SHIFT, PAGE_SIZE, DMA_BIDIRECTIONAL); dbuf = (TG_PAGED_BUFFER *)pfn; } @@ -374,7 +374,7 @@ static int tg_req_submit(struct TG_PENDI * also no any offset inside page needed. */ req->pg = vmalloc_to_page(dst); -	req->phys = pci_map_page(dev->pci_dev, vmalloc_to_page(dst), 0, PAGE_SIZE, DMA_BIDIRECTIONAL); +	req->phys = dma_map_page(&dev->pci_dev->dev, vmalloc_to_page(dst), 0, PAGE_SIZE, DMA_BIDIRECTIONAL); if (!req->phys) { DPRINTK("Can not allocate memory for DMA mappingn"); goto out; @@ -405,7 +405,7 @@ static int tg_req_submit(struct TG_PENDI out: if (ret != TG_STATUS_PENDING) { page_cache_release(req->pg); -		pci_unmap_page(dev->pci_dev, req->phys, PAGE_SIZE, DMA_BIDIRECTIONAL); +		dma_unmap_page(&dev->pci_dev->dev, req->phys, PAGE_SIZE, DMA_BIDIRECTIONAL); } DPRINTK("EXITn"); @@ -460,7 +460,7 @@ out_wait: wait_for_completion(&req->waiting); out: page_cache_release(req->pg); -	pci_unmap_page(dev->pci_dev, req->phys, PAGE_SIZE, DMA_BIDIRECTIONAL); +	dma_unmap_page(&dev->pci_dev->dev, req->phys, PAGE_SIZE, DMA_BIDIRECTIONAL); DPRINTK("EXITn"); return ret; } diff -puNr prl-tools-build/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c prl-tools-build/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c --- prl-tools-build/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c +++ prl-tools-build/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c @@ -16,6 +16,7 @@ #include <linux/pagemap.h> #include <linux/namei.h> #include <linux/cred.h> +#include <linux/writeback.h> #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 40)) &&  (LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) @@ -57,7 +58,7 @@ unsigned long *prlfs_dfl( struct dentry } #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0) -#define prl_uaccess_kernel() uaccess_kernel() +#define prl_uaccess_kernel() (false) #else #define prl_uaccess_kernel() segment_eq(get_fs(), KERNEL_DS) #endif @@ -954,7 +955,7 @@ static const struct address_space_operat .writepage		= prlfs_writepage, .write_begin    = simple_write_begin, .write_end      = prlfs_write_end, -	.set_page_dirty = __set_page_dirty_nobuffers, +	.dirty_folio    = filemap_dirty_folio, }; </ins>

Discussion:
doesn't enable parallels guest on kernel . Steps to reproduce the behavior: ; Should work. Add any other context about the problem here. It requires kernel bigger than 4.15: <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. --Please run and paste the result.
Duplicate of

Describe the bug Take an error: To Reproduce Steps to reproduce the behavior: to : Expected behavior Installed parallels tools Screenshots If applicable, add screenshots to help explain your problem. Additional context Add any other context about the problem here. Metadata Please run and paste the result. Maintainer information:
Depending on kernel version, the value of is not a package, but . The module is thus broken for kernel versions at or above 4.15.
I've seen it. But this line was removed
Right, the idea behind that PR (cc was good, but the implementation was not. It needs some more effort.
So how do we install parallels tools?
I wanna know so far :)
I marked this as stale due to inactivity. &rarr;

Configuring NixOS to use Parallels Tools is impossible. NixOS as a Parallels guest VM on Mac to nix config and run the following error the from the Mac /Applications folder into NixOS advised, run one of the above commands to add the .iso file -run which (unexpectedly) repeats the same error in step 3
Perhaps has some ideas ... ?
value has to be updated with the output of (and the should be updated too).
I assume you meant that I should be updating the file? Where does this file exist on my NixOS?
I'm guessing this is a Mac thing, and I've never even used a Mac... I'm not quite sure why you thought I'd be able to help, but wish you the best of luck,
Sorry ... I think I should have instead tagged as he seems to be an user of it ... though git history shows that originally created the file.
I located the file you must be referring to here: but it is not editable. I wonder if you meant something else?
Take a look at and on how to make changes to Nixpkgs. Basically for a one time fix, you obtain a copy of nixpkgs, edit the file in question, and do a or or . I can't fix this issue without your help because I don't have access to .
My pr downloads prl-tools automatically, but I think it's only been merged into master so far (so you would have to cherry pick it into your own 17.09 fork). What version of parallels are you using? With my PR you can override the version in your using nixpkgs overlays so it downloads the correct one – I'll probably post an example at some point. Luke Adams
Getting this issue from: Is this resolved yet?
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly: for maintainers and people that previously touched the related code and @ mention them in a comment. on the . on the on .
still important to me
Is this fixed, any workaround?
Still waiting here too.
Feature request to support parallels-tools oficially:
For those who are interested, I've managed to install Parallels Tools 16 under Linux kernel 5.9. File sharing should be working via . However, features such as clipboard sharing or drag-and-drop seem to be broken. I tried to run under a FHS environment, but still reports . Also, the mouse cursor became invisible after loading the driver, so I decided not to load it. Anyway, you can find the modified files . Hope this helps.
Anyone / know how to submit this to Parallels for inclusion? We'll see if anyone reads these, I've posted to their forum:
That would be quite difficult, as it will really force them to maintain a standalone Nix package, which they have . But, as another issue () pointed out, it would be great if they removed all hard-coded paths in their source code.
Then at least if they would do as you suggest that would greatly simplify the situation. It would also be nice for them to address the other issues that you've noted as problems such as the clipboard, etc.
I marked this as stale due to inactivity. &rarr;
Bump on this. Trying to get it working on M1 mac.
+1
+1
For those using above for installing Parallel Tools and who want clipboard sharing (copy/paste to and from macOS) to work, patch the file from their repository with: and rebuild nix, then run , and you should have copy/paste between NixOS and macOS working. (tl;dr debugging saga) The clue was , which showed that was trying to load the shared library but failing. It wasn't listed in , so I figured it must be trying to it and failing to locate it on any path it was configured for. I located a path in the nix store to a and manually set and re-ran : this time it hung instead of immediately exiting, so, progress.

I then ran with strace and looked for any other s it was trying to open and failing to do so, and after a bit of filtering zeroed in on libgconf-2.so, libgio-, libglib-, libgobject-, which are all from the package. Again manually setting , this time, success, I was able to copy and paste to and from macOS and NixOS. The only thing left was to do it the "right" way: according to the manual in , it describes the variable as a list of additional packages to add to the binary's rpath. I was motivated to get this to work because I'm using NixOS in a VM on a new M1 MacBook Pro as my main development environment now, and it was the last major hurdle to overcome to have a smooth integration between guest and host.
Great work! Will you consider making a PR with these changes, and possibly taking maintainership? I originally packaged prl-tools for a friend with a Mac and cannot maintain this by myself without the hardware.
Works great for me! I think we still need maintainers for Intel platforms, since we are both on M1. Also, I'm not sure if the package would work on x86_64.
I see. Maybe someone else from the thread can test this on Intel Macs?
I consolidated changes and my patch into a . Unfortunately, yes, due to my lack of access to an Intel Mac, I don't think I can help maintain this.