All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Amit Shah <amit.shah@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, chrisw@redhat.com,
	allen.m.kay@intel.com, linux-kernel@vger.kernel.org,
	gcosta@redhat.com, avi@qumranet.com,
	virtualization@lists.linux-foundation.org, BENAMI@il.ibm.com
Subject: Re: [PATCH] KVM PV Guest: Implement paravirtualized DMA
Date: Tue, 29 Apr 2008 15:31:32 +0200	[thread overview]
Message-ID: <87od7shjnv.fsf@basil.nowhere.org> (raw)
In-Reply-To: <1209465451-3758-4-git-send-email-amit.shah@qumranet.com> (Amit Shah's message of "Tue, 29 Apr 2008 13:37:31 +0300")

Amit Shah <amit.shah@qumranet.com> writes:
> +
> +static struct page *page;
> +static unsigned long page_gfn;
Bad variable names

> +
> +const struct dma_mapping_ops *orig_dma_ops;

I suspect real dma ops stacking will need some further thought than
your simple hacks
> +
> +	match = find_matching_pt_dev(&pt_devs_head, &pv_pci_info);
> +	if (match) {
> +		r = match->is_pv;
> +		goto out;
> +	}
> +
> +	memcpy(page_address(page), &pv_pci_info, sizeof(pv_pci_info));

Note that on 32bit page_address() might be not mapped.


> +
> +	npages = get_order(size) + 1;

Are you sure that's correct? It looks quite bogus. order is a 2 logarithm,
normally npages = 1 << order

if you want  npages from order the correct  need 1 << order

Haven't read further, but to be honest the code doesn't seem to be anywhere
near merging quality.

-Andi


  reply	other threads:[~2008-04-29 13:31 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29 10:37 PV DMA for PCI passthrough devices for KVM Amit Shah
2008-04-29 10:37 ` Amit Shah
2008-04-29 10:37 ` [PATCH] x86 DMA: Handle devices assigned to the guest by the host Amit Shah
2008-04-29 10:37 ` Amit Shah
2008-04-29 10:37   ` Amit Shah
2008-04-29 10:37   ` [PATCH] KVM x86: Handle hypercalls for assigned PCI devices Amit Shah
2008-04-29 10:37     ` Amit Shah
2008-04-29 10:37     ` [PATCH] KVM PV Guest: Implement paravirtualized DMA Amit Shah
2008-04-29 10:37       ` Amit Shah
2008-04-29 13:31       ` Andi Kleen [this message]
2008-04-29 13:59         ` Amit Shah
2008-04-29 13:59         ` Amit Shah
2008-04-29 13:31       ` Andi Kleen
2008-04-29 10:37     ` Amit Shah
2008-04-29 14:44     ` [PATCH] KVM x86: Handle hypercalls for assigned PCI devices Glauber Costa
2008-04-29 14:44       ` Glauber Costa
2008-04-29 15:58       ` Amit Shah
2008-04-29 15:58       ` Amit Shah
2008-04-29 22:48         ` Avi Kivity
2008-04-29 22:48           ` Avi Kivity
2008-04-30  6:05           ` Muli Ben-Yehuda
2008-04-30  6:05           ` Muli Ben-Yehuda
2008-04-30  6:05             ` Muli Ben-Yehuda
2008-04-29 22:48         ` Avi Kivity
2008-05-01 13:18         ` Amit Shah
2008-05-01 13:18           ` Amit Shah
2008-05-01 13:18         ` Amit Shah
2008-04-29 10:37   ` Amit Shah
2008-04-29 13:14   ` [PATCH] x86 DMA: Handle devices assigned to the guest by the host Andi Kleen
2008-04-29 13:14   ` Andi Kleen
2008-04-29 13:49     ` Amit Shah
2008-04-29 13:49     ` Amit Shah
2008-04-30  6:29   ` Muli Ben-Yehuda
2008-04-30  6:29   ` Muli Ben-Yehuda
2008-04-29 13:15 ` PV DMA for PCI passthrough devices for KVM Andi Kleen
2008-04-29 13:15 ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87od7shjnv.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=BENAMI@il.ibm.com \
    --cc=allen.m.kay@intel.com \
    --cc=amit.shah@qumranet.com \
    --cc=avi@qumranet.com \
    --cc=chrisw@redhat.com \
    --cc=gcosta@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.