avg (Andriy Gapon)
User

Projects

User Details

User Since
Jun 4 2014, 6:42 AM (189 w, 1 d)

Recent Activity

Today

avg added a comment to D13962: Use a dedicated per-CPU stack for machine check exceptions..

Another report with a slightly more relevant stack trace.
Turns out that there is another interesting bit, NbMcaToMstCpuEn (NB machine check errors to master CPU only).

MCA: Bank 4, Status 0xbe082000b5080823
MCA: Global Cap 0x0000000000000106, Status 0x0000000000000004
MCA: Vendor "AuthenticAMD", ID 0x100f43, APIC ID 0
MCA: CPU 0 UNCOR PCC BUSLG Source WR Memory
MCA: Address 0x37284000
MCA: Misc 0xc01b0fff01000000
panic: Unrecoverable machine check exception
cpuid = 0
time = 1516285616
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff81eaf740
vpanic() at vpanic+0x19c/frame 0xffffffff81eaf7c0
panic() at panic+0x43/frame 0xffffffff81eaf820
mca_intr() at mca_intr+0x9b/frame 0xffffffff81eaf840
mchk_calltrap() at mchk_calltrap+0x8/frame 0xffffffff81eaf840
--- trap 0x1c, rip = 0xffffffff80f60c91, rsp = 0xfffffe0029aa4840, rbp = 0xfffffe0029aa48a0 ---
acpi_pcib_read_config() at acpi_pcib_read_config+0x1/frame 0xfffffe0029aa48a0
sysctl_root_handler_locked() at sysctl_root_handler_locked+0x7b/frame 0xfffffe0029aa48e0
sysctl_root() at sysctl_root+0x20e/frame 0xfffffe0029aa4960
userland_sysctl() at userland_sysctl+0x199/frame 0xfffffe0029aa4a10
sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe0029aa4ac0
amd64_syscall() at amd64_syscall+0x79b/frame 0xfffffe0029aa4bf0
fast_syscall_common() at fast_syscall_common+0x100/frame 0x7fffffffd1e0
KDB: enter: panic
[ thread pid 690 tid 100174 ]

The stack trace is missing sysctl_proc_inject frame, I guess that's that because the MCE was delivered before acpi_pcib_read_config updated rbp.

Thu, Jan 18, 5:03 PM
avg added a comment to D13962: Use a dedicated per-CPU stack for machine check exceptions..

Tested an AMD using amd_ecc_inject and injecting an uncorrectable ECC DRAM error:

sysctl hw.error_injection.dram_ecc.bit_mask=0x11
sysctl hw.error_injection.dram_ecc.inject=1
Thu, Jan 18, 3:13 PM
avg committed rS328126: correct read-ahead calculations in vfs_bio_getpages.
correct read-ahead calculations in vfs_bio_getpages
Thu, Jan 18, 12:59 PM

Tue, Jan 16

avg committed rS328051: MFC r327724: usbdevs: add ASMedia vendor ID.
MFC r327724: usbdevs: add ASMedia vendor ID
Tue, Jan 16, 11:25 AM
avg committed rS328050: MFC r327724: usbdevs: add ASMedia vendor ID.
MFC r327724: usbdevs: add ASMedia vendor ID
Tue, Jan 16, 11:23 AM
avg committed rS328049: MFC r327725: zfs_mount: restore a bit of ifdef-out illumos code.
MFC r327725: zfs_mount: restore a bit of ifdef-out illumos code
Tue, Jan 16, 11:22 AM
avg committed rS328048: MFC r327725: zfs_mount: restore a bit of ifdef-out illumos code.
MFC r327725: zfs_mount: restore a bit of ifdef-out illumos code
Tue, Jan 16, 11:22 AM
avg added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

@anish Did you have a chance to look at D13828? Would you like to do that before we go with this solution?

Tue, Jan 16, 10:50 AM

Mon, Jan 15

avg committed rS328002: MFC r327593: Fix a couple of comments in AMD Virtual Machine Control Block….
MFC r327593: Fix a couple of comments in AMD Virtual Machine Control Block…
Mon, Jan 15, 12:17 PM
avg committed rS328001: MFC r327593: Fix a couple of comments in AMD Virtual Machine Control Block….
MFC r327593: Fix a couple of comments in AMD Virtual Machine Control Block…
Mon, Jan 15, 12:17 PM
avg committed rS328000: MFC r326567: ddb: fix validation of cpu id in 'set db_cpu=x'.
MFC r326567: ddb: fix validation of cpu id in 'set db_cpu=x'
Mon, Jan 15, 12:15 PM
avg committed rS327999: MFC r326567: ddb: fix validation of cpu id in 'set db_cpu=x'.
MFC r326567: ddb: fix validation of cpu id in 'set db_cpu=x'
Mon, Jan 15, 12:14 PM
avg committed rS327998: MFC r326140: vmrun.sh: add -A option for AHCI emulation of disk devices.
MFC r326140: vmrun.sh: add -A option for AHCI emulation of disk devices
Mon, Jan 15, 12:00 PM
avg committed rS327997: MFC r326140: vmrun.sh: add -A option for AHCI emulation of disk devices.
MFC r326140: vmrun.sh: add -A option for AHCI emulation of disk devices
Mon, Jan 15, 11:55 AM
avg committed rS327996: geom_disk / scsi_da: deny opening write-protected disks for writing.
geom_disk / scsi_da: deny opening write-protected disks for writing
Mon, Jan 15, 11:20 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Mon, Jan 15, 11:20 AM

Sun, Jan 14

avg added inline comments to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.
Sun, Jan 14, 11:06 AM

Fri, Jan 12

avg updated the diff for D13828: vmm/svm: use special state for LAPIC interrupt injected as virtual interrupt.

Ignore software emulated LAPIC TPR when checking for a pending vector (SVM only).

Fri, Jan 12, 5:25 PM

Thu, Jan 11

avg added a comment to D13229: Save and restore guest debug registers..
In D13229#290619, @jhb wrote:

Ah, on VT-x the save/restore of DR7 was conditional (and the changes to VT-x turn it on). It sounds like for SVM DR6 and DR7 are saved and restored unconditionally and the dirty bit is just a way to let SVM know that the saved value in the VMCB was changed by the VMM?

Thu, Jan 11, 9:43 PM
avg added a comment to D13229: Save and restore guest debug registers..

The SVM part looks good to me (including the cache bit manipulations).

Thu, Jan 11, 12:23 PM
avg added a comment to D13229: Save and restore guest debug registers..
In D13229#290214, @jhb wrote:

I am a bit surprised it worked fine without the patch. Perhaps if you used watchpoints both outside and inside at the same time you might get some inconsistent results?

Thu, Jan 11, 12:17 PM
avg added a comment to D13828: vmm/svm: use special state for LAPIC interrupt injected as virtual interrupt.

The VIRQ injection doesn't cover all cases - it misses out the modification of the TPR register via CR8.

Thu, Jan 11, 11:56 AM

Wed, Jan 10

avg updated the diff for D13828: vmm/svm: use special state for LAPIC interrupt injected as virtual interrupt.

remove a stray change that broke !KTR build

Wed, Jan 10, 6:27 PM
avg added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

Please see D13828 as well.

Wed, Jan 10, 6:09 PM
avg created D13828: vmm/svm: use special state for LAPIC interrupt injected as virtual interrupt.
Wed, Jan 10, 6:08 PM
avg committed rS327775: amdsbwd: fix handling of timeout values beyond the supported range.
amdsbwd: fix handling of timeout values beyond the supported range
Wed, Jan 10, 5:35 PM
avg added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

Oh, I didn't think about that.
I think that that can cause an extra interrupt latency but not an interrupt loss, but not sure.

Wed, Jan 10, 9:53 AM

Tue, Jan 9

avg committed rS327726: vmm/svm: contigmalloc of the whole svm_softc is excessive.
vmm/svm: contigmalloc of the whole svm_softc is excessive
Tue, Jan 9, 2:22 PM
avg updated the summary of D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.
Tue, Jan 9, 1:56 PM
avg updated the diff for D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.
  • remove references to AVIC as it disables virtual interrupt injection, so they cannot be used together, actually
  • remove more code that was useful only for virtual interrupt injection
Tue, Jan 9, 1:49 PM
avg committed rS327725: zfs_mount: restore a bit of ifdef-out illumos code.
zfs_mount: restore a bit of ifdef-out illumos code
Tue, Jan 9, 1:43 PM
avg committed rS327724: usbdevs: add ASMedia vendor ID.
usbdevs: add ASMedia vendor ID
Tue, Jan 9, 1:42 PM

Mon, Jan 8

avg added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

Also, I think CR8 write exits are needed to force re-evaluation of the TPR for the software APIC model.

Mon, Jan 8, 11:13 PM
avg added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

I didn't have success with this on my Ryzen 1700, but it's also possibly buggy :(

Mon, Jan 8, 9:56 PM
avg added inline comments to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.
Mon, Jan 8, 9:52 PM
avg added a comment to D13229: Save and restore guest debug registers..

First, as a baseline, I did some tests on AMD/SVM without applying this patch. I could use up to four hardware watchpoints in a guest, seemingly without any problems.
My tests weren't extensive, so I might have missed some problems.
With this patch everything works good too, I do not see any regressions and now I am able to inspect DR registers from the host.

Mon, Jan 8, 9:33 PM

Sat, Jan 6

avg updated the summary of D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.
Sat, Jan 6, 12:39 AM
avg added a member for bhyve: avg.
Sat, Jan 6, 12:37 AM
avg created D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.
Sat, Jan 6, 12:32 AM

Fri, Jan 5

avg committed rS327593: Fix a couple of comments in AMD Virtual Machine Control Block structure.
Fix a couple of comments in AMD Virtual Machine Control Block structure
Fri, Jan 5, 7:15 PM

Wed, Dec 20

avg added inline comments to D13494: Fix arc after kmem/kernel_arena merge.
Wed, Dec 20, 6:05 PM
avg added inline comments to D13494: Fix arc after kmem/kernel_arena merge.
Wed, Dec 20, 6:04 PM

Dec 14 2017

avg updated the diff for D13360: geom_disk / scsi_da: deny opening write-protected disks for writing.

address comments:

  • ENODEV -> EROFS
  • better minimum_cmd_size comparison
Dec 14 2017, 1:18 PM

Dec 12 2017

avg added inline comments to D13360: geom_disk / scsi_da: deny opening write-protected disks for writing.
Dec 12 2017, 8:29 PM
avg added a comment to D13447: zfs: deadlock in "zfs rename" if zv_total_opens > 0 since MFV r323535.

I don't have anything against this patch, but I would prefer a more universal solution.
There are more of problems involving FreeBSD-specific volume manipulations done in the sync context.
Please see this bug report for some details: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203864
These comments have my analysis:

Dec 12 2017, 3:37 PM
avg added a comment to D13360: geom_disk / scsi_da: deny opening write-protected disks for writing.

@imp Warner, do you have any further questions or requests?

Dec 12 2017, 3:26 PM
avg added inline comments to D13360: geom_disk / scsi_da: deny opening write-protected disks for writing.
Dec 12 2017, 3:22 PM
avg abandoned D13224: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom.

Closing this review as now I see many shortcomings in it.
First, 'NO RETRY' is indeed a too specific name and a too specific instruction comparing to 'FAIL FAST'.
Second, suppressing retries could be a [barely] good enough first approximation for certain class of storage devices (spinning HDDs), but for other device types it might be rather wrong.
Third, the naive implementation didn't take into account things like frozen CAM queues, etc.
Other problems pointed out by reviewers.
So, finally, this change wouldn't fly anyway given the opposition.

Dec 12 2017, 11:26 AM

Dec 7 2017

avg added a comment to D9876: apuled(4): add support for LEDs on PC Engines APU boards.

Is there still an interest in getting this moving forward?
I think that it should be relatively easy to address my comments and get this into a committable shape.

Dec 7 2017, 10:56 AM

Dec 6 2017

avg added a comment to D13360: geom_disk / scsi_da: deny opening write-protected disks for writing.
In D13360#279553, @imp wrote:

What happens if I flip the write protect switch off? This doesn't seem to contemplate that...

Dec 6 2017, 9:10 AM

Dec 5 2017

avg added a reviewer for D13360: geom_disk / scsi_da: deny opening write-protected disks for writing: imp.
Dec 5 2017, 11:07 PM
avg committed rS326567: ddb: fix validation of cpu id in 'set db_cpu=x'.
ddb: fix validation of cpu id in 'set db_cpu=x'
Dec 5 2017, 2:22 PM
avg updated the diff for D13360: geom_disk / scsi_da: deny opening write-protected disks for writing.

Move mode header querying from scsi_xpt to scsi_da.

Dec 5 2017, 2:02 PM

Dec 4 2017

avg added a comment to D13360: geom_disk / scsi_da: deny opening write-protected disks for writing.
In D13360#279048, @cem wrote:

I would like to see this change or something like it land in the tree. I don't think the concept is as controversial as having mount fallback to RO.

Dec 4 2017, 8:43 PM
avg added a comment to D13361: vfs_donmount: in certain cases try r/o mount if r/w mount fails.

It's not a no, but it's push back that this isn't POLA based on what people expect.

Dec 4 2017, 5:29 PM
avg committed rS326539: amd-vi: set iommu msi configuration using pci_enable_msi method.
amd-vi: set iommu msi configuration using pci_enable_msi method
Dec 4 2017, 5:11 PM
avg committed rS326538: vmm/amd: add ivhd device with a higher order.
vmm/amd: add ivhd device with a higher order
Dec 4 2017, 5:08 PM
avg committed rS326537: amd-vi: clear event interrupt and overflow bits upon handling the interrupt.
amd-vi: clear event interrupt and overflow bits upon handling the interrupt
Dec 4 2017, 5:03 PM
avg committed rS326536: MFC r326150: zdb: use a heap allocation instead of a huge array on stack.
MFC r326150: zdb: use a heap allocation instead of a huge array on stack
Dec 4 2017, 4:47 PM
avg added a comment to D13361: vfs_donmount: in certain cases try r/o mount if r/w mount fails.

I'd rather focus on the convenience of a modern user than on the historic Unix behavior.

Dec 4 2017, 4:37 PM
avg added a comment to D13361: vfs_donmount: in certain cases try r/o mount if r/w mount fails.
In D13361#278943, @kib wrote:

For instance, we do not guess the filesystem type in the kernel. Why rw/ro should be different ?

Dec 4 2017, 3:53 PM
avg created D13361: vfs_donmount: in certain cases try r/o mount if r/w mount fails.
Dec 4 2017, 1:53 PM
avg added a comment to D13360: geom_disk / scsi_da: deny opening write-protected disks for writing.

This is a proof of concept, needs discussion and refinement.

Dec 4 2017, 10:32 AM
avg created D13360: geom_disk / scsi_da: deny opening write-protected disks for writing.
Dec 4 2017, 10:30 AM

Dec 1 2017

avg committed rS326428: MFC r326070: zfs_write: fix problem with writes appearing to succeed when over….
MFC r326070: zfs_write: fix problem with writes appearing to succeed when over…
Dec 1 2017, 11:14 AM
avg committed rS326427: MFC r326070: zfs_write: fix problem with writes appearing to succeed when over….
MFC r326070: zfs_write: fix problem with writes appearing to succeed when over…
Dec 1 2017, 11:14 AM
avg committed rS326426: MFC r326067: make illumos uiocopy use vn_io_fault_uiomove.
MFC r326067: make illumos uiocopy use vn_io_fault_uiomove
Dec 1 2017, 11:11 AM
avg committed rS326425: MFC r326067: make illumos uiocopy use vn_io_fault_uiomove.
MFC r326067: make illumos uiocopy use vn_io_fault_uiomove
Dec 1 2017, 11:07 AM

Nov 30 2017

avg accepted D13278: Fix assertion when ZFS fails to open certain devices.

LGTM. Thank you!

Nov 30 2017, 9:51 AM

Nov 25 2017

avg added a comment to D13224: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom.

@ing.gila_gmail.com thank you very much for the explanation! It's both interesting and useful. Much appreciated.

Nov 25 2017, 7:11 PM
avg added a comment to D13224: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom.
In D13224#275493, @imp wrote:

After reading the links and ing.gila_gmail.com's description, it looks like FAILFAST and NORETRY are two different things.

Nov 25 2017, 1:20 PM
avg committed rS326187: zdb: follow-up to r326150, check if malloc succeeded.
zdb: follow-up to r326150, check if malloc succeeded
Nov 25 2017, 9:47 AM

Nov 24 2017

avg updated the diff for D13224: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom.

BIO_NORETRY has nothing to do with timeouts

Nov 24 2017, 5:26 PM
avg added a comment to D13224: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom.

@imp a couple of links on what's going on in illumos:

Nov 24 2017, 2:20 PM
avg added a comment to D13224: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom.
In D13224#275374, @imp wrote:

I think this is a terrible idea, at least as implemented. It suffers several problems.

First, it conflates the notion of 'fast fail' with the notion of 'don't retry'. Those are two very different notions.

Nov 24 2017, 1:55 PM
avg added inline comments to D13224: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom.
Nov 24 2017, 1:40 PM
avg added a comment to D13224: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom.
In D13224#275371, @mav wrote:

I like the part about BIO_NORETRY. Just wonder why it is not implemented for SCSI devices too.

Nov 24 2017, 12:30 PM
avg committed rS326158: amd-vi: a small whitespace cleanup.
amd-vi: a small whitespace cleanup
Nov 24 2017, 11:37 AM
avg committed rS326157: amd-vi: use correct type for pci_rid, start_dev_rid, end_dev_rid sysctls.
amd-vi: use correct type for pci_rid, start_dev_rid, end_dev_rid sysctls
Nov 24 2017, 11:36 AM
avg committed rS326156: amd-vi: small improvements to event printing.
amd-vi: small improvements to event printing
Nov 24 2017, 11:36 AM
avg committed rS326155: amd-vi: print some additional details for INVALID_DEVICE_REQUEST event.
amd-vi: print some additional details for INVALID_DEVICE_REQUEST event
Nov 24 2017, 11:34 AM
avg committed rS326153: amd-vi: fix up r326152, the new width requires a wider type.
amd-vi: fix up r326152, the new width requires a wider type
Nov 24 2017, 11:25 AM
avg committed rS326152: amd-vi: fix and extend definition of Command and Event Status Register (0x2020).
amd-vi: fix and extend definition of Command and Event Status Register (0x2020)
Nov 24 2017, 11:20 AM
avg committed rS326151: vmm/amd: improve iteration over IVHD (type 10h) entries in IVRS table.
vmm/amd: improve iteration over IVHD (type 10h) entries in IVRS table
Nov 24 2017, 11:10 AM
avg committed rS326150: zdb: use a heap allocation instead of a huge array on stack.
zdb: use a heap allocation instead of a huge array on stack
Nov 24 2017, 10:45 AM
avg created D13224: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom.
Nov 24 2017, 10:28 AM

Nov 23 2017

avg committed rS326140: vmrun.sh: add -A option for AHCI emulation of disk devices.
vmrun.sh: add -A option for AHCI emulation of disk devices
Nov 23 2017, 10:10 PM

Nov 21 2017

avg committed rS326070: zfs_write: fix problem with writes appearing to succeed when over quota.
zfs_write: fix problem with writes appearing to succeed when over quota
Nov 21 2017, 6:28 PM
avg committed rS326067: make illumos uiocopy use vn_io_fault_uiomove.
make illumos uiocopy use vn_io_fault_uiomove
Nov 21 2017, 6:02 PM

Nov 17 2017

avg committed rS325932: MFC r325610: MFV r325609: 7531 Assign correct flags to prefetched buffers.
MFC r325610: MFV r325609: 7531 Assign correct flags to prefetched buffers
Nov 17 2017, 10:13 AM
avg committed rS325931: MFC r325610: MFV r325609: 7531 Assign correct flags to prefetched buffers.
MFC r325610: MFV r325609: 7531 Assign correct flags to prefetched buffers
Nov 17 2017, 10:10 AM

Nov 16 2017

avg committed rS325915: MFC r325035: MFV r325013,r325034: 640 number_to_scaled_string is duplicated in….
MFC r325035: MFV r325013,r325034: 640 number_to_scaled_string is duplicated in…
Nov 16 2017, 11:36 PM
avg committed rS325914: MFC r325035: MFV r325013,r325034: 640 number_to_scaled_string is duplicated in….
MFC r325035: MFV r325013,r325034: 640 number_to_scaled_string is duplicated in…
Nov 16 2017, 11:27 PM
avg committed rS325913: MFC r325228: vdev_geom_close: close errored consumer even if vdev_reopening is….
MFC r325228: vdev_geom_close: close errored consumer even if vdev_reopening is…
Nov 16 2017, 11:02 PM
avg committed rS325912: MFC r325228: vdev_geom_close: close errored consumer even if vdev_reopening is….
MFC r325228: vdev_geom_close: close errored consumer even if vdev_reopening is…
Nov 16 2017, 10:59 PM
avg committed rS325911: MFC r325608: MFV r325607: 8607 zfs: variable set but not used.
MFC r325608: MFV r325607: 8607 zfs: variable set but not used
Nov 16 2017, 10:53 PM
avg committed rS325910: MFC r325606: MFV r325605: 8713 Buffer overflow in dsl_dataset_name().
MFC r325606: MFV r325605: 8713 Buffer overflow in dsl_dataset_name()
Nov 16 2017, 10:48 PM
avg committed rS325909: MFC r325606: MFV r325605: 8713 Buffer overflow in dsl_dataset_name().
MFC r325606: MFV r325605: 8713 Buffer overflow in dsl_dataset_name()
Nov 16 2017, 10:45 PM
avg committed rS325908: MFC r325227,r325272: geom_slice: do not destroy softc until providers are gone.
MFC r325227,r325272: geom_slice: do not destroy softc until providers are gone
Nov 16 2017, 10:37 PM
avg committed rS325907: MFC r325227,r325272: geom_slice: do not destroy softc until providers are gone.
MFC r325227,r325272: geom_slice: do not destroy softc until providers are gone
Nov 16 2017, 10:25 PM