Re: [Qemu-devel] [PATCH v5 7/7] pc: add PC_I440FX_COMPAT to disable aercap for vifo device

2015-03-13 Thread Alex Williamson
On Thu, 2015-03-12 at 18:23 +0800, Chen Fan wrote: > for piix4 chipset, we don't need to expose aer, so introduce > PC_I440FX_COMPAT for all piix4 machines to disable aercap, > and add HW_COMPAT_2_2 to disable aercap for all lower > than 2.3. 440FX is not PCIe, so it doesn't seem like we need to d

Re: [Qemu-devel] [PATCH v2] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-03-13 Thread Chen Gang
Firstly, thank you very much for your reviewing, and I shall send patch v3 within this week end (2015-03-15). On 3/14/15 02:20, Richard Henderson wrote: > On 03/12/2015 09:06 AM, Chen Gang wrote: >> +#define TILEGX_GEN_SAVE_PREP(rdst) \ >> +dc->tmp_regcur->idx = rdst; \ >> +dc->tmp_regcu

Re: [Qemu-devel] [PATCH] tcg/optimize: Handle or r, a, a with constant a

2015-03-13 Thread Bastian Koppelmann
On 03/13/2015 07:26 PM, Richard Henderson wrote: As seen with ubuntu-5.10-live-powerpc.iso. Reported-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- tcg/optimize.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 067917

Re: [Qemu-devel] Fedora Virt preview and qemu 2.2.1 update

2015-03-13 Thread Kashyap Chamarthy
On Fri, Mar 13, 2015 at 10:18:39PM +0100, Gerhard Wiesinger wrote: > Hello, > > Any updates for the > http://fedorapeople.org/groups/virt/virt-preview/fedora-virt-preview.repo > repo to qemu 2.2.1 planned? The above is maintained by Fedora Virtualization maintainers. I added Cole Robinson, who ma

Re: [Qemu-devel] [PATCH v2] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-03-13 Thread Richard Henderson
On 03/13/2015 04:07 PM, Chen Gang wrote: >> UNARY_RRR_0_OPCODE_X0. >> >>> +if ((get_UnaryOpcodeExtension_X0(bundle) == 0x03) && !rsrc && >>> !rdst) { >> >> FNOP_UNARY_OPCODE_X0. > > OK, thanks. > >> There are enough of these it's probably worth splitting >> out deco

Re: [Qemu-devel] [PATCH] vl: fix resource leak with monitor_fdset_add_fd

2015-03-13 Thread Shannon Zhao
On 2015/3/13 20:55, Paolo Bonzini wrote: > monitor_fdset_add_fd returns an AddfdInfo struct (used by the QMP > command add_fd). Free it. > > Signed-off-by: Paolo Bonzini > --- > v1->v2: line length [Fam], pass &error_abort [Shannon] > --- > vl.c | 7 +-- > 1 file changed, 5 insertions

Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-proxy: Fix possible overflow

2015-03-13 Thread Shannon Zhao
On 2015/3/13 20:50, Paolo Bonzini wrote: > > > On 13/03/2015 12:09, Shannon Zhao wrote: >> +g_assert(strlen(path) < sizeof(helper.sun_path)); > > Ok. > >> sockfd = socket(AF_UNIX, SOCK_STREAM, 0); >> if (sockfd < 0) { >> fprintf(stderr, "failed to create socket: %s\n", st

[Qemu-devel] [PATCH v2] fsdev/virtfs-proxy-helper: Fix possible overflow

2015-03-13 Thread Shannon Zhao
It's detected by coverity. As max of sockaddr_un.sun_path is sizeof(helper.sun_path), should check the length of source and use strncpy instead of strcpy. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- v1->v2: Still use strcpy [Paolo] --- fsdev/virtfs-proxy-helper.c | 1 + 1 fi

[Qemu-devel] [PATCH v2] hw/9pfs/virtio-9p-proxy: Fix possible overflow

2015-03-13 Thread Shannon Zhao
It's detected by coverity. As max of sockaddr_un.sun_path is sizeof(helper.sun_path), should check the length of source and use strncpy instead of strcpy. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- v1->v2: Still use strcpy [Paolo] --- hw/9pfs/virtio-9p-proxy.c | 1 + 1 file

Re: [Qemu-devel] [PATCH v2] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-03-13 Thread Chen Gang
On 3/14/15 08:22, Richard Henderson wrote: > On 03/13/2015 04:07 PM, Chen Gang wrote: >>> UNARY_RRR_0_OPCODE_X0. >>> +if ((get_UnaryOpcodeExtension_X0(bundle) == 0x03) && !rsrc && !rdst) { >>> >>> FNOP_UNARY_OPCODE_X0. >> >> OK, thanks. >> >>> There are enou

[Qemu-devel] [PATCH] qga/commands-posix: Fix resource leak

2015-03-13 Thread Shannon Zhao
It's detected by coverity. Close the dirfd. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- qga/commands-posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index d5bb5cb..cbf1c80 100644 --- a/qga/commands-posix.c +++ b/qga/comma

[Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-13 Thread Shannon Zhao
Free data in function sdp_attr_write after use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/bt/sdp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/bt/sdp.c b/hw/bt/sdp.c index 218e075..8e6d5e3 100644 --- a/hw/bt/sdp.c +++ b/hw/bt/sdp.c @@ -735,6 +735,7 @@ static void

[Qemu-devel] [PATCH v8 2/9] virtio-net: use qemu_mac_strdup_printf

2015-03-13 Thread sfeldma
From: Scott Feldman Signed-off-by: Scott Feldman Reviewed-by: Eric Blake --- hw/net/virtio-net.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 27adcc5..321bef4 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/vir

[Qemu-devel] [PATCH v8 0/9] rocker: add new rocker ethernet switch device

2015-03-13 Thread sfeldma
From: Scott Feldman v8: - From Stefan Hajnoczi's net-pull-request v3, merge in these changes: - Squash David Ahern's clang struct definition warnings fix - Squash in Jiri's fix for rocker format string specifiers [Peter] - Squash in Windows build fix [Peter] - In addition, fix

[Qemu-devel] [PATCH v8 7/9] rocker: add tests

2015-03-13 Thread sfeldma
From: Scott Feldman Add some basic test for rocker to test L2/L3/L4 functionality. Requires an external test environment, simp, located here: https://github.com/scottfeldman/simp To run tests, simp environment must be installed and a suitable VM image built and installed with a Linux 3.18 (or

[Qemu-devel] [PATCH v8 5/9] pci: add network device class 'other' for network switches

2015-03-13 Thread sfeldma
From: Scott Feldman Rocker is an ethernet switch device, so add 'other' network device class as defined by PCI to cover these types of devices. Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- include/hw/pci/pci_ids.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/hw

[Qemu-devel] [PATCH v8 3/9] rocker: add register programming guide

2015-03-13 Thread sfeldma
From: Scott Feldman This is the register programming guide for the Rocker device. It's intended for driver writers and device writers. It covers the device's PCI space, the register set, DMA interface, and interrupts. Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- docs/specs/roc

[Qemu-devel] [PATCH v8 1/9] net: add MAC address string printer

2015-03-13 Thread sfeldma
From: Scott Feldman We can use this in virtio-net code as well as new Rocker driver code, so up-level this. Signed-off-by: Scott Feldman Reviewed-by: Eric Blake --- include/net/net.h |1 + net/net.c |7 +++ 2 files changed, 8 insertions(+) diff --git a/include/net/net.h b

[Qemu-devel] [PATCH v8 4/9] pci: add rocker device ID

2015-03-13 Thread sfeldma
From: Scott Feldman Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- docs/specs/pci-ids.txt |1 + include/hw/pci/pci.h |1 + 2 files changed, 2 insertions(+) diff --git a/docs/specs/pci-ids.txt b/docs/specs/pci-ids.txt index c6732fe..e4a4490 100644 --- a/docs/specs/pci-ids

[Qemu-devel] [PATCH v8 9/9] rocker: timestamp on the debug logs helps correlate with events in the VM

2015-03-13 Thread sfeldma
From: David Ahern Signed-off-by: David Ahern Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- hw/net/rocker/rocker.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/net/rocker/rocker.h b/hw/net/rocker/rocker.h index 6ae74ff..b3310b6 100644 --- a/

[Qemu-devel] [PATCH v8 8/9] MAINTAINERS: add rocker

2015-03-13 Thread sfeldma
From: Scott Feldman Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- MAINTAINERS |6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d7e9ba2..8cbf013 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -754,6 +754,12 @@ S: Maintained F: hw/net/vmxn

Re: [Qemu-devel] [PULL v4 00/11] Net patches

2015-03-13 Thread Scott Feldman
On Thu, Mar 12, 2015 at 12:58 PM, Stefan Hajnoczi wrote: > On Thu, Mar 12, 2015 at 03:03:45PM +, Peter Maydell wrote: >> On 12 March 2015 at 14:43, Peter Maydell wrote: >> > On 12 March 2015 at 14:33, Stefan Hajnoczi wrote: >> >> v4: >> >> * Drop clang 3.5.0 fixes since they break with olde

[Qemu-devel] [Bug 1432103] [NEW] error in x86 executable segment permission check

2015-03-13 Thread aegiryy
Public bug reported: When the code segment register (%cs) selects an executable segment with no read permission, mov instructions that read from the segment via %cs prefix can still succeed without causing a general protection error. ** Affects: qemu Importance: Undecided Status: Ne

[Qemu-devel] [PATCH] hw/usb: Include USB files only if necessary

2015-03-13 Thread Thomas Huth
Boards that do not include an USB controller should not provide USB devices. However, when running "qemu-system-s390x -device help" for example, there's still a usb-hub, usb-kbd, usb-mouse and usb-tablet in the list of "supported" devices. Let's fix that by compiling and linking the USB files only

Re: [Qemu-devel] [PATCH] hw/usb: Include USB files only if necessary

2015-03-13 Thread Thomas Huth
On Sat, 14 Mar 2015 06:33:35 +0100 Thomas Huth wrote: > Boards that do not include an USB controller should not provide > USB devices. However, when running "qemu-system-s390x -device help" By the way, in case somebody wants to test the above example, and wonders why there are also U/O/E/XHCI co

[Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-13 Thread Chen Gang
QEMU TILE-Gx can decode bundle, disassemble code, and generate tcg code for 1st TB block (__start). Then directly jump to __libc_start_main (2nd TB block). In __libc_start_main, it can continue executing to the first function call _dl_aux_init(). Signed-off-by: Chen Gang --- target-tilegx/cpu-q

[Qemu-devel] [PATCH v2 4/7] monitor: Remove unused functions

2015-03-13 Thread Thomas Huth
The functions ringbuf_read_completion() and monitor_get_rs() are not used anywhere anymore, so let's remove them. Signed-off-by: Thomas Huth Cc: Luiz Capitulino --- hmp.h |1 - include/monitor/monitor.h |1 - monitor.c | 13 - 3 files ch

[Qemu-devel] [PATCH v2 2/7] vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags()

2015-03-13 Thread Thomas Huth
The function is not used anymore and thus can be deleted. Signed-off-by: Thomas Huth Cc: Dmitry Fleytman --- hw/net/vmxnet_rx_pkt.c |7 --- hw/net/vmxnet_rx_pkt.h |9 - 2 files changed, 0 insertions(+), 16 deletions(-) diff --git a/hw/net/vmxnet_rx_pkt.c b/hw/net/vmxnet_rx_

[Qemu-devel] [PATCH v2 6/7] util: Remove unused functions

2015-03-13 Thread Thomas Huth
Delete the unused functions qemu_signalfd_available(), qemu_send_full() and qemu_recv_full(). Signed-off-by: Thomas Huth --- include/qemu-common.h |4 --- include/qemu/compatfd.h |1 - util/compatfd.c | 19 - util/osdep.c| 66

[Qemu-devel] [PATCH v2 1/7] migration: Remove unused functions

2015-03-13 Thread Thomas Huth
migrate_rdma_pin_all(), qsb_clone() and qsb_set_length() are completely unused and thus can be deleted. Signed-off-by: Thomas Huth Cc: Juan Quintela Cc: Amit Shah --- include/migration/migration.h |1 - include/migration/qemu-file.h |2 - migration/migration.c |9 --- m

[Qemu-devel] [PATCH v2 0/7] Remove more unused functions

2015-03-13 Thread Thomas Huth
Here are some more patches to remove completely unused functions from QEMU. Please review carefully, some of the functions might still get usefull in the future again, so if you discover one, please let me know, then I'll remove it from the patch series again. v2: Changed series according to revie

[Qemu-devel] [PATCH v2 3/7] pci: Remove unused function ich9_d2pbr_init()

2015-03-13 Thread Thomas Huth
The function ich9_d2pbr_init() is completely unused and thus can be deleted. Signed-off-by: Thomas Huth Cc: Michael S. Tsirkin --- hw/pci-bridge/i82801b11.c | 21 - include/hw/i386/ich9.h|1 - 2 files changed, 0 insertions(+), 22 deletions(-) diff --git a/hw/pci-b

[Qemu-devel] [PATCH v2 7/7] Remove various unused functions

2015-03-13 Thread Thomas Huth
The functions tpm_backend_thread_tpm_reset(), serial_set_frequency() and iothread_find() are completely unused, let's remove them. Signed-off-by: Thomas Huth --- backends/tpm.c | 11 --- hw/char/serial.c |7 --- include/hw/char/serial.h

[Qemu-devel] [PATCH v2 5/7] usb: Remove unused functions

2015-03-13 Thread Thomas Huth
Delete set_usb_string(), usb_ep_get_ifnum(), usb_ep_get_max_packet_size() usb_ep_get_max_streams() and usb_ep_set_pipeline() since they are not used anymore. Signed-off-by: Thomas Huth Reviewed-by: Gerd Hoffmann --- hw/usb/core.c| 41 - include/hw/u

Re: [Qemu-devel] [PATCH] qga/commands-posix: Fix resource leak

2015-03-13 Thread Stefan Weil
Am 14.03.2015 um 04:30 schrieb Shannon Zhao: It's detected by coverity. Close the dirfd. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- qga/commands-posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index d5bb5cb..cbf1c80

Re: [Qemu-devel] [PATCH] hw/bt/sdp: Fix resource leak detect by coverity

2015-03-13 Thread Stefan Weil
Am 14.03.2015 um 04:42 schrieb Shannon Zhao: Free data in function sdp_attr_write after use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/bt/sdp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/bt/sdp.c b/hw/bt/sdp.c index 218e075..8e6d5e3 100644 --- a/hw/bt/sdp.c

<    1   2   3