Re: [Qemu-devel] [PATCH 2/5] slirp: Split get_dns_addr

2016-03-30 Thread Thomas Huth
> @@ -173,6 +176,18 @@ int get_dns_addr(struct in_addr *pdns_addr) > return 0; > } > > +int get_dns_addr(struct in_addr *pdns_addr) > +{ > +if (dns_addr.s_addr != 0) { > +int ret; > +ret = get_dns_addr_cached(pdns_addr); > +if (ret <= 0) { > +return ret; > +} > +} > +return get_dns_addr_resolv_conf(pdns_addr); > +} > + > #endif > > static void slirp_init_once(void) > Reviewed-by: Thomas Huth <th...@redhat.com>

Re: [Qemu-devel] [PATCH 5/5] slirp: Add RDNSS advertisement

2016-03-30 Thread Thomas Huth
popt_body; > } QEMU_PACKED; > > /* NDP options type */ > #define NDPOPT_LINKLAYER_SOURCE 1 /* Source Link-Layer Address */ > #define NDPOPT_LINKLAYER_TARGET 2 /* Target Link-Layer Address */ > #define NDPOPT_PREFIX_INFO 3 /* Prefix Information */ > +#define NDPOPT_RDNSS25 /* Recursive DNS Server Address */ > > /* NDP options size, in octets. */ > #define NDPOPT_LINKLAYER_LEN8 > #define NDPOPT_PREFIXINFO_LEN 32 > +#define NDPOPT_RDNSS_LEN24 > > /* > * Definition of type and code field values. > Reviewed-by: Thomas Huth <th...@redhat.com>

Re: [Qemu-devel] [PATCH 1/5] slirp: Allow disabling IPv4 or IPv6

2016-03-30 Thread Thomas Huth
On 30.03.2016 17:04, Samuel Thibault wrote: > Hello, > > Thomas Huth, on Wed 30 Mar 2016 10:38:46 +0200, wrote: >>> -"-netdev >>> user,id=str[,net=addr[/mask]][,host=addr][,ipv6-net=addr[/int]]\n" >>> -" >>> [,ipv6-hos

Re: [Qemu-devel] [PATCH 1/5] slirp: Allow disabling IPv4 or IPv6

2016-03-30 Thread Thomas Huth
On 30.03.2016 17:13, Samuel Thibault wrote: > Thomas Huth, on Wed 30 Mar 2016 17:06:51 +0200, wrote: >> The "restrict" option is listed with "=on|off" here, that's why I >> thought it should be there for "ipv4" and "ipv6", too. Which boolean &

[Qemu-devel] [PATCH] slirp: Fix migration from older versions of QEMU to the current one

2016-03-31 Thread Thomas Huth
've detected version 3 or less. Signed-off-by: Thomas Huth <th...@redhat.com> --- slirp/slirp.c | 44 ++-- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index 3481fcc..998f278 100644 --- a/slirp/s

Re: [Qemu-devel] [PATCH] slirp: Fix migration from older versions of QEMU to the current one

2016-04-01 Thread Thomas Huth
On 01.04.2016 00:22, Samuel Thibault wrote: > Samuel Thibault, on Fri 01 Apr 2016 00:00:43 +0200, wrote: >> Just realizing... We'd need to add AF_INET6 cases here too, to be able >> to save/restore a VM using ipv6 connections. > > That seems quite involved however, maybe we should postpone that

Re: [Qemu-devel] [PATCH v2] util: Improved qemu_hexmap() to include an ascii dump of the buffer

2016-03-30 Thread Thomas Huth
--- > 2 files changed, 23 insertions(+), 40 deletions(-) [...] Code looks fine now, thanks for taking care of this! Reviewed-by: Thomas Huth <th...@redhat.com> Jason, since there is no explicit maintainer for util/hexdump.c, could you maybe take this throug

Re: [Qemu-devel] [PATCH] util: Improved qemu_hexmap() to include an ascii dump of the buffer

2016-03-23 Thread Thomas Huth
; len) { >> +fprintf(fp, " %02x", (unsigned char)buf[b + i]); >> +} >> +else >> +{ >> +fprintf(fp, " "); >> +} >> } >> - fprintf(fp,

Re: [Qemu-devel] [PATCH] util: Improved qemu_hexmap() to include an ascii dump of the buffer

2016-03-23 Thread Thomas Huth
Hi Isaac, thanks for taking care of this! Comments below... On 22.03.2016 08:41, Isaac Lozano wrote: > qemu_hexdump() in util/hexdump.c has been changed to give also include a > ascii dump of the buffer. Also, calls to hex_dump() in net/net.c have > been replaced with calls to qemu_hexdump().

Re: [Qemu-devel] [PATCH] linux-user,target-ppc: fix use of MSR_LE

2016-03-31 Thread Thomas Huth
me_addr, 1); > return; > @@ -4798,7 +4798,7 @@ static void setup_rt_frame(int sig, struct > target_sigaction *ka, > #endif > > /* Signal handlers are entered in big-endian mode. */ > -env->msr &= ~MSR_LE; > +env->msr &= ~(1ull << MSR_LE); > > unlock_user_struct(rt_sf, rt_sf_addr, 1); > return; > Reviewed-by: Thomas Huth <h...@tuxfamily.org>

Re: [Qemu-devel] [PATCH] hw/virtio/balloon: Fixes for different host page sizes

2016-04-13 Thread Thomas Huth
On 13.04.2016 15:15, Michael S. Tsirkin wrote: > On Wed, Apr 13, 2016 at 01:52:44PM +0200, Thomas Huth wrote: >> The balloon code currently calls madvise() with TARGET_PAGE_SIZE >> as length parameter, and an address which is directly based on >> the page address supplie

Re: [Qemu-devel] [PATCH] hw/virtio/balloon: Fixes for different host page sizes

2016-04-14 Thread Thomas Huth
On 14.04.2016 13:47, Dr. David Alan Gilbert wrote: > * Thomas Huth (th...@redhat.com) wrote: > >> That would mean a regression compared to what we have today. Currently, >> the ballooning is working OK for 64k guests on a 64k ppc host - rather >> by chance than on p

Re: [Qemu-devel] [PATCH] hw/virtio/balloon: Fixes for different host page sizes

2016-04-13 Thread Thomas Huth
On 13.04.2016 19:07, Michael S. Tsirkin wrote: > On Wed, Apr 13, 2016 at 04:51:49PM +0200, Thomas Huth wrote: >> On 13.04.2016 15:15, Michael S. Tsirkin wrote: >>> On Wed, Apr 13, 2016 at 01:52:44PM +0200, Thomas Huth wrote: ... >>>> Then, there's yet another

Re: [Qemu-devel] [PATCH] hw/virtio/balloon: Fixes for different host page sizes

2016-04-13 Thread Thomas Huth
On 13.04.2016 19:55, Michael S. Tsirkin wrote: > On Wed, Apr 13, 2016 at 07:38:12PM +0200, Thomas Huth wrote: >> On 13.04.2016 19:07, Michael S. Tsirkin wrote: >>> On Wed, Apr 13, 2016 at 04:51:49PM +0200, Thomas Huth wrote: >>>> On 13.04.2016 15:15, Michael S. Tsirk

Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support

2016-04-29 Thread Thomas Huth
On 29.04.2016 05:24, David Gibson wrote: > On Tue, Apr 26, 2016 at 04:03:37PM -0500, Michael Roth wrote: ... >> In the case of pseries, the DIMM abstraction isn't really exposed to >> the guest, but rather the memory blocks we use to make the backing >> memdev memory available to the guest. During

Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support

2016-04-29 Thread Thomas Huth
On 29.04.2016 08:59, Bharata B Rao wrote: > On Fri, Apr 29, 2016 at 08:45:37AM +0200, Thomas Huth wrote: >> On 29.04.2016 05:24, David Gibson wrote: >>> On Tue, Apr 26, 2016 at 04:03:37PM -0500, Michael Roth wrote: >> ... >>>> In the case of pseries, the D

Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support

2016-04-29 Thread Thomas Huth
On 29.04.2016 10:30, Igor Mammedov wrote: > On Fri, 29 Apr 2016 10:22:03 +0200 > Thomas Huth <th...@redhat.com> wrote: > >> On 29.04.2016 08:59, Bharata B Rao wrote: >>> On Fri, Apr 29, 2016 at 08:45:37AM +0200, Thomas Huth wrote: >>>> On 29.04.2016

Re: [Qemu-devel] [RFC for-2.7 01/11] qdt: IEEE1275-style device tree utility code

2016-04-26 Thread Thomas Huth
On 20.04.2016 04:33, David Gibson wrote: ... > This patch introduces a new utility library "qdt" for runtime > manipulation of device trees. The intention is that machine type code > can use these routines to construct the device tree conveniently, > using a pointer-based representation doesn't

Re: [Qemu-devel] Is anyone able to load a web page from a guest operating system?

2016-04-27 Thread Thomas Huth
On 26.04.2016 22:19, Programmingkid wrote: > > On Apr 26, 2016, at 4:12 PM, Thomas Huth wrote: > >> On 26.04.2016 21:25, Programmingkid wrote: >>> >>> On Apr 26, 2016, at 3:00 PM, Dr. David Alan Gilbert wrote: >>> >>>> * Programmingkid (

Re: [Qemu-devel] [RFC for-2.7 01/11] qdt: IEEE1275-style device tree utility code

2016-04-27 Thread Thomas Huth
On 27.04.2016 09:28, Markus Armbruster wrote: > Thomas Huth <th...@redhat.com> writes: > >> On 27.04.2016 08:43, Markus Armbruster wrote: >>> David Gibson <da...@gibson.dropbear.id.au> writes: >>> >>>> On Tue, Apr 26, 2016 at 01:00:06PM +020

Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support

2016-04-27 Thread Thomas Huth
On 26.04.2016 23:03, Michael Roth wrote: > Quoting Igor Mammedov (2016-04-26 02:52:36) >> On Tue, 26 Apr 2016 10:39:23 +0530 >> Bharata B Rao wrote: >> >>> On Mon, Apr 25, 2016 at 11:20:50AM +0200, Igor Mammedov wrote: On Wed, 16 Mar 2016 10:11:54 +0530

Re: [Qemu-devel] [RFC for-2.7 01/11] qdt: IEEE1275-style device tree utility code

2016-04-27 Thread Thomas Huth
On 27.04.2016 08:43, Markus Armbruster wrote: > David Gibson <da...@gibson.dropbear.id.au> writes: > >> On Tue, Apr 26, 2016 at 01:00:06PM +0200, Thomas Huth wrote: >>> On 20.04.2016 04:33, David Gibson wrote: [...] >>>> +/* >>>> + * Pr

Re: [Qemu-devel] Is anyone able to load a web page from a guest operating system?

2016-04-27 Thread Thomas Huth
On 27.04.2016 12:05, Laszlo Ersek wrote: > On 04/26/16 22:12, Thomas Huth wrote: >> On 26.04.2016 21:25, Programmingkid wrote: >>> On Apr 26, 2016, at 3:00 PM, Dr. David Alan Gilbert wrote: > >>>> Does ping work? >>> I can ping the virtual rout

Re: [Qemu-devel] [RFC for-2.7 06/11] pseries: Consolidate RTAS loading

2016-04-27 Thread Thomas Huth
OS and boot firmware can locate it. > > For historical reasons the copy and update to the device tree were in > different parts of the code. This cleanup brings them both together in > an spapr_load_rtas() function. > > Signed-off-by: David Gibson <da...@gibson.dropbear.id.

Re: [Qemu-devel] [RFC for-2.7 07/11] pseries: Move adding of fdt reserve map entries

2016-04-27 Thread Thomas Huth
dt, KERNEL_LOAD_ADDR, spapr->kernel_size))); > +} > + if (spapr->initrd_size) { > +_FDT((fdt_add_mem_rsv(fdt, spapr->initrd_base, spapr->initrd_size))); > +} > + > return fdt; > } Reviewed-by: Thomas Huth <th...@redhat.com>

Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support

2016-04-27 Thread Thomas Huth
On 27.04.2016 15:37, Igor Mammedov wrote: > On Tue, 26 Apr 2016 16:03:37 -0500 > Michael Roth wrote: > >> Quoting Igor Mammedov (2016-04-26 02:52:36) >>> On Tue, 26 Apr 2016 10:39:23 +0530 >>> Bharata B Rao wrote: >>> On Mon, Apr

Re: [Qemu-devel] [PATCH] slirp: fix guest network access with darwin host

2016-04-28 Thread Thomas Huth
; > Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> > --- > slirp/ip_icmp.c | 2 +- > slirp/socket.c | 2 +- > slirp/socket.h | 12 > slirp/tcp_subr.c | 2 +- > 4 files changed, 15 insertions(+), 3 deletions(-) Reviewed-by: Thomas Huth <th...@redhat.com>

Re: [Qemu-devel] [RFC for-2.7 04/11] pseries: Make spapr_create_fdt_skel() get information from machine state

2016-04-26 Thread Thomas Huth
ppc/spapr.h | 4 +++ > 2 files changed, 40 insertions(+), 45 deletions(-) Reviewed-by: Thomas Huth <th...@redhat.com>

Re: [Qemu-devel] [RFC for-2.7 05/11] pseries: Build device tree only at reset time

2016-04-26 Thread Thomas Huth
On 20.04.2016 04:33, David Gibson wrote: > Currently the pseries code builds a "skeleton" device tree at machine init > time, then adds a bunch of stuff to it at reset. Over time, more and more > logic has had to be moved from init to reset time, and there's really no > advantage to doing any of

Re: [Qemu-devel] Is anyone able to load a web page from a guest operating system?

2016-04-26 Thread Thomas Huth
On 26.04.2016 21:25, Programmingkid wrote: > > On Apr 26, 2016, at 3:00 PM, Dr. David Alan Gilbert wrote: > >> * Programmingkid (programmingk...@gmail.com) wrote: >>> My three guest operating systems can't load a web page. I think this is a >>> bug with QEMU. Is there anyone who has the latest

Re: [Qemu-devel] [PATCH 15/52] target-ppc: do not make PowerPCCPUClass depend on target-specific symbols

2016-05-18 Thread Thomas Huth
struct ppc_segment_page_sizes *sps; > -#endif > void (*init_proc)(CPUPPCState *env); > int (*check_pow)(CPUPPCState *env); > -#if defined(CONFIG_SOFTMMU) > int (*handle_mmu_fault)(PowerPCCPU *cpu, vaddr eaddr, int rwx, int > mmu_idx); > -#endif > bool (*interr

Re: [Qemu-devel] [PATCH CFT v4 00/52] NEED_CPU_H / cpu.h / hw/hw.h cleanups

2016-05-18 Thread Thomas Huth
On 18.05.2016 18:36, Paolo Bonzini wrote: > This series removes usage of NEED_CPU_H from several central > include files in QEMU, most notably hw/hw.h and qemu-common.h. > Definitions conditional on NEED_CPU_H remain only in disas/disas.h, > exec/gdbstub.h, exec/helper-head.h and exec/log.h. > >

Re: [Qemu-devel] [PATCH 16/52] target-ppc: make cpu-qom.h not target specific

2016-05-18 Thread Thomas Huth
On 18.05.2016 18:36, Paolo Bonzini wrote: > Make PowerPCCPU an opaque type within cpu-qom.h, and move all definitions > of private methods, as well as all type definitions that require knowledge > of the layout to cpu.h. Conversely, move all definitions needed to define > a class to cpu-qom.h.

[Qemu-devel] [PATCH] usb/ohci: Fix crash with when specifying too many num-ports

2016-05-23 Thread Thomas Huth
/qemu/+bug/1581308 Signed-off-by: Thomas Huth <th...@redhat.com> --- hw/usb/hcd-ohci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index ffab561..16d9ff7 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -1848,6 +1848,12 @@ static vo

Re: [Qemu-devel] [PATCH] MAINTAINERS: update M68K entry

2016-05-12 Thread Thomas Huth
gt; index 81e7fac..c79404c 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -131,7 +131,8 @@ F: include/hw/lm32/ > F: tests/tcg/lm32/ > > M68K > -S: Orphan > +M: Laurent Vivier <laur...@vivier.eu> > +S: Maintained > F: target-m68k/ > F: hw/m68k/ Yay, fin

Re: [Qemu-devel] [PATCH CFT v3 00/50] NEED_CPU_H / cpu.h / hw/hw.h cleanups

2016-05-17 Thread Thomas Huth
On 16.05.2016 18:59, Peter Maydell wrote: > On 16 May 2016 at 17:53, Peter Maydell wrote: >> ppc64 (this is the ppc64be host in the GCC compile farm if >> you have an account there): >> >> /home/pm215/qemu/hw/intc/xics_kvm.c: In function ‘icp_get_kvm_state’: >>

Re: [Qemu-devel] [PATCH 14/50] target-ppc: make cpu-qom.h not target specific

2016-05-17 Thread Thomas Huth
On 16.05.2016 17:35, Paolo Bonzini wrote: > Make PowerPCCPU an opaque type within cpu-qom.h, and move all definitions > of private methods, as well as all type definitions that require knowledge > of the layout to cpu.h. Conversely, move all definitions needed to define > a class to cpu-qom.h.

Re: [Qemu-devel] [PATCH 15/50] target-s390x: make cpu-qom.h not target specific

2016-05-17 Thread Thomas Huth
int cpuid, void *opaque); > + > +hwaddr s390_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); > +hwaddr s390_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); > +int s390_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); > +int s390_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); > +void s390_cpu_gdb_init(CPUState *cs); > +void s390x_cpu_debug_excp_handler(CPUState *cs); > + > #include > > /* distinguish between 24 bit and 31 bit addressing */ > Reviewed-by: Thomas Huth <th...@redhat.com>

Re: [Qemu-devel] [PATCH 10/50] target-m68k: make cpu-qom.h not target specific

2016-05-17 Thread Thomas Huth
LE *f, fprintf_function > cpu_fprintf, > + int flags); > +hwaddr m68k_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); > +int m68k_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); > +int m68k_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); > + > +void m68k_cpu_exec_enter(CPUState *cs); > +void m68k_cpu_exec_exit(CPUState *cs); > > void m68k_tcg_init(void); > void m68k_cpu_init_gdb(M68kCPU *cpu); > Looks sane. Reviewed-by: Thomas Huth <h...@tuxfamily.org>

[Qemu-devel] [PATCH 2/4] slirp: Remove obsolete backward-compatibility cruft

2016-05-13 Thread Thomas Huth
anymore, so no need to keep the code for this platform anymore. Signed-off-by: Thomas Huth <th...@redhat.com> --- slirp/misc.c | 21 - slirp/slirp.h| 28 slirp/slirp_config.h | 12 3 files changed, 61 deletions(-)

[Qemu-devel] [PATCH 3/4] slirp: Remove some unused code from slirp.h

2016-05-13 Thread Thomas Huth
These hunks are apparently not used anymore, so let's delete them. Signed-off-by: Thomas Huth <th...@redhat.com> --- slirp/slirp.h | 22 -- 1 file changed, 22 deletions(-) diff --git a/slirp/slirp.h b/slirp/slirp.h index 5b5df59..e373876 100644 --- a/slirp/slirp.h

[Qemu-devel] [PATCH 0/4] slirp: Spring-cleaning

2016-05-13 Thread Thomas Huth
QEMU 2.6.0 has been released ... time for some spring-cleaning in the slirp code: These patches remove some old and unused code, and clean up osdep.h related header inclusions. Thomas Huth (4): slirp: Clean up slirp_config.h slirp: Remove obsolete backward-compatibility cruft slirp: Remove

Re: [Qemu-devel] ipxe and arm

2016-05-13 Thread Thomas Huth
On 12.05.2016 16:03, Gerd Hoffmann wrote: > Hi, > >>> I don't understand the question, sorry. How can ipxe fail if ipxe is not >>> made available to the guest, in any NIC's PCI option ROM BAR? >> What I meat to say is that on x86 user can use rtl8139 or e1000 to use >> ipxe. If uefi doesn't

[Qemu-devel] [PATCH 4/4] slirp: Clean up osdep.h related header inclusions

2016-05-13 Thread Thomas Huth
qemu/osdep.h is included in some headers twice - one time should be sufficient. Also remove the inclusion of time.h since that is already done by osdep.h, too (this makes scripts/clean-includes happy again). Signed-off-by: Thomas Huth <th...@redhat.com> --- slirp/ip6_icmp.c | 1 -

[Qemu-devel] [PATCH 1/4] slirp: Clean up slirp_config.h

2016-05-13 Thread Thomas Huth
There are a lot of unused #defines / #undefs in slirp_config.h, which are apparently left-overs from the very early slirp code. Since there is no more code that uses them, let's simply remove them from our version of slirp. Signed-off-by: Thomas Huth <th...@redhat.com> --- slirp/slirp_co

Re: [Qemu-devel] [RFC for-2.7 02/11] pseries: Split device tree construction from device tree load

2016-04-20 Thread Thomas Huth
xit(1); > + } > + > +/* Load the fdt */ > +qemu_fdt_dumpdtb(fdt, fdt_totalsize(fdt)); > +cpu_physical_memory_write(spapr->fdt_addr, fdt, fdt_totalsize(fdt)); > + > /* Set up the entry state */ > first_ppc_cpu = POWERPC_CPU(first_cpu); > first_ppc_cpu->env.gpr[3] = spapr->fdt_addr; Looks good. Reviewed-by: Thomas Huth <th...@redhat.com>

Re: [Qemu-devel] [RFC for-2.7 03/11] pseries: Remove rtas_addr and fdt_addr fields from machinestate

2016-04-20 Thread Thomas Huth
/ppc/spapr.h > index 815d5ee..655ffe9 100644 > --- a/include/hw/ppc/spapr.h > +++ b/include/hw/ppc/spapr.h > @@ -56,7 +56,6 @@ struct sPAPRMachineState { > uint32_t htab_shift; > hwaddr rma_size; > int vrma_adjust; > -hwaddr fdt_addr, rtas_addr; > ssize_t rtas_size; > void *rtas_blob; > void *fdt_skel; > Reviewed-by: Thomas Huth <th...@redhat.com>

[Qemu-devel] [PATCH] hw/virtio/balloon: Replace TARGET_PAGE_SIZE with BALLOON_PAGE_SIZE

2016-04-14 Thread Thomas Huth
this as the size parameter for the madvise() call instead. Signed-off-by: Thomas Huth <th...@redhat.com> --- hw/virtio/virtio-balloon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index c74101e..9dbe681

[Qemu-devel] [PATCH for-2.6] ppc: Fix migration of the XER register

2016-04-15 Thread Thomas Huth
x it by using cpu_read_xer() instead. Signed-off-by: Thomas Huth <th...@redhat.com> --- In case somebody wants to test this, this problem can easily be seen with my SPRs kvm-unit-test on KVM running on a P8 machine: https://patchwork.ozlabs.org/patch/607981/ target-ppc/machine.c | 2 +-

Re: [Qemu-devel] [PATCH for-2.6] ppc: Fix migration of the XER register

2016-04-15 Thread Thomas Huth
On 15.04.2016 12:17, Mark Cave-Ayland wrote: > On 15/04/16 10:03, Thomas Huth wrote: > >> env->xer only holds the lower bits of the XER register nowadays, the >> SO, OV and CA bits are stored in separate variables (see the function >> cpu_write_xer() for details

[Qemu-devel] [PATCH 2/2] ppc: Fix the bad exception NIP value and the range check in LSWX

2016-04-14 Thread Thomas Huth
er decreases it again by 4 while handling the program exception. So to get this right, we've got to undo the "- 4" from gen_lswx() here before calling helper_raise_exception_err(). Signed-off-by: Thomas Huth <th...@redhat.com> --- target-ppc/mem_helper.c | 5 +++-- 1 file changed, 3

[Qemu-devel] [PATCH 1/2] ppc: Fix the range check in the LSWI instruction

2016-04-14 Thread Thomas Huth
"||" instead of "&&". Since we can reuse this check later for the LSWX instruction, let's place the fixed code into a helper function, too. Signed-off-by: Thomas Huth <th...@redhat.com> --- target-ppc/cpu.h | 10 ++ target-ppc/translate.c | 6 +

[Qemu-devel] [PATCH 0/2] ppc: Fixes for LSWX and LSWI instructions

2016-04-14 Thread Thomas Huth
ee/powerpc/emulator.c#n95 For testing the lswi instruction, an additional kvm-unit-test can be used, see the patch that I've posted here: https://patchwork.ozlabs.org/patch/610483/ Thomas Huth (2): ppc: Fix the range check in the LSWI instruction ppc: Fix the bad exception NIP value and the r

[Qemu-devel] [PATCH] hw/ppc/spapr: Fix crash when specifying bad parameters to spapr-pci-host-bridge

2016-04-21 Thread Thomas Huth
in spapr_populate_pci_dt() does not check for this condition and then tries to dereference this NULL pointer. Apart from that, the return value of spapr_populate_pci_dt() also has to be checked for all PCI buses, not only for the last one, to make sure we catch all errors. Signed-off-by: Thomas Huth

Re: [Qemu-devel] [PATCH v2] test: port postcopy test to ppc64

2016-07-26 Thread Thomas Huth
On 26.07.2016 11:23, Laurent Vivier wrote: > > > On 23/07/2016 08:30, David Gibson wrote: >> On Fri, Jul 22, 2016 at 09:28:58AM +0200, Laurent Vivier wrote: >>> >>> >>> On 22/07/2016 08:43, David Gibson wrote: On Thu, Jul 21, 2016 at 06:47:56PM +0200, Laurent Vivier wrote: > As

Re: [Qemu-devel] [PATCH] ppc/mmu-hash64: Remove duplicated #include statement

2016-07-14 Thread Thomas Huth
On 14.07.2016 16:32, Eric Blake wrote: > On 07/14/2016 02:14 AM, Thomas Huth wrote: >> No need to include error-report.h twice here. >> >> Signed-off-by: Thomas Huth <th...@redhat.com> >> --- >> target-ppc/mmu-hash64.c | 1 - >> 1 file changed, 1

Re: [Qemu-devel] [PATCH] virtio: Tell the user what went wrong when event_notifier_init failed

2016-07-14 Thread Thomas Huth
On 28.06.2016 00:12, Thomas Huth wrote: > event_notifier_init() can fail in real life, for example when there > are not enough open file handles available (EMFILE) when using a lot > of devices. So instead of leaving the average user with a cryptic > error number only, print out a

Re: [Qemu-devel] [PATCH 1/7] tests/prom-env-test: increase the test timeout

2016-07-14 Thread Thomas Huth
On 14.07.2016 15:43, Marcel Apfelbaum wrote: > On a slower machine the test can take more than 30 seconds. > Increase the timeout to 100 seconds. > > Signed-off-by: Marcel Apfelbaum > --- > tests/prom-env-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [Qemu-devel] [PATCH] test: port postcopy test to ppc64

2016-07-21 Thread Thomas Huth
On 21.07.2016 15:46, Laurent Vivier wrote: > > > On 21/07/2016 15:16, Thomas Huth wrote: >> On 21.07.2016 12:12, Laurent Vivier wrote: >>> As userfaultfd syscall is available on powerpc, migration >>> postcopy can be used. >> >> Good idea to add thi

Re: [Qemu-devel] [PATCH v2] test: port postcopy test to ppc64

2016-07-21 Thread Thomas Huth
" -drive file=%s,if=pflash,format=raw", > + tmpfs, bootpath); > +cmd_dst = g_strdup_printf("-machine accel=kvm:tcg -m 256M" > + " -name pcdest,debug-threads=on" > + " -serial file:%s/dest_serial" > + " -incoming %s", > + tmpfs, uri); > +} else { > +g_assert_not_reached(); > +} > > -cmd = g_strdup_printf("-machine accel=kvm:tcg -m 150M" > - " -name pcdest,debug-threads=on" > - " -serial file:%s/dest_serial" > - " -drive file=%s,format=raw" > - " -incoming %s", > - tmpfs, bootpath, uri); > -to = qtest_init(cmd); > -g_free(cmd); > +from = qtest_start(cmd_src); > +g_free(cmd_src); > + > +to = qtest_init(cmd_dst); > +g_free(cmd_dst); > > global_qtest = from; > rsp = qmp("{ 'execute': 'migrate-set-capabilities'," > Looks fine to me now, thanks for the update! Reviewed-by: Thomas Huth <th...@redhat.com>

Re: [Qemu-devel] [PATCH v2] test: port postcopy test to ppc64

2016-07-26 Thread Thomas Huth
On 26.07.2016 11:53, Laurent Vivier wrote: > > > On 26/07/2016 11:39, Laurent Vivier wrote: >> >> >> On 26/07/2016 11:28, Thomas Huth wrote: >>> On 26.07.2016 11:23, Laurent Vivier wrote: >>>> >>>> >>>> On 23/07/2016 0

Re: [Qemu-devel] [Patch v1 15/29] s390x/sclp: indicate sclp features

2016-08-02 Thread Thomas Huth
On 02.08.2016 13:59, David Hildenbrand wrote: > We have three different blocks in the SCLP read-SCP information response > that indicate sclp features. Let's prepare propagation. > > Acked-by: Cornelia Huck > Signed-off-by: David Hildenbrand >

[Qemu-devel] [PATCH v2 2/5] ppc: Introduce a function to look up CPU alias strings

2016-08-09 Thread Thomas Huth
We will need this function to look up the aliases in the spapr-cpu-core code, too. Signed-off-by: Thomas Huth <th...@redhat.com> --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 13 + 2 files changed, 14 insertions(+) diff --git a/target-ppc/cpu.h b/targ

[Qemu-devel] [PATCH v2 5/5] ppc/kvm: Register also a generic spapr CPU core family type

2016-08-09 Thread Thomas Huth
erface. Let's fix it by supporting a CPU family type for the spapr-cpu-core on KVM, too. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1363812 Signed-off-by: Thomas Huth <th...@redhat.com> --- target-ppc/kvm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --g

[Qemu-devel] [PATCH v2 3/5] hw/ppc/spapr: Look up CPU alias names instead of hard-coding the aliases

2016-08-09 Thread Thomas Huth
, and if not by trying to look up the given model as an alias name instead). Signed-off-by: Thomas Huth <th...@redhat.com> --- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_cpu_core.c | 38 +- 2 files changed, 22 insertions(+), 18 deletions(-) diff --gi

Re: [Qemu-devel] [PATCH for-2.7 0/5] spapr: Fix regression in CPU alias handling

2016-08-09 Thread Thomas Huth
On 09.08.2016 17:39, Bharata B Rao wrote: > On Tue, Aug 09, 2016 at 11:17:04AM +0200, Thomas Huth wrote: >> There is a regression with the "-cpu" parameter which has been >> introduced by the spapr CPU hotplug code: We used to allow to specify >> a "CPU family&

[Qemu-devel] [PATCH v2 0/5] spapr: Fix regression in CPU alias handling

2016-08-09 Thread Thomas Huth
Remove the "Do not leak the memory of the type string" patch since it got obsoleted by Cédric's patch Cédric Le Goater (1): spapr: remove extra type variable Thomas Huth (4): ppc: Introduce a function to look up CPU alias strings hw/ppc/spapr: Look up CPU alias names instead of

[Qemu-devel] [PATCH v2 1/5] spapr: remove extra type variable

2016-08-09 Thread Thomas Huth
From: Cédric Le Goater <c...@kaod.org> The sPAPR CPU core typename is already available in the upper block. Let's use it and move the check upward also. Signed-off-by: Cédric Le Goater <c...@kaod.org> Reviewed-by: Thomas Huth <th...@redhat.com> --- hw/ppc/spapr.c | 15 +

Re: [Qemu-devel] [Bug 1613133] [NEW] SLIRP code regression fails to build on OpenBSD

2016-08-15 Thread Thomas Huth
On 15.08.2016 02:46, Brad Smith wrote: > Public bug reported: > > The SLIRP code has regressed between 2.6 and 2.7 and now fails to build > on OpenBSD. [...] > In file included from /usr/include/net/if.h:454:0, > from slirp/slirp.c:34: > /usr/include/net/if_arp.h:47:8: error:

[Qemu-devel] [PATCH for-2.7] slirp: Rename "struct arphdr" to "struct slirp_arphdr"

2016-08-15 Thread Thomas Huth
struct arphdr is already used by the system headers on OpenBSD and thus QEMU does not compile here anymore. Fix it by renaming our struct to slirp_arphdr instead. Reported-by: Brad Smith Buglink: https://bugs.launchpad.net/qemu/+bug/1613133 Signed-off-by: Thomas Huth <th...@redhat.com> ---

Re: [Qemu-devel] [Bug 1613133] [NEW] SLIRP code regression fails to build on OpenBSD

2016-08-15 Thread Thomas Huth
On 15.08.2016 09:15, Paolo Bonzini wrote: > > > On 15/08/2016 08:53, Thomas Huth wrote: >> On 15.08.2016 02:46, Brad Smith wrote: >>> Public bug reported: >>> >>> The SLIRP code has regressed between 2.6 and 2.7 and now fails to build >>>

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-12 Thread Thomas Huth
On 12.08.2016 10:41, Nikunj A Dadhania wrote: > Thomas Huth <th...@redhat.com> writes: >>>> You can not rely on /dev/random for this job, since it might block. So >>>> your guest would stop executing when there is not enough random data >>>> availabl

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-12 Thread Thomas Huth
On 12.08.2016 09:39, Nikunj A Dadhania wrote: > Thomas Huth <th...@redhat.com> writes: > >> On 12.08.2016 08:43, Nikunj A Dadhania wrote: >>> David Gibson <da...@gibson.dropbear.id.au> writes: >>> >>>> [ Unknown signature status ] >>&g

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-12 Thread Thomas Huth
On 12.08.2016 08:43, Nikunj A Dadhania wrote: > David Gibson writes: > >> [ Unknown signature status ] >> On Tue, Aug 09, 2016 at 02:47:46PM +0530, Nikunj A Dadhania wrote: >>> Nikunj A Dadhania writes: >>> David Gibson

[Qemu-devel] [PATCH] ui/console: Fix non-working backspace key in monitor of gtk UI

2016-08-11 Thread Thomas Huth
/1611979 Signed-off-by: Thomas Huth <th...@redhat.com> --- ui/console.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/console.c b/ui/console.c index c24bfe4..3940762 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1142,6 +1142,7 @@ static const int qcode_to_keysym[Q_KEY_COD

Re: [Qemu-devel] [PATCH 4/5] checkpatch: bump most warnings to errors

2016-08-10 Thread Thomas Huth
On 10.08.2016 12:44, Paolo Bonzini wrote: > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 714a000..ab08ca2 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -1289,11 +1289,11 @@ sub process { > # This is a

Re: [Qemu-devel] [PATCH 4/5] checkpatch: bump most warnings to errors

2016-08-10 Thread Thomas Huth
On 10.08.2016 12:25, Paolo Bonzini wrote: > >>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl >>> index 714a000..ab08ca2 100755 >>> --- a/scripts/checkpatch.pl >>> +++ b/scripts/checkpatch.pl >>> @@ -1289,11 +1289,11 @@ sub process { >>> # This is a signoff, if

Re: [Qemu-devel] [PATCH 3/5] CODING_STYLE, checkpatch: update line length rules

2016-08-10 Thread Thomas Huth
uot;line over 90 characters\n" . $herecurr); > + } else { > + WARN("line over 80 characters\n" . $herecurr); > + } > } > > # check for spaces before a quoted newline > Reviewed-by: Thomas Huth <th...@redhat.com>

Re: [Qemu-devel] [PATCH 4/5] checkpatch: bump most warnings to errors

2016-08-10 Thread Thomas Huth
On 10.08.2016 10:22, Paolo Bonzini wrote: > This only leaves a warning-level message for the extra-long lines > soft limit. Everything else is bumped up. > > In the future warnings can be added for checks that can have false > positives. > > Signed-off-by: Paolo Bonzini >

[Qemu-devel] [PATCH] ppc/mmu-hash64: Remove duplicated #include statement

2016-07-14 Thread Thomas Huth
No need to include error-report.h twice here. Signed-off-by: Thomas Huth <th...@redhat.com> --- target-ppc/mmu-hash64.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c index 82c2186..f6ffe35 100644 --- a/target-ppc/mmu-hash64.c +++ b/

[Qemu-devel] [PATCH 2/2] tests: Check serial output of firmware boot of some machines

2016-07-14 Thread Thomas Huth
s. Signed-off-by: Thomas Huth <th...@redhat.com> --- tests/Makefile.include | 8 tests/boot-serial-test.c | 110 +++ 2 files changed, 118 insertions(+) create mode 100644 tests/boot-serial-test.c diff --git a/tests/Makefile

[Qemu-devel] [PATCH 1/2] tests: Resort check-qtest entries in Makefile.include

2016-07-14 Thread Thomas Huth
mpty lines inbetween should help to ease this situation a little bit, so that it is hopefully now obvious that new tests should be added with "+=" instead of "=". Signed-off-by: Thomas Huth <th...@redhat.com> --- tests/Makefile.include | 32

[Qemu-devel] [PATCH 0/2] Sort tests by architecture and add a test for serial output

2016-07-14 Thread Thomas Huth
orrespond variable by accident). Thomas Huth (2): tests: Resort check-qtest entries in Makefile.include tests: Check serial output of firmware boot of some machines tests/Makefile.include | 40 +++-- tests/boot-serial-test.c | 110 +++

Re: [Qemu-devel] [PATCH] test: port postcopy test to ppc64

2016-07-21 Thread Thomas Huth
On 21.07.2016 12:12, Laurent Vivier wrote: > As userfaultfd syscall is available on powerpc, migration > postcopy can be used. Good idea to add this test for PPC, too! > This patch adds the support needed to test this on powerpc, > instead of using a bootsector to run code to modify memory, > we

[Qemu-devel] [PATCH] hw/ppc/spapr: Make sure to close the htab_fd when migration is canceled

2016-07-21 Thread Thomas Huth
=1354341 Signed-off-by: Thomas Huth <th...@redhat.com> --- hw/ppc/spapr.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 7f33a1b..9193ac2 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1512,7 +1512,6 @@ stat

[Qemu-devel] [PATCH] ppc: Huge page detection mechanism fixes - Episode III

2016-07-18 Thread Thomas Huth
-backend objects that have been specified additionally and return their minimum page size if that value is smaller than the page size of the main memory. Reported-by: Greg Kurz <gr...@kaod.org> Signed-off-by: Thomas Huth <th...@redhat.com> --- target-ppc/kvm.c | 27 ++-

[Qemu-devel] assert in memory.c line 1934 (was: Yet another fix for the huge page support detection mechanism)

2016-07-18 Thread Thomas Huth
On 18.07.2016 12:44, Greg Kurz wrote: > On Mon, 18 Jul 2016 11:33:16 +0200 > Thomas Huth <th...@redhat.com> wrote: > >> On 18.07.2016 11:26, Greg Kurz wrote: >>> On Mon, 18 Jul 2016 11:04:39 +0200 >>> Thomas Huth <th...@redhat.com> wrote: >

Re: [Qemu-devel] [PATCH] ppc: Huge page detection mechanism fixes - Episode III

2016-07-19 Thread Thomas Huth
On 18.07.2016 17:18, Greg Kurz wrote: > On Mon, 18 Jul 2016 15:19:04 +0200 > Thomas Huth <th...@redhat.com> wrote: > >> After already fixing two issues with the huge page detection mechanism >> (see commit 159d2e39a860 and 86b50f2e1bef), Greg Kurz noticed another &g

Re: [Qemu-devel] [PATCH] ppc: Yet another fix for the huge page support detection mechanism

2016-07-15 Thread Thomas Huth
On 15.07.2016 10:35, David Gibson wrote: > On Fri, Jul 15, 2016 at 10:10:25AM +0200, Thomas Huth wrote: >> Commit 86b50f2e1bef ("Disable huge page support if it is not available >> for main RAM") already made sure that huge page support is not announced >> to the

[Qemu-devel] [PATCH v2 1/2] tests: Resort check-qtest entries in Makefile.include

2016-07-15 Thread Thomas Huth
m48t59-test is disabled for sparc and sparc64, too. Signed-off-by: Thomas Huth <th...@redhat.com> --- tests/Makefile.include | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 20

[Qemu-devel] [PATCH v2 0/2] Add a test for serial output (and sort tests by architecture in the Makefile)

2016-07-15 Thread Thomas Huth
orrespond variable by accident). v2: - Some more clean-ups for the Makefile (i.e. some additional empty lines) - Check return value of read() to make sure that there is no error Thomas Huth (2): tests: Resort check-qtest entries in Makefile.include tests: Check serial output of firmware

[Qemu-devel] [PATCH v2 2/2] tests: Check serial output of firmware boot of some machines

2016-07-15 Thread Thomas Huth
s. Signed-off-by: Thomas Huth <th...@redhat.com> --- tests/Makefile.include | 8 tests/boot-serial-test.c | 111 +++ 2 files changed, 119 insertions(+) create mode 100644 tests/boot-serial-test.c diff --git a/tests/Makefile

Re: [Qemu-devel] [PATCH] ppc: Yet another fix for the huge page support detection mechanism

2016-07-15 Thread Thomas Huth
On 15.07.2016 17:18, Greg Kurz wrote: > On Fri, 15 Jul 2016 14:28:44 +0200 > Thomas Huth <th...@redhat.com> wrote: > >> On 15.07.2016 10:35, David Gibson wrote: >>> On Fri, Jul 15, 2016 at 10:10:25AM +0200, Thomas Huth wrote: >>>> Commi

Re: [Qemu-devel] [PATCH] ppc: abort if compat property contains an unknown value

2016-07-13 Thread Thomas Huth
On 13.07.2016 12:00, Greg Kurz wrote: > It is not possible to set the compat property to an unknown value with > powerpc_set_compat(). Something must have gone terribly wrong in QEMU, > if we detect an "Internal error" in powerpc_get_compat(). Let's abort then. > > This patch also drops the

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: Yet another fix for the huge page support detection mechanism

2016-07-18 Thread Thomas Huth
On 18.07.2016 10:59, Greg Kurz wrote: > On Mon, 18 Jul 2016 10:52:36 +1000 > David Gibson <da...@gibson.dropbear.id.au> wrote: > >> On Fri, Jul 15, 2016 at 10:10:25AM +0200, Thomas Huth wrote: >>> Commit 86b50f2e1bef ("Disable huge page support if it is not a

Re: [Qemu-devel] [PATCH] ppc: Yet another fix for the huge page support detection mechanism

2016-07-18 Thread Thomas Huth
On 15.07.2016 11:28, Greg Kurz wrote: > On Fri, 15 Jul 2016 10:10:25 +0200 > Thomas Huth <th...@redhat.com> wrote: > >> Commit 86b50f2e1bef ("Disable huge page support if it is not available >> for main RAM") already made sure that huge page support is not an

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: Yet another fix for the huge page support detection mechanism

2016-07-18 Thread Thomas Huth
On 18.07.2016 11:26, Greg Kurz wrote: > On Mon, 18 Jul 2016 11:04:39 +0200 > Thomas Huth <th...@redhat.com> wrote: > >> On 18.07.2016 10:59, Greg Kurz wrote: >>> On Mon, 18 Jul 2016 10:52:36 +1000 >>> David Gibson <da...@gibson.dropbear.id.au> wrote: &

Re: [Qemu-devel] [PATCH] MAINTAINERS: Update PPC maintainer to Richard

2016-07-15 Thread Thomas Huth
On 14.07.2016 23:52, Pranith Kumar wrote: > Richard agreed to look after PPC[1]. Make this change. > > [1] https://lists.gnu.org/archive/html/qemu-ppc/2016-03/msg00657.html > > CC: Richard Henderson > Signed-off-by: Pranith Kumar > --- > MAINTAINERS |

Re: [Qemu-devel] [PATCH 1/2] tests: Resort check-qtest entries in Makefile.include

2016-07-15 Thread Thomas Huth
On 15.07.2016 05:12, David Gibson wrote: > On Thu, Jul 14, 2016 at 11:57:45AM +0200, Thomas Huth wrote: >> The rather random list of check-qtest-xxx entries caused some >> confusion in the past, where to use "=" and where to use "+=" >&

Re: [Qemu-devel] [PATCH 2/2] tests: Check serial output of firmware boot of some machines

2016-07-15 Thread Thomas Huth
On 15.07.2016 05:21, David Gibson wrote: > On Thu, Jul 14, 2016 at 11:57:46AM +0200, Thomas Huth wrote: >> Some of the machines that we have got a firmware image for write >> some output to the serial console while booting up. We can use >> this output to make sure that the

<    4   5   6   7   8   9   10   11   12   13   >