- 13 Jun, 2017 1 commit
-
-
Juan Quintela authored
They are indpendent, and nowadays almost every device register things with qdev->vmsd. Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Peter Xu <peterx@redhat.com>
-
- 05 Jun, 2017 1 commit
-
-
Laurent Vivier authored
We can replace the four remaining calls of register_savevm() by calls to register_savevm_live(). So we can remove the function and as we don't allocate anymore the ops pointer with g_new0() we don't have to free it then. Signed-off-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- 02 Jun, 2017 2 commits
-
-
Marc-André Lureau authored
Move all the frontend struct and methods to a seperate unit. This avoids accidentally mixing backend and frontend calls, and helps with readabilty. Make qemu_chr_replay() a macro shared by both char and char-fe. Export qemu_chr_write(), and use a macro for qemu_chr_write_all() (nb: yes, CharBackend is for char frontend :) Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Marc-André Lureau authored
So they are all in one place. The following patch will move serial & parallel declarations to the respective headers. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
- 27 May, 2017 3 commits
-
-
Sjors Gielen authored
When forwarding TCP packets, the internal tcpiphdr struct length was wrongly used inside the IP header. This commit changes the behaviour to what is used by tcp_output.c, using the correct full IP header + payload length. Signed-off-by:
Sjors Gielen <sjors@sjorsgielen.nl> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Spotted by ASAN: /x86_64/hmp/pc-0.12: ================================================================= ==22538==ERROR: LeakSanitizer: detected memory leaks Direct leak of 224 byte(s) in 1 object(s) allocated from: #0 0x7f0f63cdee60 in malloc (/lib64/libasan.so.3+0xc6e60) #1 0x556f11ff32d7 in tcp_newtcpcb /home/elmarco/src/qemu/slirp/tcp_subr.c:250 #2 0x556f11fdb1d1 in tcp_listen /home/elmarco/src/qemu/slirp/socket.c:688 #3 0x556f11fca9d5 in slirp_add_hostfwd /home/elmarco/src/qemu/slirp/slirp.c:1052 #4 0x556f11f8db41 in slirp_hostfwd /home/elmarco/src/qemu/net/slirp.c:506 #5 0x556f11f8dd83 in hmp_hostfwd_add /home/elmarco/src/qemu/net/slirp.c:535 There might be a better way to fix this, but calling slirp tcp_close() doesn't work. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Tao Wu authored
This bug was introduced by https://github.com/qemu/qemu/commit/98c6305Signed-off-by:
Tao Wu <lepton@google.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-bu: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- 29 Apr, 2017 7 commits
-
-
Dr. David Alan Gilbert authored
This converts the remaining components, except for the top level loop, to VMState. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Dr. David Alan Gilbert authored
Working up the stack, this replaces the slirp_socket_load/save with VMState definitions. A place holder for IPv6 support is added as a comment; it needs testing once the rest of the IPv6 code is there. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Dr. David Alan Gilbert authored
The socket structure has a pair of unions for lhost and fhost addresses; the unions are identical so split them out into a separate union declaration. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Dr. David Alan Gilbert authored
Convert the sbuf structure to a VMStateDescription. Note this uses the VMSTATE_WITH_TMP mechanism to calculate and reload the offsets based on the pointers. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Dr. David Alan Gilbert authored
Convert the migration of the struct tcpcb to use a VMStateDescription, the rest of it will come later. Mostly mechanical, except for conversion of some 'char' to uint8_t to ensure portability. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Samuel Thibault authored
so that people do not think it is not working at least basically. Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
ASAN detects an "unknown-crash" when running pxe-test: /ppc64/pxe/spapr-vlan: ================================================================= ==7143==ERROR: AddressSanitizer: unknown-crash on address 0x7f6dcd298d30 at pc 0x55e22218830d bp 0x7f6dcd2989e0 sp 0x7f6dcd2989d0 READ of size 128 at 0x7f6dcd298d30 thread T2 #0 0x55e22218830c in tftp_session_allocate /home/elmarco/src/qq/slirp/tftp.c:73 #1 0x55e22218a1f8 in tftp_handle_rrq /home/elmarco/src/qq/slirp/tftp.c:289 #2 0x55e22218b54c in tftp_input /home/elmarco/src/qq/slirp/tftp.c:446 #3 0x55e2221833fe in udp6_input /home/elmarco/src/qq/slirp/udp6.c:82 #4 0x55e222137b17 in ip6_input /home/elmarco/src/qq/slirp/ip6_input.c:67 Address 0x7f6dcd298d30 is located in stack of thread T2 at offset 96 in frame #0 0x55e222182420 in udp6_input /home/elmarco/src/qq/slirp/udp6.c:13 This frame has 3 object(s): [32, 48) '<unknown>' [96, 124) 'lhost' <== Memory access at offset 96 partially overflows this variable [160, 200) 'save_ip' <== Memory access at offset 96 partially underflows this variable The sockaddr_storage pointer is the sockaddr_in6 lhost on the stack. Copy only the source addr size. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- 25 Apr, 2017 1 commit
-
-
Cédric Le Goater authored
NC-SI (Network Controller Sideband Interface) enables a BMC to manage a set of NICs on a system. This model takes the simplest approach and reverses the NC-SI packets to pretend a NIC is present and exercise the Linux driver. The NCSI header file <ncsi-pkt.h> comes from mainline Linux and was untabified. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- 28 Mar, 2017 3 commits
-
-
Samuel Thibault authored
Previously we would always send an RDNSS option in the RA, making the guest try to resolve DNS through IPv6, even if the host does not actually have and IPv6 DNS server available. This makes the RDNSS option enabled only when an IPv6 DNS server is available. Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Samuel Thibault authored
Do not hardcode the RA size at all, use a pl_size variable which accounts the accumulated size, and fill rip->ip_pl at the end. This will allow to make some blocks optional. Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Laurent Vivier authored
slirp/slirp.c: In function 'get_dns_addr_resolv_conf': slirp/slirp.c:202:29: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] char *res = inet_ntop(af, tmp_addr, s, sizeof(s)); ^~~~~~~~~ slirp/slirp.c:204:25: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] res = "(string conversion error)"; Signed-off-by:
Laurent Vivier <laurent@vivier.eu> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- 26 Feb, 2017 3 commits
-
-
Peter Maydell authored
Coverity points out (CID 1005725) that an error-exit path in tcp_listen() will try to close(s) even if the reason it got there was that the qemu_socket() failed and s was never opened. Not only that, this isn't even the right function to use, because we need closesocket() to do the right thing on Windows. Change to using the right function and only calling it if needed. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Peter Maydell authored
The mbuf code currently doesn't check the result of doing a malloc() or realloc() of its data (spotted by Coverity, CID 1238946). Since the m_inc() API assumes that extending an mbuf must succeed, just convert to g_malloc() and g_free(). Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Peter Maydell authored
Check the return value from qemu_socket() rather than trying to pass it to bind() as an fd argument even if it's negative. This wouldn't have caused any negative consequences, because it won't be a valid fd number and the bind call will fail; but Coverity complains (CID 1005723). Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- 20 Dec, 2016 2 commits
-
-
Hervé Poussineau authored
The blocksize option is defined in RFC 1783 and RFC 2348. We now support block sizes between 1 and 1428 bytes, instead of 512 only. Signed-off-by:
Hervé Poussineau <hpoussin@reactos.org> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Yuval Shaia authored
Signed-off-by:
Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- 14 Nov, 2016 1 commit
-
-
Samuel Thibault authored
if_start() goes through the slirp->if_fastq and slirp->if_batchq list of pending messages, and accesses ifm->ifq_so->so_nqueued of its elements if ifm->ifq_so != NULL. When freeing a socket, we thus need to make sure that any pending message for this socket does not refer to the socket any more. Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Tested-by:
Brian Candler <b.candler@pobox.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- 13 Sep, 2016 1 commit
-
-
Daniel P. Berrange authored
The qemu_chr_fe_write method will return -1 on EAGAIN if the chardev backend write would block. Almost no callers of the qemu_chr_fe_write() method check the return value, instead blindly assuming data was successfully sent. In most cases this will lead to silent data loss on interactive consoles, but in some cases (eg RNG EGD) it'll just cause corruption of the protocol being spoken. We unfortunately can't fix the virtio-console code, due to a bug in the Linux guest drivers, which would cause the entire Linux kernel to hang if we delay processing of the incoming data in any way. Fixing this requires first fixing the guest driver to not hold spinlocks while writing to the hvc device backend. Fixes bug: https://bugs.launchpad.net/qemu/+bug/1586756Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Message-Id: <1473170165-540-4-git-send-email-berrange@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 16 Aug, 2016 1 commit
-
-
Thomas Huth authored
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 Reviewed-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-id: 1471249494-17392-1-git-send-email-thuth@redhat.com Buglink: https://bugs.launchpad.net/qemu/+bug/1613133Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- 08 Aug, 2016 1 commit
-
-
Markus Armbruster authored
Commit 9af9e0fe, 6daf194d, be62a2eb and 312fd5f2 got rid of a bunch, but they keep coming back. checkpatch.pl tries to flag them since commit 5d596c24, but it's not very good at it. Offenders tracked down with Coccinelle script scripts/coccinelle/err-bad-newline.cocci, an updated version of the script from commit 312fd5f2. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <1470224274-31522-2-git-send-email-armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- 12 Jul, 2016 4 commits
-
-
Markus Armbruster authored
Cleaned up with scripts/clean-header-guards.pl. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Richard Henderson <rth@twiddle.net>
-
Markus Armbruster authored
Cleaned up with scripts/clean-header-guards.pl. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Richard Henderson <rth@twiddle.net>
-
Markus Armbruster authored
Header guard symbols should match their file name to make guard collisions less likely. Offenders found with scripts/clean-header-guards.pl -vn. Cleaned up with scripts/clean-header-guards.pl, followed by some renaming of new guard symbols picked by the script to better ones. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Richard Henderson <rth@twiddle.net>
-
Markus Armbruster authored
Tracked down with an ugly, brittle and probably buggy Perl script. Also move includes converted to <...> up so they get included before ours where that's obviously okay. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Tested-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Richard Henderson <rth@twiddle.net>
-
- 03 Jul, 2016 6 commits
-
-
Thomas Huth authored
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 \ -net user,ipv6=yes,ipv4=no,tftp=/path/to/tftp,bootfile=ppc64.img Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Thomas Huth authored
Commit fad7fb9c ("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 buffer first. However, at two spots, the memset() was not removed from the calling function, so it currently done twice in these code paths. Thus let's delete these superfluous memsets in the calling functions now. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Samuel Thibault authored
This adds the RDNSS option to IPv6 router advertisements, so that the guest can autoconfigure the DNS server address. Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> --- Changes since last submission: - Disable on windows, until we have support for it
-
Samuel Thibault authored
They look like fe80::%eth0 Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> --- Changes since last submission: - fix windows build
-
Samuel Thibault authored
This makes get_dns_addr address family-agnostic, thus allowing to add the IPv6 case. Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by:
Thomas Huth <thuth@redhat.com>
-
Samuel Thibault authored
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 <samuel.thibault@ens-lyon.org> Reviewed-by:
Thomas Huth <thuth@redhat.com>
-
- 07 Jun, 2016 2 commits
-
-
Laurent Vivier authored
Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by:
Laurent Vivier <lvivier@redhat.com> Acked-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Peter Maydell authored
Remove glib.h includes, as it is provided by osdep.h. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com> Tested-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- 19 May, 2016 1 commit
-
-
Paolo Bonzini authored
Move it to the actual users. There are some inclusions of qemu/host-utils.h in headers, but they are all necessary. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-