Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-12 Thread Valentine Sinitsyn
Hi David, On 07.09.2015 17:46, Valentine Sinitsyn wrote: ...snip... +/* TODO : Mark addresses as Accessed and Dirty */ +static void amd_iommu_do_translate(AMDIOMMUAddressSpace *as, hwaddr addr, bool is_write, IOMMUTLBEntry *ret) +{ +AMDIOMMUState *s = as->iommu_state; + +int present; +

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-09 Thread David kiarie
On Wed, Sep 9, 2015 at 11:14 AM, Valentine Sinitsyn wrote: > Oops, that was a long ago. Sorry & thanks. No problem. Will fix all other comments. > > Valentine > > > On 09.09.2015 13:12, David kiarie wrote: >> >> I wrote something basic on the cover letter >>

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-09 Thread David kiarie
On Mon, Sep 7, 2015 at 3:46 PM, Valentine Sinitsyn wrote: > Hi David, > > Sorry for the long silence. I've skimmed through your patch, below are some > thoughts. Please remember I'm looking for IOMMU implementation details, not > how it is integrated with QEMU. > >

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-09 Thread Valentine Sinitsyn
On 09.09.2015 12:30, David kiarie wrote: ...snip... +static void amd_iommu_cmdbuf_exec(AMDIOMMUState *s) +{ +unsigned type; +uint8_t cmd[IOMMU_COMMAND_SIZE]; + +IOMMU_DPRINTF(COMMAND, ""); +memset(cmd, 0, IOMMU_COMMAND_SIZE); + +if(dma_memory_read(_space_memory, s->cmdbuf +

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-09 Thread Valentine Sinitsyn
On 09.09.2015 12:59, Michael S. Tsirkin wrote: On Wed, Sep 09, 2015 at 12:45:10PM +0500, Valentine Sinitsyn wrote: On 09.09.2015 12:30, David kiarie wrote: ...snip... +static void amd_iommu_cmdbuf_exec(AMDIOMMUState *s) +{ +unsigned type; +uint8_t cmd[IOMMU_COMMAND_SIZE]; + +

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-09 Thread Valentine Sinitsyn
On 09.09.2015 12:59, David kiarie wrote: On Wed, Sep 9, 2015 at 10:45 AM, Valentine Sinitsyn wrote: On 09.09.2015 12:30, David kiarie wrote: ...snip... +static void amd_iommu_cmdbuf_exec(AMDIOMMUState *s) +{ +unsigned type; +uint8_t

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-09 Thread Michael S. Tsirkin
On Wed, Sep 09, 2015 at 12:45:10PM +0500, Valentine Sinitsyn wrote: > On 09.09.2015 12:30, David kiarie wrote: > ...snip... > > >>>+static void amd_iommu_cmdbuf_exec(AMDIOMMUState *s) > >>>+{ > >>>+unsigned type; > >>>+uint8_t cmd[IOMMU_COMMAND_SIZE]; > >>>+ > >>>+

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-09 Thread David kiarie
On Wed, Sep 9, 2015 at 10:45 AM, Valentine Sinitsyn wrote: > On 09.09.2015 12:30, David kiarie wrote: > ...snip... > > +static void amd_iommu_cmdbuf_exec(AMDIOMMUState *s) +{ +unsigned type; +uint8_t cmd[IOMMU_COMMAND_SIZE]; + +

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-09 Thread David kiarie
I wrote something basic on the cover letter http://lists.nongnu.org/archive/html/qemu-devel/2015-08/msg02759.html On Wed, Sep 9, 2015 at 11:07 AM, Valentine Sinitsyn wrote: > On 09.09.2015 12:59, David kiarie wrote: >> >> On Wed, Sep 9, 2015 at 10:45 AM, Valentine

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-09 Thread Valentine Sinitsyn
Oops, that was a long ago. Sorry & thanks. Valentine On 09.09.2015 13:12, David kiarie wrote: I wrote something basic on the cover letter http://lists.nongnu.org/archive/html/qemu-devel/2015-08/msg02759.html On Wed, Sep 9, 2015 at 11:07 AM, Valentine Sinitsyn

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-09-07 Thread Valentine Sinitsyn
Hi David, Sorry for the long silence. I've skimmed through your patch, below are some thoughts. Please remember I'm looking for IOMMU implementation details, not how it is integrated with QEMU. On 25.08.2015 04:19, David Kiarie wrote: From: David Add AMD IOMMU

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-08-25 Thread Valentine Sinitsyn
Hi, On 25.08.2015 04:19, David Kiarie wrote: From: David davidkiar...@gmail.com Add AMD IOMMU emulation to Qemu. This is a very basic AMD IOMMU emulation that only does translation and some basic Event logging. Guest translation enables nested PCI passthrough Signed-off-by: David Kiarie

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-08-25 Thread David kiarie
Also, am not sure what HATS, GATS and sizes of virtual addresses(for both guest and host) I should be using. On Tue, Aug 25, 2015 at 10:41 AM, David kiarie davidkiar...@gmail.com wrote: On Tue, Aug 25, 2015 at 10:31 AM, Valentine Sinitsyn valentine.sinit...@gmail.com wrote: On 25.08.2015

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-08-25 Thread David kiarie
On Tue, Aug 25, 2015 at 9:39 AM, Valentine Sinitsyn valentine.sinit...@gmail.com wrote: Hi, On 25.08.2015 04:19, David Kiarie wrote: From: David davidkiar...@gmail.com Add AMD IOMMU emulation to Qemu. This is a very basic AMD IOMMU emulation that only does translation and some basic Event

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-08-25 Thread David kiarie
On Tue, Aug 25, 2015 at 10:31 AM, Valentine Sinitsyn valentine.sinit...@gmail.com wrote: On 25.08.2015 12:25, David kiarie wrote: On Tue, Aug 25, 2015 at 9:39 AM, Valentine Sinitsyn valentine.sinit...@gmail.com wrote: Hi, On 25.08.2015 04:19, David Kiarie wrote: From: David

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-08-25 Thread Valentine Sinitsyn
On 25.08.2015 12:25, David kiarie wrote: On Tue, Aug 25, 2015 at 9:39 AM, Valentine Sinitsyn valentine.sinit...@gmail.com wrote: Hi, On 25.08.2015 04:19, David Kiarie wrote: From: David davidkiar...@gmail.com Add AMD IOMMU emulation to Qemu. This is a very basic AMD IOMMU emulation that

Re: [Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-08-25 Thread Valentine Sinitsyn
On 25.08.2015 12:41, David kiarie wrote: On Tue, Aug 25, 2015 at 10:31 AM, Valentine Sinitsyn [...snip...] The spec doesn't say anything about this, I checked it. IIRC, I came across this behavior when submitted COMPLETION_WAIT command with interrupts off and spin in a while() loop waiting for

[Qemu-devel] [RFC 2/4] hw/i386: Introduce AMD IOMMU

2015-08-24 Thread David Kiarie
From: David davidkiar...@gmail.com Add AMD IOMMU emulation to Qemu. This is a very basic AMD IOMMU emulation that only does translation and some basic Event logging. Guest translation enables nested PCI passthrough Signed-off-by: David Kiarie davidkiar...@gmail.com --- hw/i386/Makefile.objs |