H_CLEAR_REF and H_CLEAR_MOD
It seems like KVM doesn't implement the H_CLEAR_REF and H_CLEAR_MOD hypervisor calls, which are absolutely critical for memory management in the FreeBSD kernel (and are marked "mandatory" in the PAPR manual). It seems some patches have been contributed already in
https://lists.ozlabs.org/pipermail/linuxppc-dev/2011-December/095013.html,
so it would be fantastic if these could end up upstream.
I'm going to try to get some kind of workaround in the meantime so we can at least run on existing kernels.
-Nathan
Quoted 4 lines
Am 18.02.2015 um 07:12 schrieb Nathan Whitehorn <[email protected]>:
It seems like KVM doesn't implement the
H_CLEAR_REFandH_CLEAR_MODhypervisor calls, which are absolutely critical for memory management in the FreeBSD kernel (and are marked "mandatory" in the PAPR manual). It seems some patches have been contributed already in https://lists.ozlabs.org/pipermail/linuxppc-dev/2011-December/095013.html, so it would be fantastic if these could end up upstream.
Paul, I guess we never included this because there was no user. If FreeBSD does use it though, I think it makes a lot of sense to resend it for inclusion.
Quoted 2 lines
I'm going to try to get some kind of workaround in the meantime so we can at least run on existing kernels.
Please don't add hacks in FreeBSD only because kvm is missing a feature. Let's just get this done properly :).
Alex
Quoted 6 lines · Alexander Graf
Quoted 4 lines
Am 18.02.2015 um 07:12 schrieb Nathan Whitehorn <[email protected]>:
It seems like KVM doesn't implement the
H_CLEAR_REFandH_CLEAR_MODhypervisor calls, which are absolutely critical for memory management in the FreeBSD kernel (and are marked "mandatory" in the PAPR manual). It seems some patches have been contributed already in https://lists.ozlabs.org/pipermail/linuxppc-dev/2011-December/095013.html, so it would be fantastic if these could end up upstream.Paul, I guess we never included this because there was no user. If FreeBSD does use it though, I think it makes a lot of sense to resend it for inclusion.
I agree. I just need to check the locking and synchronization around the reference and change bit recording, then I'll resend it.
Quoted 4 lines
Quoted 2 lines
I'm going to try to get some kind of workaround in the meantime so we can at least run on existing kernels.
Please don't add hacks in FreeBSD only because kvm is missing a feature. Let's just get this done properly :).
Right.
Paul.
Quoted 7 lines · Paul Mackerras
Quoted 4 lines · Alexander Graf
Quoted 3 lines
Am 18.02.2015 um 07:12 schrieb Nathan Whitehorn <[email protected]>:
It seems like KVM doesn't implement the
H_CLEAR_REFandH_CLEAR_MODhypervisor calls, which are absolutely critical for memory management in the FreeBSD kernel (and are marked "mandatory" in the PAPR manual). It seems some patches have been contributed already in https://lists.ozlabs.org/pipermail/linuxppc-dev/2011-December/095013.html, so it would be fantastic if these could end up upstream.Paul, I guess we never included this because there was no user. If FreeBSD does use it though, I think it makes a lot of sense to resend it for inclusion.
I agree. I just need to check the locking and synchronization around the reference and change bit recording, then I'll resend it.
Thanks much! Please let me know if I can help at all with this.
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
I'm going to try to get some kind of workaround in the meantime so we can at least run on existing kernels.
Please don't add hacks in FreeBSD only because kvm is missing a feature. Let's just get this done properly :).
Right.
Sounds good -- the possible workarounds are difficult anyway. I have added a warning at boot that checks if these return H_FUNCTION and urges people to upgrade their kernels if so. -Nathan
Quoted 2 lines
Paul.
Quoted 11 lines · Nathan Whitehorn
Quoted 7 lines · Paul Mackerras
Quoted 4 lines · Alexander Graf
Quoted 3 lines
Am 18.02.2015 um 07:12 schrieb Nathan Whitehorn <[email protected]>:
It seems like KVM doesn't implement the
H_CLEAR_REFandH_CLEAR_MODhypervisor calls, which are absolutely critical for memory management in the FreeBSD kernel (and are marked "mandatory" in the PAPR manual). It seems some patches have been contributed already in https://lists.ozlabs.org/pipermail/linuxppc-dev/2011-December/095013.html, so it would be fantastic if these could end up upstream.Paul, I guess we never included this because there was no user. If FreeBSD does use it though, I think it makes a lot of sense to resend it for inclusion.
I agree. I just need to check the locking and synchronization around the reference and change bit recording, then I'll resend it.
Thanks much! Please let me know if I can help at all with this.
Any news on this? I'm happy to test the patch if you like. -Nathan
Quoted 17 lines · Nathan Whitehorn
Quoted 14 lines · Nathan Whitehorn
Quoted 12 lines · Paul Mackerras
Quoted 11 lines · Alexander Graf
Quoted 8 lines
Am 18.02.2015 um 07:12 schrieb Nathan Whitehorn
<[email protected]>:It seems like KVM doesn't implement the
H_CLEAR_REFandH_CLEAR_MOD
hypervisor calls, which are absolutely critical for memory
management in the FreeBSD kernel (and are marked "mandatory" in the
PAPR manual). It seems some patches have been contributed already in https://lists.ozlabs.org/pipermail/linuxppc-dev/2011-December/095013.html,
so it would be fantastic if these could end up upstream.Paul, I guess we never included this because there was no user. If FreeBSD does use it though, I think it makes a lot of sense to resend it for inclusion.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I agree. I just need to check the locking and synchronization around the reference and change bit recording, then I'll resend it.
Thanks much! Please let me know if I can help at all with this.
Any news on this? I'm happy to test the patch if you like. -Nathan
I have discovered a bug where we can lose the host-side view of the dirtiness of pages when the guest does a H_CLEAR_MOD on a huge-page HPTE, so I'm working on a fix for that.
Paul.