* Re: [Qemu-devel] [QEMU PATCH v2] kvmclock: advance clock by time window between vm_stop and pre_save
From: Marcelo Tosatti @ 2016-11-11 14:23 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Dr. David Alan Gilbert, kvm, qemu-devel,
Radim Krčmář, Juan Quintela, Eduardo Habkost
In-Reply-To: <7e62defb-dcbe-492d-3c05-056b13d6699a@redhat.com>
On Thu, Nov 10, 2016 at 06:57:21PM +0100, Paolo Bonzini wrote:
>
>
> On 10/11/2016 12:48, Marcelo Tosatti wrote:
> > Destination has to run the following logic:
> >
> > If (source has KVM_CAP_ADVANCE_CLOCK)
> > use KVM_GET_CLOCK value
> > Else
> > read pvclock from guest
> >
> > To support migration from older QEMU versions which do not have
> > KVM_CAP_ADVANCE_CLOCK (or new QEMU versions running on old
> > hosts without KVM_CAP_ADVANCE_CLOCK).
> >
> > I don't see any clean way to give that information, except changing
> > the migration format to pass "host: kvm_cap_advance_clock=true/false"
> > information.
>
> If you make it only affect new machine types, you could transmit a dummy
> clock value such as -1 if the source does not have KVM_CLOCK_TSC_STABLE.
>
> Paolo
Prefer a new subsection (which is fine since migration is broken
anyway), because otherwise you have to deal with restoring
s->clock from -1 to what was read at KVM_GET_CLOCK (in case
migration fails).
^ permalink raw reply
* [Qemu-devel] [qemu patch 0/2] improve kvmclock difference on migration
From: Marcelo Tosatti @ 2016-11-14 12:36 UTC (permalink / raw)
To: kvm
Cc: qemu-devel, Dr. David Alan Gilbert, Paolo Bonzini, Juan Quintela,
Radim Krcmar, Eduardo Habkost
See patches for details.
^ permalink raw reply
* [Qemu-devel] [qemu patch 1/2] kvm: sync linux headers
From: Marcelo Tosatti @ 2016-11-14 12:36 UTC (permalink / raw)
To: kvm
Cc: qemu-devel, Dr. David Alan Gilbert, Paolo Bonzini, Juan Quintela,
Radim Krcmar, Eduardo Habkost, Marcelo Tosatti
In-Reply-To: <20161114123628.703911091@redhat.com>
[-- Attachment #1: sync-linux-headers.patch --]
[-- Type: text/plain, Size: 5447 bytes --]
Import KVM_CLOCK_TSC_STABLE.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/include/standard-headers/linux/input.h b/include/standard-headers/linux/input.h
index 7361a16..b472b85 100644
--- a/include/standard-headers/linux/input.h
+++ b/include/standard-headers/linux/input.h
@@ -245,6 +245,7 @@ struct input_mask {
#define BUS_SPI 0x1C
#define BUS_RMI 0x1D
#define BUS_CEC 0x1E
+#define BUS_INTEL_ISHTP 0x1F
/*
* MT_TOOL types
diff --git a/include/standard-headers/linux/pci_regs.h b/include/standard-headers/linux/pci_regs.h
index 4040951..e5a2e68 100644
--- a/include/standard-headers/linux/pci_regs.h
+++ b/include/standard-headers/linux/pci_regs.h
@@ -612,6 +612,8 @@
*/
#define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */
#define PCI_EXP_DEVCAP2_ARI 0x00000020 /* Alternative Routing-ID */
+#define PCI_EXP_DEVCAP2_ATOMIC_ROUTE 0x00000040 /* Atomic Op routing */
+#define PCI_EXP_DEVCAP2_ATOMIC_COMP64 0x00000100 /* Atomic 64-bit compare */
#define PCI_EXP_DEVCAP2_LTR 0x00000800 /* Latency tolerance reporting */
#define PCI_EXP_DEVCAP2_OBFF_MASK 0x000c0000 /* OBFF support mechanism */
#define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */
@@ -619,6 +621,7 @@
#define PCI_EXP_DEVCTL2 40 /* Device Control 2 */
#define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */
#define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */
+#define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040 /* Set Atomic requests */
#define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */
#define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */
#define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */
@@ -671,7 +674,8 @@
#define PCI_EXT_CAP_ID_PMUX 0x1A /* Protocol Multiplexing */
#define PCI_EXT_CAP_ID_PASID 0x1B /* Process Address Space ID */
#define PCI_EXT_CAP_ID_DPC 0x1D /* Downstream Port Containment */
-#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DPC
+#define PCI_EXT_CAP_ID_PTM 0x1F /* Precision Time Measurement */
+#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PTM
#define PCI_EXT_CAP_DSN_SIZEOF 12
#define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40
@@ -964,4 +968,13 @@
#define PCI_EXP_DPC_SOURCE_ID 10 /* DPC Source Identifier */
+/* Precision Time Measurement */
+#define PCI_PTM_CAP 0x04 /* PTM Capability */
+#define PCI_PTM_CAP_REQ 0x00000001 /* Requester capable */
+#define PCI_PTM_CAP_ROOT 0x00000004 /* Root capable */
+#define PCI_PTM_GRANULARITY_MASK 0x0000FF00 /* Clock granularity */
+#define PCI_PTM_CTRL 0x08 /* PTM Control */
+#define PCI_PTM_CTRL_ENABLE 0x00000001 /* PTM enable */
+#define PCI_PTM_CTRL_ROOT 0x00000002 /* Root select */
+
#endif /* LINUX_PCI_REGS_H */
diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h
index 541268c..2fb7859 100644
--- a/linux-headers/asm-arm/kvm.h
+++ b/linux-headers/asm-arm/kvm.h
@@ -84,6 +84,13 @@ struct kvm_regs {
#define KVM_VGIC_V2_DIST_SIZE 0x1000
#define KVM_VGIC_V2_CPU_SIZE 0x2000
+/* Supported VGICv3 address types */
+#define KVM_VGIC_V3_ADDR_TYPE_DIST 2
+#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3
+
+#define KVM_VGIC_V3_DIST_SIZE SZ_64K
+#define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K)
+
#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */
#define KVM_ARM_VCPU_PSCI_0_2 1 /* CPU uses PSCI v0.2 */
diff --git a/linux-headers/asm-x86/unistd_32.h b/linux-headers/asm-x86/unistd_32.h
index abeaf40..d45ea28 100644
--- a/linux-headers/asm-x86/unistd_32.h
+++ b/linux-headers/asm-x86/unistd_32.h
@@ -377,5 +377,8 @@
#define __NR_copy_file_range 377
#define __NR_preadv2 378
#define __NR_pwritev2 379
+#define __NR_pkey_mprotect 380
+#define __NR_pkey_alloc 381
+#define __NR_pkey_free 382
#endif /* _ASM_X86_UNISTD_32_H */
diff --git a/linux-headers/asm-x86/unistd_64.h b/linux-headers/asm-x86/unistd_64.h
index 73c3d1f..e22db91 100644
--- a/linux-headers/asm-x86/unistd_64.h
+++ b/linux-headers/asm-x86/unistd_64.h
@@ -330,5 +330,8 @@
#define __NR_copy_file_range 326
#define __NR_preadv2 327
#define __NR_pwritev2 328
+#define __NR_pkey_mprotect 329
+#define __NR_pkey_alloc 330
+#define __NR_pkey_free 331
#endif /* _ASM_X86_UNISTD_64_H */
diff --git a/linux-headers/asm-x86/unistd_x32.h b/linux-headers/asm-x86/unistd_x32.h
index e5aea76..84e58b2 100644
--- a/linux-headers/asm-x86/unistd_x32.h
+++ b/linux-headers/asm-x86/unistd_x32.h
@@ -283,6 +283,9 @@
#define __NR_membarrier (__X32_SYSCALL_BIT + 324)
#define __NR_mlock2 (__X32_SYSCALL_BIT + 325)
#define __NR_copy_file_range (__X32_SYSCALL_BIT + 326)
+#define __NR_pkey_mprotect (__X32_SYSCALL_BIT + 329)
+#define __NR_pkey_alloc (__X32_SYSCALL_BIT + 330)
+#define __NR_pkey_free (__X32_SYSCALL_BIT + 331)
#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 4806e06..bb0ed71 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -972,12 +972,19 @@ struct kvm_irqfd {
__u8 pad[16];
};
+/* For KVM_CAP_ADJUST_CLOCK */
+
+/* Do not use 1, KVM_CHECK_EXTENSION returned it before we had flags. */
+#define KVM_CLOCK_TSC_STABLE 2
+
struct kvm_clock_data {
__u64 clock;
__u32 flags;
__u32 pad[9];
};
+/* For KVM_CAP_SW_TLB */
+
#define KVM_MMU_FSL_BOOKE_NOHV 0
#define KVM_MMU_FSL_BOOKE_HV 1
^ permalink raw reply related
* [Qemu-devel] [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration
From: Marcelo Tosatti @ 2016-11-14 12:36 UTC (permalink / raw)
To: kvm
Cc: qemu-devel, Dr. David Alan Gilbert, Paolo Bonzini, Juan Quintela,
Radim Krcmar, Eduardo Habkost, Marcelo Tosatti
In-Reply-To: <20161114123628.703911091@redhat.com>
[-- Attachment #1: kvmclock-advance-clock.patch --]
[-- Type: text/plain, Size: 6621 bytes --]
Check for KVM_CAP_ADJUST_CLOCK capability KVM_CLOCK_TSC_STABLE, which
indicates that KVM_GET_CLOCK returns a value as seen by the guest at
that moment.
For new machine types, use this value rather than reading
from guest memory.
This reduces kvmclock difference on migration from 5s to 0.1s
(when max_downtime == 5s).
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
hw/i386/kvm/clock.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++--
include/hw/i386/pc.h | 5 ++
target-i386/kvm.c | 7 +++
target-i386/kvm_i386.h | 1
4 files changed, 98 insertions(+), 3 deletions(-)
Index: qemu-mig-advance-clock/hw/i386/kvm/clock.c
===================================================================
--- qemu-mig-advance-clock.orig/hw/i386/kvm/clock.c 2016-11-14 09:07:55.519856329 -0200
+++ qemu-mig-advance-clock/hw/i386/kvm/clock.c 2016-11-14 10:19:45.723254737 -0200
@@ -36,6 +36,12 @@
uint64_t clock;
bool clock_valid;
+
+ /* whether machine supports reliable KVM_GET_CLOCK */
+ bool mach_use_reliable_get_clock;
+
+ /* whether source host supported reliable KVM_GET_CLOCK */
+ bool src_use_reliable_get_clock;
} KVMClockState;
struct pvclock_vcpu_time_info {
@@ -91,15 +97,37 @@
if (running) {
struct kvm_clock_data data = {};
- uint64_t time_at_migration = kvmclock_current_nsec(s);
+ uint64_t time_at_migration = 0;
- s->clock_valid = false;
+ /* local (running VM) restore */
+ if (s->clock_valid) {
+ /*
+ * if host does not support reliable KVM_GET_CLOCK,
+ * read kvmclock value from memory
+ */
+ if (!kvm_has_adjust_clock_stable()) {
+ time_at_migration = kvmclock_current_nsec(s);
+ }
+ /* migration/savevm/init restore */
+ } else {
+ /*
+ * use s->clock in case machine uses reliable
+ * get clock and host where vm was executing
+ * supported reliable get clock
+ */
+ if (!s->mach_use_reliable_get_clock ||
+ !s->src_use_reliable_get_clock) {
+ time_at_migration = kvmclock_current_nsec(s);
+ }
+ }
- /* We can't rely on the migrated clock value, just discard it */
+ /* We can't rely on the saved clock value, just discard it */
if (time_at_migration) {
s->clock = time_at_migration;
}
+ s->clock_valid = false;
+
data.clock = s->clock;
ret = kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data);
if (ret < 0) {
@@ -152,22 +180,76 @@
qemu_add_vm_change_state_handler(kvmclock_vm_state_change, s);
}
+static bool kvmclock_src_use_reliable_get_clock(void *opaque)
+{
+ KVMClockState *s = opaque;
+
+ /*
+ * On machine types that support reliable KVM_GET_CLOCK,
+ * if host kernel does provide reliable KVM_GET_CLOCK,
+ * set src_use_reliable_get_clock=true so that destination
+ * avoids reading kvmclock from memory.
+ */
+ if (s->mach_use_reliable_get_clock && kvm_has_adjust_clock_stable()) {
+ s->src_use_reliable_get_clock = true;
+ }
+
+ return s->src_use_reliable_get_clock;
+}
+
+static const VMStateDescription kvmclock_reliable_get_clock = {
+ .name = "kvmclock/src_use_reliable_get_clock",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .needed = kvmclock_src_use_reliable_get_clock,
+ .fields = (VMStateField[]) {
+ VMSTATE_BOOL(src_use_reliable_get_clock, KVMClockState),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+static void kvmclock_pre_save(void *opaque)
+{
+ KVMClockState *s = opaque;
+ struct kvm_clock_data data;
+ int ret;
+
+ ret = kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, &data);
+ if (ret < 0) {
+ fprintf(stderr, "KVM_GET_CLOCK failed: %s\n", strerror(ret));
+ abort();
+ }
+ s->clock = data.clock;
+}
+
static const VMStateDescription kvmclock_vmsd = {
.name = "kvmclock",
.version_id = 1,
.minimum_version_id = 1,
+ .pre_save = kvmclock_pre_save,
.fields = (VMStateField[]) {
VMSTATE_UINT64(clock, KVMClockState),
VMSTATE_END_OF_LIST()
+ },
+ .subsections = (const VMStateDescription * []) {
+ &kvmclock_reliable_get_clock,
+ NULL
}
};
+static Property kvmclock_properties[] = {
+ DEFINE_PROP_BOOL("mach_use_reliable_get_clock", KVMClockState,
+ mach_use_reliable_get_clock, true),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void kvmclock_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = kvmclock_realize;
dc->vmsd = &kvmclock_vmsd;
+ dc->props = kvmclock_properties;
}
static const TypeInfo kvmclock_info = {
Index: qemu-mig-advance-clock/include/hw/i386/pc.h
===================================================================
--- qemu-mig-advance-clock.orig/include/hw/i386/pc.h 2016-11-14 09:07:55.519856329 -0200
+++ qemu-mig-advance-clock/include/hw/i386/pc.h 2016-11-14 09:11:47.112200123 -0200
@@ -370,6 +370,11 @@
#define PC_COMPAT_2_7 \
HW_COMPAT_2_7 \
{\
+ .driver = "kvmclock",\
+ .property = "mach_use_reliable_get_clock",\
+ .value = "off",\
+ },\
+ {\
.driver = TYPE_X86_CPU,\
.property = "l3-cache",\
.value = "off",\
Index: qemu-mig-advance-clock/target-i386/kvm.c
===================================================================
--- qemu-mig-advance-clock.orig/target-i386/kvm.c 2016-11-14 09:07:55.520856330 -0200
+++ qemu-mig-advance-clock/target-i386/kvm.c 2016-11-14 09:11:47.125200142 -0200
@@ -117,6 +117,13 @@
return kvm_check_extension(kvm_state, KVM_CAP_X86_SMM);
}
+bool kvm_has_adjust_clock_stable(void)
+{
+ int ret = kvm_check_extension(kvm_state, KVM_CAP_ADJUST_CLOCK);
+
+ return (ret == KVM_CLOCK_TSC_STABLE);
+}
+
bool kvm_allows_irq0_override(void)
{
return !kvm_irqchip_in_kernel() || kvm_has_gsi_routing();
Index: qemu-mig-advance-clock/target-i386/kvm_i386.h
===================================================================
--- qemu-mig-advance-clock.orig/target-i386/kvm_i386.h 2016-11-14 09:07:55.520856330 -0200
+++ qemu-mig-advance-clock/target-i386/kvm_i386.h 2016-11-14 09:11:47.125200142 -0200
@@ -17,6 +17,7 @@
bool kvm_allows_irq0_override(void);
bool kvm_has_smm(void);
+bool kvm_has_adjust_clock_stable(void);
void kvm_synchronize_all_tsc(void);
void kvm_arch_reset_vcpu(X86CPU *cs);
void kvm_arch_do_init_vcpu(X86CPU *cs);
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support
From: Stefan Weil @ 2016-11-14 12:38 UTC (permalink / raw)
To: Vincent Palatin; +Cc: qemu-devel, Paolo Bonzini
In-Reply-To: <CAP_ceTz93cKm8_N3t5fTuLm+_q3b8N2oQgLqQkpT7ObhW97_YQ@mail.gmail.com>
Am 14.11.2016 um 13:33 schrieb Vincent Palatin:
> On Mon, Nov 14, 2016 at 1:21 PM, Stefan Weil <sw@weilnetz.de> wrote:
>>
>> A full build for Windows needs the patch below to
>> fix missing declarations, otherwise it fails with
>> compiler warnings and linker errors.
> Thanks for filing the gaps. That's very helpful !
> Do you mind if I merge it with your SoB into Patch 1/5 where it belongs ?
> or do you prefer keeping it as a separate patch ?
Just merge it where it belongs to (I did not check).
You may add my SoB as well for that part.
Cheers,
Stefan
^ permalink raw reply
* Re: [QEMU PATCH v2] kvmclock: advance clock by time window between vm_stop and pre_save
From: Marcelo Tosatti @ 2016-11-11 14:23 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Dr. David Alan Gilbert, kvm, qemu-devel,
Radim Krčmář, Juan Quintela, Eduardo Habkost
In-Reply-To: <7e62defb-dcbe-492d-3c05-056b13d6699a@redhat.com>
On Thu, Nov 10, 2016 at 06:57:21PM +0100, Paolo Bonzini wrote:
>
>
> On 10/11/2016 12:48, Marcelo Tosatti wrote:
> > Destination has to run the following logic:
> >
> > If (source has KVM_CAP_ADVANCE_CLOCK)
> > use KVM_GET_CLOCK value
> > Else
> > read pvclock from guest
> >
> > To support migration from older QEMU versions which do not have
> > KVM_CAP_ADVANCE_CLOCK (or new QEMU versions running on old
> > hosts without KVM_CAP_ADVANCE_CLOCK).
> >
> > I don't see any clean way to give that information, except changing
> > the migration format to pass "host: kvm_cap_advance_clock=true/false"
> > information.
>
> If you make it only affect new machine types, you could transmit a dummy
> clock value such as -1 if the source does not have KVM_CLOCK_TSC_STABLE.
>
> Paolo
Prefer a new subsection (which is fine since migration is broken
anyway), because otherwise you have to deal with restoring
s->clock from -1 to what was read at KVM_GET_CLOCK (in case
migration fails).
^ permalink raw reply
* [qemu patch 0/2] improve kvmclock difference on migration
From: Marcelo Tosatti @ 2016-11-14 12:36 UTC (permalink / raw)
To: kvm
Cc: qemu-devel, Dr. David Alan Gilbert, Paolo Bonzini, Juan Quintela,
Radim Krcmar, Eduardo Habkost
See patches for details.
^ permalink raw reply
* [qemu patch 1/2] kvm: sync linux headers
From: Marcelo Tosatti @ 2016-11-14 12:36 UTC (permalink / raw)
To: kvm
Cc: qemu-devel, Dr. David Alan Gilbert, Paolo Bonzini, Juan Quintela,
Radim Krcmar, Eduardo Habkost, Marcelo Tosatti
In-Reply-To: <20161114123628.703911091@redhat.com>
[-- Attachment #1: sync-linux-headers.patch --]
[-- Type: text/plain, Size: 5449 bytes --]
Import KVM_CLOCK_TSC_STABLE.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/include/standard-headers/linux/input.h b/include/standard-headers/linux/input.h
index 7361a16..b472b85 100644
--- a/include/standard-headers/linux/input.h
+++ b/include/standard-headers/linux/input.h
@@ -245,6 +245,7 @@ struct input_mask {
#define BUS_SPI 0x1C
#define BUS_RMI 0x1D
#define BUS_CEC 0x1E
+#define BUS_INTEL_ISHTP 0x1F
/*
* MT_TOOL types
diff --git a/include/standard-headers/linux/pci_regs.h b/include/standard-headers/linux/pci_regs.h
index 4040951..e5a2e68 100644
--- a/include/standard-headers/linux/pci_regs.h
+++ b/include/standard-headers/linux/pci_regs.h
@@ -612,6 +612,8 @@
*/
#define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */
#define PCI_EXP_DEVCAP2_ARI 0x00000020 /* Alternative Routing-ID */
+#define PCI_EXP_DEVCAP2_ATOMIC_ROUTE 0x00000040 /* Atomic Op routing */
+#define PCI_EXP_DEVCAP2_ATOMIC_COMP64 0x00000100 /* Atomic 64-bit compare */
#define PCI_EXP_DEVCAP2_LTR 0x00000800 /* Latency tolerance reporting */
#define PCI_EXP_DEVCAP2_OBFF_MASK 0x000c0000 /* OBFF support mechanism */
#define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */
@@ -619,6 +621,7 @@
#define PCI_EXP_DEVCTL2 40 /* Device Control 2 */
#define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */
#define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */
+#define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040 /* Set Atomic requests */
#define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */
#define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */
#define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */
@@ -671,7 +674,8 @@
#define PCI_EXT_CAP_ID_PMUX 0x1A /* Protocol Multiplexing */
#define PCI_EXT_CAP_ID_PASID 0x1B /* Process Address Space ID */
#define PCI_EXT_CAP_ID_DPC 0x1D /* Downstream Port Containment */
-#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DPC
+#define PCI_EXT_CAP_ID_PTM 0x1F /* Precision Time Measurement */
+#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PTM
#define PCI_EXT_CAP_DSN_SIZEOF 12
#define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40
@@ -964,4 +968,13 @@
#define PCI_EXP_DPC_SOURCE_ID 10 /* DPC Source Identifier */
+/* Precision Time Measurement */
+#define PCI_PTM_CAP 0x04 /* PTM Capability */
+#define PCI_PTM_CAP_REQ 0x00000001 /* Requester capable */
+#define PCI_PTM_CAP_ROOT 0x00000004 /* Root capable */
+#define PCI_PTM_GRANULARITY_MASK 0x0000FF00 /* Clock granularity */
+#define PCI_PTM_CTRL 0x08 /* PTM Control */
+#define PCI_PTM_CTRL_ENABLE 0x00000001 /* PTM enable */
+#define PCI_PTM_CTRL_ROOT 0x00000002 /* Root select */
+
#endif /* LINUX_PCI_REGS_H */
diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h
index 541268c..2fb7859 100644
--- a/linux-headers/asm-arm/kvm.h
+++ b/linux-headers/asm-arm/kvm.h
@@ -84,6 +84,13 @@ struct kvm_regs {
#define KVM_VGIC_V2_DIST_SIZE 0x1000
#define KVM_VGIC_V2_CPU_SIZE 0x2000
+/* Supported VGICv3 address types */
+#define KVM_VGIC_V3_ADDR_TYPE_DIST 2
+#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3
+
+#define KVM_VGIC_V3_DIST_SIZE SZ_64K
+#define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K)
+
#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */
#define KVM_ARM_VCPU_PSCI_0_2 1 /* CPU uses PSCI v0.2 */
diff --git a/linux-headers/asm-x86/unistd_32.h b/linux-headers/asm-x86/unistd_32.h
index abeaf40..d45ea28 100644
--- a/linux-headers/asm-x86/unistd_32.h
+++ b/linux-headers/asm-x86/unistd_32.h
@@ -377,5 +377,8 @@
#define __NR_copy_file_range 377
#define __NR_preadv2 378
#define __NR_pwritev2 379
+#define __NR_pkey_mprotect 380
+#define __NR_pkey_alloc 381
+#define __NR_pkey_free 382
#endif /* _ASM_X86_UNISTD_32_H */
diff --git a/linux-headers/asm-x86/unistd_64.h b/linux-headers/asm-x86/unistd_64.h
index 73c3d1f..e22db91 100644
--- a/linux-headers/asm-x86/unistd_64.h
+++ b/linux-headers/asm-x86/unistd_64.h
@@ -330,5 +330,8 @@
#define __NR_copy_file_range 326
#define __NR_preadv2 327
#define __NR_pwritev2 328
+#define __NR_pkey_mprotect 329
+#define __NR_pkey_alloc 330
+#define __NR_pkey_free 331
#endif /* _ASM_X86_UNISTD_64_H */
diff --git a/linux-headers/asm-x86/unistd_x32.h b/linux-headers/asm-x86/unistd_x32.h
index e5aea76..84e58b2 100644
--- a/linux-headers/asm-x86/unistd_x32.h
+++ b/linux-headers/asm-x86/unistd_x32.h
@@ -283,6 +283,9 @@
#define __NR_membarrier (__X32_SYSCALL_BIT + 324)
#define __NR_mlock2 (__X32_SYSCALL_BIT + 325)
#define __NR_copy_file_range (__X32_SYSCALL_BIT + 326)
+#define __NR_pkey_mprotect (__X32_SYSCALL_BIT + 329)
+#define __NR_pkey_alloc (__X32_SYSCALL_BIT + 330)
+#define __NR_pkey_free (__X32_SYSCALL_BIT + 331)
#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 4806e06..bb0ed71 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -972,12 +972,19 @@ struct kvm_irqfd {
__u8 pad[16];
};
+/* For KVM_CAP_ADJUST_CLOCK */
+
+/* Do not use 1, KVM_CHECK_EXTENSION returned it before we had flags. */
+#define KVM_CLOCK_TSC_STABLE 2
+
struct kvm_clock_data {
__u64 clock;
__u32 flags;
__u32 pad[9];
};
+/* For KVM_CAP_SW_TLB */
+
#define KVM_MMU_FSL_BOOKE_NOHV 0
#define KVM_MMU_FSL_BOOKE_HV 1
^ permalink raw reply related
* [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration
From: Marcelo Tosatti @ 2016-11-14 12:36 UTC (permalink / raw)
To: kvm
Cc: qemu-devel, Dr. David Alan Gilbert, Paolo Bonzini, Juan Quintela,
Radim Krcmar, Eduardo Habkost, Marcelo Tosatti
In-Reply-To: <20161114123628.703911091@redhat.com>
[-- Attachment #1: kvmclock-advance-clock.patch --]
[-- Type: text/plain, Size: 6623 bytes --]
Check for KVM_CAP_ADJUST_CLOCK capability KVM_CLOCK_TSC_STABLE, which
indicates that KVM_GET_CLOCK returns a value as seen by the guest at
that moment.
For new machine types, use this value rather than reading
from guest memory.
This reduces kvmclock difference on migration from 5s to 0.1s
(when max_downtime == 5s).
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
hw/i386/kvm/clock.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++--
include/hw/i386/pc.h | 5 ++
target-i386/kvm.c | 7 +++
target-i386/kvm_i386.h | 1
4 files changed, 98 insertions(+), 3 deletions(-)
Index: qemu-mig-advance-clock/hw/i386/kvm/clock.c
===================================================================
--- qemu-mig-advance-clock.orig/hw/i386/kvm/clock.c 2016-11-14 09:07:55.519856329 -0200
+++ qemu-mig-advance-clock/hw/i386/kvm/clock.c 2016-11-14 10:19:45.723254737 -0200
@@ -36,6 +36,12 @@
uint64_t clock;
bool clock_valid;
+
+ /* whether machine supports reliable KVM_GET_CLOCK */
+ bool mach_use_reliable_get_clock;
+
+ /* whether source host supported reliable KVM_GET_CLOCK */
+ bool src_use_reliable_get_clock;
} KVMClockState;
struct pvclock_vcpu_time_info {
@@ -91,15 +97,37 @@
if (running) {
struct kvm_clock_data data = {};
- uint64_t time_at_migration = kvmclock_current_nsec(s);
+ uint64_t time_at_migration = 0;
- s->clock_valid = false;
+ /* local (running VM) restore */
+ if (s->clock_valid) {
+ /*
+ * if host does not support reliable KVM_GET_CLOCK,
+ * read kvmclock value from memory
+ */
+ if (!kvm_has_adjust_clock_stable()) {
+ time_at_migration = kvmclock_current_nsec(s);
+ }
+ /* migration/savevm/init restore */
+ } else {
+ /*
+ * use s->clock in case machine uses reliable
+ * get clock and host where vm was executing
+ * supported reliable get clock
+ */
+ if (!s->mach_use_reliable_get_clock ||
+ !s->src_use_reliable_get_clock) {
+ time_at_migration = kvmclock_current_nsec(s);
+ }
+ }
- /* We can't rely on the migrated clock value, just discard it */
+ /* We can't rely on the saved clock value, just discard it */
if (time_at_migration) {
s->clock = time_at_migration;
}
+ s->clock_valid = false;
+
data.clock = s->clock;
ret = kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data);
if (ret < 0) {
@@ -152,22 +180,76 @@
qemu_add_vm_change_state_handler(kvmclock_vm_state_change, s);
}
+static bool kvmclock_src_use_reliable_get_clock(void *opaque)
+{
+ KVMClockState *s = opaque;
+
+ /*
+ * On machine types that support reliable KVM_GET_CLOCK,
+ * if host kernel does provide reliable KVM_GET_CLOCK,
+ * set src_use_reliable_get_clock=true so that destination
+ * avoids reading kvmclock from memory.
+ */
+ if (s->mach_use_reliable_get_clock && kvm_has_adjust_clock_stable()) {
+ s->src_use_reliable_get_clock = true;
+ }
+
+ return s->src_use_reliable_get_clock;
+}
+
+static const VMStateDescription kvmclock_reliable_get_clock = {
+ .name = "kvmclock/src_use_reliable_get_clock",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .needed = kvmclock_src_use_reliable_get_clock,
+ .fields = (VMStateField[]) {
+ VMSTATE_BOOL(src_use_reliable_get_clock, KVMClockState),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+static void kvmclock_pre_save(void *opaque)
+{
+ KVMClockState *s = opaque;
+ struct kvm_clock_data data;
+ int ret;
+
+ ret = kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, &data);
+ if (ret < 0) {
+ fprintf(stderr, "KVM_GET_CLOCK failed: %s\n", strerror(ret));
+ abort();
+ }
+ s->clock = data.clock;
+}
+
static const VMStateDescription kvmclock_vmsd = {
.name = "kvmclock",
.version_id = 1,
.minimum_version_id = 1,
+ .pre_save = kvmclock_pre_save,
.fields = (VMStateField[]) {
VMSTATE_UINT64(clock, KVMClockState),
VMSTATE_END_OF_LIST()
+ },
+ .subsections = (const VMStateDescription * []) {
+ &kvmclock_reliable_get_clock,
+ NULL
}
};
+static Property kvmclock_properties[] = {
+ DEFINE_PROP_BOOL("mach_use_reliable_get_clock", KVMClockState,
+ mach_use_reliable_get_clock, true),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void kvmclock_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = kvmclock_realize;
dc->vmsd = &kvmclock_vmsd;
+ dc->props = kvmclock_properties;
}
static const TypeInfo kvmclock_info = {
Index: qemu-mig-advance-clock/include/hw/i386/pc.h
===================================================================
--- qemu-mig-advance-clock.orig/include/hw/i386/pc.h 2016-11-14 09:07:55.519856329 -0200
+++ qemu-mig-advance-clock/include/hw/i386/pc.h 2016-11-14 09:11:47.112200123 -0200
@@ -370,6 +370,11 @@
#define PC_COMPAT_2_7 \
HW_COMPAT_2_7 \
{\
+ .driver = "kvmclock",\
+ .property = "mach_use_reliable_get_clock",\
+ .value = "off",\
+ },\
+ {\
.driver = TYPE_X86_CPU,\
.property = "l3-cache",\
.value = "off",\
Index: qemu-mig-advance-clock/target-i386/kvm.c
===================================================================
--- qemu-mig-advance-clock.orig/target-i386/kvm.c 2016-11-14 09:07:55.520856330 -0200
+++ qemu-mig-advance-clock/target-i386/kvm.c 2016-11-14 09:11:47.125200142 -0200
@@ -117,6 +117,13 @@
return kvm_check_extension(kvm_state, KVM_CAP_X86_SMM);
}
+bool kvm_has_adjust_clock_stable(void)
+{
+ int ret = kvm_check_extension(kvm_state, KVM_CAP_ADJUST_CLOCK);
+
+ return (ret == KVM_CLOCK_TSC_STABLE);
+}
+
bool kvm_allows_irq0_override(void)
{
return !kvm_irqchip_in_kernel() || kvm_has_gsi_routing();
Index: qemu-mig-advance-clock/target-i386/kvm_i386.h
===================================================================
--- qemu-mig-advance-clock.orig/target-i386/kvm_i386.h 2016-11-14 09:07:55.520856330 -0200
+++ qemu-mig-advance-clock/target-i386/kvm_i386.h 2016-11-14 09:11:47.125200142 -0200
@@ -17,6 +17,7 @@
bool kvm_allows_irq0_override(void);
bool kvm_has_smm(void);
+bool kvm_has_adjust_clock_stable(void);
void kvm_synchronize_all_tsc(void);
void kvm_arch_reset_vcpu(X86CPU *cs);
void kvm_arch_do_init_vcpu(X86CPU *cs);
^ permalink raw reply
* Re: [PATCH v7 2/2] media: Add a driver for the ov5645 camera sensor.
From: Laurent Pinchart @ 2016-11-14 12:38 UTC (permalink / raw)
To: Todor Tomov
Cc: robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak, mchehab,
hverkuil, geert, matrandg, sakari.ailus, linux-media
In-Reply-To: <1479119076-26363-3-git-send-email-todor.tomov@linaro.org>
Hi Todor,
Thank you for the patch.
On Monday 14 Nov 2016 12:24:36 Todor Tomov wrote:
> The ov5645 sensor from Omnivision supports up to 2592x1944
> and CSI2 interface.
>
> The driver adds support for the following modes:
> - 1280x960
> - 1920x1080
> - 2592x1944
>
> Output format is packed 8bit UYVY.
>
> Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
> ---
> drivers/media/i2c/Kconfig | 12 +
> drivers/media/i2c/Makefile | 1 +
> drivers/media/i2c/ov5645.c | 1352 +++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 1365 insertions(+)
> create mode 100644 drivers/media/i2c/ov5645.c
[snip]
> diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
> new file mode 100644
> index 0000000..2b33bc6
> --- /dev/null
> +++ b/drivers/media/i2c/ov5645.c
[snip]
> +static const struct ov5645_mode_info *
> +ov5645_find_nearest_mode(unsigned int width, unsigned int height)
> +{
> + unsigned int i;
> +
> + for (i = ARRAY_SIZE(ov5645_mode_info_data) - 1; i >= 0; i--) {
> + if (ov5645_mode_info_data[i].width <= width &&
> + ov5645_mode_info_data[i].height <= height)
> + break;
> + }
> +
> + if (i < 0)
i needs to be int for this condition to be true.
Apart from that,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> + i = 0;
> +
> + return &ov5645_mode_info_data[i];
> +}
--
Regards,
Laurent Pinchart
^ permalink raw reply
* [Qemu-devel] [PATCH] hw/misc/ivshmem:fix misconfig of not_legacy_32bit
From: Zhuangyanying @ 2016-11-14 12:35 UTC (permalink / raw)
To: pbonzini, armbru; +Cc: qemu-devel, arei.gonglei, weidong.huang, ZhuangYanying
From: ZhuangYanying <ann.zhuangyanying@huawei.com>
After "ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem", ivshmem_64bit renamed to not_legacy_32bit, and changed the implementation of this property.
Then use64 = not_legacy_32bit = 1, then PCI attribute configuration ~ PCI_BASE_ADDRESS_MEM_TYPE_64 (default for ivshmem), the actual use is the legacy model, can not support greater than or equal 1G mapping, which is the opposite of configuration requirements.
Signed-off-by: ann.zhuangyanying@huawei.com
---
Recently, I tested ivshmem, found that use64, that is not_legacy_32bit implementation is odd, or even the opposite.
Previous use64 = ivshmem_64bit = 1, then attr |= PCI_BASE_ADDRESS_MEM_TYPE_64, then ivshmem support 1G and above packaged into bar2, presented to the virtual machine.
But after "ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem", PCI_BASE_ADDRESS_MEM_TYPE_64 is configured while not_legacy_32bit = 0, that is the legacy model.
---
hw/misc/ivshmem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 230e51b..b71acf6 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -858,7 +858,7 @@ static void ivshmem_common_realize(PCIDevice *dev, Error **errp)
pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY,
&s->ivshmem_mmio);
- if (!s->not_legacy_32bit) {
+ if (s->not_legacy_32bit) {
attr |= PCI_BASE_ADDRESS_MEM_TYPE_64;
}
@@ -1033,6 +1033,7 @@ static const VMStateDescription ivshmem_plain_vmsd = {
static Property ivshmem_plain_properties[] = {
DEFINE_PROP_ON_OFF_AUTO("master", IVShmemState, master, ON_OFF_AUTO_OFF),
+ DEFINE_PROP_UINT32("use64", IVShmemState, not_legacy_32bit, 1),
DEFINE_PROP_END_OF_LIST(),
};
@@ -1107,6 +1108,7 @@ static Property ivshmem_doorbell_properties[] = {
DEFINE_PROP_BIT("ioeventfd", IVShmemState, features, IVSHMEM_IOEVENTFD,
true),
DEFINE_PROP_ON_OFF_AUTO("master", IVShmemState, master, ON_OFF_AUTO_OFF),
+ DEFINE_PROP_UINT32("use64", IVShmemState, not_legacy_32bit, 1),
DEFINE_PROP_END_OF_LIST(),
};
--
1.8.3.1
^ permalink raw reply related
* Re: working with a Tascam US-122mkII
From: Nicholas Bailey @ 2016-11-14 12:39 UTC (permalink / raw)
To: alsa-devel
In-Reply-To: <5d70e7e5-bb61-2574-b133-3864b913a629@orange.fr>
We have a bunch of US122 (originals) which stopped working in the manner you
describe several years ago. I made a half-hearted attempt to fix them at the
time involving git bisecting the kernel source, but it got very untidy. The
original developer isn't on the project any more? Not sure. Not having much
experience with the USB stack and less with the audio drivers, I ran out of
time and was forced to give up.
I did set undergraduate projects to fix this issue at BSc and MSc level, but
nobody would touch it. Which is sad. I spoke about it to some friends in CS,
but nothing happened.
I don't know if it's even the same bug but it sounds very similar. There were
also issues using the MIDI interface.
Nick/.
On Saturday, 12 November 2016 18:46:13 GMT Christian Quentin wrote:
> Hi all,
>
> I'm currently trying to use a Tascam US-122mkII sound card with Linux.
> I've made the following attempts:
>
> * with a Debian-Wheezy-based distro (called Tango Studio) which is
> stopped now => I can use the Tascam card
> * with a Debian-Jessie-based distro (called Librazik) which
> development is active => I cannot use the Tascam card
>
>
> I'm able to use the card with Tango Studio but I would prefer to use the
> Librazik as there's a community maintaining it.
>
> * In Debian Wheezy, the card is identified as US122L
> * In Debian Jessie, the card is identified as US122mkII which looks
> promising but it's not fully functional
>
>
>
> These are the steps we went through with the linuxmao.org team :
> == checking the kernel version ==
> ****************************************************************************
> ****** Debian Wheezy
> cat /proc/version
> ****************************************************************************
> ****** Linux version 3.2.0-4-realtime-amd64 (debian-kernel@lists.debian.org)
> (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP PREEMPT RT Debian
> 3.2.57-3+tstudio.2
>
> ****************************************************************************
> ****** Debian Jessie
> cat /proc/version
> ****************************************************************************
> ****** Linux version 4.6.0-1-lzk-bl-amd64 (debian-kernel@lists.debian.org)
> (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP PREEMPT Debian
> 4.6.2-2librazik1 (2016-06-29)
>
>
>
> == checking the sound card detected ==
>
> ****************************************************************************
> ****** Debian Wheezy
> cat /proc/asound/cards
> ****************************************************************************
> ****** 0 SB <http://linuxmao.org/SB>: HDA-Intel - HDA ATI SB
> HDA ATI SB at 0xfebfc000 irq 17
> 1 US122L <http://linuxmao.org/US122L>: USB US-122L - TASCAM US-122L
> TASCAM US-122L (644:8021 if 0 at 001/002)
>
> ****************************************************************************
> ****** Debian Jessie :
> cat /proc/asound/cards
> ****************************************************************************
> ****** 0 SB <http://linuxmao.org/SB>: HDA-Intel - HDA ATI SB
> HDA ATI SB at 0xfebfc000 irq 17
> 1 MKII <http://linuxmao.org/MKII>: USB-Audio - US122 MKII
> TASCAM US122 MKII at usb-0000:00:13.5-1, high speed
>
>
>
>
> == creating a ~/.asoundrc file ==
>
> I was instructed to create an .asoundrc file
>
> ****************************************************************************
> ******
>
> 1. got from http://www.nabble.com/tascam-us122l-and-ccrma-td24036395.html
> 2. thanks to Karsten
>
>
> 1. The usb_stream plugin configuration
>
>
> pcm.!usb_stream {
> @args CARD <http://linuxmao.org/CARD>
> @args.CARD {
> type string
> default "0"
> }
>
> type usb_stream
>
> card $CARD
> }
>
> ctl.!usb_stream {
> @args CARD <http://linuxmao.org/CARD>
> @args.CARD {
> type string
> default "0"
> }
>
> type hw
>
> card $CARD
> }
> ****************************************************************************
> ******
>
>
>
> == starting Jack server ==
> I'm using QjackCtl to start the Jack server with the following parameters:
>
> ****************************************************************************
> ****** Debian Wheezy
> QjackCtl -> Settings -> Parameters -> "Interface" : usb_stream:1
> ****************************************************************************
> ****** => Jack server starts OK
>
> ****************************************************************************
> ****** Debian Jessie
> QjackCtl -> Settings -> Parameters -> "Interface" : usb_stream:1
> ****************************************************************************
> ****** => Jack server does not start
> I've tried to remove the .asoundrc : Jack server does not start either
>
> ****************************************************************************
> ****** Debian Jessie
> QjackCtl -> Settings -> Parameters -> "Interface" : hw:MKII US122 MKII
> (hw:1)
> (this value is already in the drop-down list of interfaces
> ****************************************************************************
> ****** => Jack server starts with the following message :
>
> ****************************************************************************
> ****** hw:MKII|hw:MKII|1024|2|48000|0|0|nomon|swmeter|-|32bit
> ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to
> playback-only mode
> ****************************************************************************
> ******
>
> The result is I can use the sound card to play sounds but cannot get any
> input from it (I'm trying to get MIDI events)
>
>
> The linuxmao.org team thinks there might be a change in the ALSA driver
> in the latest releases.
> What do you think?
>
> Thanks for your help
>
> Christian
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply
* Re: [meta-browser] Chromium crash start the test www.html5test.com
From: Flavio Suligoi @ 2016-11-14 12:39 UTC (permalink / raw)
To: openembedded-devel@lists.openembedded.org
In-Reply-To: <e9a8aedbf732444598e003ce0c553ab9@XCH-ALN-008.cisco.com>
Hi Julien,
I have two recurring errors.
The first one:
imx6dl:~# export DISPLAY=:0.0
imx6dl:~# google-chrome
[837:837:1114/133445:ERROR:sandbox_linux.cc(338)] InitializeSandbox() called with multiple threads in process gpu-process
[811:811:1114/133447:ERROR:surface_display_output_surface.cc(100)] Not implemented reached in virtual void cc::SurfaceDisplayOutputSurface::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
[811:811:1114/133451:ERROR:surface_display_output_surface.cc(100)] Not implemented reached in virtual void cc::SurfaceDisplayOutputSurface::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
[811:811:1114/133451:ERROR:delegated_frame_host.cc(543)] Not implemented reached in virtual void content::DelegatedFrameHost::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
[811:811:1114/133451:ERROR:delegated_frame_host.cc(543)] Not implemented reached in virtual void content::DelegatedFrameHost::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
[811:811:1114/133451:ERROR:delegated_frame_host.cc(543)] Not implemented reached in virtual void content::DelegatedFrameHost::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
/usr/bin/google-chrome: line 11: 811 Segmentation fault /usr/bin/chromium/chrome ${CHROME_EXTRA_ARGS} $@
imx6dl:~#
The second one, cause by a big alloc of over 1.5 GBytes of RAM (my board has 1GB of RAM):
imx6dl:~# export DISPLAY=:0.0
imx6dl:~# google-chrome www.google.com
[933:933:1114/133638:ERROR:sandbox_linux.cc(338)] InitializeSandbox() called with multiple threads in process gpu-process
[907:907:1114/133639:ERROR:surface_display_output_surface.cc(100)] Not implemented reached in virtual void cc::SurfaceDisplayOutputSurface::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
[907:907:1114/133639:ERROR:delegated_frame_host.cc(543)] Not implemented reached in virtual void content::DelegatedFrameHost::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
[907:907:1114/133639:ERROR:delegated_frame_host.cc(543)] Not implemented reached in virtual void content::DelegatedFrameHost::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
[907:907:1114/133649:ERROR:delegated_frame_host.cc(543)] Not implemented reached in virtual void content::DelegatedFrameHost::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
[907:907:1114/133650:ERROR:delegated_frame_host.cc(543)] Not implemented reached in virtual void content::DelegatedFrameHost::SetBeginFrameSource(cc::SurfaceId, cc::BeginFrameSource*)
tcmalloc: large alloc 1518362624 bytes == (nil) @
[907:923:1114/133650:FATAL:memory_linux.cc(43)] Out of memory.
#0 0x00005524ab52 <unknown>
#1 0x00005525a4fa <unknown>
#2 0x000055268096 <unknown>
#3 0x0000580ecdb6 tc_newarray
#4 0x0000555440be <unknown>
#5 0x000055544144 <unknown>
#6 0x000056c213d8 <unknown>
#7 0x000056c84b72 <unknown>
#8 0x000056c84f1a <unknown>
#9 0x000056c9078e <unknown>
#10 0x000056d3411a <unknown>
#11 0x000056c8ca30 <unknown>
#12 0x000056c94ee8 <unknown>
#13 0x000056c8e5ae <unknown>
#14 0x000056c8f1aa <unknown>
#15 0x00005528e182 <unknown>
#16 0x00005525e24a <unknown>
#17 0x00005525e7ca <unknown>
#18 0x00005525ea9c <unknown>
#19 0x00005525fdac <unknown>
#20 0x00005526bb34 <unknown>
#21 0x00005525dbcc <unknown>
#22 0x00005527b58c <unknown>
#23 0x0000552790aa <unknown>
/usr/bin/google-chrome: line 11: 907 Aborted /usr/bin/chromium/chrome ${CHROME_EXTRA_ARGS} $@
rt40-imx6dl:~#
________________________________________
Da: openembedded-devel-bounces@lists.openembedded.org [openembedded-devel-bounces@lists.openembedded.org] per conto di Julien Brianceau (jbriance) [jbriance@cisco.com]
Inviato: lunedì 14 novembre 2016 12.50
A: openembedded-devel@lists.openembedded.org
Oggetto: Re: [oe] [meta-browser] Chromium crash start the test www.html5test.com
Hi,
Do you have a callstack or any debug information about this crash ?
Julien
-----Original Message-----
From: openembedded-devel-bounces@lists.openembedded.org [mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of Flavio Suligoi
Sent: vendredi 11 novembre 2016 12:18
To: openembedded-devel@lists.openembedded.org
Subject: [oe] [meta-browser] Chromium crash start the test www.html5test.com
Hi all,
I'm using Yocto 2.1 Krogoth, with an i.MX6DL (DualLite) board and the meta-browser layer.
The chromium version is the classic" 48.0.2548.0.
To call the executable I use the switches:
* --use-gl=egl
* --gpu-no-context-lost
* --ignore-gpu-blacklist
* --user-data-dir=/home/root/.chromium/
I use chromium in kiosk mode, with the web address directly written on the command line.
This because chromium, when more than one tab is opened, always crashes.
Anyway, when I try to test the HTML5 compatibility using the website "www.html5test.com<http://www.html5test.com>" , chromium crashes immediately, after downloading the html5 code, even before starting the test.
Do you have any solution/patch to solve this problem?
Best regards,
Flavio
P.S.: html5test is a very used and common html5 test and I have to use it to check the html5 compatibility of my board.
--
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
^ permalink raw reply
* [bug report] qed: Add support for memory registeration verbs
From: Dan Carpenter @ 2016-11-14 12:43 UTC (permalink / raw)
To: kernel-janitors
Hello Ram Amrani,
The patch ee8eaea30b13: "qed: Add support for memory registeration
verbs" from Oct 1, 2016, leads to the following static checker
warning:
drivers/net/ethernet/qlogic/qed/qed_roce.c:2354 qed_rdma_register_tid()
error: uninitialized symbol 'fw_return_code'.
drivers/net/ethernet/qlogic/qed/qed_roce.c
2343 /* DIF */
2344 if (params->dif_enabled) {
2345 SET_FIELD(p_ramrod->flags2,
2346 RDMA_REGISTER_TID_RAMROD_DATA_DIF_ON_HOST_FLG, 1);
2347 DMA_REGPAIR_LE(p_ramrod->dif_error_addr,
2348 params->dif_error_addr);
2349 DMA_REGPAIR_LE(p_ramrod->dif_runt_addr, params->dif_runt_addr);
2350 }
2351
2352 rc = qed_spq_post(p_hwfn, p_ent, &fw_return_code);
2353
2354 if (fw_return_code != RDMA_RETURN_OK) {
This basically works even when rc is a negative error code and
fw_return_code is uninitialized but hella nasty.
2355 DP_NOTICE(p_hwfn, "fw_return_code = %d\n", fw_return_code);
2356 return -EINVAL;
2357 }
2358
2359 DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Register TID, rc = %d\n", rc);
2360 return rc;
2361 }
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH v3] Idleness DRRS test
From: Petri Latvala @ 2016-11-14 12:44 UTC (permalink / raw)
To: chris
Cc: daniel.vetter, intel-gfx, Nautiyal Ankit, paulo.r.zanoni,
rodrigo.vivi
In-Reply-To: <1477021933-3229-1-git-send-email-ankit.k.nautiyal@intel.com>
Chris, happy with this revision?
On Fri, Oct 21, 2016 at 09:22:13AM +0530, Nautiyal Ankit wrote:
> From: Ramalingam C <ramalingam.c@intel.com>
>
> Idleness DRRS:
> By default the DRRS state will be at DRRS_HIGH_RR. When a Display
> content is Idle for more than 1Sec Idleness will be declared and
> DRRS_LOW_RR will be invoked, changing the refresh rate to the
> lower most refresh rate supported by the panel. As soon as there
> is a display content change there will be a DRRS state transition
> as DRRS_LOW_RR--> DRRS_HIGH_RR, changing the refresh rate to the
> highest refresh rate supported by the panel.
>
> To test this, Idleness DRRS IGT will probe the DRRS state at below
> instances and compare with the expected state.
>
> Instance Expected State
> 1. Immediately after rendering the still image DRRS_HIGH_RR
> 2. After a delay of 1.2Sec DRRS_LOW_RR
> 3. After changing the frame buffer DRRS_HIGH_RR
> 4. After a delay of 1.2Sec DRRS_LOW_RR
> 5. After changing the frame buffer DRRS_HIGH_RR
> 6. After a delay of 1.2Sec DRRS_LOW_RR
>
> The test checks the driver DRRS state from the debugfs entry. To check the
> actual refresh-rate, a separate thread counts the number of vblanks
> received per sec. The refresh-rate calculated is checked against the
> expected refresh-rate with a tolerance value of 2.
>
> This patch is a continuation of the earlier work
> https://patchwork.freedesktop.org/patch/45472/ towards igt for idleness
>
> DRRS. The code is tested on Broxton BXT_T platform.
>
> v2: Addressed the comments and suggestions from Vlad, Marius.
> The signoff details from the earlier work are also included.
>
> v3: Modified vblank rate calculation by using reply-sequence, provided by
> drmWaitVBlank, as suggested by Chris Wilson.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
> Signed-off-by: aknautiy <ankit.k.nautiyal@intel.com>
> ---
> tests/Makefile.sources | 1 +
> tests/kms_drrs.c | 599 +++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 600 insertions(+)
> create mode 100644 tests/kms_drrs.c
>
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index a837977..5f31521 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -91,6 +91,7 @@ TESTS_progs_M = \
> kms_cursor_crc \
> kms_cursor_legacy \
> kms_draw_crc \
> + kms_drrs \
> kms_fbc_crc \
> kms_fbcon_fbt \
> kms_flip \
> diff --git a/tests/kms_drrs.c b/tests/kms_drrs.c
> new file mode 100644
> index 0000000..bd5a135
> --- /dev/null
> +++ b/tests/kms_drrs.c
> @@ -0,0 +1,599 @@
> +/*
> + * Copyright © 2016 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + */
> +
> +#include "drmtest.h"
> +#include "igt_debugfs.h"
> +#include "igt_kms.h"
> +#include "intel_chipset.h"
> +#include "intel_batchbuffer.h"
> +#include "ioctl_wrappers.h"
> +#include <time.h>
> +#include <pthread.h>
> +#include <stdlib.h>
> +#include <sys/time.h>
> +IGT_TEST_DESCRIPTION(
> +"Performs write operations and then waits for DRRS to invoke the"
> +"Low Refresh Rate and then disturbs the contents of the screen once"
> +"again hence DRRS revert back to High Refresh Rate(Default).");
> +
> +#define DRRS_STATUS_BYTES_CNT 1000
> +#define SET 1
> +#define RESET 0
> +
> +/*
> + * Structure to store data to create 2 framebuffers, fb[0] and fb[1] on a given
> + * display. To disturb the content of the screen, we replace fb[0] by fb[1] and
> + * vice versa.
> + */
> +typedef struct {
> + int drm_fd;
> + uint32_t devid;
> + uint32_t handle[2];
> + igt_display_t display;
> + igt_output_t *output;
> + enum pipe pipe;
> + igt_plane_t *primary;
> + struct igt_fb fb[2];
> + uint32_t fb_id[2];
> +} data_t;
> +
> +/*
> + * Structure to count vblank and note the starting time of the counter
> + */
> +typedef struct {
> + unsigned int vbl_count;
> + struct timeval start;
> +} vbl_info;
> +
> +/*
> + * Condition variables,mutex, and shared variables for thread synchronization
> + */
> +pthread_mutex_t rr_mutex;
> +pthread_cond_t cv_rr_calc_requested;
> +pthread_cond_t cv_rr_calc_completed;
> +int rr_calc_requested = RESET;
> +int rr_calc_completed = RESET;
> +int thread_flag = SET;
> +int refresh_rate_shared = -1;
> +
> +/*
> + * Structure for refresh rate type
> + */
> +typedef struct{
> + int rate;
> + const char *name;
> +} refresh_rate_t;
> +
> +static inline uint32_t pipe_select(int pipe)
> +{
> + if (pipe > 1)
> + return pipe << DRM_VBLANK_HIGH_CRTC_SHIFT;
> + else if (pipe > 0)
> + return DRM_VBLANK_SECONDARY;
> + else
> + return 0;
> +}
> +
> +/*
> + * igt_millisec_elapsed:
> + * Calculates the no. of millisec elapsed since timeval start
> + */
> +static double igt_millisec_elapsed(const struct timeval *start)
> +{
> + struct timeval curr;
> + double res;
> +
> + gettimeofday(&curr, NULL);
> + return (1e6*(curr.tv_sec - start->tv_sec) +
> + (curr.tv_usec - start->tv_usec)/1000.00);
> +}
> +
> +/*
> + * read_drrs_status :
> + * Func to read the DRRS status from debugfs
> + */
> +static bool read_drrs_status(char *str)
> +{
> + FILE *status;
> + int cnt;
> +
> + status = igt_debugfs_fopen("i915_drrs_status", "r");
> + igt_assert(status);
> +
> + cnt = fread(str, DRRS_STATUS_BYTES_CNT - 1, 1, status);
> + if (!cnt) {
> + if (!feof(status)) {
> + igt_info("ERROR: %d at fread\n", ferror(status));
> + return false;
> + }
> + clearerr(status);
> + }
> + fclose(status);
> + return true;
> +}
> +
> +/*
> + * is_drrs_supported :
> + * Func to check for DRRS support
> + */
> +static bool is_drrs_supported(void)
> +{
> + char str[DRRS_STATUS_BYTES_CNT] = {};
> +
> + if (!read_drrs_status(str)) {
> + igt_info("ERROR: Debugfs read FAILED\n");
> + return false;
> + }
> + return strstr(str, "DRRS Supported: Yes") != NULL;
> +}
> +
> +/*
> + * is_drrs_enabled :
> + * Func to check if DRRS is enabled by driver
> + */
> +static bool is_drrs_enabled(void)
> +{
> + char str[DRRS_STATUS_BYTES_CNT] = {};
> +
> + if (!read_drrs_status(str)) {
> + igt_info("ERROR: Debugfs read FAILED\n");
> + return false;
> + }
> + return strstr(str, "Idleness DRRS: Disabled") == NULL;
> +}
> +
> +/*
> + * prepare_crtc :
> + * Func to prepare crtc for the given display
> + */
> +static bool prepare_crtc(data_t *data)
> +{
> + if (data == NULL)
> + return false;
> +
> + igt_display_t *display = &data->display;
> + igt_output_t *output = data->output;
> +
> + /* select the pipe we want to use */
> + igt_output_set_pipe(output, data->pipe);
> + igt_display_commit(display);
> +
> + if (!output->valid) {
> + igt_output_set_pipe(output, PIPE_ANY);
> + igt_display_commit(display);
> + return false;
> + }
> +
> + return true;
> +}
> +/*
> + * vbl_rate :
> + * calculates the vblank rate by counting vblanks between start and end
> + * period, divided by time between start and end.
> + */
> +static double vbl_rate(const union drm_wait_vblank *start,
> + const union drm_wait_vblank *end) {
> + double s, e;
> +
> + s = start->reply.tval_sec + 1e-6 * start->reply.tval_usec;
> + e = end->reply.tval_sec + 1e-6 * end->reply.tval_usec;
> + return ((end->reply.sequence - start->reply.sequence) / (e - s));
> +}
> +
> +/*
> + * calculate_refresh_rate :
> + * Func to calculate the refresh rate by counting
> + * vblanks in 1 sec (1000 ms). It returns the calculated refresh rate on
> + * success. Returns -1 in case of error.
> + */
> +int calculate_refresh_rate(data_t *data)
> +{
> +#define PERIOD_MS 1000
> + union drm_wait_vblank start, end;
> + struct timeval start_tv;
> +
> + memset(&start, 0, sizeof(start));
> + start.request.type = DRM_VBLANK_RELATIVE | pipe_select(data->pipe);
> + if (drmWaitVBlank(data->drm_fd, &start) != 0) {
> + igt_info("ERROR : drmWaitVBlank Failed!\n");
> + return -1;
> + }
> + gettimeofday(&start_tv, NULL);
> + while (igt_millisec_elapsed(&start_tv) < PERIOD_MS) {
> + memset(&end, 0, sizeof(end));
> + end.request.type = DRM_VBLANK_RELATIVE |
> + pipe_select(data->pipe);
> + end.request.sequence = 1;
> + if (drmWaitVBlank(data->drm_fd, &end) != 0) {
> + igt_info("ERROR : drmWaitVBlank Failed!\n");
> + return -1;
> + }
> + }
> + return vbl_rate(&start, &end);
> +}
> +
> +/*
> + * worker_thread_func :
> + * Func which is run by a worker thread to calculate the refresh_rate,
> + * when signalled by the master thread.
> + */
> +void *worker_thread_func(void *ptr)
> +{
> + data_t *data = (data_t *) ptr;
> +
> + while (1) {
> + int refresh_rate = 0;
> + /*wait for signal from master*/
> + pthread_mutex_lock(&rr_mutex);
> + while (!rr_calc_requested)
> + pthread_cond_wait(&cv_rr_calc_requested, &rr_mutex);
> +
> + /* checkpoint for thread termination */
> + if (thread_flag == RESET) {
> + pthread_mutex_unlock(&rr_mutex);
> + pthread_exit(NULL);
> + }
> + rr_calc_requested = RESET;
> + pthread_mutex_unlock(&rr_mutex);
> + /*calculate refresh_rate*/
> + refresh_rate = calculate_refresh_rate(data);
> +
> + /* signal the master */
> + pthread_mutex_lock(&rr_mutex);
> + refresh_rate_shared = refresh_rate;
> + rr_calc_completed = SET;
> + pthread_mutex_unlock(&rr_mutex);
> + pthread_cond_signal(&cv_rr_calc_completed);
> + }
> + return NULL;
> +}
> +
> +/*
> + * check_refresh_rate :
> + * Func to check the refresh rate calculated, against the expected refresh
> + * rate. It signals the worker thread to calculate the refresh-
> + * rate, and checks if the correct refresh rate is switched.
> + * Returns 0 in case of pass , 1 in case of failure, and -1 for error.
> + */
> +
> +static int check_refresh_rate(data_t *data, refresh_rate_t *expected_rr)
> +{
> +/*
> + * The calculated refresh-rate is an approximation to estimated refresh-rate.
> + * The tolerance threshold for the difference is set to 2. Difference more than
> + * 2 is considered as failure for the check_refresh_rate.
> + */
> +#define TOLERANCE_THRESHOLD 2
> + int refresh_rate = -1;
> + char drrs_status[DRRS_STATUS_BYTES_CNT] = {};
> +
> + /* Signal worker thread to calculate refresh rate */
> + pthread_mutex_lock(&rr_mutex);
> + rr_calc_requested = SET;
> + pthread_mutex_unlock(&rr_mutex);
> + pthread_cond_signal(&cv_rr_calc_requested);
> +
> + /* Get the DRRS Status from the debugfs entry */
> + if (!read_drrs_status(drrs_status)) {
> + igt_info("ERROR : DRRS debugfs read FAILED\n");
> + return -1;
> + }
> + /* Wait for the refresh rate calculator thread */
> + pthread_mutex_lock(&rr_mutex);
> + while (!rr_calc_completed)
> + pthread_cond_wait(&cv_rr_calc_completed, &rr_mutex);
> + rr_calc_completed = RESET;
> + refresh_rate = refresh_rate_shared;
> + pthread_mutex_unlock(&rr_mutex);
> + if (refresh_rate < 0) {
> + igt_info("ERROR : Refresh rate calculation FAILED\n");
> + return -1;
> + }
> + igt_info("INFO : Actual Refresh_rate based on Vblank Counts/sec = %d\n"
> + , refresh_rate);
> +
> + /* Compare with Expected Refresh Rate*/
> + igt_info("INFO: Expected Refresh-Rate %d\n", expected_rr->rate);
> + if (strstr(drrs_status, expected_rr->name) != NULL
> + && abs(refresh_rate - expected_rr->rate) <= TOLERANCE_THRESHOLD) {
> + igt_info("INFO: Expected %s : PASSED\n", expected_rr->name);
> + return 0;
> + }
> +
> + igt_info("INFO : Expected %s : FAILED.\n", expected_rr->name);
> + return 1;
> +}
> +
> +/*
> + * clean_up :
> + * Func to stop the worker thread and destroy thread syncronization
> + * structures.
> + */
> +void clean_up(pthread_t rr_thread)
> +{
> + /* Stop the worker thread */
> + pthread_mutex_lock(&rr_mutex);
> + thread_flag = RESET;
> + rr_calc_requested = SET;
> + pthread_mutex_unlock(&rr_mutex);
> + pthread_cond_signal(&cv_rr_calc_requested);
> + pthread_join(rr_thread, NULL);
> +
> + /* destroy the condition variables and mutex */
> + pthread_cond_destroy(&cv_rr_calc_requested);
> + pthread_cond_destroy(&cv_rr_calc_completed);
> + pthread_mutex_destroy(&rr_mutex);
> +}
> +
> +/*
> + * execute_test:
> + * This function
> + * 1. Initializes the thread sync structures.
> + * 2. Creates a worker thread which can be signaled to estimate
> + * the refresh rates based on counting vblanks per sec.
> + * 3. Creates two different Framebuffer fb0, fb1
> + * and apply them in the interval of 1.2Sec. So between FB change
> + * DRRS should toggle from DRRS_HIGH_RR -> DRRS_LOW_RR.
> + * And on next FB change DRRS_LOW_RR -> DRRS_HIGH_RR.
> + *
> + * These expected transitions are verified using the kernel debugfs
> + * and the refresh-rate, calculated by counting vblanks per sec by the
> + * worker thread.
> + */
> +static int execute_test(data_t *data)
> +{
> + igt_display_t *display = &data->display;
> + igt_output_t *output = data->output;
> + drmModeModeInfo *mode, *supported_modes;
> + int test_failed = 0;
> + int ret, i, count_modes;
> + refresh_rate_t high_rr, low_rr;
> + pthread_t rr_thread;
> +
> + /*initialize the condition variables and mutex*/
> + pthread_cond_init(&cv_rr_calc_requested, NULL);
> + pthread_cond_init(&cv_rr_calc_completed, NULL);
> + pthread_mutex_init(&rr_mutex, NULL);
> + thread_flag = SET;
> + rr_calc_requested = RESET;
> + rr_calc_completed = RESET;
> + /* create a thread for calculating the refresh rate */
> + ret = pthread_create(&rr_thread, NULL, worker_thread_func,
> + (void *) data);
> + if (ret == -1) {
> + igt_info("ERROR : Refresh rate thread creation FAILED\n");
> + clean_up(rr_thread);
> + return -1;
> + }
> +
> + high_rr.name = "DRRS_HIGH_RR";
> + high_rr.rate = 0;
> + low_rr.name = "DRRS_LOW_RR";
> + low_rr.rate = 0;
> + /* get the max and min supported refresh rates for the display */
> + supported_modes = output->config.connector->modes;
> + count_modes = output->config.connector->count_modes;
> + /* minimum 2 modes are required for DRRS */
> + if (count_modes < 2) {
> + igt_info("ERROR: Minimum 2 modes required for DRRS\n");
> + return -1;
> + }
> + for (i = 0; i < count_modes; i++) {
> + int rr = supported_modes[i].vrefresh;
> +
> + if (i == 0) {
> + high_rr.rate = low_rr.rate = rr;
> + continue;
> + }
> + if (high_rr.rate < rr)
> + high_rr.rate = rr;
> + if (low_rr.rate > rr)
> + low_rr.rate = rr;
> + }
> + data->primary = igt_output_get_plane(data->output, IGT_PLANE_PRIMARY);
> + mode = igt_output_get_mode(data->output);
> + data->fb_id[0] = igt_create_color_fb(data->drm_fd, mode->hdisplay,
> + mode->vdisplay,
> + DRM_FORMAT_XRGB8888,
> + LOCAL_DRM_FORMAT_MOD_NONE,
> + 0.0, 100.1, 0.0, &data->fb[0]);
> + igt_assert(data->fb_id[0]);
> + data->fb_id[1] = igt_create_color_fb(data->drm_fd, mode->hdisplay,
> + mode->vdisplay,
> + DRM_FORMAT_XRGB8888,
> + LOCAL_DRM_FORMAT_MOD_NONE,
> + 100.1, 0.0, 0.0,
> + &data->fb[1]);
> + igt_assert(data->fb_id[1]);
> +
> + data->handle[0] = data->fb[0].gem_handle;
> + data->handle[1] = data->fb[1].gem_handle;
> +
> + /* scanout = fb[1] */
> + igt_plane_set_fb(data->primary, &data->fb[1]);
> + igt_display_commit(display);
> + if (!is_drrs_enabled()) {
> + igt_info("INFO : DRRS not enabled\n");
> + igt_plane_set_fb(data->primary, NULL);
> + igt_output_set_pipe(output, PIPE_ANY);
> + igt_display_commit(display);
> + igt_remove_fb(data->drm_fd, &data->fb[0]);
> + igt_remove_fb(data->drm_fd, &data->fb[1]);
> + clean_up(rr_thread);
> + return -1;
> + }
> +
> + /* expecting High RR */
> + ret = check_refresh_rate(data, &high_rr);
> + if (ret == -1)
> + return -1;
> + if (ret == 1)
> + test_failed = 1;
> + /* 1.2Sec to Enter the Idleness and check for Low Refresh Rate */
> + usleep(1200000);
> + ret = check_refresh_rate(data, &low_rr);
> + if (ret == -1)
> + return -1;
> + if (ret == 1)
> + test_failed = 1;
> +
> + /* scanout = fb[0] and check for High Refresh Rate*/
> + igt_plane_set_fb(data->primary, &data->fb[0]);
> + igt_display_commit(display);
> + ret = check_refresh_rate(data, &high_rr);
> + if (ret == -1)
> + return -1;
> + if (ret == 1)
> + test_failed = 1;
> +
> + /* 1.2Sec to Enter the Idleness and check for Low Refresh Rate */
> + usleep(1200000);
> + ret = check_refresh_rate(data, &low_rr);
> + if (ret == -1)
> + return -1;
> + if (ret == 1)
> + test_failed = 1;
> +
> + /* scanout = fb[1] and check for High Refresh Rate*/
> + igt_plane_set_fb(data->primary, &data->fb[1]);
> + igt_display_commit(display);
> + ret = check_refresh_rate(data, &high_rr);
> + if (ret == -1)
> + return -1;
> + if (ret == 1)
> + test_failed = 1;
> +
> + /* 1.2Sec to Enter the Idleness */
> + usleep(1200000);
> + ret = check_refresh_rate(data, &low_rr);
> + if (ret == -1)
> + return -1;
> + if (ret == 1)
> + test_failed = 1;
> +
> + clean_up(rr_thread);
> + return test_failed;
> +}
> +
> +/*
> + * finish_crtc :
> + * Func to free the framebuffers after the test completion.
> + */
> +static void finish_crtc(data_t *data)
> +{
> + igt_plane_set_fb(data->primary, NULL);
> + igt_output_set_pipe(data->output, PIPE_ANY);
> + igt_display_commit(&data->display);
> +
> + igt_remove_fb(data->drm_fd, &data->fb[0]);
> + igt_remove_fb(data->drm_fd, &data->fb[1]);
> +}
> +
> +/*
> + * reset_display :
> + * Func to reset the display structures after the test completion.
> + */
> +static void reset_display(data_t *data)
> +{
> + igt_display_t *display = &data->display;
> +
> + for_each_connected_output(display, data->output) {
> + if (data->output->valid) {
> + data->primary = igt_output_get_plane(data->output,
> + IGT_PLANE_PRIMARY);
> + igt_plane_set_fb(data->primary, NULL);
> + }
> + igt_output_set_pipe(data->output, PIPE_ANY);
> + }
> +}
> +/*
> + * run_test :
> + * Func to run the test for the eDP display.
> + */
> +static void run_test(data_t *data)
> +{
> + igt_display_t *display = &data->display;
> + int ret;
> +
> + reset_display(data);
> + /* Check for eDP Connector on PIPE A ,as eDP goes normally on PIPE_A */
> + for_each_connected_output(display, data->output) {
> + drmModeConnectorPtr c = data->output->config.connector;
> +
> + if (c->connector_type != DRM_MODE_CONNECTOR_eDP ||
> + c->connection != DRM_MODE_CONNECTED)
> + continue;
> + data->pipe = PIPE_A;
> + igt_assert_f(prepare_crtc(data), "Failed to prepare CRTC\n");
> + igt_info("INFO : Beginning %s on pipe %s,connector %s\n",
> + igt_test_name(),
> + kmstest_pipe_name(data->pipe),
> + igt_output_name(data->output));
> +
> + ret = execute_test(data);
> + igt_skip_on_f(ret == -1,
> + "INFO :%s on pipe %s, connector %s:SKIPPED\n",
> + igt_test_name(),
> + kmstest_pipe_name(data->pipe),
> + igt_output_name(data->output));
> + igt_fail_on_f(ret == 1,
> + "INFO :%s on pipe %s, connector %s:FAILED\n",
> + igt_test_name(),
> + kmstest_pipe_name(data->pipe),
> + igt_output_name(data->output));
> +
> + igt_assert_f(ret == 0,
> + "INFO :%s on pipe %s, connector %s: PASSED\n",
> + igt_test_name(),
> + kmstest_pipe_name(data->pipe),
> + igt_output_name(data->output));
> +
> + finish_crtc(data);
> + }
> +}
> +
> +igt_simple_main
> +{
> + data_t data = {};
> +
> + igt_skip_on_simulation();
> + data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + if (data.drm_fd == -1) {
> + igt_info("ERROR : invalid fd\n");
> + return;
> + }
> + data.devid = intel_get_drm_devid(data.drm_fd);
> + if (data.devid < 0) {
> + igt_info("ERROR : invalid dev id\n");
> + return;
> + }
> + /* Check if the DRRS is supported.
> + * If yes call the Idleness DRRS test
> + */
> + igt_require_f(is_drrs_supported(),
> + "DRRS not supported:check VBT/panel caps\n");
> + igt_display_init(&data.display, data.drm_fd);
> + run_test(&data);
> + igt_display_fini(&data.display);
> +}
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH 05/10] rt2800: make ba_size depend on ampdu_factor
From: Stanislaw Gruszka @ 2016-11-14 12:43 UTC (permalink / raw)
To: Mathias Kresin; +Cc: linux-wireless, Helmut Schaa, Felix Fietkau
In-Reply-To: <20161114084536.GB12372@redhat.com>
On Mon, Nov 14, 2016 at 09:45:36AM +0100, Stanislaw Gruszka wrote:
> Could you check below patch and see if it helps? If it does not,
> could you printk sta->ht_cap.ampdu_density and ba_size values
> and provide them here.
Actually please print parameters from below patch. I think ba_size
should be based on per TID buf_size instead of ampdu_factor, in case
STA has buf size different for some TIDs.
Also adding Felix to cc since my orginal patch:
http://marc.info/?l=linux-wireless&m=147809595316289&w=2
was shamelessly stolen from mt76 driver. Perhaps Felix could provide
us some expertise.
Thanks
Stanislaw
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index 2515702..35bc38c 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -7950,6 +7950,8 @@ int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct rt2x00_sta *sta_priv = (struct rt2x00_sta *)sta->drv_priv;
int ret = 0;
+ printk("action %d sta %pM tid %u buf_size %u ampdu_factor %u\n", params->action, sta->addr, params->tid, params->buf_size, sta->ht_cap.ampdu_factor);
+
/*
* Don't allow aggregation for stations the hardware isn't aware
* of because tx status reports for frames to an unknown station
^ permalink raw reply related
* Re: [PATCH] powerpc: fpr save/restore function cleanups
From: Michael Ellerman @ 2016-11-14 12:44 UTC (permalink / raw)
To: Nicholas Piggin, linuxppc-dev; +Cc: Stephen Rothwell, Alan Modra
In-Reply-To: <20161101161828.6075f836@roar.ozlabs.ibm.com>
Nicholas Piggin <npiggin@gmail.com> writes:
> On Tue, 1 Nov 2016 15:41:12 +1100
> Nicholas Piggin <npiggin@gmail.com> wrote:
>
>> On Tue, 1 Nov 2016 15:22:19 +1100
>> Nicholas Piggin <npiggin@gmail.com> wrote:
>>
>> > The powerpc64 linker generates fpr save/restore functions on-demand,
>> > placing them in the .sfpr section. So remove the explicitly coded ones
>> > from the 64 build.
>> >
>> > Have 32-bit put save/restore functions into .sfpr section rather than
>> > .text, to match 64-bit.
>> >
>> > And explicitly have the linker script place the section rather than
>> > leaving it as orphan.
>> >
>> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>> > ---
>> >
>> > I tested this with 64-bit optimize-for-size build with modules,
>> > and that works okay.
>>
>> No I didn't, it's broken. I'll send an update shortly.
>
> Working (hopefully) patch this time. I also removed the 32-bit changes
> which aren't really necessary:
>
> The powerpc64 linker generates fpr save/restore functions on-demand,
> placing them in the .sfpr section. Module linking (because it's a
> "non-final" link) requires --save-restore-funcs for this.
>
> Remove the explicitly coded save/restore functions from the 64 build.
>
> And explicitly have the linker script place the section rather than
> leaving it as orphan.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> arch/powerpc/Makefile | 4 +
> arch/powerpc/boot/Makefile | 3 +-
> arch/powerpc/boot/crtsavres.S | 8 +-
> arch/powerpc/kernel/vmlinux.lds.S | 6 +
> arch/powerpc/lib/Makefile | 5 +-
> arch/powerpc/lib/crtsavres.S | 238 +-------------------------------------
> 6 files changed, 22 insertions(+), 242 deletions(-)
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index fe76cfe..8ea7c9e 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -179,7 +179,11 @@ else
> CHECKFLAGS += -D__LITTLE_ENDIAN__
> endif
>
> +ifeq ($(CONFIG_PPC32),y)
> KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
> +else
> +KBUILD_LDFLAGS_MODULE += --save-restore-funcs
As discussed offline, this option is reasonably new, added in 2014 and
appearing in binutils 2.25.
So it's too new to require, we can use it if it's there, but we still
need a fallback for when it's not.
cheers
^ permalink raw reply
* RE: [PATCH v2 3/3] mwifiex: Enable WoWLAN for both sdio and pcie
From: Amitkumar Karwar @ 2016-11-14 12:45 UTC (permalink / raw)
To: Brian Norris
Cc: linux-wireless@vger.kernel.org, Cathy Luo, Nishant Sarmukadam,
rajatja@google.com, dmitry.torokhov@gmail.com
In-Reply-To: <20161111204235.GB111624@google.com>
Hi Brian,
> From: Brian Norris [mailto:briannorris@chromium.org]
> Sent: Saturday, November 12, 2016 2:13 AM
> To: Amitkumar Karwar
> Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam;
> rajatja@google.com; dmitry.torokhov@gmail.com
> Subject: Re: [PATCH v2 3/3] mwifiex: Enable WoWLAN for both sdio and
> pcie
>
> On Fri, Nov 11, 2016 at 04:45:11PM +0530, Amitkumar Karwar wrote:
> > From: Rajat Jain <rajatja@google.com>
> >
> > Commit ce4f6f0c353b ("mwifiex: add platform specific wakeup interrupt
> > support") added WoWLAN feature only for sdio. This patch moves that
> > code to the common module so that all the interface drivers can use
> it
> > for free. It enables pcie and sdio for its use currently.
> >
> > Signed-off-by: Rajat Jain <rajatja@google.com>
> > ---
> > v2: v1 doesn't apply smoothly on latest code due to recently merged
> > patch "mwifiex: report error to PCIe for suspend failure". Minor
> > conflict is resolved in v2
> > ---
>
> In case you haven't noticed my comments elsewhere, I'll repeat them
> here: you're copy-and-pasting buggy code. That can be OK I suppose, but
> please fix these issues, possibly in a follow-up patch.
Thanks for pointing this. I will post separate follow-up patch which address this issue as per your suggestion.
Regards,
Amitkumar
^ permalink raw reply
* [PATCH v2] ARM: dts: vfxxx: Enable DMA for DSPI2 and DSPI3
From: Sanchayan Maity @ 2016-11-14 12:37 UTC (permalink / raw)
To: shawnguo
Cc: stefan, linux-arm-kernel, devicetree, linux-kernel,
Sanchayan Maity
In-Reply-To: <20161110114505.17618-1-maitysanchayan@gmail.com>
Enable DMA for DSPI2 and DSPI3 on Vybrid.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
---
Changes since v1:
Add signed-off-by missing in v1.
---
arch/arm/boot/dts/vfxxx.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/vfxxx.dtsi b/arch/arm/boot/dts/vfxxx.dtsi
index 000550f..e9d2847 100644
--- a/arch/arm/boot/dts/vfxxx.dtsi
+++ b/arch/arm/boot/dts/vfxxx.dtsi
@@ -573,6 +573,9 @@
clocks = <&clks VF610_CLK_DSPI2>;
clock-names = "dspi";
spi-num-chipselects = <2>;
+ dmas = <&edma1 0 10>,
+ <&edma1 0 11>;
+ dma-names = "rx", "tx";
status = "disabled";
};
@@ -585,6 +588,9 @@
clocks = <&clks VF610_CLK_DSPI3>;
clock-names = "dspi";
spi-num-chipselects = <2>;
+ dmas = <&edma1 0 12>,
+ <&edma1 0 13>;
+ dma-names = "rx", "tx";
status = "disabled";
};
--
2.10.2
^ permalink raw reply related
* Re: Debugging Ethernet issues
From: Mason @ 2016-11-14 12:45 UTC (permalink / raw)
To: netdev
Cc: Andrew Lunn, Florian Fainelli, Mans Rullgard, Sergei Shtylyov,
Tom Lendacky, Zach Brown, Shaohui Xie, Tim Beale, Brian Hill,
Vince Bridgers, Balakumaran Kannan, David S. Miller,
Sebastian Frias, Kirill Kapranov
In-Reply-To: <5829AA80.2090102@free.fr>
On 14/11/2016 13:13, Mason wrote:
> This is a different log which I got earlier, but can no longer reproduce:
>
> # tcpdump -n -i eth1-boards ether host 00:16:e8:4b:b0:7d
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
> listening on eth1-boards, link-type EN10MB (Ethernet), capture size 262144 bytes
> 11:08:09.610662 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
> 11:08:10.642852 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
> 11:08:10.643276 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
> 11:08:10.790526 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
> 11:08:11.638146 ARP, Reply 172.27.64.58 is-at 00:16:e8:4b:b0:7d, length 46
> 11:08:11.638156 IP 172.27.64.1 > 172.27.64.58: ICMP echo request, id 29883, seq 0, length 28
> 11:08:11.638345 IP 172.27.64.58 > 172.27.64.1: ICMP echo reply, id 29883, seq 0, length 28
> 11:08:16.642811 ARP, Request who-has 172.27.64.1 tell 172.27.64.58, length 46
> 11:08:16.642822 ARP, Reply 172.27.64.1 is-at 00:15:17:24:e0:81, length 28
Additional tests on v4.7
If I set the link up *BEFORE* running the DHCP client, then I get:
# ip link set eth0 up /* Wait 4-5 seconds */
[ 69.815303] nb8800 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
# time udhcpc | while read LINE; do date; echo $LINE; done
Mon Nov 14 13:27:30 UTC 2016
udhcpc (v1.22.1) started
Mon Nov 14 13:27:30 UTC 2016
Sending discover...
Mon Nov 14 13:27:31 UTC 2016
Sending select for 172.27.64.58...
Mon Nov 14 13:27:32 UTC 2016
Lease of 172.27.64.58 obtained, lease time 604800
Mon Nov 14 13:27:32 UTC 2016
deleting routers
Mon Nov 14 13:27:32 UTC 2016
adding dns 172.27.0.17
real 0m1.292s
user 0m0.037s
sys 0m0.087s
# tcpdump -n -i eth1-boards ether host 00:16:e8:4b:b0:7d
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1-boards, link-type EN10MB (Ethernet), capture size 262144 bytes
13:27:30.922880 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:27:30.923055 IP 172.27.64.1 > 172.27.64.58: ICMP echo request, id 29883, seq 0, length 28
13:27:31.924151 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:27:31.936221 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:27:32.061869 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:27:35.933946 ARP, Request who-has 172.27.64.58 tell 172.27.64.1, length 28
13:27:35.934079 ARP, Reply 172.27.64.58 is-at 00:16:e8:4b:b0:7d, length 46
I did see (once) the 9-packet trace (with the ping echo/reply)
# tcpdump -n -i eth1-boards ether host 00:16:e8:4b:b0:7d
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1-boards, link-type EN10MB (Ethernet), capture size 262144 bytes
13:17:31.494117 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:17:32.495374 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:17:32.510753 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:17:32.591262 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:17:33.494093 ARP, Reply 172.27.64.58 is-at 00:16:e8:4b:b0:7d, length 46
13:17:33.494107 IP 172.27.64.1 > 172.27.64.58: ICMP echo request, id 29883, seq 0, length 28
13:17:33.494242 IP 172.27.64.58 > 172.27.64.1: ICMP echo reply, id 29883, seq 0, length 28
13:17:38.500651 ARP, Request who-has 172.27.64.1 tell 172.27.64.58, length 46
13:17:38.500663 ARP, Reply 172.27.64.1 is-at 00:15:17:24:e0:81, length 28
Since the ping request is sent from the DHCP server, perhaps the server
is checking its ARP table. I think it is not an important difference.
Experiment #2
Set link up, then down, then up. Then send DHCP request.
# ip link set eth0 up
[ 39.185326] nb8800 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[root@buildroot ~]# ip link set eth0 down
/* WAIT A LONG TIME FOR "Link is Down" MESSAGE */
# ip link set eth0 up
[ 102.818598] nb8800 26000.ethernet eth0: Link is Down
[ 104.828632] nb8800 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Note: isn't it weird that I have to set link up before "link down" message appears?
# time udhcpc | while read LINE; do date; echo $LINE; done
Mon Nov 14 13:40:08 UTC 2016
udhcpc (v1.22.1) started
Mon Nov 14 13:40:08 UTC 2016
Sending discover...
Mon Nov 14 13:40:11 UTC 2016
Sending discover...
Mon Nov 14 13:40:14 UTC 2016
Sending discover...
Mon Nov 14 13:40:37 UTC 2016
Sending discover...
Mon Nov 14 13:40:40 UTC 2016
Sending discover...
Mon Nov 14 13:40:43 UTC 2016
Sending discover...
Mon Nov 14 13:41:06 UTC 2016
Sending discover...
Mon Nov 14 13:41:09 UTC 2016
Sending discover...
Mon Nov 14 13:41:12 UTC 2016
Sending discover...
Mon Nov 14 13:41:35 UTC 2016
Sending discover...
Mon Nov 14 13:41:38 UTC 2016
Sending discover...
Mon Nov 14 13:41:42 UTC 2016
Sending discover...
\x03^C
real 1m37.623s
user 0m0.100s
sys 0m0.053s
# tcpdump -n -i eth1-boards ether host 00:16:e8:4b:b0:7d
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1-boards, link-type EN10MB (Ethernet), capture size 262144 bytes
13:40:08.593122 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:40:09.594365 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:40:11.619772 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:40:11.619925 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:40:14.646372 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:40:14.646535 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:40:37.706093 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:40:37.706257 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:40:40.732693 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:40:40.732827 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:40:43.759342 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:40:43.759475 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:41:06.819024 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:41:06.819201 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:41:09.845671 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:41:09.845807 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:41:12.872271 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:41:12.872396 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:41:35.931994 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:41:35.932162 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:41:38.958593 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:41:38.958742 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
13:41:41.985194 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:e8:4b:b0:7d, length 300
13:41:41.985359 IP 172.27.200.1.67 > 172.27.64.58.68: BOOTP/DHCP, Reply, length 391
^C
24 packets captured
24 packets received by filter
0 packets dropped by kernel
Link appears to be broken (not receiving) after up/down/up sequence.
Despite the rx_frames_ok: 8 ???
And why 8, server sent 12 replies...
# ethtool -S eth0
NIC statistics:
rx_bytes_ok: 975
rx_frames_ok: 8
rx_undersize_frames: 0
rx_fragment_frames: 0
rx_64_byte_frames: 6
rx_127_byte_frames: 0
rx_255_byte_frames: 1
rx_511_byte_frames: 1
rx_1023_byte_frames: 0
rx_max_size_frames: 0
rx_oversize_frames: 0
rx_bad_fcs_frames: 0
rx_broadcast_frames: 3
rx_multicast_frames: 1
rx_control_frames: 0
rx_pause_frames: 0
rx_unsup_control_frames: 0
rx_align_error_frames: 0
rx_overrun_frames: 0
rx_jabber_frames: 0
rx_bytes: 975
rx_frames: 8
tx_bytes_ok: 4344
tx_frames_ok: 15
tx_64_byte_frames: 3
tx_127_byte_frames: 0
tx_255_byte_frames: 0
tx_511_byte_frames: 12
tx_1023_byte_frames: 0
tx_max_size_frames: 0
tx_oversize_frames: 0
tx_broadcast_frames: 12
tx_multicast_frames: 0
tx_control_frames: 0
tx_pause_frames: 0
tx_underrun_frames: 0
tx_single_collision_frames: 0
tx_multi_collision_frames: 0
tx_deferred_collision_frames: 0
tx_late_collision_frames: 0
tx_excessive_collision_frames: 0
tx_bytes: 4344
tx_frames: 15
tx_collisions: 0
Will add a few traces, as suggested by Florian.
Regards.
^ permalink raw reply
* Re: [PULL] Btrfs fixes for 4.9-rc5
From: David Sterba @ 2016-11-14 12:46 UTC (permalink / raw)
To: Chris Mason; +Cc: linux-btrfs
In-Reply-To: <7efb4535-dbd8-1c7c-c6f0-0dda234077e2@fb.com>
On Fri, Nov 11, 2016 at 03:45:10PM -0500, Chris Mason wrote:
> On 11/10/2016 10:00 AM, David Sterba wrote:
> > Hi,
> >
> > two minor error handling fixes and one fix for balance sttus item that goes
> > back to 4.4.
> >
> > The branch continues from my last pull that went to Linus' tree, so it would
> > be a good idea to do the same as before. I've added a signed tag for branch.
>
> Looking at this again before sending off:
>
> btrfs: remove redundant check of btrfs_iget return value
>
> Is really a cleanup and we should wait for the merge window. Since this
> means rebasing the pull, I'm happy to send the others on Monday.
Technically it is a cleanup, but I look at it more from the correctness
perspective and based of feelings that "this looks relvant for rc".
But postponing for 4.10 fine for me.
^ permalink raw reply
* [PATCH 1/2] drm/amdgpu: cleanup unused iterator members for sdma v3
From: Huang Rui @ 2016-11-14 12:46 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Alex Deucher,
Christian König
Cc: Huang Rui
Signed-off-by: Huang Rui <ray.huang@amd.com>
---
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index c5719a1..373ae70 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -987,7 +987,7 @@ static void sdma_v3_0_vm_write_pte(struct amdgpu_ib *ib, uint64_t pe,
ib->ptr[ib->length_dw++] = lower_32_bits(pe);
ib->ptr[ib->length_dw++] = upper_32_bits(pe);
ib->ptr[ib->length_dw++] = ndw;
- for (; ndw > 0; ndw -= 2, --count, pe += 8) {
+ for (; ndw > 0; ndw -= 2) {
ib->ptr[ib->length_dw++] = lower_32_bits(value);
ib->ptr[ib->length_dw++] = upper_32_bits(value);
value += incr;
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related
* [PATCH 2/2] drm/amdgpu: cleanup unused iterator members for sdma v2.4
From: Huang Rui @ 2016-11-14 12:46 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Alex Deucher,
Christian König
Cc: Huang Rui
In-Reply-To: <1479127619-23643-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
Signed-off-by: Huang Rui <ray.huang@amd.com>
---
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
index 1f3dcab..5a80837 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
@@ -783,7 +783,7 @@ static void sdma_v2_4_vm_write_pte(struct amdgpu_ib *ib, uint64_t pe,
ib->ptr[ib->length_dw++] = pe;
ib->ptr[ib->length_dw++] = upper_32_bits(pe);
ib->ptr[ib->length_dw++] = ndw;
- for (; ndw > 0; ndw -= 2, --count, pe += 8) {
+ for (; ndw > 0; ndw -= 2) {
ib->ptr[ib->length_dw++] = lower_32_bits(value);
ib->ptr[ib->length_dw++] = upper_32_bits(value);
value += incr;
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related
* Re: [PATCH 05/10] rt2800: make ba_size depend on ampdu_factor
From: Stanislaw Gruszka @ 2016-11-14 12:45 UTC (permalink / raw)
To: linux-wireless; +Cc: Helmut Schaa, Kalle Valo
In-Reply-To: <1478095865-8651-6-git-send-email-sgruszka@redhat.com>
On Wed, Nov 02, 2016 at 03:11:00PM +0100, Stanislaw Gruszka wrote:
> We can calculate BA window size (max number of pending frames not
> yet block acked) of remote station using Maximum A-MPDU length factor
> for that station.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Kalle, please drop this patch from the set, it requires some rework.
Thanks
Stanislaw
> ---
> drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 15 ++++++++++-----
> 1 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
> index 68b620b..9da89e3 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
> @@ -305,14 +305,19 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
> struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
> struct ieee80211_tx_rate *txrate = &tx_info->control.rates[0];
> struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
> - struct rt2x00_sta *sta_priv = NULL;
> + u8 ba_size = 0;
>
> if (sta) {
> - txdesc->u.ht.mpdu_density =
> - sta->ht_cap.ampdu_density;
> + struct rt2x00_sta *sta_priv = sta_to_rt2x00_sta(sta);
>
> - sta_priv = sta_to_rt2x00_sta(sta);
> + txdesc->u.ht.mpdu_density = sta->ht_cap.ampdu_density;
> txdesc->u.ht.wcid = sta_priv->wcid;
> +
> + if (!(tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)) {
> + ba_size = IEEE80211_MIN_AMPDU_BUF;
> + ba_size <<= sta->ht_cap.ampdu_factor;
> + ba_size = min_t(int, 63, ba_size - 1);
> + }
> }
>
> /*
> @@ -345,7 +350,7 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
> return;
> }
>
> - txdesc->u.ht.ba_size = 7; /* FIXME: What value is needed? */
> + txdesc->u.ht.ba_size = ba_size;
>
> /*
> * Only one STBC stream is supported for now.
> --
> 1.7.1
>
^ permalink raw reply
* ✗ Fi.CI.BAT: warning for drm_crtc.[hc] cleanup and documenation
From: Patchwork @ 2016-11-14 12:47 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx
In-Reply-To: <20161114115825.22050-1-daniel.vetter@ffwll.ch>
== Series Details ==
Series: drm_crtc.[hc] cleanup and documenation
URL : https://patchwork.freedesktop.org/series/15272/
State : warning
== Summary ==
Series 15272v1 drm_crtc.[hc] cleanup and documenation
https://patchwork.freedesktop.org/api/1.0/series/15272/revisions/1/mbox/
Test drv_module_reload_basic:
pass -> DMESG-WARN (fi-skl-6770hq)
fi-bdw-5557u total:244 pass:229 dwarn:0 dfail:0 fail:0 skip:15
fi-bsw-n3050 total:244 pass:204 dwarn:0 dfail:0 fail:0 skip:40
fi-bxt-t5700 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-j1900 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-n2820 total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32
fi-hsw-4770 total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20
fi-hsw-4770r total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20
fi-ilk-650 total:244 pass:191 dwarn:0 dfail:0 fail:0 skip:53
fi-ivb-3520m total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22
fi-ivb-3770 total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22
fi-kbl-7200u total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22
fi-skl-6260u total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14
fi-skl-6700hq total:244 pass:223 dwarn:0 dfail:0 fail:0 skip:21
fi-skl-6700k total:244 pass:222 dwarn:1 dfail:0 fail:0 skip:21
fi-skl-6770hq total:244 pass:229 dwarn:1 dfail:0 fail:0 skip:14
fi-snb-2520m total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32
fi-snb-2600 total:244 pass:211 dwarn:0 dfail:0 fail:0 skip:33
020e291d72d4aaf3e0f8f5168a60ac05daa43a77 drm-intel-nightly: 2016y-11m-14d-08h-02m-22s UTC integration manifest
28625c8 doc/dma-buf: Fix up include directives
45a8685c drm/i915: Fixup kerneldoc includes
7e18d70 drm: Extract drm_dumb_buffers.c
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2982/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.