Get rid of workarounds to avoid ins/outs instructions emitted by the guest.
They can be emulated if needed in the future. Obtained from: NetApp
This commit is contained in:
parent
46b1c55d9e
commit
1c211178a7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/bhyve/; revision=245053
@ -294,13 +294,9 @@ bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
|
||||
bus_size_t offset, u_int8_t *addr, size_t count)
|
||||
{
|
||||
|
||||
if (tag == X86_BUS_SPACE_IO) {
|
||||
while (count > 0) {
|
||||
*addr = inb(bsh + offset);
|
||||
count--;
|
||||
addr++;
|
||||
}
|
||||
} else {
|
||||
if (tag == X86_BUS_SPACE_IO)
|
||||
insb(bsh + offset, addr, count);
|
||||
else {
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile(" \n\
|
||||
cld \n\
|
||||
@ -319,13 +315,9 @@ bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
|
||||
bus_size_t offset, u_int16_t *addr, size_t count)
|
||||
{
|
||||
|
||||
if (tag == X86_BUS_SPACE_IO) {
|
||||
while (count > 0) {
|
||||
*addr = inw(bsh + offset);
|
||||
count--;
|
||||
addr++;
|
||||
}
|
||||
} else {
|
||||
if (tag == X86_BUS_SPACE_IO)
|
||||
insw(bsh + offset, addr, count);
|
||||
else {
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile(" \n\
|
||||
cld \n\
|
||||
@ -344,13 +336,9 @@ bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
|
||||
bus_size_t offset, u_int32_t *addr, size_t count)
|
||||
{
|
||||
|
||||
if (tag == X86_BUS_SPACE_IO) {
|
||||
while (count > 0) {
|
||||
*addr = inl(bsh + offset);
|
||||
count--;
|
||||
addr++;
|
||||
}
|
||||
} else {
|
||||
if (tag == X86_BUS_SPACE_IO)
|
||||
insl(bsh + offset, addr, count);
|
||||
else {
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile(" \n\
|
||||
cld \n\
|
||||
@ -585,13 +573,9 @@ bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
|
||||
bus_size_t offset, const u_int8_t *addr, size_t count)
|
||||
{
|
||||
|
||||
if (tag == X86_BUS_SPACE_IO) {
|
||||
while (count > 0) {
|
||||
outb(bsh + offset, *addr);
|
||||
addr++;
|
||||
count--;
|
||||
}
|
||||
} else {
|
||||
if (tag == X86_BUS_SPACE_IO)
|
||||
outsb(bsh + offset, addr, count);
|
||||
else {
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile(" \n\
|
||||
cld \n\
|
||||
@ -610,13 +594,9 @@ bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
|
||||
bus_size_t offset, const u_int16_t *addr, size_t count)
|
||||
{
|
||||
|
||||
if (tag == X86_BUS_SPACE_IO) {
|
||||
while (count > 0) {
|
||||
outw(bsh + offset, *addr);
|
||||
addr++;
|
||||
count--;
|
||||
}
|
||||
} else {
|
||||
if (tag == X86_BUS_SPACE_IO)
|
||||
outsw(bsh + offset, addr, count);
|
||||
else {
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile(" \n\
|
||||
cld \n\
|
||||
@ -635,13 +615,9 @@ bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
|
||||
bus_size_t offset, const u_int32_t *addr, size_t count)
|
||||
{
|
||||
|
||||
if (tag == X86_BUS_SPACE_IO) {
|
||||
while (count > 0) {
|
||||
outl(bsh + offset, *addr);
|
||||
addr++;
|
||||
count--;
|
||||
}
|
||||
} else {
|
||||
if (tag == X86_BUS_SPACE_IO)
|
||||
outsl(bsh + offset, addr, count);
|
||||
else {
|
||||
#ifdef __GNUCLIKE_ASM
|
||||
__asm __volatile(" \n\
|
||||
cld \n\
|
||||
|
Loading…
Reference in New Issue
Block a user