In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
This kind of quoting doesn't work, no idea why shellcheck wanted this.
If there is a "safer" way to "fix" this feel free to do it just test
that it's working after.
Reported by: Kenneth Raplee <kenrap@kennethraplee.com>
Sponsored by: Beckhoff Automation GmbH & Co. KG
Fixes: 7ad4d94d5b ("Fix some shell issues by adding quotes and replace backticks with $()")
When saving log files in RFC 5424 format presence of STRUCTURED-DATA
in message caused line to not appear in log file at all, because
a variable forgotten to initialize. This could be tested by (slightly
modified) example from RFC:
echo '<165>1 2003-10-11T22:14:15.003Z mymachine.example.com su 12345 ID47 [exampleSDID@32473 iut="3" eventSource="Application" eventID="1011"][id@2 test="tast"] BOM"su root" failed for lonvick on /dev/pts/8" ' | nc -w1 -Uu /var/run/log
While here, update stale information in comment to logmsg() that RFC 5424
log format was not supported.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/717
Refactor to eliminate duplicated rate and delay tables, with minor style
tweaks for changed lines. Remove an obsolete comment about needing to
convert from microseconds to ticks (that's done elsewhere). Remove
traiing whitespace in kbdcontrol.c.
Except for the new warning, no change in behavior
Sponsored by: DSS GmbH
Reviewed by: imp [minor style tweaks as well]
Pull Request: https://github.com/freebsd/pull/683
Differential Revision: https://reviews.freebsd.org/D38818
pci_cfgrw() may be called via a write to the extended config space,
which is memory-mapped. In this case, the name "eax" is misleading.
Give it a more generic name. No functional change intended.
Reviewed by: corvink, jhb
MFC after: 1 week
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40732
The device model effectively assumes that MSI-X is enabled (it never
asserts the legacy interrupt), so any guest which relies on being able
to use the legacy PCI interrupt will fail.
The WIP arm64 port does not implement legacy PCI interrupts, but NVMe
emulation is potentially useful there. Simply remove the call.
Reviewed by: corvink, chuck, jhb
Tested by: chuck
MFC after: 1 month
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40731
- Pass down the top-level arglist from main down to camdd_rw and use
it in place of the hardcoded CAMDD_ARG_ERR_RECOVER when calling
camdd_probe_pass. This now disables error recovery by default
unless -E is specified.
- Use the return value of parse_btl to determine if an explicit LUN
was specified.
- Remove most CAMDD_ARG_* flags that are only set and never checked.
CAMDD_ARG_VERBOSE remains, but could perhaps be removed (and possibly
-v should be removed as well since it is currently a no-op).
Reported by: clang -Wunused-but-set-variable (arglist in main)
Differential Revision: https://reviews.freebsd.org/D40666
geom_gettree probably never fails, and if it does there isn't much of
a fallback other than aborting partitioning. However, a few places
were checking the return value and not doing anything with it
triggering a unused-but-set-variable warning. Checking the errors
resolves the warning.
While here, check for errors in other places that weren't checking for
them at all, remove a spurious double call (the second call overwrote
the mesh structure leaking all the pointers from the first), and close
a few resource leaks on error paths.
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D40779
The quotes are added to prevent word splits and globbing. Some
whitespaces were also removed after variables.
Approved by: imp
Differential Revision: https://reviews.freebsd.org/D40726
The old one triggered a false positive -Warray-bounds from GCC (the
compiler assumed len was always 0), but it was also fragile with
manually computed lengths paired with strcat vs using a string
builder.
Differential Revision: https://reviews.freebsd.org/D40658
Unfortunately, this feature didn't receive much feedback in the past.
However, after committing this, some people came up and complain that
this feature requires some more discussion before upstreaming it.
Additionally, it wasn't a good idea to start this new feature by adding
a new command line parameter as it fixes the user interface.
This reverts commit c9fdd4f3cc.
The gmt_ptr and gmt variables are not used, so the call to gmtime can
be removed entirely. In addition, there isn't a need to call
localtime twice.
Reported by: GCC -Wunused-but-set-variable
Reviewed by: phk, emaste
Differential Revision: https://reviews.freebsd.org/D40656
This is in the generated parser when using %pure-parser.
y.tab.c:382:14: error: variable 'yynerrs' set but not used [-Werror,-Wunused-but-set-variable]
int yynerrs;
^
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D40671
The caller ignores the return value so this is a no-op, but
ath3k_init_ar3012 returns the return values of its internal functions,
so this is more consistent.
Fix some misleading indentation while here.
Reported by: GCC -Wunused-but-set-variable (1)
tpm_intf.h was incorrectly committed with dos line endings.
Fixes: 0917f925b4 ("bhyve: add basic CRB interface for TPM devices")
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Commands send to a tpm are very slow. They can take up to several
seconds for completion. For that reason, create a thread which issues
the commands to the tpm device.
Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40458
Each tpm has a device specific table. Which table a tpm uses depends on
the tpm interface.
Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40457
In a subsquent commit the TPM emulation will build it's own TPM2 table.
This needs to be registered to the RSDT and XSDT. Instead of making the
rsdt and xsdt variables global, we can simply add a helper to basl.
Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40559
The bootindex option creates an entry in the "bootorder" fwcfg file.
This file can be picked up by the guest firmware to determine the
bootorder. Nevertheless, it's not guaranteed that the guest firmware
uses the bootorder. At the moment, our OVMF ignores the bootorder. This
will change in the future.
If guest firmware supports the "bootorder" fwcfg file and no device uses
the bootindex option, the boot order is determined by the firmware
itself. If one or more devices specify a bootindex, the first bootable
device with the lowest bootindex will be booted. It's not garanteed that
devices without a bootindex will be recognized as bootable from the
firmware in that case.
Reviewed by: jhb
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39285
Qemu's fwcfg allows to define a bootorder. Therefore, the hypervisor has
to create a fwcfg item named bootorder, which has a newline seperated
list of boot entries. Qemu's OVMF will pick up the bootorder and applies
it.
Add the moment, bhyve's OVMF doesn't support a custom bootorder by
qemu's fwcfg. However, in the future bhyve will gain support for qemu's
OVMF. Additonally, we can port relevant parts from qemu's to bhyve's
OVMF implementation.
Reviewed by: jhb, markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39284
Move some of its logic into fbsdrun_deletecpu(). This makes it easier
to split vmexit handlers into a separate file, which in turn makes
landing arm64 support easier. Also increase the scope of the mutex and
use it to synchronize updates to the vcpu mask. No functional change
intended.
Reviewed by: corvink, jhb
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40573
These exit handlers might not be used if the corresponding VM
capabilities are not set, but there is no harm in putting them into the
handler table regardless. Doing so simplifies initialization code,
makes it easier to split vmexit handlers into a separate file, and lets
us declare the handler table as const.
Reviewed by: corvink, jhb
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40572
This allows for quicker testing/debugging of rc scripts and is a pre-req
for automatic service jails.
Differential Revision: https://reviews.freebsd.org/D40369
Reviewed by: se
This patch fixes the following issues reported by shellcheck:
- Quote default assignments (SC2223)
- Use $() instead of backticks (SC2006)
- Double quote $@ (SC2068)
- Double quote variables in if-statements and other places (SC2086)
While here, fix a whitespace at one end of line instance in the license
text.
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D40604
Current snapshot implementation doesn't support multiple devices with
similar type. For example, two virtio-blk or two CD-ROM-s, etc.
So the following configuration cannot be restored.
bhyve \
-s 3,virtio-blk,disk.img \
-s 4,virtio-blk,disk2.img
In some cases it is restored silently, but doesn't work. In some cases
it fails during restore stage.
This commit fixes that issue.
Reviewed by: corvink, rew
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40109
There is no error when dump doesn't have it, but to be more
consistent this PCI devices should be saved as well.
Reviewed by: corvink, rew
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40108
Each device needs a unique identifier to store and restore snapshots
properly. Adding the pci bsf information to the device name creates a
unique identifier as a bsf can't be occupied twice.
Reviewed by: corvink
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40107
Both devices and kernel struct can use the same 'lookup_dev'
function instead of having duplicated code.
Reviewed by: corvink, rew
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40105