Thread (20 messages) 20 messages, 4 authors, 2019-07-19

Re: [PATCH v5 1/7] kvmppc: HMM backend driver to manage pages of secure guest

From: Bharata B Rao <hidden>
Date: 2019-07-11 05:09:03
Also in: linux-mm

On Wed, Jul 10, 2019 at 10:47:34AM -0300, Jason Gunthorpe wrote:
On Tue, Jul 09, 2019 at 01:55:28PM -0500, janani wrote:
quoted
quoted
+int kvmppc_hmm_init(void)
+{
+	int ret = 0;
+	unsigned long size;
+
+	size = kvmppc_get_secmem_size();
+	if (!size) {
+		ret = -ENODEV;
+		goto out;
+	}
+
+	kvmppc_hmm.device = hmm_device_new(NULL);
+	if (IS_ERR(kvmppc_hmm.device)) {
+		ret = PTR_ERR(kvmppc_hmm.device);
+		goto out;
+	}
+
+	kvmppc_hmm.devmem = hmm_devmem_add(&kvmppc_hmm_devmem_ops,
+					   &kvmppc_hmm.device->device, size);
+	if (IS_ERR(kvmppc_hmm.devmem)) {
+		ret = PTR_ERR(kvmppc_hmm.devmem);
+		goto out_device;
+	}
This 'hmm_device' API family was recently deleted from hmm:
Hmmm... I still find it in upstream, guess it will be removed soon?

I find the below commit in mmotm.
commit 07ec38917e68f0114b9c8aeeb1c584b5e73e4dd6
Author: Christoph Hellwig [off-list ref]
Date:   Wed Jun 26 14:27:01 2019 +0200

    mm: remove the struct hmm_device infrastructure
    
    This code is a trivial wrapper around device model helpers, which
    should have been integrated into the driver device model usage from
    the start.  Assuming it actually had users, which it never had since
    the code was added more than 1 1/2 years ago.

This patch should use the driver core directly instead.

Regards,
Jason
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help