[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

[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

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

2015-03-13 Thread Thomas Huth
ng to review comment from v1: - Dropped the patch to remove portio_list_destroy() and portio_list_del() - Keep the ARI functions in the pci patch since they might get useful again Thomas Huth (7): migration: Remove unused functions vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags()

[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

[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/ser

[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

Re: [Qemu-devel] [PATCH] elf-loader: Add missing error handling for call of lseek

2015-03-16 Thread Thomas Huth
* sizeof(phdr[0]); > -lseek(fd, ehdr.e_phoff, SEEK_SET); > +if (lseek(fd, ehdr.e_phoff, SEEK_SET) != ehdr.e_phoff) { > +goto fail; > +} > phdr = g_malloc0(size); > if (!phdr) > goto fail; Looks good. Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH] elf-loader: Fix truncation warning from coverity

2015-03-16 Thread Thomas Huth
d, off_t offset, size_t size) > { > void *ptr; > if (lseek(fd, offset, SEEK_SET) < 0) Sounds reasonable. Reviewed-by: Thomas Huth

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

2015-03-17 Thread Thomas Huth
On Tue, 17 Mar 2015 13:19:57 +0100 Gerd Hoffmann wrote: > On Di, 2015-03-17 at 13:05 +0100, Gerd Hoffmann wrote: > > On Sa, 2015-03-14 at 06:33 +0100, Thomas Huth wrote: > > > Boards that do not include an USB controller should not provide > > > USB devices. However

Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices

2015-09-25 Thread Thomas Huth
On 25/09/15 16:17, Markus Armbruster wrote: > Thomas Huth writes: > >> On 24/09/15 20:57, Markus Armbruster wrote: >>> Several devices don't survive object_unref(object_new(T)): they crash >>> or hang during cleanup, or they leave dangling pointers behind.

Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices

2015-09-28 Thread Thomas Huth
On 28/09/15 10:11, Markus Armbruster wrote: > Thomas Huth writes: > >> On 25/09/15 16:17, Markus Armbruster wrote: >>> Thomas Huth writes: >>> >>>> On 24/09/15 20:57, Markus Armbruster wrote: >>>>> Several devices don't surviv

Re: [Qemu-devel] [PATCH 01/10][TRIVIAL] adb: add to input category

2015-09-28 Thread Thomas Huth
dc->realize; > dc->realize = adb_mouse_realizefn; > +set_bit(DEVICE_CATEGORY_INPUT, dc->categories); > > adc->devreq = adb_mouse_request; > dc->reset = adb_mouse_reset; Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 02/10][TRIVIAL] cmd646: add to storage category

2015-09-28 Thread Thomas Huth
t; dc->props = cmd646_ide_properties; > +set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); > } Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 03/10][TRIVIAL] escc: add to input category

2015-09-28 Thread Thomas Huth
+set_bit(DEVICE_CATEGORY_INPUT, dc->categories); > } Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 06/10][TRIVIAL] macio-ide: add to storage category

2015-09-28 Thread Thomas Huth
ate_pmac; > +set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); > } Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 04/10][TRIVIAL] grackle: add to bridge category

2015-09-28 Thread Thomas Huth
ysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); > +DeviceClass *dc = DEVICE_CLASS(klass); > > k->init = pci_grackle_init_device; > +set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); > } Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 07/10][TRIVIAL] uninorth: add to bridge category

2015-09-28 Thread Thomas Huth
gp_info = { > @@ -488,8 +494,10 @@ static const TypeInfo pci_unin_agp_info = { > static void pci_unin_internal_class_init(ObjectClass *klass, void *data) > { > SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass); > +DeviceClass *dc = DEVICE_CLASS(klass); > > sbc->init = pci_unin_internal_init_device; > +set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); > } Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 08/10][TRIVIAL] macio: add to bridge category

2015-09-28 Thread Thomas Huth
PPLE; > k->class_id = PCI_CLASS_OTHERS << 8; > dc->props = macio_properties; > + set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); > } Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 09/10][TRIVIAL] macio-nvram: add to misc category

2015-09-28 Thread Thomas Huth
> dc->props = macio_nvram_properties; > + set_bit(DEVICE_CATEGORY_MISC, dc->categories); > } Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 10/10][TRIVIAL] openpic: add to misc category

2015-09-28 Thread Thomas Huth
--- a/hw/intc/openpic_kvm.c > +++ b/hw/intc/openpic_kvm.c > @@ -275,6 +275,7 @@ static void kvm_openpic_class_init(ObjectClass *oc, void > *data) > dc->realize = kvm_openpic_realize; > dc->props = kvm_openpic_properties; > dc->reset = kvm_openpic_reset; > +set_bit(DEVICE_CATEGORY_MISC, dc->categories); > } Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH v4 3/7] libqtest: New hmp() & friends

2015-09-29 Thread Thomas Huth
> + * @s: #QTestState instance to operate on. > + * @fmt...: HMP command to send to QEMU > + * > + * Send HMP command to QEMU via QMP's human-monitor-command. > + * > + * Returns: the command's output. > + */ > +char *qtest_hmp(QTestState *s, const char *fmt, ...); > + > +/** > + * qtest_hmpv: > + * @s: #QTestState instance to operate on. > + * @fmt: HMP command to send to QEMU > + * @ap: HMP command arguments > + * > + * Send HMP command to QEMU via QMP's human-monitor-command. > + * > + * Returns: the command's output. Maybe mention that the output string should be free'd with g_free() ? > + */ > +char *qtest_hmpv(QTestState *s, const char *fmt, va_list ap); > + > +/** > * qtest_get_irq: > * @s: #QTestState instance to operate on. > * @num: Interrupt to observe. > @@ -499,6 +522,16 @@ static inline void qmp_eventwait(const char *event) > } > > /** > + * hmp: > + * @fmt...: HMP command to send to QEMU > + * > + * Send HMP command to QEMU via QMP's human-monitor-command. > + * > + * Returns: the command's output. dito Anyway, patch looks fine to me, so: Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH v4 5/7] qmp: Fix device-list-properties not to crash for abstract device

2015-09-29 Thread Thomas Huth
On 28/09/15 22:08, Markus Armbruster wrote: > Broken in commit f4eb32b "qmp: show QOM properties in > device-list-properties", v2.1. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Markus Armbruster > Reviewed-by: Eric Blake > --- > qmp.c | 6 ++ > tests/device-int

Re: [Qemu-devel] [PATCH v4 6/7] qdev: Protect device-list-properties against broken devices

2015-09-29 Thread Thomas Huth
On 28/09/15 22:08, Markus Armbruster wrote: > Several devices don't survive object_unref(object_new(T)): they crash > or hang during cleanup, or they leave dangling pointers behind. > > This breaks at least device-list-properties, because > qmp_device_list_properties() needs to create a device to

Re: [Qemu-devel] [PATCH v4 2/2] spapr: generate DT node names

2015-09-29 Thread Thomas Huth
On 29/09/15 10:37, Laurent Vivier wrote: > > > On 29/09/2015 07:18, David Gibson wrote: >> On Thu, Sep 24, 2015 at 12:27:39PM +0200, Laurent Vivier wrote: ... >>> -/* NOTE: this is normally generated by firmware via >>> path/unit name, - * but in our case we must set it manually >>> since

Re: [Qemu-devel] [PATCH 2/3] hw: do not pass NULL to memory_region_init from instance_init

2015-09-30 Thread Thomas Huth
On 29/09/15 14:37, Paolo Bonzini wrote: > This causes the region to outlive the object, because it attaches the > region to /machine. This is not nice for the "realize" method, but > much worse for "instance_init" because it can cause dangling pointers > after a simple object_new/object_unref pair

Re: [Qemu-devel] [PATCH 3/3] macio: move DBDMA_init from instance_init to realize

2015-09-30 Thread Thomas Huth
set_parent_bus(DEVICE(&s->cuda), sysbus_get_default()); > object_property_add_child(obj, "cuda", OBJECT(&s->cuda), NULL); > - > -s->dbdma = DBDMA_init(&dbdma_mem); > -memory_region_add_subregion(&s->bar, 0x08000, dbdma_mem); > } > > static const VMStateDescription vmstate_macio_oldworld = { Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH] spapr: add a default rng device

2015-09-30 Thread Thomas Huth
On 30/09/15 10:33, Greg Kurz wrote: > On Tue, 29 Sep 2015 15:01:09 +1000 > David Gibson wrote: > >> On Mon, Sep 28, 2015 at 12:13:47PM +0200, Greg Kurz wrote: >>> A recent patch by Thomas Huth brought a new spapr-rng pseudo-device to >>> provide high-quality ran

Re: [Qemu-devel] [PATCH 3/4] spapr_iommu: Provide a function to switch a TCE table to allowing VFIO

2015-09-30 Thread Thomas Huth
On 30/09/15 05:48, David Gibson wrote: > Because of the way non-VFIO guest IOMMU operations are KVM accelerated, not > all TCE tables (guest IOMMU contexts) can support VFIO devices. Currently, > this is decided at creation time. > > To support hotplug of VFIO devices, we need to allow a TCE tabl

Re: [Qemu-devel] [PATCH 4/4] spapr_pci: Allow VFIO devices to work on the normal PCI host bridge

2015-09-30 Thread Thomas Huth
st(OBJECT(pdev), "vfio-pci")) { > +sPAPRTCETable *tcet = spapr_tce_find_by_liobn(phb->dma_liobn); > + > +spapr_tce_set_need_vfio(tcet, true); > +} > + > if (dev->hotplugged) { > fdt = create_device_tree(&fdt_size); > fdt_start_offset = spapr_create_pci_child_dt(phb, pdev, fdt, 0); Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH v5 02/10] hw: do not pass NULL to memory_region_init from instance_init

2015-10-01 Thread Thomas Huth
;, FCODE_MAX_ROM_SIZE, > +memory_region_init_ram(&s->rom, OBJECT(s), "tcx.prom", > FCODE_MAX_ROM_SIZE, > &error_fatal); > memory_region_set_readonly(&s->rom, true); > sysbus_init_mmio(sbd, &s->rom); I'd still use "obj" instead of "OBJECT(s)", even if the rest of the function is doing it differently ... but I guess we can also clean that up later ... So anyway, patch looks fine to me: Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH v5 05/10] libqtest: Clean up unused QTestState member sigact_old

2015-10-01 Thread Thomas Huth
exit */ > }; > > static GList *qtest_instances; > Reviewed-by: Thomas Huth

[Qemu-devel] [PATCH] spapr: Add "slb-size" property to CPU device tree nodes

2015-10-01 Thread Thomas Huth
ot;ibm,slb-size". The Linux kernel can deal with both names, but to be on the safe side we should support the official name, too. Signed-off-by: Thomas Huth --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index a9b5f2a..ba6b273 100644

Re: [Qemu-devel] [PATCH] ppc: drop useless register sync

2015-10-02 Thread Thomas Huth
On 01/10/15 18:56, Greg Kurz wrote: > Since msr is always synced, no need to read it from KVM. Out of curiosity: Where does that happen? Thanks, Thomas > Signed-off-by: Greg Kurz > --- > target-ppc/translate_init.c |2 -- > 1 file changed, 2 deletions(-) > > diff --git a/target-ppc/tran

Re: [Qemu-devel] [RFC v0 1/2] spapr: Accommadate alignment gaps in hotplug memory region

2015-10-05 Thread Thomas Huth
On 05/10/15 10:35, Bharata B Rao wrote: > Size hotplug memory region assuming a 256MB max alignment every slot. > > Signed-off-by: Bharata B Rao > --- > hw/ppc/spapr.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index fc5e7d6..2ec509b 100644 > -

Re: [Qemu-devel] How to get started with the source code of Qemu?

2015-10-07 Thread Thomas Huth
On 06/10/15 16:17, Aaron Elkins wrote: > Hi all, > > I am new to Qemu, and I’m extremely interested in understanding how the > source code of Qemu work. But after > I downloaded the whole project, I just lost in it, the project is too large > for me to get started. A very rough survey: - The m

Re: [Qemu-devel] Debugging u-boot after relocation on arm machie

2015-10-08 Thread Thomas Huth
On 07/10/15 20:32, mar.krzeminski wrote: > Hello, > > I am working on u-boot under qemu. Debugging before u-boots relocate > itself works just fine. > After relocation and reloading elf in gdb, qemu does no stop on breakpoint. Are you using software breakpoints or hardware breakpoints? In case yo

[Qemu-devel] [PATCH 0/5] Small optimizations for code using g_malloc0 + memset/memcpy

2015-10-08 Thread Thomas Huth
memset(..., 0, ...), then the memset does not make much sense, of course, since the buffer has already been zeroed by the g_malloc0. Thomas Huth (5): hw/dma/pxa2xx: Remove superfluous memset hw/scsi/spapr_vscsi: Remove superfluous memset hw/input/tsc210x: Remove superfluous memset tests/i44fx

[Qemu-devel] [PATCH 2/5] hw/scsi/spapr_vscsi: Remove superfluous memset

2015-10-08 Thread Thomas Huth
g_malloc0 already clears the memory, so no need for the additional memset here. Cc: Paolo Bonzini Cc: David Gibson Cc: Alexander Graf Signed-off-by: Thomas Huth --- hw/scsi/spapr_vscsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index

[Qemu-devel] [PATCH 4/5] tests/i44fx-test: No need for zeroing memory before memset

2015-10-08 Thread Thomas Huth
Change a g_malloc0 into g_malloc since the following memset fills the whole buffer anyway. Cc: Laszlo Ersek Signed-off-by: Thomas Huth --- tests/i440fx-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c index d0bc8de..7fa1709

[Qemu-devel] [PATCH 1/5] hw/dma/pxa2xx: Remove superfluous memset

2015-10-08 Thread Thomas Huth
g_malloc0 already clears the memory, so no need for the additional memset here. Signed-off-by: Thomas Huth --- hw/dma/pxa2xx_dma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c index d4501fb..3f0a720 100644 --- a/hw/dma/pxa2xx_dma.c +++ b/hw/dma

[Qemu-devel] [PATCH 3/5] hw/input/tsc210x: Remove superfluous memset

2015-10-08 Thread Thomas Huth
g_malloc0 already clears the memory, so no need for additional memsets here. And while we're at it, let's also remove the superfluous typecasts for the return values of g_malloc0. Signed-off-by: Thomas Huth --- hw/input/tsc210x.c | 8 ++-- 1 file changed, 2 insertions(+), 6

[Qemu-devel] [PATCH 5/5] linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup

2015-10-08 Thread Thomas Huth
No need to use g_malloc0 to zero the memory if we memcpy to the whole buffer afterwards anyway. Actually, there is even a function which combines both steps, g_memdup, so let's use this function here instead. Cc: Riku Voipio Signed-off-by: Thomas Huth --- linux-user/syscall.c | 3 +-- 1

Re: [Qemu-devel] [PATCH 1/5] hw/dma/pxa2xx: Remove superfluous memset

2015-10-09 Thread Thomas Huth
On 08/10/15 22:59, Eric Blake wrote: > On 10/08/2015 01:35 PM, Thomas Huth wrote: >> g_malloc0 already clears the memory, so no need for >> the additional memset here. >> >> Signed-off-by: Thomas Huth >> --- >> hw/dma/pxa2xx_dma.c | 1 - >> 1 file cha

Re: [Qemu-devel] [PATCH 4/5] tests/i44fx-test: No need for zeroing memory before memset

2015-10-09 Thread Thomas Huth
On 08/10/15 22:24, Laszlo Ersek wrote: > On 10/08/15 21:35, Thomas Huth wrote: >> Change a g_malloc0 into g_malloc since the following >> memset fills the whole buffer anyway. >> >> Cc: Laszlo Ersek >> Signed-off-by: Thomas Huth >> --- >> tes

Re: [Qemu-devel] [PATCH 3/5] hw/input/tsc210x: Remove superfluous memset

2015-10-09 Thread Thomas Huth
On 09/10/15 01:34, Eric Blake wrote: > On 10/08/2015 01:35 PM, Thomas Huth wrote: >> g_malloc0 already clears the memory, so no need for additional >> memsets here. And while we're at it, let's also remove the >> superfluous typecasts for the return values of g_mallo

[Qemu-devel] [PATCH v2 3/4] tests/i44fx-test: No need for zeroing memory before memset

2015-10-09 Thread Thomas Huth
Change a g_malloc0 into g_malloc since the following memset fills the whole buffer anyway. Signed-off-by: Thomas Huth Reviewed-by: Laszlo Ersek --- tests/i440fx-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c index d0bc8de

[Qemu-devel] [PATCH v2 0/4] Small optimizations for code using g_malloc0 + memset/memcpy

2015-10-09 Thread Thomas Huth
sending it again Thomas Huth (4): hw/dma/pxa2xx: Remove superfluous memset hw/input/tsc210x: Remove superfluous memset tests/i44fx-test: No need for zeroing memory before memset linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup hw/dma/pxa2xx_dma.c | 3 +-- hw/input/tsc210x.c | 8

[Qemu-devel] [PATCH v2 4/4] linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup

2015-10-09 Thread Thomas Huth
No need to use g_malloc0 to zero the memory if we memcpy to the whole buffer afterwards anyway. Actually, there is even a function which combines both steps, g_memdup, so let's use this function here instead. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake --- linux-user/syscall.

[Qemu-devel] [PATCH v2 2/4] hw/input/tsc210x: Remove superfluous memset

2015-10-09 Thread Thomas Huth
g_malloc0 already clears the memory, so no need for additional memsets here. And while we're at it, let's also remove the superfluous typecasts for the return values of g_malloc0 and use the type-safe g_new0 instead. Signed-off-by: Thomas Huth --- hw/input/tsc210x.c | 8 ++-- 1 fi

[Qemu-devel] [PATCH v2 1/4] hw/dma/pxa2xx: Remove superfluous memset

2015-10-09 Thread Thomas Huth
g_malloc0 already clears the memory, so no need for the additional memset here. And while we're at it, also convert the g_malloc0 to the preferred g_new0. Signed-off-by: Thomas Huth --- hw/dma/pxa2xx_dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/dma/pxa2xx_

Re: [Qemu-devel] [PATCH 1/5] slirp: closesocket must be called to close sockets on windows

2015-10-27 Thread Thomas Huth
On 22/10/15 01:15, Mark Pizzolato wrote: > Signed-off-by: Mark Pizzolato > --- > slirp/slirp.c | 2 +- > slirp/socket.c | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/slirp/slirp.c b/slirp/slirp.c > index 35f819a..d18faa8 100644 > --- a/slirp/slirp.c > +++ b/slirp/

Re: [Qemu-devel] Coding style for errors

2015-10-28 Thread Thomas Huth
On 23/10/15 19:02, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@gmail.com) wrote: >> On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: >>> Markus Armbruster writes: >>> Lluís Vilanova writes: >>> [...] > So, is there any agreement on what should be used? If so

Re: [Qemu-devel] [PATCH 01/13] PPC: Allow Rc bit to be set on mtspr

2015-11-03 Thread Thomas Huth
NDLER(dcbi, 0x1F, 0x16, 0x0E, 0x03E1, PPC_CACHE), > GEN_HANDLER(dcbst, 0x1F, 0x16, 0x01, 0x03E1, PPC_CACHE), Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 02/13] PPC: Fix lsxw bounds checks

2015-11-03 Thread Thomas Huth
On 23/10/15 15:56, Mark Cave-Ayland wrote: > From: Alexander Graf > > The lsxw instruction checks whether the desired string actually fits > into all defined registers. Unfortunately it does the calculation wrong, > resulting in illegal instruction traps for loads that really should fit. s/lsxw/

Re: [Qemu-devel] [PATCH 03/13] PPC: mac99: Always add USB controller

2015-11-03 Thread Thomas Huth
;usb |= defaults_enabled() && !machine->usb_disabled; > + > /* Timebase Frequency */ > if (kvm_enabled()) { > tbfreq = kvmppc_get_tbfreq(); > According to https://en.wikipedia.org/wiki/New_World_ROM : "The simplest way to distinguish a New World ROM Mac is that it will have a factory built-in USB port." ... so it seems to me that this is right. Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 02/13] PPC: Fix lsxw bounds checks

2015-11-03 Thread Thomas Huth
On 03/11/15 20:21, Mark Cave-Ayland wrote: > On 03/11/15 15:23, Thomas Huth wrote: > >> On 23/10/15 15:56, Mark Cave-Ayland wrote: >>> From: Alexander Graf >>> >>> The lsxw instruction checks whether the desired string actually fits >>> into

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-10 Thread Thomas Huth
On 10/11/15 05:22, Sukadev Bhattiprolu wrote: [...] > | > +static int file_read_buf(char *file_name, char *buf, int len) > | > +{ > | > +int rc; > | > +FILE *fp; > | > + > | > +fp = fopen(file_name, "r"); > | > +if (!fp) { > | > +error_report("%s: Error opening %s\n", __func

[Qemu-devel] [PATCH 0/4] Remove superfluous return statements

2015-11-10 Thread Thomas Huth
Some functions in QEMU have a "return;" statement at the very end of a function with "void" return type, i.e. the return statement is superfluous. This patch series removes some of them. Thomas Huth (4): hw/ide: Remove superfluous return statements hw/acpi: Remove superflu

[Qemu-devel] [PATCH 3/4] hw/s390x: Remove superfluous return statements

2015-11-10 Thread Thomas Huth
The "return;" statements at the end of functions do not make much sense, so let's remove them. Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Thomas Huth --- hw/s390x/css.c| 1 - hw/s390x/event-

[Qemu-devel] [PATCH 4/4] hw/core/qdev: Remove superfluous return statement

2015-11-10 Thread Thomas Huth
The "return;" statement at the end of device_set_realized() does not make much sense, so let's remove it. Signed-off-by: Thomas Huth --- hw/core/qdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 4ab04aa..d712a0b 100644 --- a/hw/core/

[Qemu-devel] [PATCH 1/4] hw/ide: Remove superfluous return statements

2015-11-10 Thread Thomas Huth
The "return;" statements at the end of functions do not make much sense, so let's remove them. Cc: John Snow Cc: qemu-bl...@nongnu.org Signed-off-by: Thomas Huth --- hw/ide/atapi.c | 1 - hw/ide/macio.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/hw/ide/atapi.c b/hw/id

[Qemu-devel] [PATCH 2/4] hw/acpi: Remove superfluous return statement

2015-11-10 Thread Thomas Huth
The "return;" statement at the end of acpi_memory_plug_cb() does not make much sense, so let's remove it. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Thomas Huth --- hw/acpi/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/acpi/m

Re: [Qemu-devel] [PULL 01/28] target-ppc: Use sensible POWER8/POWER8E versions

2016-01-25 Thread Thomas Huth
On 25.01.2016 20:14, Alexander Graf wrote: > > > On 01/25/2016 02:15 AM, David Gibson wrote: >> From: Benjamin Herrenschmidt >> >> We never released anything older than POWER8 DD2.0 and POWER8E DD2.1, >> so let's use these versions, without that some firmware or Linux code >> might fail to use s

Re: [Qemu-devel] [PATCH 03/10] target-ppc: Rework ppc_store_slb

2016-01-26 Thread Thomas Huth
On 27.01.2016 01:04, David Gibson wrote: > On Mon, Jan 25, 2016 at 08:22:51PM +0100, Alexander Graf wrote: >> >> >> On 01/25/2016 06:15 AM, David Gibson wrote: >>> ppc_store_slb updates the SLB for PPC cpus with 64-bit hash MMUs. >>> Currently it takes two parameters, which contain values encoded a

Re: [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors

2016-01-27 Thread Thomas Huth
On 20.01.2016 15:10, Lluís Vilanova wrote: > Thomas Huth writes: > >> On 18.01.2016 21:26, Eric Blake wrote: >>> On 01/15/2016 06:54 AM, Lluís Vilanova wrote: >>>> Gives some general guidelines for reporting errors in QEMU. >>>> >>>> Si

Re: [Qemu-devel] [PATCHv2 01/10] target-ppc: Remove unused kvmppc_read_segment_page_sizes() stub

2016-01-27 Thread Thomas Huth
egment_page_sizes(uint32_t *prop, int > maxcells) > -{ > -return -1; > -} > - > static inline int kvmppc_set_interrupt(PowerPCCPU *cpu, int irq, int level) > { > return -1; Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors

2016-01-28 Thread Thomas Huth
On 27.01.2016 20:20, Lluís Vilanova wrote: > Lluís Vilanova writes: > >> Thomas Huth writes: >>> On 20.01.2016 15:10, Lluís Vilanova wrote: >>>> Thomas Huth writes: >>>> >>>>> On 18.01.2016 21:26, Eric Blake wrote: >>>>>

Re: [Qemu-devel] [PATCHv2 06/10] target-ppc: Remove unused mmu models from ppc_tlb_invalidate_one

2016-01-28 Thread Thomas Huth
On 27.01.2016 11:13, David Gibson wrote: > ppc_tlb_invalidate_one() has a big switch handling many different MMU > types. However, most of those branches can never be reached: > > It is called from 3 places: from remove_hpte() and h_protect() in > spapr_hcall.c (which always has a 64-bit hash MMU

Re: [Qemu-devel] [PATCH v6 1/5] util: Introduce error reporting functions with fatal/abort

2016-02-02 Thread Thomas Huth
On 02.02.2016 19:53, Markus Armbruster wrote: > Lluís Vilanova writes: ... >> diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h >> index 7ab2355..6c2f142 100644 >> --- a/include/qemu/error-report.h >> +++ b/include/qemu/error-report.h >> @@ -43,4 +43,23 @@ void error_report(c

Re: [Qemu-devel] [PATCH v6 1/5] util: Introduce error reporting functions with fatal/abort

2016-02-03 Thread Thomas Huth
On 03.02.2016 10:48, Markus Armbruster wrote: > David Gibson writes: > >> On Tue, Feb 02, 2016 at 10:47:35PM +0100, Thomas Huth wrote: >>> On 02.02.2016 19:53, Markus Armbruster wrote: >>>> Lluís Vilanova writes: >>> ... >>> >>>>

Re: [Qemu-devel] [PATCH 3/4] hw/s390x: Remove superfluous return statements

2015-11-11 Thread Thomas Huth
On 11/11/15 12:25, Cornelia Huck wrote: > On Tue, 10 Nov 2015 21:16:10 +0100 > Thomas Huth wrote: > >> The "return;" statements at the end of functions do not make >> much sense, so let's remove them. >> >> Cc: Cornelia Huck >> Cc: Christ

Re: [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit

2015-11-12 Thread Thomas Huth
On 11/11/15 18:16, Aravinda Prasad wrote: > Memory error such as bit flips that cannot be corrected > by hardware are passed on to the kernel for handling. > If the memory address in error belongs to guest then > guest kernel is responsible for taking suitable action. > Patch [1] enhances KVM to ex

Re: [Qemu-devel] [PATCH 1/4] spapr: Extend rtas-blob

2015-11-12 Thread Thomas Huth
On 11/11/15 18:15, Aravinda Prasad wrote: > Extend rtas-blob to accommodate error log. Error log > structure is saved in rtas space upon a machine check > exception. > > Signed-off-by: Aravinda Prasad > --- > hw/ppc/spapr.c |4 > 1 file changed, 4 insertions(+) > > diff --git a/hw/ppc/

Re: [Qemu-devel] [PATCH 3/4] spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls

2015-11-12 Thread Thomas Huth
On 11/11/15 18:15, Aravinda Prasad wrote: > This patch adds support in QEMU to handle "ibm,nmi-register" > and "ibm,nmi-interlock" RTAS calls. > > The machine check notification address is saved when the > OS issues "ibm,nmi-register" RTAS call. > > This patch also handles the case when multiple

Re: [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit

2015-11-12 Thread Thomas Huth
On 12/11/15 09:09, Thomas Huth wrote: > On 11/11/15 18:16, Aravinda Prasad wrote: >> Memory error such as bit flips that cannot be corrected >> by hardware are passed on to the kernel for handling. >> If the memory address in error belongs to guest then >> guest kerne

Re: [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit

2015-11-12 Thread Thomas Huth
On 13/11/15 02:57, David Gibson wrote: > On Thu, Nov 12, 2015 at 10:40:11AM +0100, Thomas Huth wrote: >> On 12/11/15 09:09, Thomas Huth wrote: >>> On 11/11/15 18:16, Aravinda Prasad wrote: [...] >>>> +qemu_mutex_lock(&spapr->mc_in_progress); >>> &

Re: [Qemu-devel] [Qemu-ppc] [PATCH for-2.5] mac_dbdma: always initialize channel field in DBDMA_channel

2015-11-13 Thread Thomas Huth
On 13/11/15 10:45, Hervé Poussineau wrote: > Le 13/11/2015 05:09, Programmingkid a écrit : >> >> On Nov 12, 2015, at 11:04 PM, qemu-ppc-requ...@nongnu.org wrote: >> >>> Message: 3 >>> Date: Thu, 12 Nov 2015 22:24:08 +0100 >>> From: Herv? Poussineau >>> To: qemu-devel@nongnu.org >>> Cc: "open list:

Re: [Qemu-devel] [PATCH] net: convert qemu_log to error_report

2015-11-13 Thread Thomas Huth
nce this code is now used by the netdev dumping filter, too, so "-net dump" is not the only user anymore. Anyway, that can also be done with a later patch, so if you don't want to do this now: Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit

2015-11-16 Thread Thomas Huth
On 16/11/15 04:50, Paul Mackerras wrote: > On Thu, Nov 12, 2015 at 09:09:59AM +0100, Thomas Huth wrote: >> >> Shouldn't you also check MSR_ME here first and enter checkstop when >> machine checks are disabled? > > MSR_ME is a hypervisor resource and is not able to

Re: [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit

2015-11-16 Thread Thomas Huth
On 12/11/15 19:49, Aravinda Prasad wrote: > > On Thursday 12 November 2015 03:10 PM, Thomas Huth wrote: ... >> Also LoPAPR talks about 'subsequent processors report "fatal error >> previously reported"', so maybe the other processors should report that >&g

Re: [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit

2015-11-16 Thread Thomas Huth
On 16/11/15 11:07, Aravinda Prasad wrote: > > > On Monday 16 November 2015 01:22 PM, Thomas Huth wrote: >> On 12/11/15 19:49, Aravinda Prasad wrote: >>> >>> On Thursday 12 November 2015 03:10 PM, Thomas Huth wrote: >> ... >>>> Also LoPAPR tal

Re: [Qemu-devel] [Qemu-ppc] [PATCH for-2.5] mac_dbdma: always initialize channel field in DBDMA_channel

2015-11-19 Thread Thomas Huth
On 13/11/15 13:10, Hervé Poussineau wrote: > Le 13/11/2015 11:40, Thomas Huth a écrit : >> On 13/11/15 10:45, Hervé Poussineau wrote: >>> Le 13/11/2015 05:09, Programmingkid a écrit : >>>> >>>> On Nov 12, 2015, at 11:04 PM, qemu-ppc-requ...@nongnu.org wr

[Qemu-devel] [PATCH for-2.5] hw/ppc/spapr: Remove duplicated "pseries" alias

2015-11-23 Thread Thomas Huth
ult = 0" there since the is_default variable should be set to zero by default already. Signed-off-by: Thomas Huth --- hw/ppc/spapr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 030ee35..32e595b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/s

Re: [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-09 Thread Thomas Huth
On 08.02.2016 11:28, Samuel Thibault wrote: > From: Guillaume Subiron > > This patch adds the functions needed to handle IPv6 packets. ICMPv6 and > NDP headers are implemented. > > Slirp is now able to send NDP Router or Neighbor Advertisement when it > receives Router or Neighbor Solicitation.

Re: [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-09 Thread Thomas Huth
On 09.02.2016 17:31, Samuel Thibault wrote: > Thomas Huth, on Tue 09 Feb 2016 17:14:15 +0100, wrote: >>> +return (a.s6_addr[prefix_len / 8] >> (8 - (prefix_len % 8))) >>> +== (b.s6_addr[prefix_len / 8] >> (8 - (prefix_len % 8))); >> >> chec

Re: [Qemu-devel] [PATCHv7 2/9] slirp: Adding ICMPv6 error sending

2016-02-09 Thread Thomas Huth
On 08.02.2016 11:28, Samuel Thibault wrote: > From: Yann Bordenave > > Disambiguation : icmp_error is renamed into icmp_send_error, since it > doesn't manage errors, but only sends ICMP Error messages. You could maybe also put the icmp_error (for IPv4) related stuff into a separate patch ... but

Re: [Qemu-devel] [PATCHv7 3/9] slirp: Adding IPv6 UDP support

2016-02-09 Thread Thomas Huth
On 08.02.2016 11:28, Samuel Thibault wrote: > From: Guillaume Subiron > > This adds the sin6 case in the fhost and lhost unions and related macros. > It adds udp6_input() and udp6_output(). > It adds the IPv6 case in sorecvfrom(). > Finally, udp_input() is called by ip6_input(). > > Signed-off-b

Re: [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-09 Thread Thomas Huth
On 09.02.2016 20:56, Samuel Thibault wrote: > Thomas Huth, on Tue 09 Feb 2016 17:14:15 +0100, wrote: >> A lot of these defines seem to be define in already >> (as recommended by RFC 3542) ... would it be feasible to use that >> standard header, instead of redefining here

Re: [Qemu-devel] [PATCHv7 3/9] slirp: Adding IPv6 UDP support

2016-02-09 Thread Thomas Huth
On 09.02.2016 22:19, Samuel Thibault wrote: > Thanks for your reviews so far! I have integrated the rest of comments, > the only remaining question for patches 1-3 is about srand() and rand(). I personally don't mind whether you use rand(), g_random_int_range() or g_rand_int_range() here, but of

Re: [Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-10 Thread Thomas Huth
On 08.02.2016 11:28, Samuel Thibault wrote: > From: Guillaume Subiron > > This patch factorizes the tcpiphdr structure to put the IPv4 fields in > an union, for addition of version 6 in further patch. > Using some macros, retrocompatibility of the existing code is assured. > > This patch also fi

Re: [Qemu-devel] [PATCHv7 5/9] slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff

2016-02-10 Thread Thomas Huth
On 08.02.2016 11:28, Samuel Thibault wrote: > From: Guillaume Subiron > > Basically, this patch adds some switch in various TCP functions to > prepare them for the IPv6 case. > > To have something to "switch" in tcp_input() and tcp_respond(), a new > argument is used to give them the sa_family o

Re: [Qemu-devel] [PATCHv7 6/9] slirp: Reindent after refactoring

2016-02-10 Thread Thomas Huth
On 08.02.2016 11:28, Samuel Thibault wrote: > From: Guillaume Subiron > > No code change. > > Signed-off-by: Guillaume Subiron > Signed-off-by: Samuel Thibault > --- > slirp/tcp_input.c | 99 > +++--- > slirp/tcp_output.c | 29

Re: [Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-10 Thread Thomas Huth
On 10.02.2016 10:28, Samuel Thibault wrote: > That one is tricky, yes :) > > Thomas Huth, on Wed 10 Feb 2016 09:05:32 +0100, wrote: >>> -#define SLIRP_MSIZE (IF_MTU + IF_MAXLINKHDR + offsetof(struct mbuf, m_dat) >>> + 6) >>> +#define SLIRP_MSIZE\ &

Re: [Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions

2016-02-10 Thread Thomas Huth
On 08.02.2016 11:28, Samuel Thibault wrote: > From: Guillaume Subiron > > This patch adds IPv6 case in TCP functions refactored by the last > patches. > This also adds IPv6 pseudo-header in tcpiphdr structure. > Finally, tcp_input() is called by ip6_input(). > > Signed-off-by: Guillaume Subiron

Re: [Qemu-devel] [PATCHv7 9/9] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-02-10 Thread Thomas Huth
On 08.02.2016 11:28, Samuel Thibault wrote: > From: Yann Bordenave > > This patch adds parameters to manage some new options in the qemu -net > command. > Slirp IPv6 address, network prefix, and DNS IPv6 address can be given in > argument to the qemu command. > Defaults parameters are respectivel

Re: [Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions

2016-02-10 Thread Thomas Huth
On 10.02.2016 13:30, Samuel Thibault wrote: > Thomas Huth, on Wed 10 Feb 2016 11:47:05 +0100, wrote: >>> + ip = mtod(m, struct ip *); >>> + ip6 = mtod(m, struct ip6 *); >>> + save_ip = *ip; >>> + save_ip6 = *ip6; >> >> Could you do the &

Re: [Qemu-devel] [PATCH] memory: fix usage of find_next_bit and find_next_zero_bit

2016-02-10 Thread Thomas Huth
atch here applied, SLOF boots fine again, so: Tested-by: Thomas Huth

[Qemu-devel] [PATCH 2/4] hw/ppc/spapr: Implement h_set_dabr

2016-02-10 Thread Thomas Huth
According to LoPAPR, h_set_dabr should simply set DABRX to 3 (if the register is available), and load the parameter into DABR. If DABRX is not available, the hypervisor has to check the "Breakpoint Translation" bit of the DABR register first. Signed-off-by: Thomas Huth --- hw/ppc/spa

[Qemu-devel] [PATCH 3/4] hw/ppc/spapr: Implement the h_set_xdabr hypercall

2016-02-10 Thread Thomas Huth
The H_SET_XDABR hypercall is similar to H_SET_DABR, but also sets the extended DABR (DABRX) register. Signed-off-by: Thomas Huth --- hw/ppc/spapr_hcall.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 6b9d512

<    1   2   3   4   5   6   7   8   9   10   >