From: Paul Mackerras <paulus@ozlabs.org>
To: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Cc: aik@ozlabs.ru, linuxppc-dev@lists.ozlabs.org,
kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH V4 0/8] KVM: PPC: Implement passthrough of emulated devices for nested guests
Date: Tue, 18 Dec 2018 12:02:53 +1100 [thread overview]
Message-ID: <20181218010253.GE25748@blackberry> (raw)
In-Reply-To: <20181214052910.23639-1-sjitindarsingh@gmail.com>
On Fri, Dec 14, 2018 at 04:29:02PM +1100, Suraj Jitindar Singh wrote:
> This patch series allows for emulated devices to be passed through to nested
> guests, irrespective of at which level the device is being emulated.
>
> Note that the emulated device must be using dma, not virtio.
>
> For example, passing through an emulated e1000:
>
> 1. Emulate the device at L(n) for L(n+1)
>
> qemu-system-ppc64 -netdev type=user,id=net0 -device e1000,netdev=net0
>
> 2. Assign the VFIO-PCI driver at L(n+1)
>
> echo vfio-pci > /sys/bus/pci/devices/0000:00:00.0/driver_override
> echo 0000:00:00.0 > /sys/bus/pci/drivers/e1000/unbind
> echo 0000:00:00.0 > /sys/bus/pci/drivers/vfio-pci/bind
> chmod 666 /dev/vfio/0
>
> 3. Pass the device through from L(n+1) to L(n+2)
>
> qemu-system-ppc64 -device vfio-pci,host=0000:00:00.0
>
> 4. L(n+2) can now access the device which will be emulated at L(n)
>
> V2 -> V3:
> 1/8: None
> 2/8: None
> 3/8: None
> 4/8: None
> 5/8: None
> 6/8: Add if def to fix compilation for some platforms
> 7/8: None
> 8/8: None
>
> Suraj Jitindar Singh (8):
> KVM: PPC: Only report KVM_CAP_SPAPR_TCE_VFIO on powernv machines
> KVM: PPC: Book3S HV: Add function kvmhv_vcpu_is_radix()
> KVM: PPC: Book3S HV: Implement functions to access quadrants 1 & 2
> KVM: PPC: Add load_from_eaddr and store_to_eaddr to the kvmppc_ops
> struct
> KVM: PPC: Update kvmppc_st and kvmppc_ld to use quadrants
> KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L2
> guest
> KVM: PPC: Introduce new hcall H_COPY_TOFROM_GUEST to access quadrants
> 1 & 2
> KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L3
> guest
Thanks, series applied to my kvm-ppc-next branch.
Paul.
prev parent reply other threads:[~2018-12-18 1:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 5:29 [PATCH V4 0/8] KVM: PPC: Implement passthrough of emulated devices for nested guests Suraj Jitindar Singh
2018-12-14 5:29 ` [PATCH V4 1/8] KVM: PPC: Only report KVM_CAP_SPAPR_TCE_VFIO on powernv machines Suraj Jitindar Singh
2018-12-14 5:29 ` [PATCH V4 2/8] KVM: PPC: Book3S HV: Add function kvmhv_vcpu_is_radix() Suraj Jitindar Singh
2018-12-14 5:29 ` [PATCH V4 3/8] KVM: PPC: Book3S HV: Implement functions to access quadrants 1 & 2 Suraj Jitindar Singh
2018-12-14 5:29 ` [PATCH V4 4/8] KVM: PPC: Add load_from_eaddr and store_to_eaddr to the kvmppc_ops struct Suraj Jitindar Singh
2018-12-14 5:29 ` [PATCH V4 5/8] KVM: PPC: Update kvmppc_st and kvmppc_ld to use quadrants Suraj Jitindar Singh
2018-12-14 5:29 ` [PATCH V4 6/8] KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L2 guest Suraj Jitindar Singh
2018-12-14 5:29 ` [PATCH V4 7/8] KVM: PPC: Introduce new hcall H_COPY_TOFROM_GUEST to access quadrants 1 & 2 Suraj Jitindar Singh
2018-12-14 5:29 ` [PATCH V4 8/8] KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L3 guest Suraj Jitindar Singh
2018-12-18 1:02 ` Paul Mackerras [this message]
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=20181218010253.GE25748@blackberry \
--to=paulus@ozlabs.org \
--cc=aik@ozlabs.ru \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sjitindarsingh@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).