Re: [Qemu-devel] [V12 3/4] hw/i386: Introduce AMD IOMMU

2016-07-03 Thread Jan Kiszka
On 2016-07-04 07:49, David Kiarie wrote: > +/* FIXME: something might go wrong if System Software writes in chunks > + * of one byte but linux writes in chunks of 4 bytes so currently it > + * works correctly with linux but will definitely be busted if software > + * reads/writes 8

Re: [Qemu-devel] [V12 3/4] hw/i386: Introduce AMD IOMMU

2016-07-03 Thread David Kiarie
On Mon, Jul 4, 2016 at 8:41 AM, Jan Kiszka wrote: > On 2016-07-04 07:06, David Kiarie wrote: >> On Wed, Jun 22, 2016 at 11:24 PM, Jan Kiszka wrote: >>> On 2016-06-15 14:21, David Kiarie wrote: +static uint64_t amdvi_mmio_read(void *opaque, hwaddr addr,

Re: [Qemu-devel] [V12 3/4] hw/i386: Introduce AMD IOMMU

2016-07-03 Thread Jan Kiszka
On 2016-07-04 07:06, David Kiarie wrote: > On Wed, Jun 22, 2016 at 11:24 PM, Jan Kiszka wrote: >> On 2016-06-15 14:21, David Kiarie wrote: >>> +static uint64_t amdvi_mmio_read(void *opaque, hwaddr addr, unsigned size) >>> +{ >>> +AMDVIState *s = opaque; >>> + >>> +

Re: [Qemu-devel] [PATCH 1/4] ppc: simplify ppc_hash64_hpte_page_shift_noslb()

2016-07-03 Thread David Gibson
On Fri, Jul 01, 2016 at 09:10:10AM +0200, Cédric Le Goater wrote: > The segment page shift parameter is never used. Let's remove it. I think I did have a use case for this in mind when I made it, but I can't remember what it was now. Oh well, we can always add it back when I remember. I'll

Re: [Qemu-devel] [PATCH 1/4] ppc: simplify ppc_hash64_hpte_page_shift_noslb()

2016-07-03 Thread David Gibson
On Mon, Jul 04, 2016 at 02:46:51PM +1000, David Gibson wrote: > On Fri, Jul 01, 2016 at 09:10:10AM +0200, Cédric Le Goater wrote: > > The segment page shift parameter is never used. Let's remove it. > > I think I did have a use case for this in mind when I made it, but I > can't remember what it

[Qemu-devel] [PATCH] ppc: Fix xsrdpi, xvrdpi and xvrspi rounding

2016-07-03 Thread Anton Blanchard
From: Anton Blanchard xsrdpi, xvrdpi and xvrspi use the round ties away method, not round nearest even. Signed-off-by: Anton Blanchard --- target-ppc/fpu_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [Qemu-devel] [V12 3/4] hw/i386: Introduce AMD IOMMU

2016-07-03 Thread David Kiarie
On Wed, Jun 22, 2016 at 11:24 PM, Jan Kiszka wrote: > On 2016-06-15 14:21, David Kiarie wrote: >> + >> +/* System Software might never read from some of this fields but anyways */ > > No read-modify-write accesses observed in the field? And fields like > AMDVI_MMIO_STATUS or

Re: [Qemu-devel] [PATCH v2 2/7] ppc: simplify max_smt initialization in ppc_cpu_realizefn()

2016-07-03 Thread David Gibson
On Sat, Jul 02, 2016 at 12:41:32AM +0200, Greg Kurz wrote: > kvmppc_smt_threads() returns 1 if KVM is not enabled. > > Signed-off-by: Greg Kurz Applied to ppc-for-2.7 > --- > target-ppc/translate_init.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [Qemu-devel] [PATCH v2 4/7] ppc: open code cpu creation for machine types

2016-07-03 Thread David Gibson
On Sat, Jul 02, 2016 at 10:33:33AM +0200, Greg Kurz wrote: > On Sat, 2 Jul 2016 13:36:22 +0530 > Bharata B Rao wrote: > > > On Sat, Jul 02, 2016 at 12:41:48AM +0200, Greg Kurz wrote: > > > If we want to generate cpu_dt_id in the machine code, this must occur > > >

Re: [Qemu-devel] [PATCH v3 3/5] numa: reduce code duplication by adding helper numa_get_node_for_cpu()

2016-07-03 Thread David Gibson
On Fri, Jul 01, 2016 at 01:50:24PM +0200, Igor Mammedov wrote: > Replace repeated pattern > > for (i = 0; i < nb_numa_nodes; i++) { > if (test_bit(idx, numa_info[i].node_cpu)) { >... >break; > > with a helper function to lookup numa node index for cpu. > >

[Qemu-devel] [PATCH qemu v19 2/5] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2)

2016-07-03 Thread Alexey Kardashevskiy
This makes use of the new "memory registering" feature. The idea is to provide the userspace ability to notify the host kernel about pages which are going to be used for DMA. Having this information, the host kernel can pin them all once per user process, do locked pages accounting (once) and not

[Qemu-devel] [PATCH qemu v19 0/5] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-07-03 Thread Alexey Kardashevskiy
Each Partitionable Endpoint (IOMMU group) has an address range on a PCI bus where devices are allowed to do DMA. These ranges are called DMA windows. By default, there is a single DMA window, 1 or 2GB big, mapped at zero on a PCI bus. PAPR defines a DDW RTAS API which allows pseries guests

[Qemu-devel] [PATCH qemu v19 3/5] vfio: Add host side DMA window capabilities

2016-07-03 Thread Alexey Kardashevskiy
There are going to be multiple IOMMUs per a container. This moves the single host IOMMU parameter set to a list of VFIOHostDMAWindow. This should cause no behavioral change and will be used later by the SPAPR TCE IOMMU v2 which will also add a vfio_host_win_del() helper. Signed-off-by: Alexey

[Qemu-devel] [PATCH qemu v19 5/5] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-07-03 Thread Alexey Kardashevskiy
This adds support for Dynamic DMA Windows (DDW) option defined by the SPAPR specification which allows to have additional DMA window(s) The "ddw" property is enabled by default on a PHB but for compatibility the pseries-2.6 machine and older disable it. This also creates a single DMA window for

[Qemu-devel] [PATCH qemu v19 4/5] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)

2016-07-03 Thread Alexey Kardashevskiy
New VFIO_SPAPR_TCE_v2_IOMMU type supports dynamic DMA window management. This adds ability to VFIO common code to dynamically allocate/remove DMA windows in the host kernel when new VFIO container is added/removed. This adds a helper to vfio_listener_region_add which makes

[Qemu-devel] [PATCH qemu v19 1/5] spapr_iommu: Realloc guest visible TCE table when starting/stopping listening

2016-07-03 Thread Alexey Kardashevskiy
The sPAPR TCE tables manage 2 copies when VFIO is using an IOMMU - a guest view of the table and a hardware TCE table. If there is no VFIO presense in the address space, then just the guest view is used, if this is the case, it is allocated in the KVM. However since there is no support yet for

Re: [Qemu-devel] [RFC PATCH V2 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-07-03 Thread Jason Wang
On 2016年07月02日 14:22, Zhang Chen wrote: We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pkt and mirror(filter-mirror) to secondary guest,

Re: [Qemu-devel] [RFC PATCH V2 2/3] filter-rewriter: track connection and parse packet

2016-07-03 Thread Jason Wang
On 2016年07月02日 14:22, Zhang Chen wrote: We use colo-base.h to track connection and parse packet Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/filter-rewriter.c | 52

Re: [Qemu-devel] [PATCH v2 0/2]vhost-user: Extend protocol to seek response for any command.

2016-07-03 Thread Prerna Saxena
Hi Marc-Andre, Thank you for taking a look. On 03/07/16 5:17 pm, "Marc-André Lureau" wrote: >Hi > >On Fri, Jul 1, 2016 at 11:46 AM, Prerna Saxena wrote: >> From: Prerna Saxena >> >> The current vhost-user

Re: [Qemu-devel] [RFC PATCH V2 1/3] filter-rewriter: introduce filter-rewriter initialization

2016-07-03 Thread Jason Wang
On 2016年07月02日 14:22, Zhang Chen wrote: Filter-rewriter is a part of COLO project. It will rewrite some of secondary packet to make secondary guest's connection established successfully. Probably need to be more verbose here. E.g we only care about tcp and only rewrite ack now. usage:

Re: [Qemu-devel] [PATCH v0] spapr: Ensure thread0 of CPU core is always realized first

2016-07-03 Thread David Gibson
On Fri, Jul 01, 2016 at 10:44:39AM +0530, Bharata B Rao wrote: > During CPU core realization, we create all the thread objects and parent > them to the core object in a loop. However, the realization of thread > objects is done separately by walking the threads of a core using >

Re: [Qemu-devel] [PATCH] ppc: Fix xsrdpi, xvrdpi and xvrspi rounding

2016-07-03 Thread David Gibson
On Mon, Jul 04, 2016 at 09:20:12AM +1000, Anton Blanchard wrote: > From: Anton Blanchard > > xsrdpi, xvrdpi and xvrspi use the round ties away method, not round > nearest even. > > Signed-off-by: Anton Blanchard Applied to ppc-for-2.7. I take it

Re: [Qemu-devel] [PATCH 1/3] Mediated device Core driver

2016-07-03 Thread Jike Song
On 06/21/2016 12:31 AM, Kirti Wankhede wrote: > +/* > + * mdev_register_device : Register a device > + * @dev: device structure representing parent device. > + * @ops: Parent device operation structure to be registered. > + * > + * Add device to list of registered parent devices. > + * Returns a

Re: [Qemu-devel] [PATCH v20 Resend 09/10] tests: add unit test case for replication

2016-07-03 Thread Changlong Xie
On 06/14/2016 03:53 PM, Changlong Xie wrote: Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- tests/.gitignore | 1 + tests/Makefile | 4 + tests/test-replication.c | 555

[Qemu-devel] [PULL 5/6] slirp: Remove superfluous memset() calls from the TFTP code

2016-07-03 Thread Samuel Thibault
From: Thomas Huth Commit fad7fb9ccd8013ea03 ("Add IPv6 support to the TFTP code") refactored some common code for preparing the mbuf into a new function called tftp_prep_mbuf_data(). One part of this common code is to do a "memset(m->m_data, 0, m->m_size);" for the related

[Qemu-devel] [PULL 2/6] slirp: Add dns6 resolution

2016-07-03 Thread Samuel Thibault
This makes get_dns_addr address family-agnostic, thus allowing to add the IPv6 case. Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/ip6.h | 9 +++ slirp/libslirp.h | 1 + slirp/slirp.c| 79

[Qemu-devel] [PULL 0/6] slirp: ipv6 dns & dhcp support

2016-07-03 Thread Samuel Thibault
The following changes since commit 9a48e3670030148a8d00c8d4d4cd7f051c0d9f39: Added Bulgarian translation (2016-07-01 16:06:57 +0100) are available in the git repository at: http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault for you to fetch changes up to

[Qemu-devel] [PULL 4/6] slirp: Add RDNSS advertisement

2016-07-03 Thread Samuel Thibault
This adds the RDNSS option to IPv6 router advertisements, so that the guest can autoconfigure the DNS server address. Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- Changes since last submission: - Disable on windows, until we have

[Qemu-devel] [PULL 6/6] slirp: Add support for stateless DHCPv6

2016-07-03 Thread Samuel Thibault
From: Thomas Huth Provide basic support for stateless DHCPv6 (see RFC 3736) so that guests can also automatically boot via IPv6 with SLIRP (for IPv6 network booting, see RFC 5970 for details). Tested with: qemu-system-ppc64 -nographic -vga none -boot n -net nic \

[Qemu-devel] [PULL 3/6] slirp: Support link-local DNS addresses

2016-07-03 Thread Samuel Thibault
They look like fe80::%eth0 Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- Changes since last submission: - fix windows build --- slirp/libslirp.h | 2 +- slirp/slirp.c| 32 +++- slirp/socket.c | 5

[Qemu-devel] [PULL 1/6] slirp: Split get_dns_addr

2016-07-03 Thread Samuel Thibault
Separate get_dns_addr into get_dns_addr_cached and get_dns_addr_resolv_conf to make conversion to IPv6 easier. Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/slirp.c | 53 ++--- 1

[Qemu-devel] [Bug 1598612] Re: Windows for Workgroups 3.11 installer crashes with a general protection fault

2016-07-03 Thread Julius Schwartzenberg
Windows 3.1 has the same problem, but the errors are slightly different: Application Error WINSETUP caused a General Protection Fault in module 0C77:7011WINSETUP will close. Application Error WINSETUP caused a General Protection Fault in module KRNL386.EXE at 0001:9F03. -- You received this

[Qemu-devel] [Bug 1598612] [NEW] Windows for Workgroups 3.11 installer crashes with a general protection fault

2016-07-03 Thread Julius Schwartzenberg
Public bug reported: I used only disk images from here: http://ia801606.us.archive.org/zipview.php?zip=/22/items/IBM_PC_Compatibles_TOSEC_2012_04_23/IBM_PC_Compatibles_TOSEC_2012_04_23.zip When I try to install Windows for Workgroups 3.11 on either PC DOS 2000 or MS-DOS 6.22, the installer

Re: [Qemu-devel] [PATCH] target-i386: Use struct X86XSaveArea in fpu_helper.c

2016-07-03 Thread Eduardo Habkost
On Sat, Jul 02, 2016 at 04:45:11PM -0700, Richard Henderson wrote: > On 07/02/2016 01:02 PM, Eduardo Habkost wrote: > > On Sat, Jul 02, 2016 at 09:44:31AM -0700, Richard Henderson wrote: > > [...] > > > @@ -1402,9 +1409,8 @@ void helper_xrstor(CPUX86State *env, target_ulong > > > ptr, uint64_t

Re: [Qemu-devel] [PATCH v2 0/2]vhost-user: Extend protocol to seek response for any command.

2016-07-03 Thread Marc-André Lureau
Hi On Fri, Jul 1, 2016 at 11:46 AM, Prerna Saxena wrote: > From: Prerna Saxena > > The current vhost-user protocol requires the client to send responses to only > a > few commands. For the remaining commands, it is impossible for QEMU to know

[Qemu-devel] [PATCH] qemu log: wrap long text

2016-07-03 Thread Mike Frysinger
The existing help output is a bit hard to read due to the ad-hoc wrapping. This makes it a bit more programmatic (at least, it wraps it once, but that should be good enough for now). Signed-off-by: Mike Frysinger --- util/log.c | 36 ++-- 1

[Qemu-devel] [Bug 1588328] Re: Qemu 2.6 Solaris 9 Sparc Segmentation Fault

2016-07-03 Thread Zhen Ning Lim
Hi Mark, We are finally in:) By the way, how do you figure out which slice its in? >From solaris 8 dvd onwards, i seems to see 2 disk label options: SMI and EFI. Not sure why you didnt see those. 0 > boot disk:a Not a bootable ELF image Loading a.out image... Loaded 7680 bytes entry point is