mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
vbox: remove USB (OHCI) pass-through support
The usage of the USBProxyDevice is no longer necessary because USB pass-through is now supported by using the xHCI device model. Issue #1863.
This commit is contained in:
parent
a62859bb39
commit
71b621775b
@ -30,7 +30,6 @@ SRC_CC += Main/src-client/MouseImpl.cpp
|
||||
SRC_CC += Main/src-client/VBoxDriversRegister.cpp
|
||||
SRC_CC += Main/src-client/VMMDevInterface.cpp
|
||||
SRC_CC += Main/src-client/SessionImpl.cpp
|
||||
SRC_CC += Main/src-client/USBDeviceImpl.cpp
|
||||
|
||||
SRC_CC += Main/src-server/AudioAdapterImpl.cpp
|
||||
SRC_CC += Main/src-server/BandwidthControlImpl.cpp
|
||||
@ -39,7 +38,6 @@ SRC_CC += Main/src-server/BIOSSettingsImpl.cpp
|
||||
SRC_CC += Main/src-server/ClientToken.cpp
|
||||
SRC_CC += Main/src-server/DHCPServerImpl.cpp
|
||||
SRC_CC += Main/src-server/GuestOSTypeImpl.cpp
|
||||
SRC_CC += Main/src-server/HostUSBDeviceImpl.cpp
|
||||
SRC_CC += Main/src-server/MachineImpl.cpp
|
||||
SRC_CC += Main/src-server/MachineImplCloneVM.cpp
|
||||
SRC_CC += Main/src-server/Matching.cpp
|
||||
@ -59,7 +57,6 @@ SRC_CC += Main/src-server/TokenImpl.cpp
|
||||
SRC_CC += Main/src-server/USBControllerImpl.cpp
|
||||
SRC_CC += Main/src-server/USBDeviceFilterImpl.cpp
|
||||
SRC_CC += Main/src-server/USBDeviceFiltersImpl.cpp
|
||||
SRC_CC += Main/src-server/USBProxyService.cpp
|
||||
SRC_CC += Main/src-server/VirtualBoxImpl.cpp
|
||||
SRC_CC += Main/src-server/VRDEServerImpl.cpp
|
||||
|
||||
|
@ -33,7 +33,6 @@ SRC_CC += Runtime/common/log/logrel.cpp \
|
||||
$(addprefix Runtime/generic/,$(filter-out $(FILTERED_OUT_SRC_CC), $(GENERIC_SRC_CC)))
|
||||
|
||||
SRC_CC += Runtime/common/err/RTErrConvertFromErrno.cpp
|
||||
SRC_CC += Runtime/common/alloc/alloc.cpp
|
||||
SRC_CC += Runtime/common/alloc/memcache.cpp
|
||||
SRC_CC += Runtime/common/alloc/heapoffset.cpp
|
||||
SRC_CC += Runtime/common/checksum/alt-md5.cpp
|
||||
|
@ -1 +1 @@
|
||||
a06860f27b9a7153e68eb9a0f2e12cf2fcdd1f41
|
||||
6305944f1109406627baf4fafcc37aa68020ab79
|
||||
|
@ -30,7 +30,7 @@ VBOX_MAIN_ALL += VirtualBoxBase
|
||||
VBOX_MAIN_CLI := AdditionsFacilityImpl ConsoleImpl2 DisplayImpl HGCM HGCMThread
|
||||
VBOX_MAIN_CLI += HGCMObjects
|
||||
VBOX_MAIN_CLI += KeyboardImpl SessionImpl VMMDevInterface BusAssignmentManager
|
||||
VBOX_MAIN_CLI += ConsoleImpl GuestImpl MouseImpl USBDeviceImpl VBoxDriversRegister
|
||||
VBOX_MAIN_CLI += ConsoleImpl GuestImpl MouseImpl VBoxDriversRegister
|
||||
|
||||
VBOX_MAIN_SRV := AudioAdapterImpl ClientToken DHCPServerImpl Matching
|
||||
VBOX_MAIN_SRV += MediumAttachmentImpl NATEngineImpl SerialPortImpl
|
||||
@ -41,7 +41,6 @@ VBOX_MAIN_SRV += NetworkServiceRunner StorageControllerImpl VirtualBoxImpl
|
||||
VBOX_MAIN_SRV += BIOSSettingsImpl MachineImpl MediumLock ParallelPortImpl
|
||||
VBOX_MAIN_SRV += SystemPropertiesImpl VRDEServerImpl TokenImpl
|
||||
VBOX_MAIN_SRV += USBControllerImpl USBDeviceFilterImpl USBDeviceFiltersImpl
|
||||
VBOX_MAIN_SRV += USBProxyService
|
||||
|
||||
VBOX_MAIN_INC := AdditionsFacilityImpl AudioAdapterImpl AudioSnifferInterface
|
||||
VBOX_MAIN_INC += AutoCaller AutostartDb AutoStateDep BandwidthControlImpl
|
||||
@ -63,7 +62,6 @@ VBOX_MAIN_INC += USBProxyService VirtualBoxImpl VRDEServerImpl GuestProcessImpl
|
||||
VBOX_MAIN_INC += USBDeviceImpl HostUSBDeviceImpl Matching Wrapper
|
||||
|
||||
VBOX_SRC_VBOX := VMM Devices Runtime GuestHost/HGSMI Storage Disassembler
|
||||
VBOX_SRC_VBOX += HostDrivers/VBoxUSB/USBFilter.cpp
|
||||
VBOX_SRC_VBOX += HostServices/SharedFolders Main/xml/Settings.cpp
|
||||
VBOX_SRC_VBOX += HostServices/SharedClipboard
|
||||
VBOX_SRC_VBOX += Main/xml/VirtualBox-settings.xsd Main/xml/SchemaDefs.xsl
|
||||
|
@ -1,480 +0,0 @@
|
||||
/*
|
||||
* \brief USBProxyDevice implementation for Genode
|
||||
* \author Christian Prochaska
|
||||
* \date 2015-04-13
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2015 Genode Labs GmbH
|
||||
*
|
||||
* This file is distributed under the terms of the GNU General Public License
|
||||
* version 2.
|
||||
*/
|
||||
|
||||
#include <base/allocator_avl.h>
|
||||
#include <base/printf.h>
|
||||
#include <timer_session/connection.h>
|
||||
#include <usb_session/connection.h>
|
||||
#include <util/construct_at.h>
|
||||
|
||||
#include <VBox/vmm/pdm.h>
|
||||
|
||||
#include "USBProxyDevice.h"
|
||||
|
||||
namespace Usb_proxy_device_genode {
|
||||
|
||||
static constexpr bool debug = false;
|
||||
|
||||
struct State_change_signal_context : Genode::Signal_context { };
|
||||
struct Ack_avail_signal_context : Genode::Signal_context { };
|
||||
struct Timeout_signal_context : Genode::Signal_context { };
|
||||
struct Wakeup_signal_context : Genode::Signal_context { };
|
||||
|
||||
class Data
|
||||
{
|
||||
private:
|
||||
|
||||
Genode::Allocator_avl _alloc;
|
||||
|
||||
public:
|
||||
|
||||
Usb::Connection usb_connection;
|
||||
Timer::Connection timer;
|
||||
|
||||
State_change_signal_context state_change_signal_context;
|
||||
Ack_avail_signal_context ack_avail_signal_context;
|
||||
Timeout_signal_context timeout_signal_context;
|
||||
Wakeup_signal_context wakeup_signal_context;
|
||||
Genode::Signal_context_capability wakeup_signal_context_cap;
|
||||
|
||||
Genode::Signal_receiver signal_receiver;
|
||||
|
||||
Data(unsigned int vendor_id, unsigned int product_id)
|
||||
: _alloc(Genode::env()->heap()),
|
||||
usb_connection(&_alloc)
|
||||
{
|
||||
/* wait until device and server are ready */
|
||||
|
||||
Genode::Signal_context_capability state_change_signal_context_cap =
|
||||
signal_receiver.manage(&state_change_signal_context);
|
||||
|
||||
usb_connection.sigh_state_change(state_change_signal_context_cap);
|
||||
|
||||
signal_receiver.wait_for_signal();
|
||||
|
||||
/* register the other signal handlers */
|
||||
|
||||
Genode::Signal_context_capability ack_avail_signal_context_cap =
|
||||
signal_receiver.manage(&ack_avail_signal_context);
|
||||
usb_connection.tx_channel()->sigh_ack_avail(ack_avail_signal_context_cap);
|
||||
|
||||
Genode::Signal_context_capability timeout_signal_context_cap =
|
||||
signal_receiver.manage(&timeout_signal_context);
|
||||
timer.sigh(timeout_signal_context_cap);
|
||||
|
||||
wakeup_signal_context_cap = signal_receiver.manage(&wakeup_signal_context);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/* keep a reference to the VirtualBox URB in a packet descriptor */
|
||||
struct Urb_preserve_completion : Usb::Completion
|
||||
{
|
||||
PVUSBURB pUrb;
|
||||
|
||||
void complete(Usb::Packet_descriptor &p) { }
|
||||
|
||||
Urb_preserve_completion(PVUSBURB pUrb) : pUrb(pUrb) { }
|
||||
virtual ~Urb_preserve_completion() { }
|
||||
};
|
||||
|
||||
static int open(PUSBPROXYDEV pProxyDev, const char *pszAddress, void *pvBackend);
|
||||
static int init(PUSBPROXYDEV pProxyDev);
|
||||
static void close(PUSBPROXYDEV pProxyDev);
|
||||
static int reset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux);
|
||||
static int set_config(PUSBPROXYDEV pProxyDev, int iCfg);
|
||||
static int claim_interface(PUSBPROXYDEV pProxyDev, int iIf);
|
||||
static int release_interface(PUSBPROXYDEV pProxyDev, int iIf);
|
||||
static int set_interface(PUSBPROXYDEV pProxyDev, int iIf, int iSetting);
|
||||
static int clear_halted_endpoint(PUSBPROXYDEV pDev, unsigned int iEp);
|
||||
static int urb_queue(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb);
|
||||
static int urb_cancel(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb);
|
||||
static PVUSBURB urb_reap(PUSBPROXYDEV pProxyDev, RTMSINTERVAL cMillies);
|
||||
static int wakeup(PUSBPROXYDEV pProxyDev);
|
||||
|
||||
};
|
||||
|
||||
int Usb_proxy_device_genode::open(PUSBPROXYDEV pProxyDev, const char *pszAddress, void *pvBackend)
|
||||
{
|
||||
char vendor_id_hex_str[7] = "0x";
|
||||
char product_id_hex_str[7] = "0x";
|
||||
const char *separator = strchr(pszAddress, ':');
|
||||
|
||||
Genode::strncpy(&vendor_id_hex_str[2], pszAddress, 5);
|
||||
Genode::strncpy(&product_id_hex_str[2], separator + 1, 5);
|
||||
|
||||
unsigned int vendor_id;
|
||||
unsigned int product_id;
|
||||
|
||||
Genode::ascii_to(vendor_id_hex_str, vendor_id);
|
||||
Genode::ascii_to(product_id_hex_str, product_id);
|
||||
|
||||
if (debug)
|
||||
PDBG("vendor_id: %x, product_id: %x", vendor_id, product_id);
|
||||
|
||||
Usb_proxy_device_genode::Data *data =
|
||||
USBPROXYDEV_2_DATA(pProxyDev, Usb_proxy_device_genode::Data*);
|
||||
|
||||
Genode::construct_at<Usb_proxy_device_genode::Data>(data, vendor_id, product_id);
|
||||
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::init(PUSBPROXYDEV pProxyDev)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("not implemented, returning VINF_SUCCESS anyway");
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
void Usb_proxy_device_genode::close(PUSBPROXYDEV pProxyDev)
|
||||
{
|
||||
Usb_proxy_device_genode::Data *data =
|
||||
USBPROXYDEV_2_DATA(pProxyDev, Usb_proxy_device_genode::Data*);
|
||||
|
||||
data->~Data();
|
||||
|
||||
if (debug)
|
||||
PDBG("not implemented");
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::reset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("not implemented, returning VINF_SUCCESS anyway");
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::set_config(PUSBPROXYDEV pProxyDev, int iCfg)
|
||||
{
|
||||
if (iCfg == 1) {
|
||||
/* default configuration */
|
||||
if (debug)
|
||||
PDBG("not implemented, returning VINF_SUCCESS anyway");
|
||||
return VINF_SUCCESS;
|
||||
} else {
|
||||
if (debug)
|
||||
PDBG("not implemented and iCfg != 1");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::claim_interface(PUSBPROXYDEV pProxyDev, int iIf)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("not implemented, returning VINF_SUCCESS anyway");
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::release_interface(PUSBPROXYDEV pProxyDev, int iIf)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("not implemented");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::set_interface(PUSBPROXYDEV pProxyDev, int iIf, int iSetting)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("not implemented");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::clear_halted_endpoint(PUSBPROXYDEV pDev, unsigned int iEp)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("not implemented, returning VINF_SUCCESS anyway");
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::urb_queue(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("EndPt = %u, enmType = %d, enmDir = %d, cbData = %u",
|
||||
pUrb->EndPt, pUrb->enmType, pUrb->enmDir, pUrb->cbData);
|
||||
|
||||
static int count = 0;
|
||||
|
||||
const char *dir_str = (pUrb->enmDir == VUSBDIRECTION_OUT) ? "OUT" : "IN";
|
||||
|
||||
Usb_proxy_device_genode::Data *data =
|
||||
USBPROXYDEV_2_DATA(pProxyDev, Usb_proxy_device_genode::Data*);
|
||||
|
||||
if (!data->usb_connection.source()->ready_to_submit()) {
|
||||
PERR("%s: not ready to submit", __PRETTY_FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
if (pUrb->enmType == VUSBXFERTYPE_MSG) {
|
||||
|
||||
if (pUrb->cbData < sizeof(VUSBSETUP))
|
||||
return VERR_BUFFER_UNDERFLOW;
|
||||
|
||||
PVUSBSETUP pSetup = (PVUSBSETUP)pUrb->abData;
|
||||
|
||||
if (debug)
|
||||
PDBG("control %s transfer: request_type = 0x%x, request = 0x%x,"
|
||||
"value = 0x%x, index = 0x%x, length = %u, cbData = %u",
|
||||
dir_str, pSetup->bmRequestType, pSetup->bRequest,
|
||||
pSetup->wValue, pSetup->wIndex, pSetup->wLength, pUrb->cbData);
|
||||
|
||||
Usb::Packet_descriptor p = data->usb_connection.source()->alloc_packet(pSetup->wLength);
|
||||
|
||||
p.type = Usb::Packet_descriptor::CTRL;
|
||||
p.succeded = false;
|
||||
p.control.request = pSetup->bRequest;
|
||||
p.control.request_type = pSetup->bmRequestType;
|
||||
p.control.value = pSetup->wValue;
|
||||
p.control.index = pSetup->wIndex;
|
||||
p.control.timeout = 1000;
|
||||
p.completion = new Urb_preserve_completion(pUrb);
|
||||
|
||||
if ((pUrb->enmDir == VUSBDIRECTION_OUT) && (pSetup->wLength > 0)) {
|
||||
char *packet_content = data->usb_connection.source()->packet_content(p);
|
||||
Genode::memcpy(packet_content, (pSetup + 1), pSetup->wLength);
|
||||
}
|
||||
|
||||
if (debug)
|
||||
PDBG("submitting packet: %d", ++count);
|
||||
|
||||
data->usb_connection.source()->submit_packet(p);
|
||||
|
||||
return VINF_SUCCESS;
|
||||
|
||||
} else if ((pUrb->enmType == VUSBXFERTYPE_INTR) ||
|
||||
(pUrb->enmType == VUSBXFERTYPE_BULK)) {
|
||||
|
||||
Usb::Packet_descriptor p = data->usb_connection.source()->alloc_packet(pUrb->cbData);
|
||||
|
||||
if (pUrb->enmType == VUSBXFERTYPE_INTR) {
|
||||
if (debug)
|
||||
PDBG("interrupt %s transfer", dir_str);
|
||||
p.type = Usb::Packet_descriptor::IRQ;
|
||||
} else {
|
||||
if (debug)
|
||||
PDBG("bulk %s transfer", dir_str);
|
||||
p.type = Usb::Packet_descriptor::BULK;
|
||||
}
|
||||
|
||||
p.succeded = false;
|
||||
p.transfer.ep = pUrb->EndPt | (pUrb->enmDir == VUSBDIRECTION_IN ?
|
||||
Usb::ENDPOINT_IN :
|
||||
Usb::ENDPOINT_OUT);
|
||||
p.transfer.timeout = 100;
|
||||
p.completion = new Urb_preserve_completion(pUrb);
|
||||
|
||||
if ((pUrb->enmDir == VUSBDIRECTION_OUT) && (pUrb->cbData > 0)) {
|
||||
char *packet_content = data->usb_connection.source()->packet_content(p);
|
||||
Genode::memcpy(packet_content, pUrb->abData, pUrb->cbData);
|
||||
}
|
||||
|
||||
if (debug)
|
||||
PDBG("submitting packet: %d", ++count);
|
||||
|
||||
data->usb_connection.source()->submit_packet(p);
|
||||
|
||||
return VINF_SUCCESS;
|
||||
|
||||
} else
|
||||
PERR("%s: unsupported transfer type %d", __PRETTY_FUNCTION__, (int)pUrb->enmType);
|
||||
|
||||
} catch (Usb::Session::Tx::Source::Packet_alloc_failed) {
|
||||
|
||||
if (debug)
|
||||
PDBG("packet allocation failed");
|
||||
|
||||
return -1;
|
||||
|
||||
} catch (...) {
|
||||
|
||||
PWRN("%s: an unhandled exception occured", __PRETTY_FUNCTION__);
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::urb_cancel(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("not implemented, returning VINF_SUCCESS anyway");
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
PVUSBURB Usb_proxy_device_genode::urb_reap(PUSBPROXYDEV pProxyDev, RTMSINTERVAL cMillies)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("cMillies = %u", cMillies);
|
||||
|
||||
Usb_proxy_device_genode::Data *data =
|
||||
USBPROXYDEV_2_DATA(pProxyDev, Usb_proxy_device_genode::Data*);
|
||||
|
||||
if (!data->usb_connection.source()->ack_avail()) {
|
||||
|
||||
unsigned long elapsed_ms_start = data->timer.elapsed_ms();
|
||||
|
||||
if (cMillies != RT_INDEFINITE_WAIT)
|
||||
data->timer.trigger_once(cMillies * 1000);
|
||||
|
||||
for (;;) {
|
||||
|
||||
if (debug)
|
||||
PDBG("waiting for signal");
|
||||
|
||||
Genode::Signal signal = data->signal_receiver.wait_for_signal();
|
||||
|
||||
Genode::Signal_context *context = signal.context();
|
||||
|
||||
if (dynamic_cast<Timeout_signal_context*>(context)) {
|
||||
|
||||
if (cMillies == RT_INDEFINITE_WAIT) {
|
||||
/* received an old signal */
|
||||
if (debug)
|
||||
PDBG("old timeout signal received");
|
||||
continue;
|
||||
}
|
||||
|
||||
unsigned long elapsed_ms_now = data->timer.elapsed_ms();
|
||||
|
||||
if (elapsed_ms_now - elapsed_ms_start < cMillies) {
|
||||
/* received an old signal */
|
||||
if (debug)
|
||||
PDBG("old timeout signal received");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
PDBG("timeout signal received");
|
||||
|
||||
return 0;
|
||||
|
||||
} else if (dynamic_cast<Wakeup_signal_context*>(context)) {
|
||||
|
||||
if (debug)
|
||||
PDBG("wakeup signal received");
|
||||
|
||||
return 0;
|
||||
|
||||
} else if (dynamic_cast<Ack_avail_signal_context*>(context)) {
|
||||
|
||||
if (debug)
|
||||
PDBG("ack avail signal received");
|
||||
|
||||
if (data->usb_connection.source()->ack_avail())
|
||||
break;
|
||||
else
|
||||
continue;
|
||||
|
||||
} else if (dynamic_cast<State_change_signal_context*>(context)) {
|
||||
|
||||
if (debug)
|
||||
PDBG("state change signal received");
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Usb::Packet_descriptor p = data->usb_connection.source()->get_acked_packet();
|
||||
|
||||
static int count = 0;
|
||||
|
||||
if (debug)
|
||||
PDBG("got packet: %d, succeded = %d", ++count, p.succeded);
|
||||
|
||||
Urb_preserve_completion *completion = static_cast<Urb_preserve_completion*>(p.completion);
|
||||
PVUSBURB pUrb = completion->pUrb;
|
||||
delete completion;
|
||||
|
||||
if (!p.succeded) {
|
||||
pUrb->enmStatus = VUSBSTATUS_DNR;
|
||||
return pUrb;
|
||||
}
|
||||
|
||||
if (pUrb->enmType == VUSBXFERTYPE_MSG) {
|
||||
|
||||
PVUSBSETUP pSetup = (PVUSBSETUP)pUrb->abData;
|
||||
|
||||
pSetup->wLength = p.control.actual_size;
|
||||
pUrb->cbData = sizeof(VUSBSETUP) + pSetup->wLength;
|
||||
|
||||
if (debug)
|
||||
PDBG("pSetup->wLength = %u, pUrb->cbData = %u",
|
||||
pSetup->wLength, pUrb->cbData);
|
||||
|
||||
if ((pUrb->enmDir == VUSBDIRECTION_IN) && (pSetup->wLength > 0)) {
|
||||
char *packet_content = data->usb_connection.source()->packet_content(p);
|
||||
Genode::memcpy((pSetup + 1), packet_content, pSetup->wLength);
|
||||
}
|
||||
|
||||
data->usb_connection.source()->release_packet(p);
|
||||
|
||||
pUrb->enmStatus = VUSBSTATUS_OK;
|
||||
|
||||
} else if ((pUrb->enmType == VUSBXFERTYPE_INTR) ||
|
||||
(pUrb->enmType == VUSBXFERTYPE_BULK)) {
|
||||
|
||||
pUrb->cbData = p.transfer.actual_size;
|
||||
|
||||
if ((pUrb->enmDir == VUSBDIRECTION_IN) && (pUrb->cbData > 0)) {
|
||||
char *packet_content = data->usb_connection.source()->packet_content(p);
|
||||
Genode::memcpy(pUrb->abData, packet_content, pUrb->cbData);
|
||||
}
|
||||
|
||||
data->usb_connection.source()->release_packet(p);
|
||||
|
||||
pUrb->enmStatus = VUSBSTATUS_OK;
|
||||
|
||||
} else {
|
||||
PERR("%s: unsupported transfer type %d", __PRETTY_FUNCTION__, (int)pUrb->enmType);
|
||||
}
|
||||
|
||||
return pUrb;
|
||||
|
||||
}
|
||||
|
||||
int Usb_proxy_device_genode::wakeup(PUSBPROXYDEV pProxyDev)
|
||||
{
|
||||
if (debug)
|
||||
PDBG("wakeup()");
|
||||
|
||||
Usb_proxy_device_genode::Data *data =
|
||||
USBPROXYDEV_2_DATA(pProxyDev, Usb_proxy_device_genode::Data*);
|
||||
|
||||
Genode::Signal_transmitter(data->wakeup_signal_context_cap).submit();
|
||||
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
extern const USBPROXYBACK g_USBProxyDeviceHost =
|
||||
{
|
||||
"host",
|
||||
sizeof(Usb_proxy_device_genode::Data),
|
||||
Usb_proxy_device_genode::open,
|
||||
Usb_proxy_device_genode::init,
|
||||
Usb_proxy_device_genode::close,
|
||||
Usb_proxy_device_genode::reset,
|
||||
Usb_proxy_device_genode::set_config,
|
||||
Usb_proxy_device_genode::claim_interface,
|
||||
Usb_proxy_device_genode::release_interface,
|
||||
Usb_proxy_device_genode::set_interface,
|
||||
Usb_proxy_device_genode::clear_halted_endpoint,
|
||||
Usb_proxy_device_genode::urb_queue,
|
||||
Usb_proxy_device_genode::urb_cancel,
|
||||
Usb_proxy_device_genode::urb_reap,
|
||||
Usb_proxy_device_genode::wakeup,
|
||||
0
|
||||
};
|
@ -1,262 +0,0 @@
|
||||
/*
|
||||
* \brief USBProxyService implementation for Genode
|
||||
* \author Christian Prochaska
|
||||
* \date 2015-04-13
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2015 Genode Labs GmbH
|
||||
*
|
||||
* This file is distributed under the terms of the GNU General Public License
|
||||
* version 2.
|
||||
*/
|
||||
|
||||
#ifndef ____H_USBPROXYSERVICEGENODE
|
||||
#define ____H_USBPROXYSERVICEGENODE
|
||||
|
||||
#include <os/attached_rom_dataspace.h>
|
||||
#include <os/timed_semaphore.h>
|
||||
#include <timer_session/connection.h>
|
||||
#include <util/xml_node.h>
|
||||
|
||||
#include <USBProxyService.h>
|
||||
|
||||
class USBProxyServiceGenode : public USBProxyService
|
||||
{
|
||||
private:
|
||||
|
||||
static constexpr bool debug = false;
|
||||
|
||||
struct Device_list_change_signal_context : Genode::Signal_context { };
|
||||
struct Timeout_signal_context : Genode::Signal_context { };
|
||||
struct Wakeup_signal_context : Genode::Signal_context { };
|
||||
|
||||
Timer::Connection _timer;
|
||||
Genode::Signal_receiver _signal_receiver;
|
||||
Device_list_change_signal_context _device_list_change_signal_context;
|
||||
Timeout_signal_context _timeout_signal_context;
|
||||
Wakeup_signal_context _wakeup_signal_context;
|
||||
Genode::Signal_context_capability _wakeup_signal_context_cap;
|
||||
|
||||
Genode::Attached_rom_dataspace *_usb_devices_ds = 0;
|
||||
|
||||
Genode::Timed_semaphore _wait_sem;
|
||||
|
||||
PUSBDEVICE _create_usb_device(Genode::Xml_node &device_node)
|
||||
{
|
||||
unsigned int vendor_id = 0;
|
||||
unsigned int product_id = 0;
|
||||
|
||||
device_node.attribute("vendor_id").value(&vendor_id);
|
||||
device_node.attribute("product_id").value(&product_id);
|
||||
|
||||
if (debug)
|
||||
PDBG("vendor_id: %4x, product_id: %4x", vendor_id, product_id);
|
||||
|
||||
char address_buf[10];
|
||||
Genode::snprintf(address_buf, sizeof(address_buf),
|
||||
"%4x:%4x", vendor_id, product_id);
|
||||
|
||||
PUSBDEVICE dev = (PUSBDEVICE)RTMemAllocZ(sizeof(USBDEVICE));
|
||||
|
||||
dev->idVendor = vendor_id;
|
||||
dev->idProduct = product_id;
|
||||
dev->pszAddress = RTStrDup(address_buf);
|
||||
|
||||
dev->pNext = 0;
|
||||
dev->pPrev = 0;
|
||||
dev->pszManufacturer = 0;
|
||||
dev->pszSerialNumber = 0;
|
||||
dev->pszProduct = "";
|
||||
dev->bcdDevice = 0;
|
||||
dev->bcdUSB = 0;
|
||||
dev->bDeviceClass = 0x0;
|
||||
dev->bDeviceSubClass = 0x0;
|
||||
dev->bDeviceProtocol = 0x0;
|
||||
dev->bNumConfigurations = 1;
|
||||
dev->enmState = USBDEVICESTATE_UNUSED;
|
||||
dev->enmSpeed = USBDEVICESPEED_LOW;
|
||||
dev->u64SerialHash = 0;
|
||||
dev->bBus = 1;
|
||||
dev->bPort = 1;
|
||||
dev->bDevNum = 3;
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
USBProxyServiceGenode(Host *aHost) : USBProxyService(aHost)
|
||||
{
|
||||
try {
|
||||
_usb_devices_ds = new Genode::Attached_rom_dataspace("usb_devices");
|
||||
|
||||
Genode::Signal_context_capability device_list_change_signal_context_cap =
|
||||
_signal_receiver.manage(&_device_list_change_signal_context);
|
||||
_usb_devices_ds->sigh(device_list_change_signal_context_cap);
|
||||
|
||||
} catch (...) {
|
||||
PWRN("Could not retrieve the \"usb_devices\" ROM file."
|
||||
"USB device pass-through unavailable.");
|
||||
}
|
||||
|
||||
Genode::Signal_context_capability timeout_signal_context_cap =
|
||||
_signal_receiver.manage(&_timeout_signal_context);
|
||||
_timer.sigh(timeout_signal_context_cap);
|
||||
|
||||
_wakeup_signal_context_cap = _signal_receiver.manage(&_wakeup_signal_context);
|
||||
}
|
||||
|
||||
~USBProxyServiceGenode()
|
||||
{
|
||||
delete _usb_devices_ds;
|
||||
}
|
||||
|
||||
HRESULT init()
|
||||
{
|
||||
if (debug)
|
||||
RTLogPrintf("USBProxyServiceGenode::init()\n");
|
||||
|
||||
/*
|
||||
* Start the poller thread.
|
||||
*/
|
||||
return (HRESULT)start();
|
||||
}
|
||||
|
||||
PUSBDEVICE getDevices()
|
||||
{
|
||||
if (debug)
|
||||
RTLogPrintf("USBProxyServiceGenode::getDevices()\n");
|
||||
|
||||
PUSBDEVICE first_dev = 0;
|
||||
|
||||
if (!_usb_devices_ds)
|
||||
return first_dev;
|
||||
|
||||
_usb_devices_ds->update();
|
||||
|
||||
if (!_usb_devices_ds->is_valid())
|
||||
return first_dev;
|
||||
|
||||
try {
|
||||
char *content = _usb_devices_ds->local_addr<char>();
|
||||
|
||||
if (debug)
|
||||
PDBG("content: %s", content);
|
||||
|
||||
Genode::Xml_node devices_node(_usb_devices_ds->local_addr<char>());
|
||||
|
||||
Genode::Xml_node device_node = devices_node.sub_node("device");
|
||||
|
||||
first_dev = _create_usb_device(device_node);
|
||||
|
||||
PUSBDEVICE prev_dev = first_dev;
|
||||
for (;;) {
|
||||
device_node = device_node.next("device");
|
||||
PUSBDEVICE dev = _create_usb_device(device_node);
|
||||
prev_dev->pNext = dev;
|
||||
dev->pPrev = prev_dev;
|
||||
prev_dev = dev;
|
||||
}
|
||||
|
||||
} catch (...) { }
|
||||
|
||||
return first_dev;
|
||||
}
|
||||
|
||||
int wait(RTMSINTERVAL aMillies)
|
||||
{
|
||||
if (debug)
|
||||
RTLogPrintf("USBProxyServiceGenode::wait(): aMillies = %u\n",
|
||||
aMillies);
|
||||
|
||||
unsigned long elapsed_ms_start = _timer.elapsed_ms();
|
||||
|
||||
if (aMillies != RT_INDEFINITE_WAIT)
|
||||
_timer.trigger_once(aMillies * 1000);
|
||||
|
||||
for (;;) {
|
||||
|
||||
if (debug)
|
||||
PDBG("waiting for signal");
|
||||
|
||||
Genode::Signal signal = _signal_receiver.wait_for_signal();
|
||||
|
||||
Genode::Signal_context *context = signal.context();
|
||||
|
||||
if (dynamic_cast<Timeout_signal_context*>(context)) {
|
||||
|
||||
if (aMillies == RT_INDEFINITE_WAIT) {
|
||||
/* received an old signal */
|
||||
if (debug)
|
||||
PDBG("old timeout signal received");
|
||||
continue;
|
||||
}
|
||||
|
||||
unsigned long elapsed_ms_now = _timer.elapsed_ms();
|
||||
|
||||
if (elapsed_ms_now - elapsed_ms_start < aMillies) {
|
||||
/* received an old signal */
|
||||
if (debug)
|
||||
PDBG("old timeout signal received");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
PDBG("timeout signal received");
|
||||
|
||||
break;
|
||||
|
||||
} else if (dynamic_cast<Wakeup_signal_context*>(context)) {
|
||||
|
||||
if (debug)
|
||||
PDBG("wakeup signal received");
|
||||
|
||||
break;
|
||||
|
||||
} else if (dynamic_cast<Device_list_change_signal_context*>(context)) {
|
||||
|
||||
if (debug)
|
||||
PDBG("device list change signal received");
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
int interruptWait()
|
||||
{
|
||||
if (debug)
|
||||
RTLogPrintf("USBProxyServiceGenode::interruptWait()\n");
|
||||
|
||||
Genode::Signal_transmitter(_wakeup_signal_context_cap).submit();
|
||||
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
int captureDevice(HostUSBDevice *aDevice)
|
||||
{
|
||||
if (debug)
|
||||
RTLogPrintf("USBProxyServiceGenode::captureDevice()\n");
|
||||
|
||||
interruptWait();
|
||||
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
bool updateDeviceState(HostUSBDevice *aDevice,
|
||||
PUSBDEVICE aUSBDevice,
|
||||
bool *aRunFilters,
|
||||
SessionMachine **aIgnoreMachine)
|
||||
{
|
||||
if (debug)
|
||||
RTLogPrintf("USBProxyServiceGenode::updateDeviceState()\n");
|
||||
|
||||
return updateDeviceStateFake(aDevice, aUSBDevice, aRunFilters, aIgnoreMachine);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // ____H_USBPROXYSERVICEGENODE
|
@ -115,9 +115,8 @@ HRESULT Console::onCPUExecutionCapChange(ULONG aExecutionCap)
|
||||
HRESULT Console::onStorageControllerChange() DUMMY(E_FAIL)
|
||||
HRESULT Console::onMediumChange(IMediumAttachment *aMediumAttachment, BOOL) DUMMY(E_FAIL)
|
||||
HRESULT Console::onVRDEServerChange(BOOL aRestart) DUMMY(E_FAIL)
|
||||
|
||||
void Console::onUSBDeviceStateChange(IUSBDevice *aDevice, bool aAttached,
|
||||
IVirtualBoxErrorInfo *aError) TRACE()
|
||||
HRESULT Console::onUSBDeviceAttach(IUSBDevice *, IVirtualBoxErrorInfo *, ULONG) DUMMY(E_FAIL)
|
||||
HRESULT Console::onUSBDeviceDetach(IN_BSTR aId, IVirtualBoxErrorInfo *aError) DUMMY(E_FAIL)
|
||||
|
||||
HRESULT Console::onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId) DUMMY(E_FAIL)
|
||||
HRESULT Console::onNetworkAdapterChange(INetworkAdapter *, BOOL changeAdapter) DUMMY(E_FAIL)
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "VirtualBoxBase.h"
|
||||
|
||||
#include <VBox/usbfilter.h>
|
||||
#include <USBProxyServiceGenode.h>
|
||||
|
||||
#include "dummy/macros.h"
|
||||
|
||||
@ -12,13 +11,6 @@
|
||||
static bool debug = false;
|
||||
|
||||
|
||||
struct Host::Data
|
||||
{
|
||||
VirtualBox *pParent;
|
||||
USBDeviceFilterList llUSBDeviceFilters; // USB device filters in use by the USB proxy service
|
||||
USBProxyService *pUSBProxyService;
|
||||
};
|
||||
|
||||
STDMETHODIMP Host::COMGETTER(DVDDrives)(ComSafeArrayOut(IMedium *, drives)) DUMMY(E_FAIL)
|
||||
STDMETHODIMP Host::COMGETTER(FloppyDrives)(ComSafeArrayOut(IMedium *, drives)) DUMMY(E_FAIL)
|
||||
STDMETHODIMP Host::COMGETTER(USBDevices)(ComSafeArrayOut(IHostUSBDevice *, aUSBDevices)) DUMMY(E_FAIL)
|
||||
@ -69,36 +61,11 @@ HRESULT Host::findHostDriveById(DeviceType_T, com::Guid const&, bool,
|
||||
|
||||
HRESULT Host::saveSettings(settings::Host&) TRACE(S_OK)
|
||||
|
||||
HRESULT Host::init(VirtualBox *aParent)
|
||||
{
|
||||
HRESULT hrc;
|
||||
|
||||
m = new Data();
|
||||
|
||||
m->pParent = aParent;
|
||||
|
||||
m->pUSBProxyService = new USBProxyServiceGenode(this);
|
||||
|
||||
hrc = m->pUSBProxyService->init();
|
||||
AssertComRCReturn(hrc, hrc);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT Host::init(VirtualBox *aParent) TRACE(S_OK)
|
||||
HRESULT Host::loadSettings(const settings::Host &) TRACE(S_OK)
|
||||
HRESULT Host::FinalConstruct() TRACE(S_OK)
|
||||
void Host::FinalRelease() DUMMY()
|
||||
|
||||
void Host::uninit()
|
||||
{
|
||||
delete m->pUSBProxyService;
|
||||
m->pUSBProxyService = 0;
|
||||
|
||||
m->llUSBDeviceFilters.clear();
|
||||
|
||||
delete m;
|
||||
m = 0;
|
||||
}
|
||||
void Host::uninit() DUMMY()
|
||||
|
||||
void Host::generateMACAddress(Utf8Str &mac)
|
||||
{
|
||||
@ -142,24 +109,22 @@ HRESULT Host::buildFloppyDrivesList(MediaList &list) DUMMY(E_FAIL)
|
||||
#ifdef VBOX_WITH_USB
|
||||
USBProxyService* Host::usbProxyService()
|
||||
{
|
||||
return m->pUSBProxyService;
|
||||
TRACE(nullptr)
|
||||
}
|
||||
|
||||
HRESULT Host::addChild(HostUSBDeviceFilter *pChild) DUMMY(E_FAIL)
|
||||
HRESULT Host::removeChild(HostUSBDeviceFilter *pChild) DUMMY(E_FAIL)
|
||||
|
||||
VirtualBox* Host::parent()
|
||||
{
|
||||
return m->pParent;
|
||||
}
|
||||
VirtualBox* Host::parent() DUMMY(nullptr)
|
||||
|
||||
HRESULT Host::onUSBDeviceFilterChange(HostUSBDeviceFilter *, BOOL) DUMMY(E_FAIL)
|
||||
|
||||
void Host::getUSBFilters(Host::USBDeviceFilterList *aGlobalFilters)
|
||||
{
|
||||
*aGlobalFilters = m->llUSBDeviceFilters;
|
||||
}
|
||||
void Host::getUSBFilters(Host::USBDeviceFilterList *aGlobalFilters) DUMMY()
|
||||
|
||||
HRESULT Host::checkUSBProxyService() TRACE(S_OK)
|
||||
|
||||
#include "HostUSBDeviceImpl.h"
|
||||
#include "USBDeviceFilterImpl.h"
|
||||
|
||||
bool HostUSBDevice::isMatch(const USBDeviceFilter::Data &aData) DUMMY(false)
|
||||
|
||||
#endif
|
||||
|
@ -178,6 +178,36 @@ HRESULT SharedFolder::init(Console*, com::Utf8Str const&, com::Utf8Str const&,
|
||||
bool, bool, bool) DUMMY(E_FAIL)
|
||||
|
||||
|
||||
/* USBFilter.cpp */
|
||||
|
||||
#include "VBox/usbfilter.h"
|
||||
|
||||
USBFILTERMATCH USBFilterGetMatchingMethod(PCUSBFILTER, USBFILTERIDX) DUMMY(USBFILTERMATCH_INVALID)
|
||||
int USBFilterGetNum(PCUSBFILTER pFilter, USBFILTERIDX enmFieldIdx) DUMMY(-1)
|
||||
const char * USBFilterGetString(PCUSBFILTER pFilter, USBFILTERIDX enmFieldIdx) DUMMY(nullptr)
|
||||
void USBFilterInit(PUSBFILTER pFilter, USBFILTERTYPE enmType) DUMMY()
|
||||
bool USBFilterIsMethodNumeric(USBFILTERMATCH enmMatchingMethod) DUMMY(false)
|
||||
bool USBFilterIsMethodString(USBFILTERMATCH enmMatchingMethod) DUMMY(false)
|
||||
bool USBFilterIsNumericField(USBFILTERIDX enmFieldIdx) DUMMY(false)
|
||||
bool USBFilterIsStringField(USBFILTERIDX enmFieldIdx) DUMMY(false)
|
||||
bool USBFilterMatch(PCUSBFILTER pFilter, PCUSBFILTER pDevice) DUMMY(false)
|
||||
int USBFilterSetIgnore(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx) DUMMY(-1)
|
||||
int USBFilterSetNumExact(PUSBFILTER, USBFILTERIDX, uint16_t, bool) DUMMY(-1)
|
||||
int USBFilterSetNumExpression(PUSBFILTER, USBFILTERIDX, const char *, bool) DUMMY(-1)
|
||||
int USBFilterSetStringExact(PUSBFILTER, USBFILTERIDX, const char *, bool) DUMMY(-1)
|
||||
int USBFilterSetStringPattern(PUSBFILTER, USBFILTERIDX, const char *, bool) DUMMY(-1)
|
||||
|
||||
|
||||
/* USBProxyService.cpp */
|
||||
|
||||
#include "USBProxyService.h"
|
||||
|
||||
HRESULT USBProxyService::autoCaptureDevicesForVM(SessionMachine *) DUMMY(E_FAIL)
|
||||
HRESULT USBProxyService::captureDeviceForVM(SessionMachine *, IN_GUID) DUMMY(E_FAIL)
|
||||
HRESULT USBProxyService::detachAllDevicesFromVM(SessionMachine*, bool, bool) DUMMY(E_FAIL)
|
||||
HRESULT USBProxyService::detachDeviceFromVM(SessionMachine*, IN_GUID, bool) DUMMY(E_FAIL)
|
||||
|
||||
|
||||
/* VirtualBoxImpl.cpp */
|
||||
|
||||
#include "VirtualBoxImpl.h"
|
||||
|
@ -1,32 +0,0 @@
|
||||
powerbutton.patch
|
||||
|
||||
diff --git a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
index b0b04ad..3680be4 100644
|
||||
--- a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
+++ b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
@@ -106,7 +106,9 @@
|
||||
#if 0
|
||||
#include <VBox/vmm/vmapi.h>
|
||||
#include <VBox/vmm/vmm.h>
|
||||
+#endif
|
||||
#include <VBox/vmm/pdmapi.h>
|
||||
+#if 0
|
||||
#include <VBox/vmm/pdmasynccompletion.h>
|
||||
#include <VBox/vmm/pdmnetifs.h>
|
||||
#endif
|
||||
@@ -2625,6 +2627,7 @@ STDMETHODIMP Console::Resume()
|
||||
LogFlowThisFuncLeave();
|
||||
return rc;
|
||||
}
|
||||
+#endif
|
||||
|
||||
STDMETHODIMP Console::PowerButton()
|
||||
{
|
||||
@@ -2671,6 +2674,7 @@ STDMETHODIMP Console::PowerButton()
|
||||
return rc;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
STDMETHODIMP Console::GetPowerButtonHandled(BOOL *aHandled)
|
||||
{
|
||||
LogFlowThisFuncEnter();
|
@ -23,5 +23,4 @@ usb.patch
|
||||
tm_smp.patch
|
||||
posix.patch
|
||||
hostservice.patch
|
||||
powerbutton.patch
|
||||
vbox_dd.patch
|
||||
|
@ -1,17 +1,21 @@
|
||||
usb.patch
|
||||
|
||||
diff --git a/src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp b/src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp
|
||||
index a51bc36..d21c6cb 100644
|
||||
index a51bc36..bed42e8 100644
|
||||
--- a/src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp
|
||||
+++ b/src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp
|
||||
@@ -845,8 +845,10 @@ static DECLCALLBACK(int) usbProxyConstruct(PPDMUSBINS pUsbIns, int iInstance, PC
|
||||
@@ -843,10 +843,14 @@ static DECLCALLBACK(int) usbProxyConstruct(PPDMUSBINS pUsbIns, int iInstance, PC
|
||||
/*
|
||||
* Select backend and open the device.
|
||||
*/
|
||||
+
|
||||
+ return PDMUSB_SET_ERROR(pUsbIns, VERR_NOT_SUPPORTED, N_("USBProxy: not supported on Genode"));
|
||||
+#if 0
|
||||
if (!fRemote)
|
||||
pThis->pOps = &g_USBProxyDeviceHost;
|
||||
+#if 0
|
||||
else
|
||||
pThis->pOps = &g_USBProxyDeviceVRDP;
|
||||
+#endif
|
||||
+#endif /* if 0 */
|
||||
|
||||
pThis->pvInstanceDataR3 = RTMemAllocZ(pThis->pOps->cbBackend);
|
||||
if (!pThis->pvInstanceDataR3)
|
||||
@ -91,21 +95,41 @@ index 2f01f69..9b13e37 100644
|
||||
|
||||
private:
|
||||
|
||||
diff --git a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
index 141bb98..43cedfe 100644
|
||||
--- a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
+++ b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
@@ -9136,10 +9136,9 @@ HRESULT Console::captureUSBDevices(PUVM pUVM)
|
||||
* us back from under its lock (e.g. onUSBDeviceAttach()) which would
|
||||
* produce an inter-process dead-lock otherwise. */
|
||||
alock.release();
|
||||
-#if 0
|
||||
+
|
||||
HRESULT hrc = mControl->AutoCaptureUSBDevices();
|
||||
ComAssertComRCRetRC(hrc);
|
||||
-#endif
|
||||
}
|
||||
diff --git a/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp b/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
|
||||
index 3889a01..7ae9d1c 100644
|
||||
--- a/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
|
||||
+++ b/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
|
||||
@@ -13571,6 +13582,7 @@ STDMETHODIMP SessionMachine::AutoCaptureUSBDevices()
|
||||
AutoCaller autoCaller(this);
|
||||
AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
|
||||
|
||||
+#if 0
|
||||
#ifdef VBOX_WITH_USB
|
||||
HRESULT rc = mUSBDeviceFilters->notifyProxy(true /* aInsertFilters */);
|
||||
AssertComRC(rc);
|
||||
@@ -13579,6 +13591,7 @@ STDMETHODIMP SessionMachine::AutoCaptureUSBDevices()
|
||||
USBProxyService *service = mParent->host()->usbProxyService();
|
||||
AssertReturn(service, E_FAIL);
|
||||
return service->autoCaptureDevicesForVM(this);
|
||||
+#endif /* if 0 */
|
||||
#else
|
||||
return S_OK;
|
||||
#endif
|
||||
@@ -13614,6 +13614,7 @@
|
||||
AutoCaller autoCaller(this);
|
||||
AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
|
||||
|
||||
+#if 0
|
||||
#ifdef VBOX_WITH_USB
|
||||
HRESULT rc = mUSBDeviceFilters->notifyProxy(false /* aInsertFilters */);
|
||||
AssertComRC(rc);
|
||||
@@ -13622,6 +13623,7 @@
|
||||
USBProxyService *service = mParent->host()->usbProxyService();
|
||||
AssertReturn(service, E_FAIL);
|
||||
return service->detachAllDevicesFromVM(this, !!aDone, false /* aAbnormal */);
|
||||
+#endif /* if 0 */
|
||||
#else
|
||||
NOREF(aDone);
|
||||
return S_OK;
|
||||
diff --git a/src/app/virtualbox/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp b/src/app/virtualbox/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
|
||||
index 09b42f5..c179ca6 100644
|
||||
|
@ -336,18 +336,16 @@ index b43f5a6..6aef9df 100644
|
||||
{"acpi", 0, 7, 0, 0},
|
||||
|
||||
diff --git a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
index 69e3109..141bb98 100644
|
||||
index 69e3109..3c534df 100644
|
||||
--- a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
+++ b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
@@ -51,23 +51,34 @@
|
||||
@@ -51,23 +51,32 @@
|
||||
#include "KeyboardImpl.h"
|
||||
#include "MouseImpl.h"
|
||||
#include "DisplayImpl.h"
|
||||
+#if 0
|
||||
#include "MachineDebuggerImpl.h"
|
||||
+#endif
|
||||
#include "USBDeviceImpl.h"
|
||||
+#if 0
|
||||
#include "RemoteUSBDeviceImpl.h"
|
||||
+#endif
|
||||
#include "SharedFolderImpl.h"
|
||||
@ -374,7 +372,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
#include "VBoxEvents.h"
|
||||
#include "AutoCaller.h"
|
||||
@@ -75,7 +86,9 @@
|
||||
@@ -75,7 +84,9 @@
|
||||
|
||||
#include <VBox/com/array.h>
|
||||
#include "VBox/com/ErrorInfo.h"
|
||||
@ -384,25 +382,20 @@ index 69e3109..141bb98 100644
|
||||
|
||||
#include <iprt/asm.h>
|
||||
#include <iprt/buildconfig.h>
|
||||
@@ -90,14 +103,17 @@
|
||||
@@ -90,9 +101,12 @@
|
||||
#include <iprt/base64.h>
|
||||
#include <iprt/memsafer.h>
|
||||
|
||||
+#if 0
|
||||
#include <VBox/vmm/vmapi.h>
|
||||
#include <VBox/vmm/vmm.h>
|
||||
+#endif
|
||||
#include <VBox/vmm/pdmapi.h>
|
||||
+#if 0
|
||||
#include <VBox/vmm/pdmasynccompletion.h>
|
||||
#include <VBox/vmm/pdmnetifs.h>
|
||||
+#endif
|
||||
#ifdef VBOX_WITH_USB
|
||||
# include <VBox/vmm/pdmusb.h>
|
||||
#endif
|
||||
+#if 0
|
||||
#ifdef VBOX_WITH_NETSHAPER
|
||||
# include <VBox/vmm/pdmnetshaper.h>
|
||||
#endif /* VBOX_WITH_NETSHAPER */
|
||||
@@ -109,14 +125,17 @@
|
||||
@@ -109,14 +123,17 @@
|
||||
#include <VBox/vusb.h>
|
||||
|
||||
#include <VBox/VMMDev.h>
|
||||
@ -421,7 +414,7 @@ index 69e3109..141bb98 100644
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
#include <memory> // for auto_ptr
|
||||
@@ -278,6 +297,8 @@ struct VMSaveTask : public VMTask
|
||||
@@ -278,6 +295,8 @@ struct VMSaveTask : public VMTask
|
||||
Reason_T mReason;
|
||||
};
|
||||
|
||||
@ -430,7 +423,7 @@ index 69e3109..141bb98 100644
|
||||
// Handler for global events
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
inline static const char *networkAdapterTypeToName(NetworkAdapterType_T adapterType);
|
||||
@@ -383,6 +404,7 @@ typedef ListenerImpl<VmEventListener, Console*> VmEventListenerImpl;
|
||||
@@ -383,6 +402,7 @@ typedef ListenerImpl<VmEventListener, Console*> VmEventListenerImpl;
|
||||
|
||||
VBOX_LISTENER_DECLARE(VmEventListenerImpl)
|
||||
|
||||
@ -438,7 +431,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
// constructor / destructor
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -530,6 +552,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
@@ -530,6 +550,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
rc = mDisplay->init(this);
|
||||
AssertComRCReturnRC(rc);
|
||||
|
||||
@ -446,7 +439,7 @@ index 69e3109..141bb98 100644
|
||||
unconst(mVRDEServerInfo).createObject();
|
||||
rc = mVRDEServerInfo->init(this);
|
||||
AssertComRCReturnRC(rc);
|
||||
@@ -538,6 +561,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
@@ -538,6 +559,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
rc = mEmulatedUSB->init(this);
|
||||
AssertComRCReturnRC(rc);
|
||||
|
||||
@ -454,7 +447,7 @@ index 69e3109..141bb98 100644
|
||||
/* Grab global and machine shared folder lists */
|
||||
|
||||
rc = fetchSharedFolders(true /* aGlobal */);
|
||||
@@ -545,10 +569,12 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
@@ -545,10 +567,12 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
rc = fetchSharedFolders(false /* aGlobal */);
|
||||
AssertComRCReturnRC(rc);
|
||||
|
||||
@ -467,7 +460,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
/* Figure out size of meAttachmentType vector */
|
||||
ComPtr<IVirtualBox> pVirtualBox;
|
||||
@@ -574,9 +600,11 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
@@ -574,9 +598,11 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
// unconst(m_pVMMDev) = new VMMDev(this);
|
||||
// AssertReturn(mVMMDev, E_FAIL);
|
||||
|
||||
@ -479,7 +472,7 @@ index 69e3109..141bb98 100644
|
||||
FirmwareType_T enmFirmwareType;
|
||||
mMachine->COMGETTER(FirmwareType)(&enmFirmwareType);
|
||||
if ( enmFirmwareType == FirmwareType_EFI
|
||||
@@ -584,8 +612,10 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
@@ -584,8 +610,10 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
|| enmFirmwareType == FirmwareType_EFI64
|
||||
|| enmFirmwareType == FirmwareType_EFIDUAL)
|
||||
{
|
||||
@ -490,7 +483,7 @@ index 69e3109..141bb98 100644
|
||||
}
|
||||
|
||||
#ifdef VBOX_WITH_USB_CARDREADER
|
||||
@@ -593,6 +623,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
@@ -593,6 +621,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
AssertReturn(mUsbCardReader, E_FAIL);
|
||||
#endif
|
||||
|
||||
@ -498,7 +491,7 @@ index 69e3109..141bb98 100644
|
||||
/* VirtualBox events registration. */
|
||||
{
|
||||
ComPtr<IEventSource> pES;
|
||||
@@ -609,6 +640,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
@@ -609,6 +638,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
rc = pES->RegisterListener(aVmListener, ComSafeArrayAsInParam(eventTypes), true);
|
||||
AssertComRC(rc);
|
||||
}
|
||||
@ -506,7 +499,7 @@ index 69e3109..141bb98 100644
|
||||
}
|
||||
|
||||
/* Confirm a successful initialization when it's the case */
|
||||
@@ -625,6 +657,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
@@ -625,6 +655,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl, Loc
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -514,7 +507,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* Uninitializes the Console object.
|
||||
*/
|
||||
@@ -1035,6 +1068,8 @@ void Console::guestPropertiesVRDPUpdateDisconnect(uint32_t u32ClientId)
|
||||
@@ -1035,6 +1066,8 @@ void Console::guestPropertiesVRDPUpdateDisconnect(uint32_t u32ClientId)
|
||||
|
||||
#endif /* VBOX_WITH_GUEST_PROPS */
|
||||
|
||||
@ -523,7 +516,7 @@ index 69e3109..141bb98 100644
|
||||
bool Console::isResetTurnedIntoPowerOff(void)
|
||||
{
|
||||
Bstr value;
|
||||
@@ -1046,6 +1081,8 @@ bool Console::isResetTurnedIntoPowerOff(void)
|
||||
@@ -1046,6 +1079,8 @@ bool Console::isResetTurnedIntoPowerOff(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -532,7 +525,7 @@ index 69e3109..141bb98 100644
|
||||
#ifdef VBOX_WITH_EXTPACK
|
||||
/**
|
||||
* Used by VRDEServer and others to talke to the extension pack manager.
|
||||
@@ -1505,6 +1542,7 @@ void Console::VRDPInterceptClipboard(uint32_t u32ClientId)
|
||||
@@ -1505,6 +1540,7 @@ void Console::VRDPInterceptClipboard(uint32_t u32ClientId)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -540,7 +533,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
//static
|
||||
const char *Console::sSSMConsoleUnit = "ConsoleData";
|
||||
@@ -1970,6 +2008,8 @@ STDMETHODIMP Console::COMGETTER(Display)(IDisplay **aDisplay)
|
||||
@@ -1970,6 +2006,8 @@ STDMETHODIMP Console::COMGETTER(Display)(IDisplay **aDisplay)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -549,7 +542,7 @@ index 69e3109..141bb98 100644
|
||||
STDMETHODIMP Console::COMGETTER(Debugger)(IMachineDebugger **aDebugger)
|
||||
{
|
||||
CheckComArgOutPointerValid(aDebugger);
|
||||
@@ -2069,6 +2109,7 @@ Console::COMGETTER(SharedFolders)(ComSafeArrayOut(ISharedFolder *, aSharedFolder
|
||||
@@ -2069,6 +2107,7 @@ Console::COMGETTER(SharedFolders)(ComSafeArrayOut(ISharedFolder *, aSharedFolder
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -557,7 +550,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
STDMETHODIMP Console::COMGETTER(EventSource)(IEventSource ** aEventSource)
|
||||
{
|
||||
@@ -2085,6 +2126,8 @@ STDMETHODIMP Console::COMGETTER(EventSource)(IEventSource ** aEventSource)
|
||||
@@ -2085,6 +2124,8 @@ STDMETHODIMP Console::COMGETTER(EventSource)(IEventSource ** aEventSource)
|
||||
return hrc;
|
||||
}
|
||||
|
||||
@ -566,7 +559,7 @@ index 69e3109..141bb98 100644
|
||||
STDMETHODIMP Console::COMGETTER(AttachedPCIDevices)(ComSafeArrayOut(IPCIDeviceAttachment *, aAttachments))
|
||||
{
|
||||
CheckComArgOutSafeArrayPointerValid(aAttachments);
|
||||
@@ -2134,6 +2177,7 @@ STDMETHODIMP Console::COMSETTER(UseHostClipboard)(BOOL aUseHostClipboard)
|
||||
@@ -2134,6 +2175,7 @@ STDMETHODIMP Console::COMSETTER(UseHostClipboard)(BOOL aUseHostClipboard)
|
||||
// IConsole methods
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -574,7 +567,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
STDMETHODIMP Console::PowerUp(IProgress **aProgress)
|
||||
{
|
||||
@@ -2291,6 +2335,8 @@ STDMETHODIMP Console::PowerDown(IProgress **aProgress)
|
||||
@@ -2291,6 +2333,8 @@ STDMETHODIMP Console::PowerDown(IProgress **aProgress)
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -583,6 +576,22 @@ index 69e3109..141bb98 100644
|
||||
STDMETHODIMP Console::Reset()
|
||||
{
|
||||
LogFlowThisFuncEnter();
|
||||
@@ -2579,6 +2623,7 @@ STDMETHODIMP Console::Resume()
|
||||
LogFlowThisFuncLeave();
|
||||
return rc;
|
||||
}
|
||||
+#endif
|
||||
|
||||
STDMETHODIMP Console::PowerButton()
|
||||
{
|
||||
@@ -2625,6 +2670,7 @@ STDMETHODIMP Console::PowerButton()
|
||||
return rc;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
STDMETHODIMP Console::GetPowerButtonHandled(BOOL *aHandled)
|
||||
{
|
||||
LogFlowThisFuncEnter();
|
||||
@@ -3451,6 +3497,8 @@ STDMETHODIMP Console::RestoreSnapshot(ISnapshot *aSnapshot, IProgress **aProgres
|
||||
return S_OK;
|
||||
}
|
||||
@ -619,25 +628,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* Parses one key value pair.
|
||||
*
|
||||
@@ -5333,6 +5387,8 @@ HRESULT Console::onSharedFolderChange(BOOL aGlobal)
|
||||
return rc;
|
||||
}
|
||||
|
||||
+#endif
|
||||
+
|
||||
/**
|
||||
* Called by IInternalSessionControl::OnUSBDeviceAttach() or locally by
|
||||
* processRemoteUSBDevices() after IInternalMachineControl::RunUSBDeviceFilters()
|
||||
@@ -5499,7 +5555,7 @@ HRESULT Console::onUSBDeviceDetach(IN_BSTR aId,
|
||||
return E_FAIL;
|
||||
#endif /* !VBOX_WITH_USB */
|
||||
}
|
||||
-
|
||||
+#if 0
|
||||
/**
|
||||
* Called by IInternalSessionControl::OnBandwidthGroupChange().
|
||||
*
|
||||
@@ -6490,6 +6546,8 @@ void Console::onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelati
|
||||
@@ -6490,6 +6544,8 @@ void Console::onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelati
|
||||
fireMouseCapabilityChangedEvent(mEventSource, supportsAbsolute, supportsRelative, supportsMT, needsHostCursor);
|
||||
}
|
||||
|
||||
@ -646,7 +637,7 @@ index 69e3109..141bb98 100644
|
||||
void Console::onStateChange(MachineState_T machineState)
|
||||
{
|
||||
AutoCaller autoCaller(this);
|
||||
@@ -6497,6 +6555,8 @@ void Console::onStateChange(MachineState_T machineState)
|
||||
@@ -6497,6 +6553,8 @@ void Console::onStateChange(MachineState_T machineState)
|
||||
fireStateChangedEvent(mEventSource, machineState);
|
||||
}
|
||||
|
||||
@ -655,7 +646,7 @@ index 69e3109..141bb98 100644
|
||||
void Console::onAdditionsStateChange()
|
||||
{
|
||||
AutoCaller autoCaller(this);
|
||||
@@ -6555,6 +6615,8 @@ void Console::onUSBDeviceStateChange(IUSBDevice *aDevice, bool aAttached,
|
||||
@@ -6555,6 +6613,8 @@ void Console::onUSBDeviceStateChange(IUSBDevice *aDevice, bool aAttached,
|
||||
fireUSBDeviceStateChangedEvent(mEventSource, aDevice, aAttached, aError);
|
||||
}
|
||||
|
||||
@ -664,7 +655,7 @@ index 69e3109..141bb98 100644
|
||||
void Console::onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage)
|
||||
{
|
||||
AutoCaller autoCaller(this);
|
||||
@@ -6563,6 +6625,8 @@ void Console::onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage)
|
||||
@@ -6563,6 +6623,8 @@ void Console::onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage)
|
||||
fireRuntimeErrorEvent(mEventSource, aFatal, aErrorID, aMessage);
|
||||
}
|
||||
|
||||
@ -673,7 +664,7 @@ index 69e3109..141bb98 100644
|
||||
HRESULT Console::onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId)
|
||||
{
|
||||
AssertReturn(aCanShow, E_POINTER);
|
||||
@@ -6626,6 +6690,8 @@ HRESULT Console::onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId)
|
||||
@@ -6626,6 +6688,8 @@ HRESULT Console::onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -682,7 +673,7 @@ index 69e3109..141bb98 100644
|
||||
// private methods
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -6819,6 +6885,8 @@ HRESULT Console::consoleInitReleaseLog(const ComPtr<IMachine> aMachine)
|
||||
@@ -6819,6 +6883,8 @@ HRESULT Console::consoleInitReleaseLog(const ComPtr<IMachine> aMachine)
|
||||
}
|
||||
}
|
||||
|
||||
@ -691,7 +682,7 @@ index 69e3109..141bb98 100644
|
||||
char szError[RTPATH_MAX + 128];
|
||||
int vrc = com::VBoxLogRelCreate("VM", logFile.c_str(),
|
||||
RTLOGFLAGS_PREFIX_TIME_PROG | RTLOGFLAGS_RESTRICT_GROUPS,
|
||||
@@ -6839,6 +6907,8 @@ HRESULT Console::consoleInitReleaseLog(const ComPtr<IMachine> aMachine)
|
||||
@@ -6839,6 +6905,8 @@ HRESULT Console::consoleInitReleaseLog(const ComPtr<IMachine> aMachine)
|
||||
if (SUCCEEDED(hrc) || cHistoryFiles)
|
||||
RTDirFlush(logDir.c_str());
|
||||
|
||||
@ -700,7 +691,7 @@ index 69e3109..141bb98 100644
|
||||
return hrc;
|
||||
}
|
||||
|
||||
@@ -7113,6 +7183,10 @@ HRESULT Console::powerUp(IProgress **aProgress, bool aPaused)
|
||||
@@ -7113,6 +7181,10 @@ HRESULT Console::powerUp(IProgress **aProgress, bool aPaused)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -711,7 +702,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
// If there is immutable drive the process that.
|
||||
VMPowerUpTask::ProgressList progresses(task->hardDiskProgresses);
|
||||
@@ -7123,7 +7197,8 @@ HRESULT Console::powerUp(IProgress **aProgress, bool aPaused)
|
||||
@@ -7123,7 +7195,8 @@ HRESULT Console::powerUp(IProgress **aProgress, bool aPaused)
|
||||
++cOperations;
|
||||
ulTotalOperationsWeight += 1;
|
||||
}
|
||||
@ -721,7 +712,7 @@ index 69e3109..141bb98 100644
|
||||
progressDesc.raw(),
|
||||
TRUE, // Cancelable
|
||||
cOperations,
|
||||
@@ -7136,13 +7211,15 @@ HRESULT Console::powerUp(IProgress **aProgress, bool aPaused)
|
||||
@@ -7136,13 +7209,15 @@ HRESULT Console::powerUp(IProgress **aProgress, bool aPaused)
|
||||
else if ( mMachineState == MachineState_Saved
|
||||
|| (!fTeleporterEnabled && !fFaultToleranceSyncEnabled))
|
||||
{
|
||||
@ -739,7 +730,7 @@ index 69e3109..141bb98 100644
|
||||
progressDesc.raw(),
|
||||
TRUE /* aCancelable */,
|
||||
3 /* cOperations */,
|
||||
@@ -7153,7 +7230,8 @@ HRESULT Console::powerUp(IProgress **aProgress, bool aPaused)
|
||||
@@ -7153,7 +7228,8 @@ HRESULT Console::powerUp(IProgress **aProgress, bool aPaused)
|
||||
}
|
||||
else if (fFaultToleranceSyncEnabled)
|
||||
{
|
||||
@ -749,7 +740,7 @@ index 69e3109..141bb98 100644
|
||||
progressDesc.raw(),
|
||||
TRUE /* aCancelable */,
|
||||
3 /* cOperations */,
|
||||
@@ -7399,6 +7477,7 @@ HRESULT Console::powerDown(IProgress *aProgress /*= NULL*/)
|
||||
@@ -7399,6 +7475,7 @@ HRESULT Console::powerDown(IProgress *aProgress /*= NULL*/)
|
||||
* safe to release the object lock now if needed)
|
||||
* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -757,7 +748,7 @@ index 69e3109..141bb98 100644
|
||||
/* Stop the VRDP server to prevent new clients connection while VM is being
|
||||
* powered off. */
|
||||
if (mConsoleVRDPServer)
|
||||
@@ -7413,6 +7492,7 @@ HRESULT Console::powerDown(IProgress *aProgress /*= NULL*/)
|
||||
@@ -7413,6 +7490,7 @@ HRESULT Console::powerDown(IProgress *aProgress /*= NULL*/)
|
||||
|
||||
alock.acquire();
|
||||
}
|
||||
@ -765,7 +756,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
/* advance percent count */
|
||||
if (aProgress)
|
||||
@@ -7649,6 +7729,8 @@ HRESULT Console::setMachineState(MachineState_T aMachineState,
|
||||
@@ -7649,6 +7727,8 @@ HRESULT Console::setMachineState(MachineState_T aMachineState,
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -774,7 +765,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* Searches for a shared folder with the given logical name
|
||||
* in the collection of shared folders.
|
||||
@@ -7684,6 +7766,8 @@ HRESULT Console::findSharedFolder(const Utf8Str &strName,
|
||||
@@ -7684,6 +7764,8 @@ HRESULT Console::findSharedFolder(const Utf8Str &strName,
|
||||
return VBOX_E_FILE_ERROR;
|
||||
}
|
||||
|
||||
@ -783,7 +774,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* Fetches the list of global or machine shared folders from the server.
|
||||
*
|
||||
@@ -8390,6 +8474,8 @@
|
||||
@@ -8390,6 +8472,8 @@ void Console::changeClipboardMode(ClipboardMode_T aClipboardMode)
|
||||
pVMMDev->hgcmHostCall("VBoxSharedClipboard", VBOX_SHARED_CLIPBOARD_HOST_FN_SET_MODE, 1, &parm);
|
||||
}
|
||||
|
||||
@ -792,33 +783,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* Changes the drag'n_drop mode.
|
||||
*
|
||||
@@ -8426,7 +8512,7 @@ void Console::changeDragAndDropMode(DragAndDropMode_T aDragAndDropMode)
|
||||
|
||||
pVMMDev->hgcmHostCall("VBoxDragAndDropSvc", DragAndDropSvc::HOST_DND_SET_MODE, 1, &parm);
|
||||
}
|
||||
-
|
||||
+#endif /* if 0 */
|
||||
#ifdef VBOX_WITH_USB
|
||||
/**
|
||||
* Sends a request to VMM to attach the given host device.
|
||||
@@ -8472,6 +8558,7 @@ HRESULT Console::attachUSBDevice(IUSBDevice *aHostDevice, ULONG aMaskedIfs)
|
||||
Address.c_str(), uuid.raw()));
|
||||
|
||||
void *pvRemoteBackend = NULL;
|
||||
+#if 0
|
||||
if (fRemote)
|
||||
{
|
||||
RemoteUSBDevice *pRemoteUSBDevice = static_cast<RemoteUSBDevice *>(aHostDevice);
|
||||
@@ -8479,7 +8566,7 @@ HRESULT Console::attachUSBDevice(IUSBDevice *aHostDevice, ULONG aMaskedIfs)
|
||||
if (!pvRemoteBackend)
|
||||
return E_INVALIDARG; /* The clientId is invalid then. */
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
USHORT portVersion = 1;
|
||||
hrc = aHostDevice->COMGETTER(PortVersion)(&portVersion);
|
||||
AssertComRCReturnRC(hrc);
|
||||
@@ -8590,12 +8677,13 @@ HRESULT Console::detachUSBDevice(const ComObjPtr<OUSBDevice> &aHostDevice)
|
||||
@@ -8590,12 +8674,13 @@ HRESULT Console::detachUSBDevice(const ComObjPtr<OUSBDevice> &aHostDevice)
|
||||
setErrorStatic(hrc2, "GetRemote() failed");
|
||||
|
||||
PCRTUUID pUuid = aHostDevice->id().raw();
|
||||
@ -833,16 +798,7 @@ index 69e3109..141bb98 100644
|
||||
alock.release();
|
||||
int vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), 0 /* idDstCpu (saved state, see #6232) */,
|
||||
(PFNRT)usbDetachCallback, 5,
|
||||
@@ -8639,7 +8727,7 @@ Console::usbDetachCallback(Console *that, PUVM pUVM, PCRTUUID aUuid)
|
||||
return vrc;
|
||||
}
|
||||
#endif /* VBOX_WITH_USB */
|
||||
-
|
||||
+#if 0
|
||||
/* Note: FreeBSD needs this whether netflt is used or not. */
|
||||
#if ((defined(RT_OS_LINUX) && !defined(VBOX_WITH_NETFLT)) || defined(RT_OS_FREEBSD))
|
||||
/**
|
||||
@@ -8875,6 +8963,8 @@ HRESULT Console::detachFromTapInterface(INetworkAdapter *networkAdapter)
|
||||
@@ -8875,6 +8960,8 @@ HRESULT Console::detachFromTapInterface(INetworkAdapter *networkAdapter)
|
||||
}
|
||||
#endif /* (RT_OS_LINUX || RT_OS_FREEBSD) && !VBOX_WITH_NETFLT */
|
||||
|
||||
@ -851,19 +807,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* Called at power down to terminate host interface networking.
|
||||
*
|
||||
@@ -9046,9 +9136,10 @@ HRESULT Console::captureUSBDevices(PUVM pUVM)
|
||||
* us back from under its lock (e.g. onUSBDeviceAttach()) which would
|
||||
* produce an inter-process dead-lock otherwise. */
|
||||
alock.release();
|
||||
-
|
||||
+#if 0
|
||||
HRESULT hrc = mControl->AutoCaptureUSBDevices();
|
||||
ComAssertComRCRetRC(hrc);
|
||||
+#endif
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -9077,6 +9168,8 @@ void Console::detachAllUSBDevices(bool aDone)
|
||||
@@ -9077,6 +9164,8 @@ void Console::detachAllUSBDevices(bool aDone)
|
||||
mControl->DetachAllUSBDevices(aDone);
|
||||
}
|
||||
|
||||
@ -872,7 +816,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* @note Locks this object for writing.
|
||||
*/
|
||||
@@ -9249,6 +9342,8 @@ void Console::processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *p
|
||||
@@ -9249,6 +9338,8 @@ void Console::processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *p
|
||||
LogFlowThisFuncLeave();
|
||||
}
|
||||
|
||||
@ -881,7 +825,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* Progress cancelation callback for fault tolerance VM poweron
|
||||
*/
|
||||
@@ -9346,6 +9441,7 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
@@ -9346,6 +9437,7 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
/* Create the VRDP server. In case of headless operation, this will
|
||||
* also create the framebuffer, required at VM creation.
|
||||
*/
|
||||
@ -889,7 +833,7 @@ index 69e3109..141bb98 100644
|
||||
ConsoleVRDPServer *server = pConsole->consoleVRDPServer();
|
||||
Assert(server);
|
||||
|
||||
@@ -9392,6 +9488,7 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
@@ -9392,6 +9484,7 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
vrc, errMsg.c_str()));
|
||||
throw setErrorStatic(E_FAIL, errMsg.c_str());
|
||||
}
|
||||
@ -897,7 +841,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
ComPtr<IMachine> pMachine = pConsole->machine();
|
||||
ULONG cCpus = 1;
|
||||
@@ -9416,8 +9513,10 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
@@ -9416,8 +9509,10 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
|
||||
alock.acquire();
|
||||
|
||||
@ -908,7 +852,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
if (RT_SUCCESS(vrc))
|
||||
{
|
||||
@@ -9441,9 +9540,11 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
@@ -9441,9 +9536,11 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
/*
|
||||
* Synchronize debugger settings
|
||||
*/
|
||||
@ -920,7 +864,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
/*
|
||||
* Shared Folders
|
||||
@@ -9719,6 +9820,7 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
@@ -9719,6 +9816,7 @@ DECLCALLBACK(int) Console::powerUpThread(RTTHREAD Thread, void *pvUser)
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
@ -928,7 +872,7 @@ index 69e3109..141bb98 100644
|
||||
|
||||
/**
|
||||
* Reconfigures a medium attachment (part of taking or deleting an online snapshot).
|
||||
@@ -10209,6 +10311,8 @@ DECLCALLBACK(int) Console::saveStateThread(RTTHREAD Thread, void *pvUser)
|
||||
@@ -10209,6 +10307,8 @@ DECLCALLBACK(int) Console::saveStateThread(RTTHREAD Thread, void *pvUser)
|
||||
return VINF_SUCCESS;
|
||||
}
|
||||
|
||||
@ -937,7 +881,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* Thread for powering down the Console.
|
||||
*
|
||||
@@ -10367,8 +10471,6 @@ Console::i_pdmIfSecKey_KeyRelease(PPDMISECKEY pInterface, const char *pszId)
|
||||
@@ -10367,8 +10467,6 @@ Console::i_pdmIfSecKey_KeyRelease(PPDMISECKEY pInterface, const char *pszId)
|
||||
}
|
||||
|
||||
|
||||
@ -946,7 +890,7 @@ index 69e3109..141bb98 100644
|
||||
/**
|
||||
* The Main status driver instance data.
|
||||
*/
|
||||
@@ -10461,9 +10563,11 @@ DECLCALLBACK(int) Console::drvStatus_MediumEjected(PPDMIMEDIANOTIFY pInterface,
|
||||
@@ -10461,9 +10559,11 @@ DECLCALLBACK(int) Console::drvStatus_MediumEjected(PPDMIMEDIANOTIFY pInterface,
|
||||
alock.release();
|
||||
|
||||
ComPtr<IMediumAttachment> pNewMediumAtt;
|
||||
|
@ -10,7 +10,6 @@ SRC_CC = frontend/main.cc frontend/console.cc \
|
||||
frontend/VBoxAPIWrap/MediumFormatWrap.cpp \
|
||||
frontend/VBoxAPIWrap/TokenWrap.cpp \
|
||||
frontend/VirtualBoxErrorInfoImpl.cpp \
|
||||
frontend/USBProxyDevice-genode.cpp \
|
||||
devices.cc drivers.cc dummies.cc libc.cc \
|
||||
logger.cc mm.cc pdm.cc pgm.cc rt.cc sup.cc iommio.cc ioport.cc \
|
||||
hm.cc thread.cc dynlib.cc unimpl.cc
|
||||
@ -33,8 +32,6 @@ INC_DIR += $(call select_from_repositories,src/lib/pthread)
|
||||
|
||||
INC_DIR += $(VBOX_DIR)/Runtime/include
|
||||
|
||||
SRC_CC += HostDrivers/VBoxUSB/USBFilter.cpp
|
||||
|
||||
SRC_CC += HostServices/SharedFolders/service.cpp
|
||||
SRC_CC += HostServices/SharedFolders/mappings.cpp
|
||||
SRC_CC += HostServices/SharedFolders/vbsf.cpp
|
||||
@ -53,7 +50,6 @@ INC_DIR += $(REP_DIR)/src/virtualbox/frontend
|
||||
INC_DIR += $(REP_DIR)/src/virtualbox/frontend/VBoxAPIWrap
|
||||
|
||||
INC_DIR += $(VBOX_DIR)/Main/xml
|
||||
INC_DIR += $(VBOX_DIR)/Devices/USB
|
||||
INC_DIR += $(VBOX_DIR)/HostServices
|
||||
|
||||
# search path to 'scan_code_set_2.h'
|
||||
|
@ -122,6 +122,8 @@ DUMMY(RTPathAppend)
|
||||
DUMMY(RTPathChangeToDosSlashes)
|
||||
DUMMY(RTSemEventWaitEx)
|
||||
|
||||
DUMMY(RTMemDupExTag)
|
||||
DUMMY(RTMemDupTag)
|
||||
DUMMY(RTMemExecFree)
|
||||
|
||||
DUMMY(SELMR3GetSelectorInfo)
|
||||
|
Loading…
x
Reference in New Issue
Block a user